A trip through the fantasy worlds I enjoy

 

In a prior Developer Blog (http://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.

  1. Adding things. This is the easiest, just create a new XML file, with a new name. It doesn’t matter what the name is, as long as it isn’t the same as an existing file. Personally I like using the same name that it uses in GC3, but I append the mod name to make sure it is unique. The only other thing that matter is that it is in the right directory. Faction Defs, Star System Defs and Planet Defs are all in the Game folder (because if you look at the XML in the GalCiv’s real directories those files are in the Game folder). You have to match GalCiv3’s file placement so that the modded files load correctly. Add a new file in here with just the new Faction, Star System, Planet, Tech, Improvement, Ideology Trait, etc (there are about 150 moddable xml files in GC3). Anything Paul can add to the game, you can add too.
  2. Modifying things. What if you want to increase the amount of credits the Iridium to start the game with? If you ever want to modify an existing object you just need to copy the file from the GC3 directories and modify what you like, but be sure to keep the name exactly the same. When the game starts if it sees a file with an identical name in your mod directory to one of the base files it uses your mod file instead. This gives you ultimate control over overwriting anything in the base game (without ever having to modify a base game file).
  3. Removing things. Since you can overwrite any of the existing XML files our deletion solution is built right in. If there is a particular global event that annoys you can copy that xml file into your mod directory, delete that event form your copy and voila, it’s gone.

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.


Comments (Page 2)
on Feb 22, 2015

I did not know it. Thank you.

on Feb 22, 2015

When the minor civs get integrated will we be able to mod in our own?

on Feb 22, 2015

Any thoughts on a face/race picture creator?  (similarly to how one can modify color/face/etc in FE)?

 

cheers,

on Feb 23, 2015

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.

on Feb 23, 2015

tid242

Any thoughts on a face/race picture creator?  (similarly to how one can modify color/face/etc in FE)?

cheers,

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.

on Feb 23, 2015

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

on Feb 23, 2015

androshalforc

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.

on Feb 23, 2015

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.

on Feb 23, 2015

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....

on Feb 23, 2015

admiralWillyWilber

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 ear. 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 hsve to rely on money, or approval.

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 instead. Terran colonization now eould have to be a research option.

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 beginnin,  so you at least have the minimum types. Different diplomacy, and research method options for different races would be nice.

  • factiondefs.xml, copy/paste with minor changes if it doesn't like duplicates, repeat till 150. The 1400 stars thing might be impossible given the current larger galaxy type added with beta4 previously caused overflow problems in beta3
  • Mod the diplomacy screen as described, UI modding like that might not be possible  & such a capability sounds like it would be the sort of thing you'd need access to the source code for at least some of it.
  • you could probably do most of what you describe for tech tree changes using existing capabilities, but keep in mind the currently unimplimented espionage state. In fact, myself or another might have pointed that out in the thread where you asked it previously but could be wrong.
  • random starting planet: highly doubt it's even possible, some of these are really starting to sound bizarre "yea but can it.." things you know it cant
  • not allow colonize standard habitable worlds?  Probably doable by moving them into extreme worlds (at worst) & changing the colonization techs for the unlucky race to not get the required one
on Feb 24, 2015

Derek Paxton

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.


 



Thanks for even looking into it  

on Feb 25, 2015

Derek Paxton


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.

 

Fair enough, thanks for the clarification.

 

In a round-about way my question could be construed as a request for plenty of pics to choose from.

 

cheers,

on Mar 10, 2015

Will you include some sort of balancing tool for modders? 

I could imagine a bootstrap analysis where you have the computer simulate 50 games overnight, one after another, with different scenarios, delivering a result like:
"Your custom race [Ghosts of Abbadon] won 15 of 50 games (above average). 20 scenarios were lost in early-game, 3 in mid-game, 12 lost in late game.
Most common victory: Conquest. 
Preferred environment: lengthy games, big galaxies.
Weakness: Vulnerable in early game.
Strength: Dominates mid-game.
Suggested balancing: reduce point total by 1"

on Mar 14, 2015

Elyandarin

Will you include some sort of balancing tool for modders? 

I could imagine a bootstrap analysis where you have the computer simulate 50 games overnight, one after another, with different scenarios, delivering a result like:
"Your custom race [Ghosts of Abbadon] won 15 of 50 games (above average). 20 scenarios were lost in early-game, 3 in mid-game, 12 lost in late game.
Most common victory: Conquest. 
Preferred environment: lengthy games, big galaxies.
Weakness: Vulnerable in early game.
Strength: Dominates mid-game.
Suggested balancing: reduce point total by 1"

I think the suggested balancing would be really tough  to actually make worthwhile.  For example, lets say the ghosts was perfectly balanced for arguments sake.... but.... the 3 starting colony ships was massively overpowered or the trouble was in a custom tech tree it used.

With that said, I'd love a way to pull a post game report from a soak game similar to the one you get at the end of a plague inc. game or the ability to tell the game to just freaking soak games on a loop 

on Mar 25, 2015

Hello Derek,
is it possible to make new 3D models for ship parts and systems?

What 3D format you using, and what software is needed to create a new models?
For example I want to change the chaff model (which is now looks like a 
disk, with something more close to reality, something like 
that: http://www.adelaidedivewreck.com.au/jan-2008-visit/chaff_launchers.JPG
)
What I must do to make a new model?
 
Best Regards!