In a prior Developer Blog (https://forums.galciv3.com/461709/page/1/ ) I talked about all the cool stuff you can do in the Custom Race tool. We give you a bunch of images, traits, abilities and settings to create whatever race you want.
But, if you really want to make something unique you can go so much further. In this post I’ll talk about how modding works in Galactic Civilizations III and show you how I used it to make a new faction for the game, the Ghosts of Abbadon.
How does modding work?
Mods are files placed in your My Games/GalCiv3/Mods/ directory. They can include graphic and XML files. You can have as many mods in here as you want, but keep them in their own directories (so if you want to remove one it’s easy to do). The plan is to get some Steam Workshop integration in here to help manage this at some point. But first we are getting the system working.
NOTE: We use a file structure to help with organization, but the game actually just searches all subdirectories when looking for files. So your files must have unique names (even if they aren' in the same directory).
At a high level there are three things you want to do when modding. You either want to add something, modify something or delete something.
Now let’s use this power to create a new faction, the Ghosts of Abbadon. The Ghosts are unlike any other faction in GC3, and we want to be able to do more with them than the Custom Race tool normally allows. In this case they have ruined their homeworld and used the last of their resources to prepare 3 colony ships to go out and attempt to find a new home.
How do we do this?
1: Copy the FactionDefs.xml file into my new mods \My Games\GalCiv3\Ghost\Game\ directory.
2: Rename it from FactionDefs.xml to FactionDefs_Ghost.xml. (I don’t want to overwrite the existing factiondefs, I just want to add a new one).
3: Open up the file (I use Notepad++ for this) delete the other entries, except maybe one I am about to use as a template, and add the XML for my faction.
There are lots of things set here. But the important things here are that <HomeStarSystem> is set to “DeadSystem” where normal factions have a Colony, Scout and Survey ship in <StartingShips> they have 3 Colony ships instead. We could put anything we want in here, 12 Colony ships, a Battleship, a fleet of flying toasters, etc.
I played with a bunch of options with their starting ships. At first I gave them the extra colony ships in addition to the normal Survey and Scout. But when it was just Colony ships it made them feel a more desperate. They don’t have the luxury of having a scout out finding planets for them, or time spent collecting anomalies. When they choose to set out for a star it becomes a dramatic step, and when there is nothing there it is a tragedy of the time of a very valuable resource wasted. And when they find a worthwhile planet it is a huge joy. The hardest part is finding a mediocre planet, do they keep going, looking for something better, or settle?
I used the Terran definition for most of their art aspects, and I’m using one of the extra faction foregrounds and backgrounds that come with the game (“Devilgirl”) for the leader art. We could create our own versions of any of this. If you had a custom image you wanted to use for your faction you would just reference it here, I think Paul has one for his dog Maggie.
The only custom art I created for them is that I created a new material in <Material1>, Ghost_Ship_Material_01.
To do that I added a new file for my mod, this time in the \Mods\Ghost\Core\ directory. I’ve used it to define a new material that I can use to create ships. Materials aren’t colors (you will want to add appearances to modify ship colors). They define the way that light interacts with the surface of the object and I wanted to try some things out to make the ghost ships look unusual.
I really don’t know what I’m doing here. But I love having lots of levers available to tweak and play with. So I’m not asking any modder to understand what all these options mean. Instead do what I did, make a bunch of new materials with all sorts of values then load up the game and check them out. I’ve created new color schemes and materials, and I will add them to the base game to make it easy for non-modders to play with. But modders can go wild.
For this new material I bumped the Reflectivity to a crazy 10.2. That’s going to make my ship look like it is made from mirrors. It’s hard to appreciate in a still picture, but it looks pretty cool in motion.
So I have some cool looking ships and a fun faction to play as. I’m going to go play some Galactic Civilizations III.
Very nice, looking forward to what the community brings to the table!
This is really cool.
I think it'd be great if you'd allow at least some of this capability within the race generator vs xml modding.
Assign a total point value to home planet value/colony ship/scout/etc and allow the player to modify it in game.
I see some modding problems with the system as written... but first off, I want to say thanks for posting this early enough for us tyo give feedback before it's done (I hope?)
Using the above suggestions, I'm hoping that the following is not too optimistic:
edit: It's possible I've misread something... If so, My appologies
- Tetra
Can you explain where the conflict is? I haven't tried modding GCIII yet, but I don't see why this modded race which uses the Terran tree wouldn't just use a modded Terran tree if you created one.
@Stardock: Do custom raced created with the in-game editor create .xml files like this one so you can start a race in the editor and then go in an mod it?
I'm really liking the modding options. It is fun to do just like playing the game, it makes it feel personalized.
Glorious.
@perrgrine. In this example. A new race is being added, nothing I'm the core game is being modified so no conflict. But lets say you have two hypothetical mods as follows:
• mod1 removes the tourism stuff from all tech trees, adds some new buildings Ann specialty planet types with resource types for the buildings added to colony or something instead of faction
• mod2 removes the atarbase module stuff from tech trees & adds them in elsewhere along with new/different modules.
both mods do not directly conflict, but there is no way to use both using the capabilities described without having to keep one (or both) branches that should be pruned/trimmed from the tech trees, ignore some errors about duplicate entries, or manually merge the two mods into one file. Under the changes I suggested, they each take the relevant techs they want to remove & set their prerequ's to nonexisting tech effectively removing them.... the only time a conflict would come into play is if both wanted to prune the same techs (resulting in what should be the same basic end result), or add to the same techs/improvements/etc (probabbly not the most compatible of mods on a conceptual level at that point)
Ahh, I see what you are talking about now. thanks for the clarification.
Sure. But the point is that this is just one of many many crazy things that can be done with modding. And I picked a very simple one because I wanted a clear example. No matter what we provide in the custom race creator, there will always be another thing that could be added to it. The point of modding is that all of those options become available to you.
Modding is better for things that are inherently difficult to balance. I don't want players to feel like they have to make a custom Terran faction with 3 colony ships or else they are playing with a disadvantage. Instead we leave that to mods where the understanding is that you can do unbalanced things if you want.
For example, in my playing of the Ghosts last night I found out that they are overpowered. Since each of their initial colony ships start off with population they were starting with more population than any other factions (if they could get new colonies in a reasonable time frame). Population drives everything in GC3, so they became tech and production monsters right out of the gate. I fixed that by reducing their homeworld population from the normal 10 to 5. This accounted for the pop on the ship and also did a better job of reflecting that their homeworld is ruined.
Will you provide support for standard bik files, so the average modder can add video or animated files?Bk2 files, so far I haven't been able to obtain a license for as a casual modder or individual, I think they only sell it to game developers.Thanks for reading either way.
The first issue I see is that modding a specific core race's tech tree (or worse all) will either make that mod inoperable with any other mod even if both simply add a new item to the tree & do not cause conflicts
While modding, I've found that having a second file with the same start of the name (say TerranTechDefs - Copy.xml, the default for win8.1's copy/paste from/to that folder), but then it complains about duplicate entries in the file at launch A Better solution IMO would be to start modded xml files with something akin to this:
<modfile>
<Thisfile>SomeXmlFile.xml</ThisFile>
<DiffMethod>Replace/Modify/Append</DiffMethod>
<modded stuff...>
</modfile>
I may not be understanding what you are asking for. This is essentially what it does. If it is a new filename then it does an Append of everything in it. If it is an existing filename then it replaces everything in the former file with this one. It doesn't happen on a per entry basis.
Let's talk about why. It would be cool to have that on each entry. It wouldn't allow modders to do anything additional, and it wouldn't get rid of compatibility issues. But it would reduce compatibility issues by allowing modders to be more surgical with their changes. The nice thing about the existing system (load file A or file B ) is that the game itself is unaware of mods, we are handing mod assets at the file level. No code to parse these files and apply logic on each entry. The game is simply given a different view of the world when you have mods loaded or not.
This also works when talk about scenarios and the campaign. Where they have a locked view of the world. For them mods don't exist but their own local changes do. So they are a special saved game state. So if you run a GC3 campaign game Paul can change it however he would like and thats exactly how it will play, regardless of what mods are in your mod directory. You could also make a special scenario with rules just for that scenario and not worry about compatibility.
That isn't to say that being able to modify/delete at an entry level wouldn't be good. This is a first step. lets get it into mod makers hands and see where to go next.
Players have a mod manager that allows multiple mods to be loaded at the same time with an option to define which order mods are loaded in. Since mods would theoretically (I hope) just be the bare bones of the mods themselves & define for themselves how they are to treat the original xml, almost no additional validation need be performed above the existing validation already in place.
I'm all for this. It isn't in now and probably won't be in for Beta 5. But I would love to use Steam Workshop for this where you can find, install, uninstall, enable and disable all your mods in one place.
We went to bink2 for performance reasons. We would have to write code to handle both, and we may even need to pay an additional licensing fee to do that. I'll ask the Rad Game guys to see if there is a way modders can make Bink2 movies for GC3.
I want to preface this really long reply with this "Thanks for the reply, I had a lot of fun responding to your points & putting this together" a similar quote>comment quote>comment >repeat style seemed like the best format
I was trying to go with simple in example, and I agree that it was more than a little contrived to come up with one that wouldn't take much of a description for why someone might want to run them both. Your credits mod actually has a better place that should be able to do it and not have the problem you describe, but it sadly suffers from the same limitation it had in galcivII Specifically MapSizeDefs.xml
<GlobalCombatMods> <EffectType>ShipRange</EffectType> <Target> <TargetType>Ship</TargetType> </Target> <BonusType>Multiplier</BonusType> <Value>1.60</Value> </GlobalCombatMods>There is one for each maptype, unfortunately the only EffectType it allows is ShipRange I think (GC2 had a similar if not the same thing), if it was more flexible & supported other stuff, your mod could simply add this to it:
<GlobalCombatMods> <EffectType>CreditsInit</EffectType> <Target> <TargetType>Faction</TargetType> </Target> <BonusType>Multiplier</BonusType> <Value>2</Value></GlobalCombatMods>
and any newly created factions would automatically benefit from double the starting credits giving everything with 3000 creditsinit 6000 & anything starting with a value !3000 double !3000. add in things like tweaking research speeds, production capabilities, or anything else as what could be a quick and trivial way to make massive global changes. I don't remember what I tried with it in 0.6x
I both agree and disagree at the same time on this one & will use a mod I made for GalCivII as an example, I removed things from a number of core game buildings and techs (doc'd in linked post but the mod itself is no longer reachable due to new job). Using the improved GalCivIII capabilities, I would probably have broken it into multiple individual mods that could be loaded individually when it makes sense, but there are plenty of less extreme reasons than total conversion to want to remove things from the core game
Some of these issues are addressed on our side. Using your example (which would be a common one) of adding new techs to the Terran tech tree you can do entirely without replacing a base file. Create a new file for your new techs and they will be incorporated into the tree, as well as new techs from any other mods. So we will do what we can on our side to make it easy and clean.
Great to hear, going along with that train of an example, will a mod that includes a <InternalName>$example</InternalName> that already exists in the core files replace, merge, or error about duplicates with the original? I could see reasons why each might be desired, but I think replace would be the generally optimal option.
I may not be understanding what you are asking for. This is essentially what it does. If it is a new filename then it does an Append of everything in it. If it is an existing filename then it replaces everything in the former file with this one. It doesn't happen on a per entry basis.Let's talk about why. It would be cool to have that on each entry. It wouldn't allow modders to do anything additional, and it wouldn't get rid of compatibility issues. But it would reduce compatibility issues by allowing modders to be more surgical with their changes. The nice thing about the existing system (load file A or file B ) is that the game itself is unaware of mods, we are handing mod assets at the file level. No code to parse these files and apply logic on each entry. The game is simply given a different view of the world when you have mods loaded or not.
I was thinking more for the entire file than individual items in it since xmlname_addstuff.xml xmlname_replacestuff.xml could both be included in a single mod. Using your factiondefs_ghost.xml screenshot, the entire thing would be placed between <modfile><thisfile>factiondefs.xml</thisfile><diffmethod>append</diffmethod> and </modfile>. You are right that this can already be done as long as a mod adding an item with an InternalName already in the core files overwrites that one & the same is true for mods in a lower load order (assuming that is added). I think doing it on a per component/improvement/tech/etc level might be excessive since you could just have an xml file for the appends to $xmlfile, a second for replace if needed & a third for modify to do things like surgically remove bits from existing things like I did all over in the galcivII mod example, replacing the entire xml file would be excessive & incompatible if I were to break it among itself if I were to have done it with a mod for the life support tech changes, one for the entertainment tech changes, & a third for sensortech changes.. all three would need to remove something from the original tech tree (various bonuses) in order to insert them elsewhere without actually removing any techs (IIRC) and instantly become incompatible with each other allowing that sort of thing was the idea behind modify but would be unneeded if duplicate <InternalName>s clobbered ones loading later with the first version... guess I'd still need to make it one monolithic thing using that example
Generally I find that the xml files get included with a save game & making changes usually needs to restart. The only exception that I've noticed (accidentally at that) was mod some stuff> start a game> before saving alt-tab out & make more changes. The specific thing I did this with was the bonus with some kind of ship component in 0.6x while in the designer . I don't know if that was a fluke or just an interesting loophole.
xenonauts has an excellent example of this in action, essentially it's a simple launcher app that lets you see installed mods, make them active, set the load order, etc. it also doubles as a launcher that launches the game with mods as configured & the mods only come into play if you actually click the button to go into that part. something like that might(?) even be able to speed up whatever is happening between launching the game & Lord Kona/The drengin going away to give us the intro getting the video (if that's not doing some kind of beta debugging thingy?) by caching whats in memory to disk & just loading that if all the xml & game files have the same filetimes, maybe even reserve that to a default unchecked enable quickload option on that launcher since any problemsd caused by new drivers or something could be resolved by "try disable quickload &doing a standard load"
-Tetra
If this isn't stickied, this should be stickied. Great post.
I want to translate the sentence of the game into Japanese. However, I do not want to update the xml file every version up. I want the other file to do a sentence playing a game.
@folexe. All of the language files are in calciv3\data\english\text\ rather than the XML files that define the mechanics. As long as you only change the string values rather than names, it should just be a matter of translating the English text to the corresponding Japanese text
I did not know it. Thank you.
When the minor civs get integrated will we be able to mod in our own?
Any thoughts on a face/race picture creator? (similarly to how one can modify color/face/etc in FE)?
cheers,
So anyways, I was looking at some of the xml files this morning & stumbled upon a better place than mapdefs that should to do found a better way to do the starting 6000 credits mod. Without a working mods directory (or possibly related to my D:\SteamLibrary\SteamApps\common\Galactic Civilizations III installdir & C:\Users\James\Documents\My Games\GalCiv3\Mods split, or just some user error), I'll have to wait till it gets rolled out to us to test it as a stand alone mod
Specifically GalCiv3GlobalDefs.xml, but <globalcombatdefs> supports more than I thought and more importantly <globalfactionmods> won;t do a multiplier on creditsinit as the effecttype. this comes close:
<GlobalFactionMods> <EffectType>Credits</EffectType> <Target> <TargetType>Faction</TargetType> </Target> <BonusType>Multiplier</BonusType> <Value>2</Value> </GlobalFactionMods>
but it doesn't effect the starting credits & might modify other stuff too . Part of what makes this particular example so difficult is that factiondefs.xml has doesn't use <effecttype>s that would get triggeredby gamestart a upresolution, or whatever, if it did, you might be able to do things like make a scenario where you have to galactically dominate or band together lesser factions with a goal or deposing a genocidal/opverly powerful $factionleader that does not actually trigger a victory condition & just makes that faction less super by giving it a new leader & modifying some of the existing stats.
No. That system you refer to in FE is extensive (that's not a simple thing to do), and results pretty medicore end result (as I say that as the lead designer on FE, so I'm not knocking it). For GC3 we have opted for higher quality (and much easier tech) premade images. You can mix the character and background if you want,, and we will provide a sampling of hue shifted and tweaked versions for you to play with.
Heres a question say i wanted to completely scrap the trade system and redesign it ( i havent looked at the xml's to see whats there for trade) how difficult would that be?
My current thoughts are to
allow internal trading
increase the number of trade routes by planet (0-2) per planet plus some ideology/ improvement's
reduce profits to minimum
increase maintenance costs
add multipliers for additional trade routes per world and secondary trade routes
a lot of that -could- be done. Interns trading excepted (sorta & more on that later).
•• much of it would probably entail either removing or replacing core
stuff. The first would (I think) make your mod incompatible with just about any mod that removes stuff from the same files (is shipcomponentdefs or various techdefs filessince you can't have the old trading stuff available while replacing it. Duplicate entries could block the bits off with bad prerequs if it overwrites instead of throwing an err for duplicates.
• first you would want to add a new resource (or several)
-•.. Second you would want to add those resources to individual planet types(thereby potentially creating conflicts with other mods): The resource should probably get assigned to planet instead of faction.
• second you start putting trade modules back in that require .
those resources.
•• if you wanted to fake internal trading, make a planetary improvement/project that requires one of those resources generated by the planet & have it mske a second resource.assigned to faction.
••• add one or more improvement /projectsthat use that second resource.
potential problems abound. (my lack of playing with resources to determine their behaviors much being why they are almost all "I'm not sure but..." Type things.
• by default resources all get assigned to faction. I don't know if assigns to planet will work but assume they will be available on that planet
• I dont know if resources assigned to planet will be available to supported shipyard and am assuming it will... But you know what happens with that word...
• I dont know if destroying an improvement/completing a project that requires a resource will return it/destroythe resource.
• I dont know if/when resources mined ny star wars regenerate(if ever) & dont know if those generated by colonizing a planet will ever do the same if they do.
• the number of new buildings might make the improvements list unwieldy since it doesn't get tabs like ship components (that alone would allow a lot more modding!).
with that said.. If resources regenerate each turn & structures disable if the resource is ever missing (.i.e war/blockade /bombardment/destroyed building) it simply disables the improvement (as opposed to destroying it or keeping it active.... This could be an awful it of fun if done well& everything works.
Well i would like to no how to make a 130, player mod with 1400 stars. I would like to limit the actual player selection to 50 players, so as to not make this overwhelming, and the rest opponents. I would like to limit the diplomacy screen to the first 50 players you meet who are not upset or hostile towards you. This would not affect espionage, and war. The players on this screen would change based on thrir relations towards you.
If the next gamedon't have the research.ideas i came up with, i would like to be able to include them. I would like to change game mechanics for different races. Two good examples are i would like to make the krynn where after they have researched universal translator, and have advanced espionage on at least one race they can't research techs anymore, but now have to steal them. I would like to be able to remove the mechanic where the yor, and thalan don't have to rely on money, or approval. i would like to make some techs untradeable unstealable for some races , and not others. I would like to change the start settings where you start on a random starting planet. Different type, and class. If you start on a different type, then you can't colonise terran world, but you would have that advanced type of extreme planet instead. Terran colonization now would have to be a research option If you don't start out on terran worlds. I might include an option where you pick your tech paths for your race at the start of the game. To keep this from becoming inbalancing i would like to require you to pick certain types of paths in the beginning, so you at least have the minimum types. Different diplomacy, and research method options for different races would be nice.
I would just like to pre-thank the wonderful person or persons who is going to make a Babylon 5 mod - it will be AMAZE-BALLZ!!!!
We are making better worlds. All of them, better worlds....
There are many great features available to you once you register, including:
Sign in or Create Account