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.
Ok, so I'm trying to put my own custom faction in the game. I downloaded the Zathras mod to double check that everything seemed to be in the same order (the things that I changed, at least) and they are... When I go to launch the game, I get the following error message:
C:\Users\Tommy\Documents\My Games\GalCiv3\Mods\Revenants\Game\FactionDefs_Revenants.xml(69,15): error: element 'LeaderImageFG' is not allowed for content model '(InternalName,DisplayName,DisplayNameShort,LeaderName,Description,LeaderDescription?,RaceType,PersonalityTraits*,RaceTraits*,RequiresHomeworld?,HomeStarSystem,HomePlanetName?,StartingShips*,TechTree,StartingTechs*,HatedFaction*,ShipCallsign,LogoImage,LeaderThumbnail,LeaderImageFG?,LeaderImageBG?,NewsRobotMovie_Approach,NewsRobotMovie_Idle,StartupImage?,StartupTitle?,StartupDescription?,StartupTraitsDescription?,MapColorDef,UIColorDef?,FactionMoviesFGDef?,FactionMoviesBGDef?,FactionMusicDef?,Material1,Material2,Surface1,Surface2,Appearance,ShipStyleSet,CreditsInit,WarEnduranceInit,DefaultResistance,ManufacturingSliderInit?,MilitarySliderInit?,ResearchSliderInit?,WealthSliderInit?,InfluenceTallyInit?,TradeRouteInit?,StartingColonyPopulation?,AICategoryWeight?)'Anyone know what this is and what I did wrong?
As you can tell I have moded most of the stuff here and I have it working
<TechTree>Terran_Tree</TechTree> <ShipCallsign>FOP</ShipCallsign> <LogoImage>NTSTDKBlueRaceLogo00.png</LogoImage> <LeaderThumbnail>NTGC3_WT_Riker_Small.png</LeaderThumbnail> <LeaderImageFG>DStartGameTerran.png</LeaderImageFG> <LeaderImageBG>jamesclyne14.png</LeaderImageBG>
I was not able to mod the Terran Research Adviser
<NewsRobotMovie_Approach>Terran_ResearchAdviser_Approach.bk2</NewsRobotMovie_Approach> <NewsRobotMovie_Idle>Terran_ResearchAdviser_Idle.bk2</NewsRobotMovie_Idle>
<StartupImage>StartGameRiker.png</StartupImage> <StartupTitle>FACTION_TERRAN_StartupTitle</StartupTitle> <StartupDescription>FACTION_TERRAN_StartupDescription</StartupDescription> <StartupTraitsDescription>FACTION_TERRAN_StartupTraitsDescription</StartupTraitsDescription> <MapColorDef>TerranMapColors</MapColorDef> <UIColorDef>TerranUIColors</UIColorDef>
Make sure you have hind these or taeken them out. <!-- <FactionMoviesFGDef>TerranMoviesFG</FactionMoviesFGDef> <FactionMoviesBGDef>TerranMoviesBG</FactionMoviesBGDef> -->
<FactionMusicDef>TerranMusic</FactionMusicDef> <Material1>GC3_Ship_Material_Brushed_Metal</Material1> <Material2>Onyx_Material_01</Material2> <Surface1>GC3_Default_Surface_04</Surface1> <Surface2>GC3_Default_Surface_04</Surface2> <Appearance>GC3_Terran_Appearance</Appearance> <ShipStyleSet>TerranShipStyleSet</ShipStyleSet>
I really hope modders of galciv 3 will start hosting @ nexusmods.com website
it's so much better than the library of galciv 2 with a host of great features for modders & users.
I`ve tried and all I get is a Blank pic with text now.How did you get this to work or was it done in Beta 4 ??? If it was done in Beta5 Please tell how. Thanks!!Nasty!
I got the startup portrait to work in Beta 5, but it's finicky. I used the same dimensions and resolution for all my races, but only two, ('Zathras' and 'Cosmic Horror') are displayed properly. The others are either way off-center to show nothing, or only a shoulder (or tentacle whatever -- I'm easy). I'm still trying to figure that out. Dimensions: 860*540, Resolution: 92ppi.
Okay, question for the developers now. I'm tinkering around with TechTrees and ShipComponentDefs. I now have a few new. selectable components unlocked when the proper tech's been researched. I'd like to make a ship component that affects a ships stat, but the effect increases if the are more ships in the fleet with the same component.
For example, component raises [x] stat by [y] amount for each additional ship in fleet WITH that component. Does that make sense? Is it possible?
Thanks!
Yes. I had similar ideas in mind.
I can't see a way to do it because the Value in the modifier seems to have to just be an integer. I don't know whether it can be a variable. There don't seem to be any defined in the relevant schemas.
Yes. I had similar ideas in mind.I can't see a way to do it because the Value in the modifier seems to have to just be an integer. I don't know whether it can be a variable. There don't seem to be any defined in the relevant schemas.
I'm not a programmer and I've not done a lot of modding, but I'm pretty sure to accomplish something like what you want to do is to copy a ship component that effects the fleet (i.e., the <Scope> needs to be Fleet), change the <OnePerShip> field to false, change the <Type>, <SupportType>, and <EffectType> to the appropriate types, and then either use a flat bonus or a multiplier (in which case I believe 1 is equal to 100%).
I tried this by making a component called an HP Generator. I changed it's Type to HitPointAugment and left its SupportType Shields (because I wasn't sure if there was a valid Hit Point type, and then changed the EffectType to HitPointsCap with a BonusType of Multiplier and Value of 1. I think it applied the multiplier to the base value of each ship's HP, never to the modified value (so, for example, each new ship with this module increased a cargo-hull example's HP by 10, but a huge-hull example's HP by 200.
This is probably not exactly what you guys are after, but it is similar, I think. And maybe this will point you in the right direction.
Hi,
i tryed to create my own race with their own shipstyle. i built some templates for survey, colony and constructor sofar. the new shipstyle is already displayed in the shipstyle list for custom race but in the preview there is still the terran survey and not mine. i modified the factionshipstylesetdefs, shipdefs, shipclassdefs and the factiondefs XML for my race. i put the filename of my models to the ships startingcolony, startingsurvey, constructor, colony and survey.
now the problem. when i start a game with my new race, game crashes. it must be something with the ships, but i dont know how to fix it.
maybe someone could help. did i missed something or is there anything else i have to do before the game accepts my models? why is my surveyship not being shown when i select my shipstyle? do i need to use a special form for the filename?
btw, i created only ship templates, without any modules. could this be the problem?
thx in advance
Here is my effort
It's the 'Kerbal' race (how original lol), but I'd like folks to try it out to see how I've done.
http://hugefiles.net/wzd5e6mt1q5y
Not a lot of info out there ATM, modding wise, but I do hope on game release, that changes
virus scanner block the page for me scara_monga
Dunno how buddy?
It's 'hugefiles', pretty decent storage site
Blocked for me too scara_munga. Getting to it is hard too since you get spammed with adds and buttons you don't want. Might be a good storage site, but sharing???
Anyway, its not your fault or anything. Just saying.
Dunno how buddy?It's 'hugefiles', pretty decent storage site
"Decent", aside from insane amounts of pop-ups, and quite a few ads.
There are a lot of better file sharing sites out there: Mediafire, Dropbox, DepositFiles, Mega, just to name a few.
After wading through ads as if the site was made of custard*, I managed to download it.
You should probably have made a new StarSystem instead of changing DeadSystem - otherwise you ruin compatabiliy with other mods. PlanetDefs doesn't need to replace the whole file either
*And not just any custard. The real thick kind your gran makes that you need to slice with a carving knife.
I have a quick question for the developers:
In regards to culture traits and racial abilities, I see there are a decent number of actions that can be triggered, like:
<Action>DiscoverNearbyPlanetOfClass</Action>
<Action>AwardShipOfClass</Action>
<Action>TerraformTilesOnPlayerPlanets</Action>
etc
I was curious if there is an action that will allow me to award an improvement on the homeworld (or any world, doesn't matter, this is for a minor faction). Something like:
<Action>AwardImprovementOfType</Action>
<StringParam>PlanetaryDefenseSystem</StringParam>
I'm guessing something like this doesn't exist, but I thought I'd ask.
Alternatively, would it be possible to see a full list of all possible actions?
Thanks in advance.
Well, not to be funny, but this is 2015, and I don't have any pop-ups or ads from that site? Must be the way your browser is configured?, or not
Criticism noted. I ain't an expert at this lol, was my first effort, and mostly for fun, I'm just learning, but I thank you for your valuable input, it is much appreciated
BTW, I wasn't sure, as regards links, what the best to post was, so I apologise for that. Never intended to make things difficult whatsoever.
Here is Dropbox link regardless, in case anyone else wants to have a laugh.
https://www.dropbox.com/s/26xcf76mtguzaxo/Kerbal.rar?dl=0
Thx all!
I'm not at home at the moment, so I cant check which one, but the possible actions are defined in the schemas. Finding where something is defined in the schemas can be quite difficult (there is very little logic to them as far as I can tell). Start off with finding the schema for the xml file you are editing. If it's not defined there, check out the schemas "included" in that schema, the one's "included" in those schemas, and so-on.
Found it, it was in ModifierEffectTypes.xsd. Looks like there is actually an action that awards a free improvement. Awesome stuff, thanks for the help!
Sorry for the double post. I thought I'd found the right action, but it turns out the "AwardFreeImprovement" action is just the one from the colonizers ability that grants you a free rushed improvement.
So, action types aside, would anyone know of a way to somehow spawn a new improvement on a planet as a result of a trigger? I've been looking through all the actions and trigger types for the past hour and a half or so, but I haven't had any luck in stringing something together that would get it to do what I want. I'd appreciate any insight, even if it's just "Nope; impossible"
Can someone please test this modified version of my mod. Has its own starsystem now, and all seems OK, except I'm getting TWO 'stars' in the system??? Also, is there any way to change colour of planet types? Like, I want Jool to be green etc.
Many thx for any help guys
There are two stars because you've made it a BinaryStar system (Bi- meaning two). Change it to UnaryStar if you only want a single star.
To change the colour of a planet in the build screen, you can edit PlanetArtDefs. There are four sets of RGB-A tags that you can adjust however you want.
To change the colour of a planet in the main map, change BaseLayerGradientFile to point to a different gradient file (which are found in \Steam\SteamApps\common\Galactic Civilizations III\Gfx\planets ). For example, your Jool is Planet_Base_Mars_Gradient_01. If you change it to Planet_Base_Green_Gradient_02, it will look very green. You can, of course, make your own gradiant and use that. You can also change the BaseLayerTextureFile to adjust the texture of the planet.
I know there's been a lot of confusion regarding the mod directory structure, so I tried to simplify it to this: directories are only needed if there is a modified file present.
For example, in my Zathras mod I modifed the 'FactionDefs.xml' file, renaming it 'FactionDefs_Zathras.xml' and putting it in a 'Game' folder I created in the Zathras mod folder. Here's a screenshot:
Notice there are only two directories present: 'Game' and 'Gfx'(with it subdirectories). That is because they are the only directories with modified files.
The structure confused me initially, too. I put 'Core', 'Text', and the others in there, even though they were empty. Hope this helps, and happy modding!
I've been struggling with this too.
When the game crashes, check out the debug.err file in you MyGames/GalcivIII directory.
When I tried to use ship templates I made in the shidefs/shipclassdefs it threw up an error message (in the debug file) about ship blueprints having to point to "core or modded" ship models.
Going to continue playing around with it tonight so I'll let you know if I figure it out.
Damn I feel a fool (again) lol for not noticing that 'star' thing
Thank you Niedzielan!!!
Thank you very much
How does one change the colour of ships? I edited the RGB sliders in GC3AppearanceDefs, but that didn't do anything? Also, lol, I cant seem to figure out the planet positioning correctly, how does that work?
Thanks as ever guys!
Hey scara_monga. If by RGB sliders you mean the EngineColor, that doesn't effect the ship's color. I wrote a post on ship colors a while ago, but here is a relevant portion of what I said:
I hope that helps... maybe someone else has figured out how this works?
Also, here is a list of the numbers and the associated colors, though I'm sure the color names aren't exact as I was just approximating. It'll point you in the right direction, at least...
0 - white or very light gray1 - blue2 - cyan3 - another blue4 - gray5 - brown6 - yellow7 - red8 - light gray9 - purple10 - very light blue (I think)11 - orange12 - very light cyan (I think)13 - light purple14 - another light gray15 - black16 - dark gray17 - light brown18 - reddish gray19 - bright red20 - goldish21 - bluish gray22 - goldish yellow23 - another goldish yellow24 - another light gray25 - light yellow or gold26 - cyan (I think)27 - gray (I think)28 - purplish gray39 - dark purple30 - mint-ish green31 - purple32 - white33 - black
Maybe someone has a better/more accurate (or official) list... This was produced with trial and error, so if anyone has anything better, or knows how to make a truly custom color, that would be great!
There are many great features available to you once you register, including:
Sign in or Create Account