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 #76 Top
So once we've done the modifications to the above mentioned files should the game start applying them when its restarted and a new game is created? Coz none of my modifications are happening.
Reply #77 Top
So once we've done the modifications to the above mentioned files should the game start applying them when its restarted and a new game is created? Coz none of my modifications are happening.


What exactly are you doing?
Reply #78 Top
Hi everyone

Does anyone know how to edit the custom planets, with toxic, barren or radioactive restrictions.

I would like to make Mars a barren planet to begin with, so that it would be necessary to acquire that tech to colonize the red planet.

I have already re-created the inner solarsystem, with Mercury, Venus, Earth, Mars and Jupiter. It would be great if Venus could be made toxic or radioactive and Mars barren.

Is this, at all, possible?

If it is possible, how do I do it?

Best regards
Kieldsen
Reply #79 Top
I just posted this question myself & only one person has respond (who pointed me toward this thread.) He noted that Kyro had thoughfully linked to a thread that discussed this very problem. However, it appears that the gremlins have indeed made off with the thread & so we are bereft of an answer... Maybe Kyro could resurrect the thread or paste in the content that is now lost to us? Thank you!
Reply #80 Top
Hi everyone

Does anyone know how to edit the custom planets, with toxic, barren or radioactive restrictions.

I would like to make Mars a barren planet to begin with, so that it would be necessary to acquire that tech to colonize the red planet.

I have already re-created the inner solarsystem, with Mercury, Venus, Earth, Mars and Jupiter. It would be great if Venus could be made toxic or radioactive and Mars barren.

Is this, at all, possible?

If it is possible, how do I do it?

Best regards
Kieldsen


you can only have one planet type in a custom planets!!!
you`ll have to chose if it will be mars or Venus!!!also make that planet the 5th planet to be sure the other 4 show up when you start the game!!

Nasty
Reply #81 Top
Thanks for the info, but I'm trying to make a star system with a red star. How do I change the star type?
Reply #82 Top
Devin you can edit a custom map to have a red star.
But custom planets can`t be edited for different star type.
Reply #83 Top
Hey Nasty... i just came across some interesting 'tutorial' stuff to create planet surfaces & textures - you may wish to go have a look at those nifty tricks.

Planet texturing

;)
Reply #84 Top
thanks Zyx I`ll check it out  :) 

Nasty
Reply #85 Top
I am using twilight of the arnor and I tried to load gas giant textures from the dread lords directory. It didn't load. Is there a special way you have to type it? Also, it looks like you can choose a texture for your sun. Can you?
Reply #86 Top
I'd recommend using a mod folder and some copy_paste process (for gas giant images) to provide the necessary files as 'local assets'.
Then, a new customplanets.xml where you could define who gets to have what and where.

Similarly, the stars' texturing can be modded, but the fx re-coder still has to sort_of randomize the entire UV-mapping grid -- so i doubt, highly different alterations would be somehow 'visible'. One can always try, though.
Reply #87 Top

I would do that but I'm trying to keep my mods as metaverse compatible as possible, and I'm looking for a way to load the textures from their original directory.

Reply #88 Top

Then, simply replace any files with the new ones straight into the default folders. BUT... just in case, move the originals away in a temporary location for backup reasons.

Not a MOD anymore, btw.

 

And... considering the file naming convention was changed altogether in TotA, you'd have to adhere to the new cycle tags present. (As an example; you would need to add (or replace the others) an extra PlanetQualPoor_9.png (or more numbers) with a Jupiter image for it to show up at random, etc)

Reply #89 Top

Since The V2.0 update I have not been able to make a custom system for my faction.  Here's the code I have currently

 

<Homeworld>Command</Homeworld>
        <Homestar>Nemesis</Homestar>

</StarSystem>
    <StarSystem Name="Nemesis">
            <DisplayName>Nemesis</DisplayName>
            <Texture>gfx/planets/sol.png</Texture>
            <Planet Name="Planet1">
                <DisplayName>Nemesis I</DisplayName>
                <Class>0</Class>
                <Texture>gfx/planets/jupiter.png</Texture>
                <TerrainPalette>DesertPlanets1</TerrainPalette>
                <PercentOfStarSize>0.80</PercentOfStarSize>
            </Planet>
            <Planet Name="Command">
                <DisplayName>Command</DisplayName>
                <Class>10</Class>
                <Texture>gfx/planets/PlanetQualGood_5.png</Texture>
                <TerrainPalette>PlanetQualGood_5</TerrainPalette>
                <Rings>gfx/planets/r00.png</Rings>
                <Orbit>1.25</Orbit>
                <InnerRadius>0.2</InnerRadius>
                <OuterRadius>15</OuterRadius>
                <PercentOfStarSize>0.50</PercentOfStarSize>
            </Planet>
            <Planet Name="Planet3">
                <DisplayName>Nemesis III</DisplayName>
                <Class>4</Class>
                <Texture>gfx/planets/PlanetQualPoor_7.png</Texture>
                <TerrainPalette>RedPlanet</TerrainPalette>
                <PercentOfStarSize>0.60</PercentOfStarSize>
            </Planet>
           
    </StarSystem>

 

It is supposed to create a system with one "Hot Jupiter" gas giant (Nemesis I), a ringed class 10 planet the size of earth (Command), and a slightly larger Ice planet (Nemesis III)

Reply #90 Top

Quoting Lord, reply 5
Don't missunderstand me for me is the work from the programmers of Stardock art to manipulate something what not implementet from stardock is ...like to paint a beart on Mona Lisas face...

umm...i think the mona lisa would look better with a beard!...time for a new mod! =)

Reply #92 Top

Code-base alteration from SD would do it, but sadly i've been asking for a long time.

I tried a bunch of "different" accessing methods for a mod only to realize defaults (RC & CP files are defined to use fix assets & to randomize the rest) are loaded by priority as proven by the TA map editor lacking of such an option.

 

Reply #93 Top

My custom empire wont start in its custom home-world(massively influenced by elder-scrolls 3-5[and other provinces])

        <Homeworld>Cyrodiil</Homeworld>
        <Homestar>Tamriel</Homestar>

    <StarSystem Name="Tamriel">
        <Planet Name="Cyrodiil">
            <DisplayName>Cyrodiil</DisplayName>
            <Class>10</Class>
            <Moon>gfx/planets/M15.png</Moon>
            <Texture>gfx/planets/PlanetQualGreat_1.png</Texture>
            <PercentOfStarSize>0.85</PercentOfStarSize>
        </Planet>
        <Planet Name="Skyrim">
            <DisplayName>Skyrim</DisplayName>
            <Class>3</Class>
            <Moon>gfx/planets/M03.png</Moon>
            <Texture>gfx/planets/PlanetQualPoor_8.png</Texture>
            <PercentOfStarSize>0.73</PercentOfStarSize>
        </Planet>
        <Planet Name="Oblivion">
            <DisplayName>Oblivion</DisplayName>
            <Texture>gfx/planets/PlanetToxic_3.png</Texture>
            <Rings>gfx/planets/R_Oblivion.png</Rings>
            <InnerRadius>0.01</InnerRadius>
            <OuterRadius>0.2</OuterRadius>
            <Class>0</Class>
            <PercentOfStarSize>0.15</PercentOfStarSize>
        </Planet>
        <Planet Name="Elsweyr">
            <DisplayName>Elsweyr</DisplayName>
            <Texture>gfx/planets/PlanetHighGravity_4.png</Texture>
            <Class>2</Class>
            <PercentOfStarSize>0.75</PercentOfStarSize>
        </Planet>
        <Planet Name="Morrowind">
            <DisplayName>Morrowind</DisplayName>
            <Class>5</Class>
            <Moon>gfx/planets/M04.png</Moon>
            <Texture>gfx/planets/PlanetQualMed_4.png</Texture>
            <PercentOfStarSize>0.45</PercentOfStarSize>
        </Planet>
        <AsteroidField Name="ValenwoodAsteroids">
            <DisplayName>Valenwood Asteroids</DisplayName>
            <Size>4</Size>
        </AsteroidField>
    </StarSystem>

 

Reply #94 Top

i hate to bump AND double post, but seriously, has no one got the answer?

Reply #95 Top

Galacticruler5000,

 

First, even if you get the custom planets to work all except the Homeworld will simply be "systemname(2-5)".  The only way I've found around this is to simply go to "Details" bottom right of the colony screen of the planet and simply rename it.  You don't have to set homeworld in the customplanets.xml either, just make it "PlanetName=Homeworld" and it'll use whatever you put in the RaceConfig.xml for homeworld.

 

Second, if you have the Homestar field in the RaceCongfig.xml and the StarSystem name in the CustomPlanets.xml are the same there shouldn't be any problems with not spawning in that system.

 

Granted no matter what I do, the asteroids always seem to ignore what I put in, but the planets always show the proper size and class.

 

Just make sure you're either activating the mod correctly, or if you're just editing the default files, that you are editing the right version of it.  If you're playing the "Ultimate Edition" you'll want to change the ones in the Twilight folder.

 

Hope this helps you figure it out.  Back to trying to win for me with a horribly overpowered race and stupidly large tech tree.

Reply #96 Top

i am spawning in that system, but im just getting Cyrodiil(2-5) and my star is named Cyrodiil.

I have my race in Documents/Mygames/GC2TwilightArnor

do i have to make my race in RaceConfig.xml, or will being in its own file be fine?

 

EDIT:

If custom races just get a generalized system name, why then do the default majors get differently named planets?

and would changing my race ID to 0 work?

Reply #97 Top

I'm having a bit of trouble with the <terrainpalette> tag on customplanets.xml. I set one planet to be a Dread Lords world, but it (along with all the other modded planets) appear Earth-like.

 

The homeworld of this system is supposed to be red like a Dread Lord world.

 

    <StarSystem Name="Fire">
        <DisplayName>Fire</DisplayName>
        <Planet Name="Steel">
            <DisplayName>Steel</DisplayName>
            <Class>10</Class>
            <TerrainPalette>DreadlordWorld</TerrainPalette>
            <Rings>gfx/planets/R03.png</Rings>
        </Planet>
        <Planet Name="Sword">
            <DisplayName>Sword</DisplayName>
            <Class>0</Class>
        </Planet>
        <Planet Name="Blood">
            <DisplayName>Blood</DisplayName>
            <Class>0</Class>
        </Planet>
        <Planet Name="Valor">
            <DisplayName>Valor</DisplayName>
            <Class>0</Class>
        </Planet>
        <Planet Name="Honor">
            <DisplayName>Honor</DisplayName>
            <Class>4</Class>
        </Planet>
    </StarSystem>

Reply #98 Top

Quoting stiefelss, reply 97
I'm having a bit of trouble with the tag on customplanets.xml. I set one planet to be a Dread Lords world, but it (along with all the other modded planets) appear Earth-like.

I'm not that familiar with how the CustomPlanets.xml works (only edited some of the Internal- and DisplayNames), but I don't think, that "DreadlordWorld" is a valid entry. At least, I couldn't find it anywhere in the files. Have you tried "RedPlanet", like Mars has?