This is a modding guide for those interested in designing custom ship styles that are used as the default style for custom faction (or even for replacing the style of an existing faction). By following this guide, you will learn how to setup a ship style set which is used by the AI in the development of new ships - whether for an AI controlled faction or for the ships that automatically appear/upgrade in your shipyard as you research new techs.
- This guide assumes you already know how to edit XML files, know how to create them, etc.
- This guide also assumes you are working with a mod, with its own mod folder... and more or less know how to work with mods.
- This guide also assumes that you know how to design your own ships.
You will need to create ships/templates for all ships you wish to use, including shipyard and starbase designs if you want. You will also need to work with two XML files, ShipClassDefs.xml and FactionShipStyleSetDefs.xml (And FactionDefs.xml to make it work with your faction in the end)
Step by Step Instructions:
Part 1: XML Setup
- Create two xml files in your mod's Game folder: ShipClassDefs_NEW.xml and FactionShipStyleSetDefs_NEW.xml (Where NEW is the name of your faction/style).
- Find the game's version of these files in Program Files (x86)\Steam\Steamapps\common\Galactic Civilizations III\data\Game. Copy the xml for one faction's entries (Terran, in this guide). (Note: Be sure, of course, to include the starting and ending elements for the each xml file, including the schema declaration).
- FactionShipStyleSetDefs_NEW.xml should look something like this: http://pastebin.com/CSDRaadE
- ShipClassDefs_NEW.xml should look something like this: http://pastebin.com/YmcEgtPg (You will notice that I removed all ship entries marked "Campaign" or "Tutorial" since in a custom style, these will not be needed).
- Either manually or using a "replace all" feature in your xml editor for both files, change all text "Terran" to whatever unique faction/style name you are using.
- If you "replace all" note that this will also change names of your shipyard and starbase models - which means you will need to either make your own templates for these or set the values for those objects back to whatever file names are appropriate. (More on that later).
Part 2: Ship Design
This process can take some time. Having looked at the FactionShipStyleSetDefs file, you know that there are quite a few ships and bases to design if you want a complete custom set. Not every entry requires a unique ship, since some are simply variations on the same ship. Still, it is a lot of ships.
- Design your ships in the ship designer. The result is that the game will save 3 files in your Documents\My Games\GalCiv3\Designs folder, all with the same name (.png, .ship, .objgfxcfg). That is, 3 files for each ship. The file names should be something like the name of the ship you entered in the ship designer with a long alphanumeric suffix.
- I saved mine as templates rather than ships by marking the option when saving my design (Don't know if it matters).
- I ended up designing my ships with very basic equipment based on ship type and saving them as templates. I am not certain if it is necessary to place equipment since the AI will place upgraded equipment on its own. Not sure if saving my ship file makes it so the AI places objects in the same places as similar components it is replacing.
- Be sure to name your ships with decently specific names, as it will help later. If you are like me, and end up making multiple of the same named ship, the game still differentiates with a very long suffix added to the name of the ship to form the file names. Or, an easier way to distinguish between ship designs of the same name... I just went to the folder and deleted files that were older and kept the newest ones.
- If you make a custom shipyard, one thing to note is that for some reason, the actual shipyard when used in game, will be rotated 90 degrees. So if I make a shipyard that looks like the first picture, it will end up looking like the second picture when used in game.
- If you make a custom starbases, you will need to make a whole mess of them... the basic starbase, then all the starbases with initial ring... then several more versions of more complicated ones so that the starbase grows as the player adds starbase modules.
- Once all of your designs are done, backup all your designs to a seperate folder and then copy them all into the Designs folder in your Program Files game location. (Program Files (x86)\Steam\Steamapps\common\Galactic Civilizations III\Designs). (In the future, the game will recognize ship designs in your mod folder, in which case you would move the designs there instead). It is important to remove the files from your My Games\GalCiv3\Designs folder so that you don't end up with a shipyard with a list of duplicate ships.
- I'm not entirely sure what the differences is between the objgfxcfg and ship file are. When I moved only png and objgfxcfg files only (without ship file) the game would crash. the same if I used only the ship file but not the object graphic config file. So, in the end, all three files need to be moved to the appropriate place.
Part 3: Putting It Together
- Going back to ShipClassDefs_NEW.xml. In the file you will notice two elements: "ThumbnailOverride" and "ShipDesign". These tell the game what thumbnail and what design to use. The values for these elements needs to be changed to the filename for the ship you want to use. For example, my design files for a scout ship are called MYFACTIONScout_1231298547129587 (.png, .ship, .objgfxcfg). I would use my file name in the appopriate spot:
(Because some ship types use the same ship design/thumbnail, I find it faster to do a "replace all" command. For example, I would replace all strings "Temp_Terran_Sniper_Alpha_01" with "MYFACTIONSniper347042F105A54F3EA5EB26C4B89CBF41". Some of the larger ships with multiple versions of the same ship use the same string quite a few times.)
- Now, go to FactionShipStyleSetDefs_NEW.xml. After the list of all the ShipClass elements, you come to where it defines the files for shipyards and starbases. Here you replace the values according to the file names you have. For example:
(If you aren't making your own shipyards or starbases, then just make sure that those values match the file names of one of the designs already in the game.
Part 4: Clean Up Any Text Strings
- As is the case in most of the modding experience, you can either enter text strings for things like names and descriptions directly into the above files, or (recommended) you can create a text string xml file and place it in your Text folder within your mod. Whichever way you do it, now is the time to clean up the text if you haven'd been doing it along the way. This is where you can customize what each ship type is called in game - regardless of what you named it in the ship designer.
- The list of things that need text are:
- DisplayName for the Ship Style Set (in FactionShipStyleSetDefs_NEW.xml)
- DisplayName and Description for every ship listed (ShipClassDefs_NEW.xml)
- The way I did it was created one xml file for all my ship related strings.
(Don't think I need to post examples of this, but if you are unsure, ask below. I or someone else can help)
Part 5: Finishing Up
- At this point, if you start a new game and create custom race in game, you should see your new ship style as an option.
- If you want to set this new style as the default for a particular faction, open the faction's FactionDefs file.
- Find the <ShipStyleSet>TerranShipStyleSet</ShipStyleSet> (Or something like it)
- Change the value to match the InternalName set in your FactionShipStyleSetDefs_NEW.xml. For example, <ShipStyleSet>MYFACTIONShipStyleSet</ShipStyleSet>
And there you go. The computer should now use your ship designs as the default for that faction and will auto-design your ships with new equipment as techs unlock new equipment. The way it choses equipment to upgrade is based on what is provided in the ShipBlueprintDefs.xml which defines what specific ships require and what to prioritize. You will notice that your ShipClassDefs_NEW.xml file pointed to these blueprints.
I hope this is helpful and makes sense, particularly to newer modders. If you have questions, please ask.