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 6)
12 PagesFirst 4 5 6 7 8  Last
on Apr 30, 2015

And one last thing, I just noticed Brad (Frogboy) mentioned the following in the GalCiv III: Making your own custom race thread.

Frogboy

Quoting Bloodlust1983,

Can we PLEASE make something to edit ships like here http://uploads.ru/FmH2b.jpg ??

Or maybe tell me how can I change the hull colors by editing .xmls?

Post-release.

So this is a feature I think we'll be seeing (thank goodness).

on May 04, 2015

Thx ever so much trumpeter87 !

on May 07, 2015

How do I change the name of my custom faction's home system and its planets? For example, I created my own human faction. Their home planet is named Earth, but so is the star (which would be the Sun), and the other planets like Mars or Jupiter are Earth III or Earth IV, for example.

Also, how do I change the image that shows up in the screen when you start a new game? I mean the screen where it is written the faction's description, strengths and weaknesses, whose image usually is a large portrait of your faction leader. Yeah, I want to change that image.

on May 08, 2015

Starus

How do I change the name of my custom faction's home system and its planets? For example, I created my own human faction. Their home planet is named Earth, but so is the star (which would be the Sun), and the other planets like Mars or Jupiter are Earth III or Earth IV, for example.

Also, how do I change the image that shows up in the screen when you start a new game? I mean the screen where it is written the faction's description, strengths and weaknesses, whose image usually is a large portrait of your faction leader. Yeah, I want to change that image.

 

did you use the editor or did you edit the factiondefs.xml file ????

on May 08, 2015

Starus

How do I change the name of my custom faction's home system and its planets? For example, I created my own human faction. Their home planet is named Earth, but so is the star (which would be the Sun), and the other planets like Mars or Jupiter are Earth III or Earth IV, for example.

Also, how do I change the image that shows up in the screen when you start a new game? I mean the screen where it is written the faction's description, strengths and weaknesses, whose image usually is a large portrait of your faction leader. Yeah, I want to change that image.

 

1. Don't have a <HomePlanetName> in FactionDefs

2. Add your planets to PlanetDefs (with DisplayName being the name you want it)

3. Add those planets to your StarSystem in StarSystemDefs

 

Eg, I have

In FactionDefs

<HomeStarSystem>StarSystem</HomeStarSystem>

and in StarSystemDefs (in StarSystem)

      <OrbitLane>
        <LaneType>HabitableZone</LaneType>
        <Body>
          <BodyType>Planet</BodyType>
          <BodyDef>Planet1</BodyDef>
          <IsHomeworld>true</IsHomeworld>
        </Body>
        <Body>
          <BodyType>Planet</BodyType>
          <BodyDef>Planet2</BodyDef>
        </Body>
      </OrbitLane>

and in PlanetDefs

<Planet>
   <InternalName>Planet1</InternalName>
      <DisplayName>Planet 1</DisplayName>
      <PlanetType>Habitable</PlanetType>
      <PlanetClass>20</PlanetClass>
      <PlanetTrait>Planet2World</PlanetTrait>
      <ArtDefine>Planet1Art</ArtDefine>
 </Planet>
 
 <Planet>
   <InternalName>Planet2</InternalName>
      <DisplayName>Planet 2</DisplayName>
      <PlanetType>Habitable</PlanetType>
      <PlanetClass>20</PlanetClass>
      <PlanetTrait>Planet2World</PlanetTrait>
      <ArtDefine>Planet2Art</ArtDefine>
 </Planet>

on May 08, 2015

Nastytang
did you use the editor or did you edit the factiondefs.xml file ????

I used the ingame editor.

on May 08, 2015

Niedzielan

1. Don't have a <HomePlanetName> in FactionDefs

2. Add your planets to PlanetDefs (with DisplayName being the name you want it)

3. Add those planets to your StarSystem in StarSystemDefs

 

Eg, I have

In FactionDefs

<HomeStarSystem>StarSystem</HomeStarSystem>

and in StarSystemDefs (in StarSystem)

      <OrbitLane>
        <LaneType>HabitableZone</LaneType>
        <Body>
          <BodyType>Planet</BodyType>
          <BodyDef>Planet1</BodyDef>
          <IsHomeworld>true</IsHomeworld>
        </Body>
        <Body>
          <BodyType>Planet</BodyType>
          <BodyDef>Planet2</BodyDef>
        </Body>
      </OrbitLane>

and in PlanetDefs

<Planet>
   <InternalName>Planet1</InternalName>
      <DisplayName>Planet 1</DisplayName>
      <PlanetType>Habitable</PlanetType>
      <PlanetClass>20</PlanetClass>
      <PlanetTrait>Planet2World</PlanetTrait>
      <ArtDefine>Planet1Art</ArtDefine>
 </Planet>
 
 <Planet>
   <InternalName>Planet2</InternalName>
      <DisplayName>Planet 2</DisplayName>
      <PlanetType>Habitable</PlanetType>
      <PlanetClass>20</PlanetClass>
      <PlanetTrait>Planet2World</PlanetTrait>
      <ArtDefine>Planet2Art</ArtDefine>
 </Planet>

Thanks for the info. But how do I apply that to a faction that I created with the ingame editor?

on May 08, 2015

Starus

Thanks for the info. But how do I apply that to a faction that I created with the ingame editor?

I don't believe you can at this time. Not without modding the xml.

on May 08, 2015

You can change the name of your home world for an in game custom race first choose the home star system from the available list it will then take you back to the screen you entered the home system picker from. Their is a field labeled homework I believe  that will rename the home world what ever you put.

on May 08, 2015

Starus


Quoting Niedzielan,


1. Don't have a <HomePlanetName> in FactionDefs

2. Add your planets to PlanetDefs (with DisplayName being the name you want it)

3. Add those planets to your StarSystem in StarSystemDefs

 

Eg, I have

In FactionDefs

<HomeStarSystem>StarSystem</HomeStarSystem>

and in StarSystemDefs (in StarSystem)

      <OrbitLane>
        <LaneType>HabitableZone</LaneType>
        <Body>
          <BodyType>Planet</BodyType>
          <BodyDef>Planet1</BodyDef>
          <IsHomeworld>true</IsHomeworld>
        </Body>
        <Body>
          <BodyType>Planet</BodyType>
          <BodyDef>Planet2</BodyDef>
        </Body>
      </OrbitLane>

and in PlanetDefs

<Planet>
   <InternalName>Planet1</InternalName>
      <DisplayName>Planet 1</DisplayName>
      <PlanetType>Habitable</PlanetType>
      <PlanetClass>20</PlanetClass>
      <PlanetTrait>Planet2World</PlanetTrait>
      <ArtDefine>Planet1Art</ArtDefine>
 </Planet>
 
 <Planet>
   <InternalName>Planet2</InternalName>
      <DisplayName>Planet 2</DisplayName>
      <PlanetType>Habitable</PlanetType>
      <PlanetClass>20</PlanetClass>
      <PlanetTrait>Planet2World</PlanetTrait>
      <ArtDefine>Planet2Art</ArtDefine>
 </Planet>



Thanks for the info. But how do I apply that to a faction that I created with the ingame editor?

 

you`ll need to copy the games factiondefs.xml to your mod folder and the planetdefs.xml too then make those changes.

 

by putting them in the mod folder it does not change the main game planets and allows you to change your homeworld name 

on May 08, 2015

^Don't forget to change the name of the xml. files put in your mod folder or it will overwrite the game xml's. if they have the same names.

on May 10, 2015

 

I tried this but my race wont show.

 

 

https://www.dropbox.com/sh/ikxfp76e7u5f9np/AACIWXHvl4f_TXxcDvmpyLMAa?dl=0

 

 

In case someone wants to help debug....

on May 11, 2015

TheLegoCruiser

 

I tried this but my race wont show.


https://www.dropbox.com/sh/ikxfp76e7u5f9np/AACIWXHvl4f_TXxcDvmpyLMAa?dl=0

 
In case someone wants to help debug....

 

Few errors I notice right off the bat.

1. Your FactionDefs is missing some important code - add </FactionList> to end of file.

2. You have <StartingShips>FrigateStaticBlueprint</StartingShips> set, and I'm pretty sure one cant start with that ship?

3. You have <MapColorDef>Teal</MapColorDef>.  This is not a defined map colour. e.g, if I wanted green, then I would use the defined Thalan set - <MapColorDef>ThalanMapColors</MapColorDef>.

 

on May 11, 2015

I assume the frigate would be usable since its the same with the campaign level 00 (Tutorial)

 

 

Just to be clear the file setup is correct right? mygames/GalCiv3/Mods/LCFactionMod01TerranRemnant?

on May 11, 2015

I think 1 & 3 on that list are the big issues, particularly 1. Not sure 2 is an issue.

12 PagesFirst 4 5 6 7 8  Last