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 2)
7 Pages1 2 3 4  Last
on Feb 14, 2006

In response to another modding request, I've written another article related to the nuts and bolts of changing planet appearances.  In this one, I describe how you can change the text that appears when you click on tile on a planet.  For example, in version 1.0, usable tiles are always called "prairies" regardless of what kind of planet it is; this article describes how you can change it so that the text (and picture) displayed is more appropriate.  Eventually, Stardock will probably release an update that has more-appropriate text and pictures for non-Earthlike planets, but if you can't wait until then or if you want to roll your own, have at it!

https://www.galciv2.com/Council/Forums.aspx?ForumID=GC2&AID=325438#0

on Feb 14, 2006
Well, I am not sure that everybody is allowed to go the forum associated with the link.
on Feb 14, 2006
It's not hard, it's just that the map editor utility is a little, um, tempermental at the moment. Stardock plans to release the map editor utility eventually but right now it's just too difficult to work with.


I do hope that after that, a campaign editor could be released? I really would love to redo my campaign in GC2 format. ;
on Feb 14, 2006
Well, I am not sure that everybody is allowed to go the forum associated with the link.



It's redirecting to the galciv2 homepage here.
on Feb 15, 2006
Yeah, I am just getting the galciv home page as well. Link does not appear to work for us peons.

Chris.
on Feb 15, 2006
Yeah... CaretFarmer, you'll need to repost that out here for the 'unwashed masses' to see. Feel free to use the screenshot of my finished product as an example if you like:



BTW for those whove not tried it yet, it was a lot more work than it looks like to get Mars looking right
on Feb 16, 2006
Hey there's a modding forum! Hey maybe this should find it's way over there...
on Feb 16, 2006

Ah, those pesky permissions.    Okay, everyone should have access to this article:

https://www.galciv2.com/forums.aspx?ForumID=348&AID=101114

Enjoy!

 

on Feb 28, 2006
Hey, does any-one know how to change the size of the planets and stars?

I want to make them all at least twice as large, I think it would look nicer compared to the scale of the ships.
on Feb 28, 2006
So can one do this with custom race home worlds?
on Mar 01, 2006
Yes you can do this to the custom race HW. I've personalized my into the HuNam Republic.
on Mar 01, 2006
I think a good addition to this would be the ability to edit the size of the grids.

If you doubled the size of stars and planets then it is very likely they would extend into other grids and look pretty weird if there was a ship next to them.
on Mar 15, 2006
I definitely like the idea of being able to customize the custom race's homeworld... It feels like a bit of a rip off when the custom race's system is a carbon copy of earth with a different name...
on Mar 17, 2006
Does anyone know how to add specific planet resources to a planet (for example - fertile soil or artifacts?

Thanks,
-gt
on Mar 19, 2006
I uploaded my Balanced Custom Planets (BCP) to the library. If any one is intrested in downloading it follow this Link

For this mod I simply gave each empire a total of 30 Planet Quality (PQ) points for home systems. I allocated the points in various amounts based on the play style I observed from several games using the Tough AI configuration.

Additionally the "custom empire" homeworld and other inhabitable planet now have a different standard texture and a moon. Furthermore I disabled planet four and five as well.



7 Pages1 2 3 4  Last