A guide to creating custom ship styles for human and AI players

for Galciv II DA

Contents
1. Introduction
2. Starting from scratch
3. Some basic info on the folder structure regarding ships
4. Creating the basis for a new ship style
5. Editing your ship style outside the game
6. Linking your designs to the ship style
7. Yes, but I want to fly my own core ships
8. Finishing the basic custom ship style
9. Additional: I’m seeing double and it’s not from modding for 5 hours straight
10. Additional: I want to see my custom names with my custom ship designs



1. Introduction
After tinkering with many of the moddable files from the game, I decided to create my own custom ship style. However, this proved to be quite a challenge as creating a custom ship style is done partly through the game and partly through manual editing of the game files. Although there are several tuturials and trouble-shooting threads already, which have been very helpful, they also left me sometimes confused about what to do and why I was doing something. Hopefully this guide will provide a useful additional information source for players wanting to create their own custom ship style.

It’s a lot of text, but I tried to make it thourough and suitable for unexperienced modders or people who got stuck somewhere along the way of creating their own custom ship style.

Disclaimer:
By modding this game, I think the worst thing that can happen is that you screw up the game, in which case you have to reinstall. If for some reason this or some other disaster happens, don’t blame me, it’s your own responsibility.

Notes for using this guide:
I use the Arial font to indicate files and folders and xml code. Words between ‘quotes’ are things that can be interpreted literally, often indicating buttons, tabs etc.

General modding tips:
- Backup files if you’re changing stuff
- Set the game in windowed mode by turning the ‘Fullscreen’ option off in the options/video screen, so you can easily switch between the game and the forum or files you are editing
- Restart Galciv and start a new game if you want to see the effect of anything you have changed outside the game

Good luck!


2. Starting from scratch
Buy the game Galciv II DA, install it and start it up. Create at least one ship for each hull type and save it as a template if you want the AI to be able to use your designs. For your own core ships you only need two cargo hull designs and one medium hull design for the core Colony, Miner and Survey ships.


3. Some basic info on the folder structure regarding ships
Outside the safety of the game, you are about to enter the frightening but wonderful world of folders, .xml and .shipcfg files on your quest of creating a custom ship style...

Your ship designs consist outside of the game as .shipcfg and .xml files in something much like the following folder:
C:\Documents and Settings\Sidemancer\My Documents\My Games\GC2DarkAvatar\shiptemplates

for example as:
S0_UD_T_Colonyship2Mk00.shipcfg
Colonyship2Mk0_t.xml


Your future ship style is going to end up here:
\My Documents\My Games\GC2DarkAvatar\ShipStyles

On the other hand, we have some core game folders which we are going to use, in my case:
C:\Program Files\Stardock\TotalGaming\GalCiv2\DarkAvatar\Data\ShipCfg
and
C:\Program Files\Stardock\TotalGaming\GalCiv2\DarkAvatar\Data\ShipTemplates
These folders will hold the ship files which represent your new core ships and provide the templates for more core ships.

In the game, we will eventually find our starting core ships under the ships/core tab and the core templates under the templates/core tab in the ship designer.

Personally, I always open up a couple of explorer windows displaying the before mentioned folders to keep an eye on what’s where.


4. Creating the basis for a new ship style
In the Galciv II opening screen, start a new game and proceed until you end up in the ‘Choose Opponents’ screen. Pick a race and click on the ‘Edit’ button. Now you are in the ‘Customize Your Opponent’ screen. Go to the ‘Appearance’ tab and choose the style which matches your designs hulls. In my case, this is the ‘Terran Alliance Style’. Click ‘Create Custom Ship Style’ (which is only clickable in the customize opponent screen, not in the the ‘Customize Your Civilization’ screen). Now you are in the ‘Custom Opponent Ship Style’ editor and you have to replace the ships on the left with your designs on the right. Too bad your designs aren’t there! That’s because the game doesn’t recognize your designs. They are user defined templates. Take a look at your design’s .shipcfg file. In my case it’s called: S0_UD_T_Colonyship2Mk00.shipcfg. S0_UD_T_ is a code called a ‘prefix’. S0 is the code of the Terran Alliance style, UD means Used Defined and T stands for Template. Ok, whatever, just press ‘Save Ship Style’ and save it under an appropriate name.


5. Editing your ship style outside the game
Go to the ship style folder:
\My Documents\My Games\GC2DarkAvatar\ShipStyles
There you have your ship style, in my case:
European Alliance.xml
You can open the file with Notepad, but if you’re interested in more than casual modding I suggest using an XML editor, there are free ones readily downloadable from the internet. Anyway, open it and be prepared for some hardcore modding! Search for the prefix code which we’re going to change to make the game recognize our designs, in my case this looks like:
[Prefix]S0[/Prefix] (but with pointy instead of square brackets)
Change the original code (S0) in a new unique prefix containing regular characters (no spaces or special symbols). I’m changing it to ‘EA’. Save it. Now your ship style is ready to be linked to your custom designs. One thing left, your designs also have to have this specific prefix so go to your shiptemplates folder:
\My Documents\My Games\GC2DarkAvatar\shiptemplates
and change all the prefixes, in my case:
S0_UD_T_Colonyship2Mk00.shipcfg becomes EA_Colonyship2Mk00.shipcfg


6. Linking your designs to the ship style
Go to the ‘Custom Opponent Ship Style’ editor in the game as described in step 4, but now edit your new ship style. Assign roles for your designs by clicking a ship (type) on the left and a ship on the right and press ‘Change’. First, if you see names of your designs but not pictures, then you have done something horribly wrong and you are probably not smart enough to mod this game. Your ship designs should always have a little icon to go with it or else the game could not find the design and you should fix this before continuing. Note that this assigning roles to your designs is specifically for the AI to be able to use them correctly. Assign all the types on the left with designs on the right and save your ship style.


7. Yes, but I want to fly my own core ships
For this step we are going to add our designs to the game’s core folders. This step is not hard, but faillure to do it correctly can lead to instant death by your monitor exploding and decapitating you in a shower of sparks and broken glass, so be careful. Ok, that’s not really true, while there is no actual imminent death threat, as always with modding, make backups of files you are going to change or rename if you’re not sure what you’re doing.
Copy the .shipcfg files from your templates folder:
\My Documents\My Games\GC2DarkAvatar\shiptemplates
to the core ShipCfg folder:
\GalCiv2\DarkAvatar\Data\ShipCfg
Now you have to rename your designs with their core counterparts, this need not be an exact matching, you don’t have to use all the core names. I ended up with this list:

EA_Avatar.shipcfg (large hull)
EA_ColonyShip.shipcfg (cargo hull)
EA_Constructor.shipcfg (cargo hull)
EA_Defender.shipcfg (small hull)
EA_Dreadnaught.shipcfg (huge hull)
EA_Freighter.shipcfg (cargo hull)
EA_Sniper.shipcfg (tiny hull)
EA_SpaceMiner.shipcfg (cargo hull)
EA_StarAvenger.shipcfg (medium hull)
EA_SurveyShip.shipcfg (medium hull)
EA_Transport.shipcfg (cargo hull)

I have at least one name for each hull and for some hull types several (cargo hulls). Some types I am not using, like for instance EA_SporeShip. This is ok, because my race does not have the Annihilator Super Ability providing the Spore technology. If my race did, I would have to design another ship for it or use a Constructor ship or whatever, that’s my choice in the game. The AI uses the setup from the custom opponent setup, where I assigned my Colony Ship design for this role, so the AI is able to build a Spore ship if it has the technology. Just make sure you have at least these types for the starting ships:
[prefix]_ColonyShip.shipcfg
[prefix]_SurveyShip.shipcfg
[prefix]_SpaceMiner.shipcfg



8. Finishing the basic custom ship style
If you click the templates/core tab in the ship designer you see a couple of ship names but missing pictures. The game expects the following core templates:
- ‘Avatar Template’ (large hull)
- ‘Colony Ship Template’ (cargo hull)
- ‘Constructor Template’ (cargo hull)
- ‘Defender Template’ (small hull)
- ‘Dreadnaught Template’ (huge hull)
- ‘Sniper Template’ (tiny hull)
- ‘Freighter Template’ (cargo hull)
- ‘Star Avenger Template’ (medium hull)
- ‘Space Miner Template 1’ (cargo hull)
- ‘Survey Ship Template’ (medium hull)
- ‘Transport Template’ (cargo hull)

Coincidentally, I have these designs in the core ShipCfg folder so I copy them into the core templates folder:
\GalCiv2\DarkAvatar\Data\ShipTemplates

Now, you have everything you need to fly your own core ships and let the AI use your designs as well!


9. Additional: I’m seeing double and it’s not from modding for 5 hours straight
If you’re only using the custom ship style for a human player, then you can leave out the template files from:
\My Documents\My Games\GC2DarkAvatar\shiptemplates
This way, your templates only show up under the core tabs in the ship designer and not under the user tab. This prevents seeing your designs twice if you look under the all tab for instance.


10. Additional: I want to see my custom names with my custom ship designs
Unfortunately, it seems that although the AI will fly any design, it always thinks your custom names are crap and sticks to its own names. This means that the AI will happily zip around the galaxy with your ‘Uber-Micro-Death-Bringer Mk1’ fighters, but will call them ‘Scout Ship’ nonetheless. I hoped the AI would use the custom names from either the .xml template files or the name of the .shipcfg files minus the prefix, but this doesn’t seem to be the case. If anyone knows how to add your own names automatically to the custom ships the AI uses, let me know!


Well, that’s it! If you have succesfully worked your way through this guide and your monitor hasn’t exploded in your face then you are now the proud living owner of a custom ship style. There is only one thing left to do: Startup Galciv II and click on ‘New Game’...

SideMancer

30,596 views 22 replies
Reply #1 Top
Very nice; though you might want to add a bit about modding for the AI

Any ship style you design the AI will randomly attach parts to; sometimes this isn't an issue, but most of the time it will place components at the wrong scale, or in poor locations, make you ship designs often look like so much junk thrown together.

The only way to avoid this is to design ships for the AI utilizing All the Technology and preferably with +25% miniaturization. These designs should try to fit 1-2 engines, some armor and as many guns as possible... place the components nicely, and try to make them on the small side; use the most enhanced versions available to conserve size.

Save this as a template... the AI will replace the components at the SAME scale and locations that you placed... if you place 1 sensor on a ship, and the AI wants 2, then 1 sensor will be placed just as you wanted and the other will be mostly random. It is usually not an issue with sensors and rangers though... it is almost always an issue with Weapons, Colony Modules... Etc.
Reply #2 Top
Nice idea Gauntlet, I will try that. Another option I heard of is Kryo's Hull System Mod that provides 'caps' to cover hardpoints so the AI can't use them.
Reply #3 Top
you could do that, but some users PCs will have a Big problem with too many parts... mine for instance will start having video card 'artifacts' and blank parts at around 200 or so parts... Also I think putting a piece over each and every hard point will end up being Very tedious.

Reply #4 Top
You're right about that, if you're picky about which hardpoints to use, then you would have to use a lot of those caps.
Reply #5 Top
Yes and I'm working on AI friendly style number 21 for my mod lol... if you made me use caps for alll those hardpoints... I would murder you!!
Reply #6 Top
if you made me use caps for alll those hardpoints... I would murder you!!

I would have died from old age before you had finished all your ship styles.
Reply #7 Top
I had made a mod a while back making all ship parts invisible (aside from Colony and Troop modules, as the modding of those graphics was broken, idk if it's fixed by now). I disappeared from the scene and haven't redone it yet because I'm toying with the idea of playing Metaverse, and that mod wasn't MV-compatible. If people are interested, it shouldn't be too hard for me to update that for DA compatibility--I recall, in the past at least, the AI used the invisible parts exclusively (in my testing).
Reply #8 Top
I would be interested in it for one
Reply #9 Top
the AI used the invisible parts exclusively

Which parts were invisible, the functional ones?
Reply #10 Top
Yes I have seen this done, I rejected the concept from my personal mod, because some users enjoy adding those parts aesthetically to their ships; as well as I hated placing the parts on the ships as invisible made it harder for me to keep track of what I had indeed placed.

Its a great thing for mods like B5 and such though.
Reply #11 Top
I'm interested as well in a mod that could make the AI put invisible functional parts on the ships.
Reply #12 Top
Yes, it was the functional parts (except for colony and troop modules as they were broken). I'll go through and see if I can't rig it up for DA. No reason I shouldn't be able to; I should have it ready before the TA Beta begins (possibly before the end of today even, depends on how much time I devote to it and how much work it takes.)
Reply #13 Top
Update: Depending on how much time I have, I may actually be able to stick with the original release I said (before TA beta).

However, question for you:
I can create a MV-Compatible version of the mod which also includes the (still broken) colony and troop modules, because the MV-Compatible aspect means I don't mod the XML for the modules, I only replace the models.
Side effects include a larger mod file (even though all the components use the same model, I need to have many versions of that model with different names, as well as a back up folder), the lack of original components (if you wanted to build a ship with visible weapons or something, you'd be out of luck), and some more work for me (which I don't mind as in the end I'll likely release both versions anyway, as the non-MV compatible version is better for mods that would like to incorporate it (Total Conversions, especially)).

Another question--in the end, would you prefer a thumbnail system like I used to have (a logo, the mod acronym, then letters indicating what type of a component it was (weapon, defense, engine, module, and which category of weapon or defense in appropriate cases)), or to keep the thumbnails from the original game? Both are possible in both cases, however I don't think I'd do original thumbnails in non-MV-compatible, and regardless of opinions it'll take too long for me to work the custom thumbnail system into the MV-compatible one in a near-future release.

I think I'm leaning towards the MV-Compatible version (without custom thumbnails for now), but if you guys get in a reply before I start working tomorrow (I'm in European time here, EST + 6 hours), then I'll take your wishes into consideration.
Reply #14 Top
Ehm, just make all of the versions as soon as possible please.

Just kidding, my own lack of time for modding and playing the game means I'm developing stuff at a crawl. After I've made a custom ship style usable by the AI and making this guide I haven't even gotten round to testing it with an AI player for a full game. I'm currently playing a game using my ship style for core ships and after that I'll probably do some more modding. I'm planning on creating 2 or 3 more ship styles consisting of 12 ships each, adding to the 2 I already have and putting them in the library.

My preferences would be for a non-MV version, because I play those type of games. I think I'd also prefer original thumbnails, just because I like things to stay as close as possible to the original game. But you indicated that you probably wouldn't want to do that for the non-MV version and that's fine with me as well.

Good luck!
Reply #15 Top
I uploaded the MV version just recently, and noted just how little demand there'd probably be for that specifically as most people who care that the AI makes ugly ships are modders (and therefore not MV users). (Though, for real low-end computers, it may reduce lag in the late game...)

The non-MV version will come shortly, I think, the main issue there is that the old mod will work fine, but I need to update the values in the XML (as all of the values at the moment are made for DL 1.2 or something like that). I read something about a plugin to Notepad++ that allows you to compare two files side-by-side, so that may make the work on that part easier than it currently looks to be. Either way, I'm going on a trip starting Saturday, which (somehow) actually opens up more time for me to work on this, so you can expect the non-MV version uploaded (not necessarily approved) before the TA beta comes out on Tuesday (which is mostly important for me because after it's out I'm not going to be doing too much modding for a while, I think )

As for thumbnails, well, I'm not doing custom ones for the MV version because some components generate their own thumbnails (therefore, in some cases, there are no thumbnail graphics to replace). Similarly, in the non-MV version, I can't assign original thumbnails to those that don't have them to begin with, whereas I can assign custom thumbnails. I appreciate your input on the matter, but I'm afraid I can't go forward with it that way.

EDIT: I found the Search and Replace feature I needed, vastly decreasing the time required to make the non-MV version. It has been uploaded (both mods are now awaiting approval).
Reply #16 Top
The non-MV version has been up for a few days now (I've been sans an internet connection for a while). Granted, in the TA rush, it wouldn't surprise me if it goes vastly unused for a while.
IDK why the MV-compat version isn't up, I'll have to ask Kryo sometime. It's still pending approval, so maybe he only had enough time for one mod per person. Doesn't really matter.
Reply #17 Top
IDK why the MV-compat version isn't up, I'll have to ask Kryo sometime. It's still pending approval, so maybe he only had enough time for one mod per person. Doesn't really matter.


I sent you a PM about it, might help to read that
Reply #18 Top
I've downloaded the mod, I'll give it a go very soon!
Reply #19 Top
Rather confused at the moment, you state that you won't be able to see your user-made ship templates when you create custom ship style, yet when I go to that screen, I see all of the templates I had prepared available, and I can select them/add them to the custom ship style...is that normal? Also, does that mean I can avoid messing around with the .xml files?
Reply #20 Top
I see all of the templates I had prepared available, and I can select them/add them to the custom ship style...is that normal

I did a short test and you are right, I guess something has been fixed with the last update!?
When I created my ship design I had to change the prefixes manually because I couldn't see my designs, which was bothersome but didn't surprise me because Kryo described the renaming as a necessary step in his sticky thread: 'Making a player-usable custom ship style'.

If it isn't necessary to change the prefixes manually than you also don't need to change the prefix in the ShipStyles file. The only possible disadvantage is that you can create custom shipstyles which have the same prefix as the original ship styles (S0 for the Terran style for example). I don't know if this can create problems in certain situations. I suggest to just go ahead with wat works en let me know if there are any problems.
Reply #21 Top

Great work with the instructions, thank you so much :)

I'm having problems with locating my core ship data. No matter where I look, I can't find GalCiv2\DarkAvatar\Data\ShipCfg


Any idea where I could find it? I bought the game from Steam. 

Reply #22 Top

Quoting Mangusti45, reply 21

I'm having problems with locating my core ship data. No matter where I look, I can't find GalCiv2\DarkAvatar\Data\ShipCfg


Any idea where I could find it? I bought the game from Steam. 

Steam only sells the Ultimate Edition of the game, so the correct path would be: Steam\SteamApps\common\Galactic Civilizations II - Ultimate Edition\DarkAvatar\Data\ShipCfg or rather Steam\SteamApps\common\Galactic Civilizations II - Ultimate Edition\Twilight\Data\ShipCfg to be precise (the guide was written for the first expansion).

However, because it's the Ultimate Edtion, you won't need to mod any files to create a custom ship style. The devs have made that much easier in the last expansion. All you have to do is start the game, select a race, go to the Appearance tab, and click on Create Custom Ship Style. You'll then go to a menu where can select the ship templates you want to use for this style.