CaretFarmer

Creating Custom Planets in GalCiv 2

Creating Custom Planets in GalCiv 2

Releasing Your Inner Slartibartfast

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!

213,467 views 98 replies | Pinned
Reply #51 Top
Once you have installed a zip program, simply double-click on any .zip files you have downloaded from the library to open them. You can then copy the files inside to the appropriate location to use them--most generally there will be a readme file in the zip that tells you where to put everything.

It's probably a good idea to wait on trying to make your own mods until you've got some experience with the process of using mods made by other people first.
Reply #52 Top
i have downloaded about 30 mods used almost all of them at least once so can you please help me with my problem please please sorry for bugin again
Reply #53 Top
i have downloaded about 30 mods used almost all of them at least once so can you please help me with my problem please please sorry for bugin again


If you know how to open and use mods then what's the issue? Making your own is as simple as making the mod files and putting them in the right place. Only if you want to distribute them to others do zips even come into the picture.

Everything you need to know about modding is detailed in the stickied modding guide. If you have *specific* questions feel free to ask. But the general question of 'how do I make mods?' is very simply answered by reading the modding guide.
Reply #55 Top
XML files and folders are different things. XML files are just text files with data in a format the game can read. The simplest way to get started is to just copy everything in the 'Default' mods folder to a new one named whatever you want, in the same location (GalCiv2\Mods, specifically). Then if there's something you want to change, just go open the appropriate .xml file from GalCiv2\Data\Emglish, and save a copy in your new mod folder (GalCiv2\Mods\WhateverYouCalledTheFolder\Data). Then make whatever changes you want to that copy of the file, again, referring to the modding guide for specific directions and details.
Reply #57 Top
and i did it to tech tree copyed everything in default then added stuff and put xml at the end and it said:

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource 'file:///C:/Program Files/Stardock/TotalGaming/GalCiv2/...

-
Reply #58 Top
View them in a text editor, not Internet Explorer.
Reply #59 Top
thanks loads and for creating mods to post on the web site is it ok for it to
be in notepad form in the zip.
Reply #60 Top
So, is there a way to specify a custom planets type from DA? Like Heavy Gravity or whatnot?
Reply #63 Top
Yes, you would put the xml files you created inside a zip file. Just like the mods you've downloaded that were made by others.
Reply #65 Top
Is there a way to "set" or "dictate" a planet's tile bonuses?


I'd like to know this too. I've tried looking through the modding guide but I couldn't find anything about it.
Reply #66 Top
I'd like to know this too. I've tried looking through the modding guide but I couldn't find anything about it.


No, it's always random.
Reply #67 Top
I'd like to know this too. I've tried looking through the modding guide but I couldn't find anything about it.


No, it's always random.


Thank you. Now I can stop looking.
Reply #68 Top
I have a custom race saved and I'd like to give them their own set starting system rather than the random one. I looked through the races file, but I see no mention of my race in there. How do I specify the Baronian Union to have their own system?

edit

I see "custom default" in the planets folder, and custom race in the races folder. These would set a custom homeworld for ANY custom race? What if I have more than one custom race? Is it not posible to make a custom system for one custom race, and another custom system for another?
Reply #69 Top
If you're using DA, you should simply need to add a new system to CustomPlanets with a StarSystem Name= attribute that matches the Homestar value in your race's file, and the game should match them up and use the proper system.
Reply #70 Top
I have come across a slight problem on my Vista system, when you try and edit the files, and then save it, it doesn't let you (cannot find location, check pathname, or something like that), However I have found a fix, cut and paste the XML document to the desktop, edit it, save (keeping it on the desktop) and then cut and paste it pack into the original folder, I do not know if this is just a problem with Vista ir just my PC so I thought to be kind enough to make sure everyone has the solution
Reply #71 Top
Also I have found that you can increase the planets class beyond 26, I have only tried up to 70 (makes every tile usable) however obviously this seriously unbalances the game, so I personally play the game different, on the largest map it is possible to slightly even the odds, by refraining from colonising new planets for the hole game, just colonise the planets on that solar systems, makes you more reliant on starbases for range (note: the game is still hugely unbalanced at the beginning of the game on lower intelligance levels)
Reply #72 Top
I'm confused ... I tried editing the mentioned files, but for some reason Custom Planets for my Custom Civ, the one I use, and my custom opponents. What are the files I need to edit, and how do I need to edit them?

(You don't have to reiterate the entire first post, just, do I need to add anything in, edit something already there?) I'm kind of lost here.

OKay, I'm able to edit the appearance of the planets, yet the names for the star/other worlds is still the same as my homeworld, despite my having changed them.
Reply #74 Top
Whenever i add a raw file for black and orange planet it comes out blue and white


The RAW file just determines the planet's topography. You need to pick a color palette to use on it via the <TerrainPalette> tag, and define that palette (if you're not going to use an existing one) in TerrainColorSchemes.xml and PlanetDescriptions.xml (those two files should be covered in the stickied official modding guide).
Reply #75 Top
Think of it this way. There is no real rules that keep balance between races not in the game or in our world. The fact is some times some one starts with more than others but that does not mean that they win. plus two thirds of the changes above are only cosmetic.