A trip through the fantasy worlds I enjoy

 

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.

  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 7)
12 PagesFirst 5 6 7 8 9  Last
on May 11, 2015

Replace content in FactionDefs with this, tested and works:

Adding back the <StartingShips>FrigateStaticBlueprint</StartingShips> causes the game to hang, so I removed it.  Set the UI/Map colours to Altarian, not quite teal, but near enough.  Your logo is not required, as it is the same as default, so no need to reference it, so removed reference.  Added in finishing code.

 

 

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<FactionList
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/FactionDefs.xsd">
<!-- Created with the Gal Civ 3 Editor -->
<!-- FactionDefs.xml -->

<Faction>
<InternalName>FACTION_REMNANT</InternalName>
<DisplayName>Terran Remnant</DisplayName>
<DisplayNameShort>Remnant</DisplayNameShort>
<LeaderName>Marcus Cory</LeaderName>
<Description>The Terran Remnant is a fleet that managed to escape from the Dread Lords and is now on the fringes of the galaxy. They must rebuild the Terran Alliance and
save Earth.</Description>
<LeaderDescription>Commander of the T.A.S. Revenge Marcus Cory believes his fleet to be the only hope for humanity.</LeaderDescription>
<RaceType>Major</RaceType>
<PersonalityTraits>Opportunistic</PersonalityTraits>
<PersonalityTraits>Expansionist</PersonalityTraits>
<RaceTraits>StarfaringAbility</RaceTraits>
<RaceTraits>ColonizersAbility</RaceTraits>
<RaceTraits>Productive2</RaceTraits>
<RaceTraits>Influential3</RaceTraits>
<RaceTraits>Economical2</RaceTraits>
<RaceTraits>Content3</RaceTraits>
<RaceTraits>Fertile1</RaceTraits>
<RaceTraits>Handy1</RaceTraits>
<RaceTraits>Traders3</RaceTraits>
<RaceTraits>Brutal2</RaceTraits>
<RaceTraits>Resilient3</RaceTraits>
<RaceTraits>Adventuresome1</RaceTraits>
<RequiresHomeworld>true</RequiresHomeworld>
<HomeStarSystem>DeadSystem</HomeStarSystem>
<StartingShips>ColonyStaticBlueprint</StartingShips>
<StartingShips>SurveyStaticBlueprint</StartingShips>
<StartingShips>ScoutStaticBlueprint</StartingShips>
<TechTree>Terran_Tree</TechTree>
<ShipCallsign>T.R.S.</ShipCallsign>
<LogoImage>RaceLogo00.png</LogoImage>
<LeaderThumbnail>Remnant_Small.png</LeaderThumbnail>
<NewsRobotMovie_Approach>Terran_ResearchAdviser_Approach.bk2</NewsRobotMovie_Approach>
<NewsRobotMovie_Idle>Terran_ResearchAdviser_Idle.bk2</NewsRobotMovie_Idle>
<StartupImage>StartGameTerran.png</StartupImage>
<StartupTitle>To rebuild the Alliance...</StartupTitle>
<StartupDescription>Escaping the Dread Lords through a wormhole the T.A.S. Last Hope and it's escorts now roam the outskirts of the galaxy. They will need to find
somewhere to call home or they will be doomed.</StartupDescription>
<StartupTraitsDescription>With only a colony ship and several warships the Remnant will need to find a habitable planet before supplies runs out.</StartupTraitsDescription>
<MapColorDef>AltarianMapColors</MapColorDef>
<UIColorDef>AltarianUIColors</UIColorDef>
<FactionMoviesFGDef>TerranMoviesFG</FactionMoviesFGDef>
<FactionMoviesBGDef>TerranMoviesBG</FactionMoviesBGDef>
<FactionMusicDef>TerranMusic</FactionMusicDef>
<Material1>GC3_Ship_Material_01</Material1>
<Material2>GC3_Ship_Material_02</Material2>
<Surface1>GC3_Default_Surface_01</Surface1>
<Surface2>GC3_Default_Surface_02</Surface2>
<Appearance>GC3_Terran_Appearance</Appearance>
<ShipStyleSet>TerranShipStyleSet</ShipStyleSet>
<CreditsInit>5000</CreditsInit>
<WarEnduranceInit>90</WarEnduranceInit>
<DefaultResistance>0.4</DefaultResistance>
<InfluenceTallyInit>10</InfluenceTallyInit>
<StartingColonyPopulation>10</StartingColonyPopulation>
<AICategoryWeight>
<Military>15</Military>
<Growth>10</Growth>
<Tech>20</Tech>
<Diplomacy>15</Diplomacy>
<Expansion>20</Expansion>
<Wealth>10</Wealth>
<Influence>5</Influence>
<Fortification>15</Fortification>
</AICategoryWeight>
</Faction>

</FactionList>

 

on May 11, 2015

Well the whole point of me using xml instead of the in game editor was to get the frigate...

 

Shame

on May 11, 2015

TheLegoCruiser

 

I tried this but my race wont show.


In case someone wants to help debug....

 

^^ And here was me thinking it was because your race wouldn't show? ^^

Anyway, your most welcome. 

on May 11, 2015

Even after using the XML you provided my race does not appear in the choose a race screen

on May 11, 2015

What version of the game do you have?

on May 11, 2015

ok I  played with this race here a few pics

 

 

Here it teal you wanted it is in the ColorDefAlts.xml file  it is called  AltTeal.

 and here the screen just before you go to your Planet! with what you gave us this is what i did.

 

 

Sorry On the ship I had no luck with It. I wonder if it is restricted because of tech or hull size or if there another file we have yet to learn about.

 

I had to rebuilded the factiondefs.xml file to get this to work.

 

on May 12, 2015

Nastytang

Here it teal you wanted it is in the ColorDefAlts.xml file  it is called  AltTeal.

 

Do you think it would it be possible to define new colours within this file?

Also, how does the planet positioning work?  I take it (5) is the centre, but can't figure out the rest?

on May 12, 2015

You can certainly  define new colors I've seen others produce color mods. 

on May 12, 2015

You need to extend 3 files:

ColorDefs.XML, FactionMapColorDefs.xml, UIColorDef.xml

In ColorDefs.xml you can define new colours with their RGB values

 

This example will give you a really blue map and UI:

 

[code]

 <!-- Blues Colors -->     <Color>     <InternalName>BluesRaceBlue</InternalName>     <Red>0</Red>     <Green>0</Green>     <Blue>255</Blue>   </Color>     <Color>     <InternalName>BluesMapBlue</InternalName>     <Red>0</Red>     <Green>0</Green>     <Blue>255</Blue>   </Color>     <Color>     <InternalName>BluesUIBlue</InternalName>     <Red>0</Red>     <Green>0</Green>     <Blue>255</Blue>   </Color>     <Color>     <InternalName>BluesUIDefault</InternalName>     <Red>100</Red>     <Green>135</Green>     <Blue>160</Blue>   </Color>     <Color>     <InternalName>BluesUIDefaultHot</InternalName>     <Red>100</Red>     <Green>170</Green>     <Blue>235</Blue>   </Color>     <Color>     <InternalName>BluesUIDefaultHighlight</InternalName>     <Red>255</Red>     <Green>204</Green>     <Blue>0</Blue>   </Color>     <Color>     <InternalName>BluesFOWUnexplored</InternalName>     <Red>20</Red>     <Green>20</Green>     <Blue>90</Blue>   </Color>[/code]

 

 

 

The colours that you defined can then be used to create colour themes for the map and UI:

 

FactionMapColorDefs.xml

 

[code] 

  <MapColorDef>     <InternalName>BluesMapColors</InternalName>     <DisplayName>UI_Color_Blues</DisplayName>     <FactionColor>BluesUIBlue</FactionColor>     <GridColor>BluesRaceBlue</GridColor>     <InfluenceColor>BluesMapBlue</InfluenceColor>     <InfluenceLine>       <MinAlpha>200</MinAlpha>       <MaxAlpha>200</MaxAlpha>     </InfluenceLine>     <InfluenceBlur>       <MinAlpha>0</MinAlpha>       <MaxAlpha>80</MaxAlpha>     </InfluenceBlur>     <ResourcePathLineColor>UIDefaultHighlight</ResourcePathLineColor>     <TradePathLineColor>BluesMapBlue</TradePathLineColor>     <ShipyardPathLineColor>UIDefault</ShipyardPathLineColor>     <StrategicIconColor>BluesUIBlue</StrategicIconColor>     <RallyPointColor>BluesUIBlue</RallyPointColor>   <CampaignWaypointColor>BluesUIBlue</CampaignWaypointColor>   </MapColorDef>

[/code]

 

UIColorDef.xml

 

[code] 

  <UIColorDef>     <InternalName>BluesUIColors</InternalName>     <DisplayName>UI_Color_Blues</DisplayName>     <Color>       <OriginalColor>UIDefault</OriginalColor>       <OverrideColor>BluesUIDefault</OverrideColor>     </Color>       <Color>       <OriginalColor>UIDefaultHot</OriginalColor>       <OverrideColor>BluesUIDefaultHot</OverrideColor>     </Color>   <Color>    <OriginalColor>UIDefaultHighlight</OriginalColor>    <OverrideColor>BluesUIDefaultHighlight</OverrideColor>   </Color>   <Color>    <OriginalColor>FOWUnexplored</OriginalColor>    <OverrideColor>BluesFOWUnexplored</OverrideColor>   </Color>   </UIColorDef>

[/code]

 

Last but not least you should activate these colours for your faction in FactionDefs.xml :

 

[code]

<MapColorDef>BluesMapColors</MapColorDef>         

<UIColorDef>BluesUIColors</UIColorDef>

[/code]

 

 

 

Edit: Hmm, it messed up the XML format - sorry for that.

on May 13, 2015

Thx very much Ronnar!! +1

Interesting problem now though, unrelated.

I've created a few mods, but the latest one, for some reason, will not display the startup image?  Every other mod does, and I've poured over the code till my eyes bleed, lol, and cannot find a reason for it?  Changed bit depth's on image etc, but it makes no difference?

Stumped on this one.

on May 13, 2015

[quote who="trumpeter87 ! " reply="100" id="3548317"]
Thx very much Ronnar!! +1

Interesting problem now though, unrelated.

I've created a few mods, but the latest one, for some reason, will not display the startup image?  Every other mod does, and I've poured over the code till my eyes bleed, lol, and cannot find a reason for it?  Changed bit depth's on image etc, but it makes no difference?

Stumped on this one.
[/quote]

what size is the pic ??? and If you don`t mine posting the pic.

on May 13, 2015

Here is mod. Doesn't matter what pic is placed in folder, nothing shows up, even pics that work in other mods?

Quite a few modded files in there though, but strange one...

I posted mod in this thread - > https://forums.galciv3.com/460614/page/1/#3548815

on May 13, 2015

OK scara I`ll look at it. thanks!

 

 

 

EDit winrar and 7zip say nothing there!!???

 

 

Files Bad

on May 13, 2015

You need Winrar 5+ to extract, its a RAR5 file

 

OK here is normal RAR version -> https://mega.co.nz/#!79wE2BAL!uEwCyEP4aBN-hZkxqaYsovfERmgQgXdAnMm3sFZqWNE

on May 13, 2015

scara_monga

You need Winrar 5+ to extract, its a RAR5 file

 

OK here is normal RAR version -> https://mega.co.nz/#!79wE2BAL!uEwCyEP4aBN-hZkxqaYsovfERmgQgXdAnMm3sFZqWNE

 

LOL so i`m abit behind the times i`m I LOL

12 PagesFirst 5 6 7 8 9  Last