Help! Mods not working

Or at least the XMLs aren't parsed.

I've been trying to get my text editing mod to work on my game (!!) with no luck. First off, ToA decided that it'd look for the mods at the top level of the game's directory structure. Whatever. Dump the mod there & no luck. Added someone's modified economic & cultural starbase structures & those work just fine. But my edited XMLs do not. Worse, when I decided to add some new techs, they don't appear (either hand-editing the XML files or using the editors provided.) I hit the "Default" button on the mods section of the options & moved the mod there. Same drill: the different starbase designs work fine, but the XMLs are not being parsed. And, yes, I do have the "Use Mods" checked (otherwise I'd not have the different starbase looks.) This has gone beyond baffling to down-right frustrating. I can send along my mod files to anyone who wants to test it, otherwise I'm at a complete loss... I'm praying that it shouldn't matter that the game's not installed in C:\Program Files\whatever (I have a dedicated hard-drive for my games, mapped as G:\ & IIRC, the game's in its own dir named "Galactic Civilizations II"). Anywho, any help/suggestions would be appeciated. Thanx in advance!
8,187 views 13 replies
Reply #1 Top
What XML files are you modding and in which folder exactly are you putting them?
Reply #2 Top
Well, pretty much all of the ones in the Data\English directory, including the techtrees. I've placed them in both G:\Galactic Civilizations 2\Mods\Mine\Data\English and G:\Galactic Civilizations 2\twilight\Mods\Mine\Data\English. I had lifted the Default mod structure & deleted the stuff that I wasn't changing to keep the file size down when I ZIPped it up.
Reply #3 Top
The mods folder doesn't use any localization, so your replacement files should just go in ModName\Data. If you want to use some changes in addition to the core files (don't use modified core files for this as that will cause duplicates), put them in the individual folders under Data.
Reply #4 Top
The mods folder doesn't use any localization, so your replacement files should just go in ModName\Data. If you want to use some changes in addition to the core files (don't use modified core files for this as that will cause duplicates), put them in the individual folders under Data.
End of quote


I thought I understood things Kryo, then read this, read it again and now I'm confused.

Are you saying that if we want to:
Replace a file like "GC2Types.xml" to just put it in our mod's Data folder
BUT
If we want to create a smaller xml file that will add or change code to a file in the base game folder, then we need to make sure the folder structure is identical?

As far as not using modified core files, for most of my modding, I'm simply coppying the core files into my mods folder and modifying them. Are you saying that's a no-no?

Hopefully I'm not thread hi-jacking.



Reply #5 Top
If you want to completely replace the existing one, you'd have ModName\Data\GC2Types.xml. If you just want to add a few new parts, you'd make a xml file with *just* those parts in it, and put it as ModName\Data\ShipComponents\MyNewShipParts.xml, etc.

The mods folder has its own structure which the game will create when you use it, and each folder's use should be pretty self-explanatory. It's not the same structure as the Data\English\etc.
Reply #6 Top
Did not know that & not 100% sure that the modding guide was clear on that (or that my aging eyes were clear enough to read it properly.) In any case, I'd been operating on the assumption that it was structured along the lines of the standard files, just one directory deeper. That'll make hay with my mod, I'm afraid. Almost tempted to call in sick tonite to fix that, but I'd better not... I'll have a stab at this tonite when I get home & (hopefully) fix the mod too if needs be. Thanx! :D
Reply #7 Top
Ok, I got it to load my mod finally, but it's still not loading my modifications, for example my new weapons that I put in a separate file called NewWeapons.xml, Used the included editor to make adjustments, not sure what I'm missing. I know as soon as I make this post I'll have it figured out.
Reply #8 Top
May sound a stupid question, but have you started a new game, put the NewWeapons.xml into ModFolder\Data\ShipComponents and researched the techs you set up?
Reply #9 Top
If you want to completely replace the existing one, you'd have ModName\Data\GC2Types.xml. If you just want to add a few new parts, you'd make a xml file with *just* those parts in it, and put it as ModName\Data\ShipComponents\MyNewShipParts.xml, etc. The mods folder has its own structure which the game will create when you use it, and each folder's use should be pretty self-explanatory. It's not the same structure as the Data\English\etc.
End of quote


Okay... My experiments over the weekend resulted in the game quitting everytime it got ready to finish making the map. So, there's something "bad" with my data files. To that end I have a couple follow-up questions.

According to your post, simple additions to the tech trees, ship components, etc. get put into a specific directory thusly named and not into the Data/English directory. I understand that. However, what sort of XML document syntax is to be used on these? Do I copy the whole header from the master file & use that? Or is the parser going to be satisfied with looking at a "naked" XML entity & be able to slip it into the correct data structure based on which directory it was located in?

The other question maybe completely idiotic, but I'll take the shot for it. Where would modified files that do not corrospond to any of the directorys be placed (i.e., the tooltips.) At the mod's root folder or in the Data/English a la the standard files? Boy, I hope that made any sort of sense. :)

Thanx for your help with this & once I get my engines finally to load, so too will the Terrans. :D
Reply #10 Top
When I've used the modular files in the subdirectories I've copied the XML headers into my files, which seems to work. And for other files, they go in ModFolder/Data. There is no Data\English folder ever used in the mod folder.
Reply #11 Top
When I've used the modular files in the subdirectories I've copied the XML headers into my files, which seems to work. And for other files, they go in ModFolder/Data. There is no Data\English folder ever used in the mod folder.
End of quote


Thank you! That's quite helpful! Not be more of a PITA, but, what's the difference between the TechTrees directory & the Techs directory? In fact, what on earth is the Techs directory for, since TechTrees have their own directory as do the ship components & planetary improvements. I've not been able to plink around with my mod yet - we just moved last month & we're still unpacking & getting things put away. Seriously cuts into my gaming time! :D
Reply #12 Top
Techs is stuff you want to add on to the main TechTree.xml and TechTrees is for new custom tech trees.
Reply #13 Top
Okay, I really hate to be PITB about this, but I'm still having problems. Using the MODS folder, the very best I could do with my modding attempt is have some of the new engine techs show correctly but anything beyond Stellar Folder, nope. It'd show up along the far left as a "beginning" tech. I tried to look at other mods from the library but I'll be blasted if not a single one I looked at uses the mod folder - they all say to overwrite the game files. Fine, whatever. I back up the whole DATA directory, then overwrite my files. Things work a h*ll of lot better... with one very bizarre exception. Despite the RacialConfig file not having been touched, when I start a game with the Terrans, I have only one technology (A History of Extremes) to start the game with. Now, that's not necessarily a huge problem because it might be kinda fun to play the game as if starting from scratch, but still... Let me ammend that; it sux. Without Industrial Revolution, all I can build are starports & market centers. Not the best way to get an empire moving. Grrr...! I had tried to paste in a text dump of my directory structure, but the editor bugger the living snot out of it, so that's a wash as far as posting to the forum. I can certainly send it to anyone who's interested (very small text file - Directory Opus is awesom! :) As always, helps & suggestions greatly appreciated & thanx in advance for your time!