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 10)
12 PagesFirst 8 9 10 11 12 
on May 15, 2015

Unsure if this has been asked before or not. I am in the process of creating a custom Race, making it completely unbalanced for fun, because it is fun to play god every now and then. That being said, I am having difficulties on finding out how to edit the total number of Racial Abilities one can have. I was easily able to edit Racial Traits, but abilities have alluded me thus far.

Anyone know how to edit them to have more than just 2 points/abilities total? 

 

Thank you for your time!

on May 15, 2015

TyHanson

Unsure if this has been asked before or not. I am in the process of creating a custom Race, making it completely unbalanced for fun, because it is fun to play god every now and then. That being said, I am having difficulties on finding out how to edit the total number of Racial Abilities one can have. I was easily able to edit Racial Traits, but abilities have alluded me thus far.

Anyone know how to edit them to have more than just 2 points/abilities total? 

 

Thank you for your time!

Those are at the bottom of GalCiv3GlobalDefs.xml, or the actual abilities in AbilityDefs.xml

on May 15, 2015

Niedzielan


You can't quite just take off the <Specialization> tag, because it kinda breaks everything. What happens is that it does remove the specializations, but the tech tree continues on each of those specializations. This makes thousands of branches in the Tech Tree, which is too much for the game to handle.

 

What I've done is to leave the specializations as-is, but create duplicates that unlock after choosing a specialization. It's messy, especially when trading, but it works.

You can check out how I've done it: https://forums.galciv3.com/463831/page/1

 

 

Thanks man, I'll take a look at that.

on May 15, 2015

TheLegoCruiser


Quoting Nastytang,

ok I  played with this race here a few pics

 




Reduced 44%

 

Original 1280 x 720



 

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




Reduced 44%

 

Original 1280 x 720



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




Reduced 44%

 

Original 1280 x 720



 

 

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.

 

Download Link Please?

 

Download Link Please?

 

OK I`ll get it up in a day or two I`m sick in bed ATM.

 

on May 15, 2015

Is there a way to make it so that certain types of starbases or starbase effects will not stack? I.e. if I wanted to make Economic Starbases individually more powerful but incapable of stacking with one another, how would I do that?

Is there a way to scale the tech costs without messing around with colony production or output?

Is there a way to use formulas to compute values in the XML rather than going with fixed values? Say, if I wanted to subtract 0.001 influence from a colony per turn per tile affected by its influence, or if I wanted to scale a colony's population growth by some function of the number of colonies in the empire, where the function was not just (some constant) * (number of colonies).

Not sure this is the right thread for this, but it's the most appropriate official modding-related thread I see.

on May 16, 2015

I don't see an update on bink2 tools here. Was it discussed elsewhere?

on May 16, 2015

Hi. I wrote my first mod, but it doesn't work and I can't understand why. I wanted to add a racial characteristic to increase the size of the planets. In the selection window of race appears PlanetClass +200%. but it is not working.
Mod text:

RaceTraitDefs.xml

<RaceTrait>
<InternalName>Planetquality1</InternalName>
<DisplayName>Planetquality1</DisplayName>
<Description>Planetquality1</Description>
<Mod>
<EffectType>PlanetClass</EffectType>
<Scope>Global</Scope>
<Target>
<TargetType>Colony</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>2</Value>
</Mod>
</RaceTrait>

FactionDefs.xml

Create race append the following line:

<RaceTraits>Planetquality1</RaceTraits>

on May 16, 2015

RinRaa

Hi. I wrote my first mod, but it doesn't work and I can't understand why. I wanted to add a racial characteristic to increase the size of the planets. In the selection window of race appears PlanetClass +200%. but it is not working.
Mod text:

RaceTraitDefs.xml

<RaceTrait>
<InternalName>Planetquality1</InternalName>
<DisplayName>Planetquality1</DisplayName>
<Description>Planetquality1</Description>
<Mod>
<EffectType>PlanetClass</EffectType>
<Scope>Global</Scope>
<Target>
<TargetType>Colony</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>2</Value>
</Mod>
</RaceTrait>

FactionDefs.xml

Create race append the following line:

<RaceTraits>Planetquality1</RaceTraits>

 

I'd probably do it as an Ability, rather than a trait - otherwise how would it work if someone took over one of your planets? half of the tiles/buildings would just disappear.

Something like:

(EDITED)

  <RaceTrait>
    <InternalName>PlanetQualityAbility</InternalName>
    <DisplayName>PlanetQualityAbility_Name</DisplayName>
    <DisplayNameShort>PlanetQualityAbility_ShortName</DisplayNameShort>
    <Description>PlanetQualityAbility_Desc</Description>
    <IsAbility>1</IsAbility>
    <Triggers>
      <OnEvent>OnColonizePlanet</OnEvent>
      <Target>
        <TargetType>Colony</TargetType>
      </Target>
      <PerformAction>
        <Action>TerraformTilesOnPlanet</Action>
        <ValueParam>1</ValueParam>
        <ValueParam>0</ValueParam>
      </PerformAction>
    </Triggers>
  </RaceTrait>

first ValueParam is # of tiles to terraform.

on May 16, 2015

so this is my custom race ATM may change may not. I do need to work on my story for it tho.

 

PICS.

I don`t really like the small riker pic but for now I`ll have to use it i wanted a serious look there. 

And the start up screen tho the one causing all the trouble!!! As you can see it looks OK so Compromise and i`m using it. 

Diplomacy Screen yeah it`s the same one in the race set up screen.

The report Screen uses the same Screen as the Startup Screen.

 

As I learn more or do more i`ll update the race now it`s time to either find a creative writer or write something my self.

 

Derek is going to be hosting the Stream on Monday I i`ll have a few Question ready hopefully they`ll get answered.

One Why does the startupscreen not work.??

Two can we use or will we beable to use a still shot for our Tech adviser?? 

How did earth planet map get made/use/ How was it done???

 

Star systems and your own planets??

If I think of more i`ll post them in the stream post when it`s up. 

 

 

 

 

Nasty!

on May 16, 2015

Nice Niedzielan and Nasty!

Great stuff

 

Can you post your faction, or PM me it please ?

And I'm looking forward to the reply as to why the start screen does not work properly, yes

on May 16, 2015

scara_monga

Nice Niedzielan and Nasty!

Great stuff

 

Can you post your faction, or PM me it please ?

And I'm looking forward to the reply as to why the start screen does not work properly, yes

 

Scara I`ll PM you 2morrow!

on May 16, 2015

Niedzielan


Quoting RinRaa,

Hi. I wrote my first mod, but it doesn't work and I can't understand why. I wanted to add a racial characteristic to increase the size of the planets. In the selection window of race appears PlanetClass +200%. but it is not working.
Mod text:

RaceTraitDefs.xml

<RaceTrait>
<InternalName>Planetquality1</InternalName>
<DisplayName>Planetquality1</DisplayName>
<Description>Planetquality1</Description>
<Mod>
<EffectType>PlanetClass</EffectType>
<Scope>Global</Scope>
<Target>
<TargetType>Colony</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>2</Value>
</Mod>
</RaceTrait>

FactionDefs.xml

Create race append the following line:

<RaceTraits>Planetquality1</RaceTraits>



 

I'd probably do it as an Ability, rather than a trait - otherwise how would it work if someone took over one of your planets? half of the tiles/buildings would just disappear.

Something like:

(EDITED)

  <RaceTrait>
    <InternalName>PlanetQualityAbility</InternalName>
    <DisplayName>PlanetQualityAbility_Name</DisplayName>
    <DisplayNameShort>PlanetQualityAbility_ShortName</DisplayNameShort>
    <Description>PlanetQualityAbility_Desc</Description>
    <IsAbility>1</IsAbility>
    <Triggers>
      <OnEvent>OnColonizePlanet</OnEvent>
      <Target>
        <TargetType>Colony</TargetType>
      </Target>
      <PerformAction>
        <Action>TerraformTilesOnPlanet</Action>
        <ValueParam>1</ValueParam>
        <ValueParam>0</ValueParam>
      </PerformAction>
    </Triggers>
  </RaceTrait>

first ValueParam is # of tiles to terraform.

 

MMmmmm I`ll have to check this out!

thanks!

on May 17, 2015

Thanks for the reply. Everything works except the homeworld. How to make homeworld. How to address. can't findthe type of the variable. The name of the planet Thala.

 

<RaceTrait>
<InternalName>Planetquality1</InternalName>
<DisplayName>Planetquality1</DisplayName>
<DisplayNameShort>Planetquality1</DisplayNameShort>
<Description>Planetquality1</Description>
<IsAbility>1</IsAbility>
<Triggers>
<OnEvent>OnStartTurn</OnEvent>
<Target>
<TargetType>Colony</TargetType>
</Target>
<PerformAction>
<Action>TerraformTilesOnPlanet</Action>
<ValueParam>1</ValueParam>
<ValueParam>0</ValueParam>
</PerformAction>
</Triggers>

<RaceTrait>

on May 18, 2015

Define in FactionDefs:

<RequiresHomeworld>true</RequiresHomeworld>
<HomeStarSystem>ThalaSystem</HomeStarSystem>

 

 

Define in StarSystemDefs:

<StarSystemGroup>
<InternalName>FACTION_NAME</InternalName>  <!enter your faction name-->

<StarSystem>
<InternalName>ThalaSystem</InternalName>
<DisplayName>Thala System</DisplayName>
<Description></Description>
<OrbitLane>
<LaneType>Star</LaneType>
<Body>
<BodyType>UnaryStar</BodyType>
<BodyDef>ThalaStar</BodyDef>
</Body>
</OrbitLane>
<OrbitLane>
<LaneType>HabitableZone</LaneType>
<Body>
<BodyType>Planet</BodyType>
<BodyDef>PlanetThala</BodyDef>
<IsHomeworld>true</IsHomeworld>
<Position>5</Position>
</Body>
<OrbitLane>
<LaneType>NoRandom</LaneType>
<Body>
<BodyType>Asteroid</BodyType>
<BodyDef>NormalAsteroid</BodyDef>
<Position>0</Position>
</Body>
</OrbitLane>
</StarSystem>

</StarSystemGroup>

</StarSystemList>

 

Define in PlanetDefs:

<Planet>
<InternalName>PlanetThala</InternalName>
<DisplayName>Thala</DisplayName>
<PlanetType>Habitable</PlanetType>
<PlanetClass>17</PlanetClass>                <!change class to suit-->
<ArtDefine>EarthArt</ArtDefine>             <!change art to suit-->
</Planet>

 

Define in StarDefs:

<Star>

<InternalName>ThalaStar</InternalName>
<DisplayName>Thala Star</DisplayName>
<ObjectType>Star</ObjectType>
<Type>BlueStar</Type>                            <!change star to suit-->
<ArtDefine>BlueStarArt</ArtDefine>           <!change art to suit-->
<SFXDefine>STAR_AMBIENT</SFXDefine>
</Star>

</StarList>

on May 19, 2015

hi. It would be good to alter the size of the planets in the conquest and annexation through cultureHere is an example for conquest:

 

<Triggers>
<OnEvent>OnConquerPlanet</OnEvent>
<Target>
<TargetType>Colony</TargetType>
</Target>
<PerformAction>
<Action>TerraformTilesOnPlanet</Action>
<ValueParam>1</ValueParam>
<ValueParam>0</ValueParam>
</PerformAction>
</Triggers>


 

12 PagesFirst 8 9 10 11 12