How to Fix Some Issues with Upgraded Ships

Note - this is in reply to a post in bug reports - someone was having trouble with tech requirements carrying over in upgraded ships. I could not post this in reply for some reason, maybe length, but it is more appropriate here anyhow. https://forums.stardock.com/index.aspx?ForumID=274&AID=111232#855983

OnEdit: I am having trouble with this post – probably because I am trying to post code. It is appearing sometimes in the Stardock forums, but not in the Galciv forums; I will try to post it again there. I have replaced the proper syntax with ‘-‘ . This works for example purposes but the what you see here is not what the xml code loks like. It uses ‘<’ and ‘>’ not ‘-‘ Sorry – I will stop editing it.

I has this issue too when upgrading. The new design would still require the techs of the old design. However I have been able to fix it now in the Beta 1.1 v2 game since *.shipclass files are now *.xml files and are user editable.
Here is an example. The first file is a troop transport I created called a "Gator". I open up the corresponding .xml file with a program called XMLSpy (home version is free), (but you can use any plain text editor such as notepad - it just does not have the color coding that makes it easier to read) in the ships folder under My\Games\GalCiv2, and this is what I see:

-?xml version="1.0" encoding="UTF-8" standalone="yes"?-
-GC2Ships-
-Ship Name="Gator"-
-Ability-Troops-/Ability-
-Component-CargoHull0-/Component-
-Component-TroopsModule-/Component-
-Component-ImpulseDrive2-/Component-
-Component-ImpulseDrive2-/Component-
-Component-GeneralSupport-/Component-
-Component-Sensors0-/Component-
-Component-Impulsedrive-/Component-
-Description-Fast Transport-/Description-
-DisplayName-Gator-/DisplayName-
-Model-UD_Gator0-/Model-
-Tech_Requirement-Planetary Invasion-/Tech_Requirement-
-Tech_Requirement-Impulse Drive Mark II-/Tech_Requirement-
-Tech_Requirement-Basic Life Support-/Tech_Requirement-
-Tech_Requirement-ImpulseDrive-/Tech_Requirement-
-UserDefined-1-/UserDefined-
-/Ship-
-/GC2Ships-

The components are obvious, that is what is on the ship. The tech requirements are when I will get the ship. The model is the *.shipcfg file it uses to build the ship. Now when I upgrade a ship, it does change the components, but it does NOT change the tech requirements! Here is the .xml ship file for the Gator Mk IIIa - notice that even though this ship does not use Impulse drives, the tech requirement for them is still present:

-?xml version="1.0" encoding="UTF-8" standalone="yes"?-
-GC2Ships-
-Ship Name="GatorMkIIIa"-
-Ability-Troops-/Ability-
-Component-CargoHull0-/Component-
-Component-AdvTroopsModule-/Component-
-Component-AdvTroopsModule-/Component-
-Component-AdvTroopsModule-/Component-
-Component-ExtendedSupport-/Component-
-Component-ExtendedSupport-/Component-
-Component-Warpdrive4-/Component-
-Component-Warpdrive3-/Component-
-Component-Warpdrive4-/Component-
-Component-Warpdrive4-/Component-
-Description-Troop Transport x3000 16/pc 2.6r-/Description-
-DisplayName-Gator MkIIIa-/DisplayName-
-Model-UD_GatorMkIIIa1-/Model-
-Tech_Requirement-Planetary Invasion-/Tech_Requirement-
-Tech_Requirement-Impulse Drive Mark II-/Tech_Requirement-
-Tech_Requirement-Basic Life Support-/Tech_Requirement-
-Tech_Requirement-ImpulseDrive-/Tech_Requirement-
-Tech_Requirement-Advanced Troop Mods-/Tech_Requirement-
-Tech_Requirement-Warp Drive II-/Tech_Requirement-
-Tech_Requirement-Extended Life Support-/Tech_Requirement-
-Tech_Requirement-Warp Drive-/Tech_Requirement-
-Tech_Requirement-Warp Drive IV-/Tech_Requirement-
-Tech_Requirement-Warp Drive V-/Tech_Requirement-
-UserDefined-1-/UserDefined-
-/Ship-
-/GC2Ships-

Now normally this is not a problem. However when I want to make a 'Blank Hull" with no components from an existing design that will show up no matter the tech requirements, this is an issue. Here is the *.xml ship file from an upgrade called Gator Base made from the last Gator design above. Note it does not have any components, but it still has tech requirements:

-?xml version="1.0" encoding="UTF-8" standalone="yes"?-
-GC2Ships-
-Ship Name="GatorBase"-
-Component-CargoHull0-/Component-
-Description-Troop Transport-/Description-
-DisplayName-Gator Base-/DisplayName-
-Model-UD_GatorBase1-/Model-
-Tech_Requirement-Planetary Invasion-/Tech_Requirement-
-Tech_Requirement-Impulse Drive Mark II-/Tech_Requirement-
-Tech_Requirement-Basic Life Support-/Tech_Requirement-
-Tech_Requirement-ImpulseDrive-/Tech_Requirement-
-Tech_Requirement-Advanced Troop Mods-/Tech_Requirement-
-Tech_Requirement-Warp Drive II-/Tech_Requirement-
-Tech_Requirement-Extended Life Support-/Tech_Requirement-
-Tech_Requirement-Warp Drive-/Tech_Requirement-
-Tech_Requirement-Warp Drive IV-/Tech_Requirement-
-Tech_Requirement-Warp Drive V-/Tech_Requirement-
-UserDefined-1-/UserDefined-
-/Ship-
-/GC2Ships-

With the old .shipclass files, this could not be fixed. Now that the newest version uses .xml, it is a snap to edit the file and remove the tech requirements! Here is my fixed Gator class base hull .xml file that will appear with Planetary Invasion as the only tech requirement:

-?xml version="1.0" encoding="UTF-8" standalone="yes"?-
-GC2Ships-
-Ship Name="GatorBase"-
-Component-CargoHull0-/Component-
-Description-Gator Class Troop Transport w/16 Atmosphere Assault Boats Base hull-/Description-
-DisplayName-Gator Base-/DisplayName-
-Model-UD_GatorBase2-/Model-
-Tech_Requirement-Planetary Invasion-/Tech_Requirement-
-UserDefined-1-/UserDefined-
-/Ship-
-/GC2Ships-

Note that the 'Model' line now points to a new *.shipcfg file - if you save a ship with the same name as an existing ship, the game will create a new *.shipcfg file with a new number appended at the end, i.e 'S0_UD_Gator0.shipcfg' for the original, 'S0_UD_Gator1.shipcfg' for the next, then 'S0_UD_Gator2.shipcfg' and etc. This is good because if you decide you want to go back to the old jewelry you can simply change the *.shipcfg file the .xml file points too.
I love that this stuff is now in XML format - it makes modding and creating ships to share so much easier!
Hope this helps....

6,120 views 4 replies
Reply #1 Top
Bump so someone I refferred this too could find it.
Reply #3 Top
I am running 1.0x and the ship files are causing me big headaches.

I initially played a custom race using the terran ship set. I designed some ships, and submitted them for sharing at the core.

I changed my custom race for different colors and to use the Yor ship set. I want to be able to share these designs as well, but can't. The game is not creating a new shipclass file but lists the shipclass file names from the original iteration. For example old design named VSS Colonizer. New design named VSS New Horizions. I have a new "VSS new horizions" cfg file but the shipclass file still shows "vss colonizer". Since I have to include both the shipclass and the cfg to allow others to share I am stopped short as only one of those files is there.

I went as far as to start over. I deleted ALL the files (I moved to another folder the ones i wanted to store) in the ships folder and started from scratch AGAIN (even included a color adjustment). I did not load any saved games from the previous maps. What does the game do? It re-creates those very first shipclass files but gives a new cfg file. So I have the new cfg file showing the correct name, the old shipclass files showing the old name, and a level of frustration that is looking down on Everest's peak.

I want to move on and try another ship set but I don't want to lose my current designs, yet can't save them elsewhere because of the missing files. And the ships I hope I never see again I can't get rid of.

Any help would be appreciated.

Now the hard part of not losing where this thread is. (watch thread don't work for me. I keep getting timed out denials when I try to add a thread.)
Reply #4 Top
@Zippyriver
The newest vesions sincve 1.0x do not use shipclass files. 1.1 uses .XML files instead.

To keep track of threeads, you can add them to your Browsers' favorites menu. Click on Favorites when you are in the thread and clcikc add to favorites. most if not all Browsers support this. I created a separate Folder in my Favs for keeping track of threads since the Forum software watch feature does not work.