GalCiv II IDE

Its in the works

Hey everybody! So I was sitting on 'the can' when I hate a great idea, an application that lets you build a technology and generates the xml for you!

I've already written the base classes for it and one of the forms. Here is the basic architecture behind it:

Tag class:
String Name
String Value
and a GetXML method overloaded twice

Technology class:
String Type
String ID
Tag DisplayName, Description, Details, Cost, Bonuses(this is an array), Model, AIValue, Requires

Those are the base classes i'm using. The Name will be what the tag is, and this is set in the Technology class' constructor ( for example, the 'Name' property of the DisplayName Tag object is 'DisplayName'). The 'Value' property is self-explanatory.

The main form will consist of a listbox of created techs, an Add button, Delete button, Edit button, Clear List button, and Generate XML button.

The second form will be where you specify the values of the various tags. However, I'm not sure how to do the Bonuses. I'm pretty sure I'll make a third form with a dropdown list of the various bonus names and a text box to enter the values, but I need to make sure there aren't duplicate entries.

I know most of you are smart enough not to do something that would break the xml, but there will be the occasional user who says 'my ex em el don't work! y u macke badd prograhm?' Which is why making a robust program is hard, because idiots can use computers too.

Anyway, what do you guys think? I'll try to get it finished asap. When I'm finished I'll be needing beta testers, so PM me your emails and I'll send you the program, but not until i'm finished!

Oh yeah, after I get this one to work I want to make one for Planetary Improvements and some of the others. But I'm starting with Techs because I'm familiar with it.
19,324 views 26 replies
Reply #1 Top
Since I've just finished a Scenario&CampaignEditor, I 've started coding a MapEditor...called the whole thing GC2IDE.
What language is your project written in? We may join our efforts/work?though, in my opinion , its kind of " useless gimmick" and not worth the effort, since its just xml. However same applies for maps BUT an overall IDE with that feature might adress completely unexperienced users in building mods. I tried to rebuild the gc2builder for DL&DA and the UI as intuitive as possible, and I also would need testers...
Reply #2 Top
Mine is in C#, which i'm pretty sure yours isn't As most people still use C++ and VB.

I had a similar idea (makeing a whole package), and the same motivation (help those who don't know xml to make simple mods). Plus, its fun to program and it'll mean makeing my own mods will be easier. XML is so tedious.

I actually don't have DA, so that might be a problem.
Reply #3 Top
Well, thats what i wanted to read, I'm a language "hopper" mine is in .net2.0 if yours were in 2.0 as well, we could join work(even 1.1 should't be a problem). But the we should talk about an Interface, my project(mdi) loads via stings into a fileobject(i.e.gc2scen(campaign) or map-file)
tried to "copy" basics of VisualStudio UI, however still very raw
Should't be a problem, if you don't have da, since directory structure is similar, and files are still the same plus no new files i think, so you would only have to dynamically change the path from galciv2 to da via a options toolbar writing into eg. mysettings a path value), but i set up such a basic environment already.
btw. do you have an idea how to "visualize" a map without using managed dx, because i want to have a simple "oldschool" topdown view
i found 2 solutions:
1. draw all mapaccess with graphics object
2. build custom controls for each maptype, containing mapsizes respectively, since performance for one dynamic mapcontrol is very poor
I decided for 2. despite performance issues which i reduced to an acceptable level.
Actual standing: all file operation and parsing things done...
mapcontrol work in progress
Any other ideas?
Reply #5 Top
Please don't take this in a harsh way, but I'm having a hard time interpreting your slightly jumbled post.

Here is what I picked up:
1. You want to know about my UI, i'll get a pic up of my forms up in three hours (in class right now, I really shouldn't even be posting this, i'm in a lecture right now).

2. Your using .NET2.0, I'm using .NET 1.1, and thus our programs should be compatible.

3. Something about changeing the file path for saveing the xml, if thats what you meant, i intended to do so. We're already thinking alike

4. You want my ideas about a way to visualize the map for your MapEditor. I don't get #2, but number one sounds alright. I'll wait to give any advice until you give a more thorough explanation of #2.

@Drengin: Sounds pretty good to me!
Reply #6 Top
Number two would be a usercontrol containing a prerendered Map, build with a tablelayoutpanel(new in 2.0) and a sort of "Button-Matix" each button representing a parsec, which simply had to change e.g its image when placing a star/planet--so my thought, you would not have to write a whole drawing engine, just simple aritmethics and logics ...but im still experimenting -- i guess that is what gc2builder does
In theory this solution should reduce code, since tlps have buildin methods to get a cells/controls position at x/y(representing a cell) within tlp, thus matching already maps sector/parsec coords--in theory!?
would be looking like this:
Free Image Hosting at www.ImageShack.us


#3. i meant just a simple option to switch between dl&da, didn't mean changing the path for savefiledialog since Path only differs in ../DarkAvatar/Data... instead of ...GalCiv2/Data/...

Reply #7 Top
Number two would be a usercontrol -- a prerendered Mapcontrol , build with a tablelayoutpanel(TLP ,new in 2.0) and a sort of "Button-Matix" each button representing a parsec, which simply had to change e.g its image when accessing the map(add/remove object)--so my thought, you would not have to write a whole drawing engine, just simple aritmethics and logics ...but im still experimenting -- i guess that is what gc2builder does
In theory this solution should reduce code, since tlps have builtin methods to get/set a cells/controls position at x/y(representing a cell) within tlp, thus matching already maps sector/parsec coords--in theory!?there are also apropriate events(eg mousehover) and args (eg. paint) already available via tlp.tlps work like html tables on form
I think its the way to go using tlps, but i'm not sure about the buttons considering a gigantic map and its performance. maybe it will be a comnination of tlps and painting...
would be looking like this:
Free Image Hosting at www.ImageShack.us


3. Something about changeing the file path for saveing the xml, if thats what you meant, i intended to do so. We're already thinking alike


or opening..., yes you are right, i've set that up already, however without mods folder support yet
sorry for the english in my first post, i was in hurry, and when in hurry, english suffers, since its not my native language

oops, double entry on edit ignore post above
screenshot of the working modules:
Free Image Hosting at www.ImageShack.us
Is your app mdi or sdi?
Reply #8 Top
Okay, here is my main form:




I just noticed I haven't added a 'Close' button yet, but that will take all of thirty seconds (Visual Studio is my friend )

This is my other two forms, they are pretty self explanatory:



It sounds like you should see which one is faster (for the map ui thing).

mdi? sdi?
Reply #9 Top
zen)theStormWeaver
This is my other two forms, they are pretty self explanatory:


I notice you don't seem to have a box for the Group tag the techtree uses to group techs together (i.e. laser 1 2 3 4 5 are all in the Laser group)
Reply #10 Top
You mean like the Government 'group' in the culture techs? Thats actually a 'Category' tag, which I have.
Reply #11 Top
I'm pretty sure that group is a seperate & different tag from category. I don't think that DL had groups but DA does. Lets see if this works or if it makes a lot of spam:

 <Culture ID="Diplomatic Relations">
<DisplayName>Diplomatic Relations</DisplayName>
<Cost>100</Cost>
<Description>Enables us to set up embassies with other civilizations.</Description>
<Details>The trick to having good relations with alien species is to first avoid killing them. This may be harder than one might think as many aliens are just incredibly disgusting. We have discovered many handy tips such as this in our research. Part of our strategy should be to expand our cultural influence into the galaxy. We can now build embassies on our worlds which will do just that.</Details>
<Requires>UniversalTranslator</Requires>
<Category>Diplomacy</Category>
<DiplomacyAbility>10</DiplomacyAbility>
<Model>instantcom0</Model>
<AIValue>7</AIValue>
<Group>Diplomacy</Group>
</Culture>
<Culture ID="Advanced Diplomacy">
<DisplayName>Advanced Diplomacy</DisplayName>
<Cost>500</Cost>
<Description>Improves our ability to persuade other races of our point of view.</Description>
<Details>Note to self: "Pull my finger" is not a universal greeting. Gaffes such as this one can be greatly reduced and, we hope, eliminated entirely as our diplomacy becomes more advanced and our understanding of other cultures (rather humorless cultures, some would say) increases.</Details>
<Requires>Diplomatic Relations</Requires>
<Category>Diplomacy</Category>
<DiplomacyAbility>10</DiplomacyAbility>
<Model>instantcom0</Model>
<AIValue>3</AIValue>
<Group>Diplomacy</Group>
</Culture>
<Culture ID="Expert Diplomacy">
<DisplayName>Expert Diplomacy</DisplayName>
<Cost>1000</Cost>
<Description>Make people like you.</Description>
<Details>Stories about intoxication don't win friends and influence people. Except Drengin. Small details like this are really useful in suborning...uh...getting to know our galactic neighbors. Did you know the Drengin really like to sing campfire songs and hold hands? Okay, see, that's just the kind of thing we want to avoid. They really don't like that stuff, so "Expert Diplomacy" is of paramount importance.</Details>
<Requires>Advanced Diplomacy</Requires>
<Category>Diplomacy</Category>
<DiplomacyAbility>10</DiplomacyAbility>
<Model>instantcom0</Model>
<AIValue>1</AIValue>
<Group>Diplomacy</Group>
</Culture>
 

Reply #12 Top
mdi=multi document interface (see my 2nd screen)
sdi=single document interface (see you screen i think )
Qustion answered by your screen, its sdi, what is good if we want to join work later.
Thats what I meant with "we need an Interface", because mdi mainform calls all fileoperations(load,save,new), I'll implement one and post code for you asap.
Concerning a possible MapControl, I may found a fast way--but needs testing.
Goal would be a mapcontol, which is 3x3 sectors min and 18x18 sectors max, and being configured through a propertygridbox(the thingy from VS which lets you configure a controls properties), same plan for mapobjects once clicked it appears in the propertygridbox and can be configured/shown
At the moment, i'm writing a zoom functionality for the control...

Maybe you could expand the threads title to gc2ide as well? I have started my own thread and don't want to keep 2 threads uptodate, me may ask kryo to "weave" myone into that one ...
Reply #13 Top
The Group tag is new in DA and , however it is freely namable and just puts on techbranch into one box with the proper count of techsections within the branch. I tried it out and made a "repairtech" mod where i put in a grouptag repair.
I wonder if DL would ignore or crash when using such a tech?
Reply #14 Top
It would probably ignore it, it ignores the [WeaponsAbility] tag if you leave out the 's' at the end of Weapons. It'll probably assume you misspelled or something.
Reply #15 Top
then you don' have to distinct between DL & DA
Reply #16 Top
I think you should know that I have three seperate form objects/classes: frmMain, frmAddTech, and frmBonus. When you click on the Add Tech button a frmAddTech object is created, shown, and given focus. When you click on the Add or Edit Bonus buttons the third form is created, shown, and given focus. When its time to go back to the previous form for some reason or another, the current form gives focus back and closes itself. Not before sending some info to a method in the previous form, if the situation calls for it (confirming an add/edit for example).

I'm not so sure that qualifies as an sdi, but I didn't know what that was until a few hours ago. So, yeah.
Reply #18 Top
A good idea. I had kinda thought of something like this but the idea is to take it to the next level, the chance to add random elements such as variations on the cost and abilities and 50/50 chance of having one prereq or another. So each time the XML is generated, it could be different!
Reply #19 Top
That wouldn't be to hard to implement, but I'm not going to do it
No offense, its an interesting idea, but I don't want to complicate something thats just supposed to be a way to save time

Sorry I haven't posted in awhile, my modem died X0

I've done some research on the System.XML namespace for C# so I could read the xml files.

I don't know how long it will take to finish. I only have a few weeks of school left and its going to get intense.

I could use some ideas to make my UI better, its rather ugly.

I'd love to rename the post, but I don't know how.
Reply #20 Top
Click on Tools at the top of the first post and then you can edit the first post. I think you also need to hit "Advanced Mode" or "ADvanced Edit" to be able to actually edit the title.

And if you click on the options tab, you can make your thread appear in the thread list on the home page.
Reply #21 Top
Sorry for the delay of posting, I've been away due to a marriage. I'll upload a first beta of the Scenario/CampaignEditor on I-ModProductions at the end of the week(after i sorted out some univerity stuff) I hope.
Reply #22 Top
mdi=multi document interface (see my 2nd screen)
sdi=single document interface (see you screen i think )
Qustion answered by your screen, its sdi, what is good if we want to join work later.
Thats what I meant with "we need an Interface", because mdi mainform calls all fileoperations(load,save,new), I'll implement one and post code for you asap.
Concerning a possible MapControl, I may found a fast way--but needs testing.
Goal would be a mapcontol, which is 3x3 sectors min and 18x18 sectors max, and being configured through a propertygridbox(the thingy from VS which lets you configure a controls properties), same plan for mapobjects once clicked it appears in the propertygridbox and can be configured/shown
At the moment, i'm writing a zoom functionality for the control...

Maybe you could expand the threads title to gc2ide as well? I have started my own thread and don't want to keep 2 threads uptodate, me may ask kryo to "weave" myone into that one ...


Strikes me that the best way to do this would be for you to first write a class hierarchy for the control/objects --> MapControlObject (abstract) -> MapGrid (virt.?) -> PlanetObject, AnomalyObj, etc

From there, create a custom user control, deriving perhaps from the table class to get some built-in functionality. Then call GDI+ functions to draw the table.

Using virtual and abstract classes for the objects will allow you to be type neutral when drawing your control...

just my $.02

Reply #23 Top
Thats what I've done by now since the other approach was too choppy. But thanks for $2
Reply #24 Top
I've uploaded a first version.
It can be downloaded here
Reply #25 Top
@theStormWeaver
can you give any details on your work? At the moment I redesign the mainUI, making the IDE modular, so that you could implement an Interface which "routes" your menu code to the mdi main menu. My problem is, that I don't know the internal design of you tool, if you gave some feedback, it would be great, since I delayed the release of mapeditor (due to that thing), maybe you want to share the source so I can put in a dummy placeholder?
Do you have any other idea about making your project comunicate with the main mdi menu, ie. making it child, if so please tell since it is important that the mdi main framework is solid and open (without too much work) to new "plugins"?