Get the inside scoop on my doings at Stardock.
Releasing Your Inner Slartibartfast
Published on February 7, 2006 By CaretFarmer In Modding

If you've been itching to make your own dream planet and don't mind doing a little minor surgery on the game's data files, read on! It's not difficult, but it does require rudimentary knowledge of XML and basic file editing skills. For this example, I'll be changing the appearance of the Yor's home star system and planets, but the steps can be applied to any of the game's races (including the custom race). I won't cover every little detail, but by the time you've finished reading this article, you should have enough information to go forth and create your own custom planets.

Before you do anything else, you should make backup copies of the files you're going to be editing, namely, CustomPlanets.xml and RaceConfig.xml. You'll find these files in the Data\English directory of the game's install directory. It is possible to make the game unplayable if you mess up these files, so save yourself a tech support call by backing up these files! Also, make sure you're editing the normal game data files and not the Metaverse data files--changing the Metaverse data files in any way could very well make it so that you can't submit games to the Metaverse!

Now that you've backed up those files, open CustomPlanets.xml in notepad. I recommend using notepad because it won't try to add strange text formatting tags or other XML junk that can derail the game's XML parsing code. If your favorite editor doesn't add anything more than what you type, you can use that too.

In CustomPlanets.xml, find the StarSystem node whose Name attribute is "Icos". This node defines the data used to describe the Yor's star system. I edited mine to look like this:

<StarSystem Name="Custom Yor">

<DisplayName>Lapeer</DisplayName>

<Planet Name="Almont">

<DisplayName>Almont</DisplayName>

<Class>15</Class>

<RAWTerrain>Strange.raw</RAWTerrain>

<Rings>gfx/planets/R03.png</Rings>

</Planet>

<Planet Name="Lapeer II">

<DisplayName>Lapeer II</DisplayName>

<Class>0</Class>

</Planet>

<Planet Name="Lapeer III">

<DisplayName>Lapeer III</DisplayName>

<Class>0</Class>

</Planet>

<Planet Name="Lapeer IV">

<DisplayName>Lapeer IV</DisplayName>

<Class>4</Class>

</Planet>

</StarSystem>

Here's what I changed from the standard Yor star system:

1. In this example, I've taken away one of the (useless) class 0 planets that the Yor would normally start out with. Feel free to add or remove planets as you like, but to avoid undesired behavior, stars should always have between 1 and 5 planets (inclusive).

2. I've changed the Name attributes and DisplayName tags so that the Yor's star is named "Lapeer" and their home planet is named "Almont". The other planets in the system are named "Lapeer II", "Lapeer III" and "Lapeer IV".

3. I bumped up the initial quality of the Yor's home planet from 10 to 15 by changing the value of the Class tag. Planet classes can range from 0 to 26, but you should make sure the home planet is usable (i.e., is at least class 3).

4. Finally, I gave the home planet a custom surface by specifying the name of a raw bitmap file. More on that a little later.

Save your changes and open RaceConfig.xml. Find the Race tag with a Name attribute of "Yor Collective". Change the value of the Homestar tag from "Icos" to "Lapeer" and the value of the Homeworld tag from "Iconia" to "Almont". Save your changes. You're two thirds of the way there!

 

The final step in creating your own custom planets is to make a height map that describes the planet surface. For this purpose, GalCiv 2 uses 384x192 8-bit grayscale images saved out as raw (i.e., headerless) data. The simplest way to create a height map is to use an off-the-shelf paint program to "paint" a height map. I use Paint Shop Pro, the programmer's paint program, but Photoshop will probably do the trick too. Basically, the whiter a pixel is, the higher the elevation in the generated terrain. So, pure black pixels will appear as deep oceans and pure white pixels will appear as snow-covered mountain peaks. What happens in between depends on the planet's class, but those details would probably bore you and they're apparent enough when you see what happens in the game. Once you've created your height map, save it to the Data\HeightMaps directory of the GalCiv2 install directory. For our example, I named my height map file Strange.raw.

If you made these changes with the game running already, you'll need to exit the game and restart it for your changes to take effect. Start a new game playing as the Yor and enjoy your handiwork!


Comments (Page 3)
7 Pages1 2 3 4 5  Last
on Mar 22, 2006
For whatever reason, this doesn't work for me at all. I'm not new to file editing, and because of the generous help of yourself and others , I've been able to completely replace the default Altarian-style Colony Ship, Constructor, and Transport with those of my own design. I've also replaced all the freighters. By editing RaceConfig I've also managed to finally replace “Custom Star” with the slightly more exotic name, "Cyrannus". BUT: No matter what I do to CustomPlanets, all of the non-homeworld planets in the system keep getting named "Cyrannus I", "Cyrannus III", "Cyrannus IV", etc. I tried editing the name of a pre-existing known planet ("Mars" to "Ares") just to see if altering CustomPlanets was doing anything at all. It wasn't. "Mars" remained "Mars". I tried moving the Custom Planets folder entirely, to see if I could make the game crash. STILL nothing. I'm beginning to thing that CustomPlanets is, in fact, not connected to anything at all. I haven't the slightest clue how you got yours to work. ‘Use Mods’ is selected, and I tried putting a copy of CustomPlanets in the Mod folder just for good measure, but no luck. Suggestions?

PS: The simple solution, I realize, is to just manually change the planet names every time I start a new game. But then, when have modders been content with the simple solution? (Or with doing things manually for that matter)
on Mar 26, 2006
Been having similar problems. I want my home star to have -one- planet named Orion... Does it work? NoOOoo. It's like CustomPlanets is dully ignored by the game.
on Apr 29, 2006
I've been able to get the customplanet.xml to work.

What exactly are you changing in the file?
on Apr 29, 2006
How does ring sizes work? I can't seem to figure out how the size of rings change when I put different numbers in and fields
on May 18, 2006
Is there a way to "set" or "dictate" a planet's tile bonuses?
on May 18, 2006
for asokgreen you need that the plant name and the display name wiil be the same like this:

if my planet name is Earth so it will apper like this: below this you need to be sure that there is a line like this: Earth if there is no line like this the planet name will be like the star name with I,II,III,IV,V.
if you want star name to be "sol" you need to do the same thing but in the star name line
on Jul 28, 2006

Originally, the minors could colonize, but that was turned off after many people complained. 

The reason that you can't use CTRL+Shift+Z with the minor races is because we don't track the range or zone of control (ZOC) information for the minor races, since they can't colonize anyway.  It saves a lot of memory and processing time when calculating the ranges.

on Aug 08, 2006
Neither HAN891 or Myself (RENFL) make these models, they are conversions of models from other people, and other games... credit is in the readme files.

**odd i didn't post this here, no idea how it got here**
on Sep 28, 2006
Hmm after headaches from reading all this replies, wondering how can i import my custom planets into custom maps??? Everytime i load my mod and the custom map from CG2Builder it shows only default pattern around the world also all the tiles has bonuses on them.

Could someone plz tell me how to work around them?

----
Nvm i figured out how to do it!
on Oct 04, 2006
Hmm after headaches from reading all this replies, wondering how can i import my custom planets into custom maps??? Everytime i load my mod and the custom map from CG2Builder it shows only default pattern around the world also all the tiles has bonuses on them.


Could someone plz tell me how to work around them?


----
Nvm i figured out how to do it!




Can you please tell me how ?
on Oct 05, 2006
Can you please tell me how ?


Sorry i didnt posted eariler... unfort it didnt work on scripting the GC2.map along with CustomPlanets.XML so im waiting for them to improve the GCBuilder.

It is possible to override that GC2.map if you have the right codes and programming skills, unfort im not sure which functions to use except the one in CustomPlanets.XML

So there no telling when this will be release.
on Oct 29, 2006
Could somebody help me to edit StarTypes.xml I have beeen trying and trying and can't seem to get any changes to work. All I want to do is change the Yellow abundant habitable yellow star with the random hardly used red star.

*Defualt*



Texture,Halo

StarType InternalName="Blue"
6
BlueStar.png
BlueStarHalo.png
0.0, 0.2, 0.5, 1.0

StarType InternalName="Purple">
5
PurpleStar.png
PurpleStarHalo.png
0.5, 0.0, 0.5, 1.0

StarType InternalName="Orange">
4
OrangeStar.png
OrangeStarHalo.png
1.0, 0.5, 0.25, 1.0

StarType InternalName="Red">
3
RedStar.png
RedStarHalo.png
0.85, 0.0, 0.0, 1.0

StarType InternalName="Yellow">
2
YellowStar.png
YellowStarHalo.png
1.0, 1.0, 0.0, 1.0

StarType InternalName="Green">
1
GreenStar.png
GreenStarHalo.png
0.0, 0.7, 0.0, 1.0

StarType InternalName="White">
0
WhiteStar.png
WhiteStarHalo.png
1.0,1.0,1.0,1.0

StarType InternalName="Sol">
7
YellowStar.png
YellowStarHalo.png
1.0, 1.0, 0.0, 1.0



What I would like to change it to.




Texture,Halo

StarType InternalName="Blue">
6
BlueStar.png
BlueStarHalo.png
0.0, 0.2, 0.5, 1.0

StarType InternalName="Purple">
5
PurpleStar.png
PurpleStarHalo.png
0.5, 0.0, 0.5, 1.0

StarType InternalName="Orange">
4
OrangeStar.png
OrangeStarHalo.png
1.0, 0.5, 0.25, 1.0

StarType InternalName="Red">
3
YellowStar.png
YellowStarHalo.png
1.0, 1.0, 0.0, 1.0

StarType InternalName="Yellow">
2
YellowStar.png
YellowStarHalo.png
1.0, 1.0, 0.0, 1.0

StarType InternalName="Green">
1
GreenStar.png
GreenStarHalo.png
0.0, 0.7, 0.0, 1.0

StarType InternalName="White">
0
WhiteStar.png
WhiteStarHalo.png
1.0,1.0,1.0,1.0

StarType InternalName="Sol">
7
RedStar.png
RedStarHalo.png
0.85, 0.0, 0.0, 1.0




Should I be changing the internal name too? (once again asks for more star color randomness when choosing abundant.)

Edit: I also tried moving the file from C:\Program Files\Stardock\TotalGaming\GalCiv2\Mods\INVADER-Mod\Data

to
C:\Program Files\Stardock\TotalGaming\GalCiv2\Mods\INVADER-Mod\Data\StarTypes

I have also looked up the modding information at: A Brief Guide to Modding Galactic Civilizations 2: Dread Lords

Any help would be appreciated.
on Nov 14, 2006
Are we able to edit planetary resources yet?
on Dec 25, 2006
I can not get this to work. I've been trying to rename the Terran Sol star system and nothing.. It's as if there is another file over wrighting what changes I am making.

The game will overwright the planet and star name to "Earth" then every other planet will show as "earth I, earth II," ect ....

I seen others have similar issues, but no one has posted how to fix it.

Any one know?
on Dec 25, 2006
The game will overwright the planet and star name to "Earth" then every other planet will show as "earth I, earth II," ect ....


That only happens when the game can't find the system definition and has to generate one itself. You probably made a mistake in your modded file which caused that definition or the whole file to become invalid (you can see if it's the latter case if other races have similar Homeworld, Homeworld I, Homeworld II... etc systems).
7 Pages1 2 3 4 5  Last