Question for Modifying a Custom Race?

New Question:

I created a fully customizable race, by copying Terran from the FactionDEF xml. It crashes the game whenever I go through 'Generating Map' Here are my entries.I don't see a mistake.. but then again it's my first time modding anything. (I have a corresponding Text XML for this to reference  for the descriptions.)

 

<Faction>
        <InternalName>FACTION_SOL'FAELIAEN</InternalName>
        <DisplayName>Sol'Faeliaen Empire</DisplayName>
        <DisplayNameShort>Sol'Faeliaen</DisplayNameShort>
        <LeaderName>Tul'Rok</LeaderName>
        <Description>FACTION_SOL'FAELIAEN_Dec</Description>
        <LeaderDescription>FACTION_SOL'FAELIAEN_LeaderDec</LeaderDescription>
        <RaceType>Major</RaceType>
        <PersonalityTraits>Neutral</PersonalityTraits>
        <PersonalityTraits>Expansionist</PersonalityTraits>
        <PersonalityTraits>Peaceful</PersonalityTraits>
        <PersonalityTraits>Scientific</PersonalityTraits>
        <PersonalityTraits>Opportunistic</PersonalityTraits>
        <RaceTraits>AncientAbility</RaceTraits>
        <RaceTraits>EngineersAbility</RaceTraits>
        <RaceTraits>ColonizersAbility</RaceTraits>
        <RaceTraits>UnwaveringAbility</RaceTraits>
        <RaceTraits>IntuitiveAbility</RaceTraits>
        <RaceTraits>ParanoidAbility</RaceTraits>
        <RaceTraits>StarfaringAbility</RaceTraits>
        <RaceTraits>AdaptableAbility</RaceTraits>
        <RaceTraits>Productive1</RaceTraits>
        <RaceTraits>Clever1</RaceTraits>
        <RaceTraits>Influential4</RaceTraits>
        <RaceTraits>Economical1</RaceTraits>
        <RaceTraits>Content1</RaceTraits>
        <RaceTraits>Fertile1</RaceTraits>
        <RaceTraits>Handy1</RaceTraits>
        <RaceTraits>Dense1</RaceTraits>
        <RaceTraits>Militant4</RaceTraits>
        <RaceTraits>Popular4</RaceTraits>
        <RaceTraits>Traders4</RaceTraits>
        <RaceTraits>Farmers1</RaceTraits>
        <RaceTraits>Courageous1</RaceTraits>
        <RaceTraits>Tough1</RaceTraits>
        <RaceTraits>Accurate1</RaceTraits>
        <RaceTraits>Agile1</RaceTraits>
        <RaceTraits>Resilient1</RaceTraits>
        <RaceTraits>Adventuresome1</RaceTraits>
        <RaceTraits>Observant1</RaceTraits>
        <RaceTraits>Fast1</RaceTraits>
        <RaceTraits>Organized1</RaceTraits>
        <RequiresHomeworld>true</RequiresHomeworld>
        <HomeStarSystem>DeadSystem</HomeStarSystem>
        <StartingShips>ColonyStaticBlueprint</StartingShips>
        <TechTree>Terran_Tree</TechTree>
        <ShipCallsign>VOID</ShipCallsign>
        <LogoImage>RaceLogo64.png</LogoImage>
        <LeaderThumbnail>Jellyfish_Small.png</LeaderThumbnail>
        <LeaderImageFG>Jellyfish_FG.png</LeaderImageFG>
        <LeaderImageBG>Spaghetti_BG.png</LeaderImageBG>
        <NewsRobotMovie_Approach>Altarian_NewsBot_Idle.bk2</NewsRobotMovie_Approach>
        <NewsRobotMovie_Idle>Altarian_NewsBot_Idle.bk2</NewsRobotMovie_Idle>
        <StartupImage>StartGameSol'Faeliaen</StartupImage>
        <StartupTitle>Searching for a new home; a new beginning...</StartupTitle>
        <StartupDescription>FACTION_SOL'FAELIAEN_StartupDescription</StartupDescription>
        <StartupTraitsDescription>FACTION_SOL'FAELIAEN_StartupDescription</StartupTraitsDescription>
        <MapColorDef>TerranMapColors</MapColorDef>
        <UIColorDef>TerranUIColors</UIColorDef>
        <FactionMusicDef>TerranMusic</FactionMusicDef>
        <Material1>GC3_ship_Material_1</Material1>
        <Material2>GC3_Ship_Relic_Steel</Material2>
        <Surface1>GC3_Ship_Surface_17</Surface1>
        <Surface2>GC3_Ship_Surface_12</Surface2>
        <Appearance>GC3_Terran_InverAppearance</Appearance>
        <ShipStyleSet>AltarianShipStyleSet</ShipStyleSet>
        <CreditsInit>0</CreditsInit>
        <WarEnduranceInit>100</WarEnduranceInit>
        <DefaultResistance>0.75</DefaultResistance>
        <InfluenceTallyInit>10</InfluenceTallyInit>
        <StartingColonyPopulation>10</StartingColonyPopulation>
        <AICategoryWeight>
          <Military>13</Military>
          <Growth>15</Growth>
          <Tech>25</Tech>
          <Diplomacy>10</Diplomacy>
          <Expansion>20</Expansion>
          <Wealth>15</Wealth>
          <Influence>5</Influence>
          <Fortification>10</Fortification>
        </AICategoryWeight>
    </Faction>




 

I do have one more problem though: Solution provided. Thanks!

 

I chose:

 

<LeaderThumbnail>GJellyfish_Small.png</LeaderThumbnail>
<LeaderImageFG>Jellyfish_FG.png</LeaderImageFG>
<LeaderImageBG>Spaghetti_BG.png</LeaderImageBG>

<StartupImage>StartGameSol'Faeliaen</StartupImage>( I made this file by combining two existing images(FG/BG from before) by having two layers to mimic the appearance of a leader in a background since all the other images in this folder were thus)

 

But I get the default Terran Foreground, background and all that jazz. Not sure how to change that... I've tried different combos and it's always default Terran. It looks like the Terran image is layered over-top of the ones I entered, because there is a flickering of the image.




Below has been answered:

I've read the post in the dev section to create a custom race using the .xml file by copying it over to a mod directory you create.

I noticed that the .xml file is basically a standard terran race config... I already created a new race in the in-game creator, and I want to port all that work over and modify that without having to recreate ALL the custom work I did in-game.

I just want to tweak things without starting over from scratch. I am happy with several aspects I made in-game.


I've tried to edit the file that has my race name in the games folder under mydocuments.. but it is just  gibberish.

Is there a way to open the xml file for an existing custom race and just modify that???

 


Thanks

11,904 views 16 replies
Reply #1 Top

It was a bad idea by Stardock to have the ingame race editor generate a 2 KB binary file instead of modifiable XML file.

Reply #2 Top

custom races created and saved in game aren't stored as XML I'm afraid if you want a mod race rather than in game custom you have to do all the work in XML.

Reply #3 Top

You can edit a .FACTION file, though it's not easy. Open it with WinRAR (7zip doesn't work) and extract Save.tmp. Open that with a hex-editor and edit what you want. If you can figure out what each thing is. Good luck with that.

 

So far the best way I've found is just to recreate the custom faction as an XML mod. It gives you a bit more control, too, if you want to have custom star systems and planets.

Reply #4 Top

Cheers everyone.

Ya it does seem odd that a custom race isn't saved as a XML file, or a copy of one created as such. Saves a lot of the work for things you'll just emulate from the in-game creator anyways.

Reply #5 Top

Also.. I noticed in the XML files say fertile.. I see fertile 1 2 4... I am assuming that 1 is negative 2, and 4 is positive 2? This holds for all <RaceTraits>?

Reply #6 Top

Quoting EvilSalmon, reply 5

Also.. I noticed in the XML files say fertile.. I see fertile 1 2 4... I am assuming that 1 is negative 2, and 4 is positive 2? This holds for all <RaceTraits>?
End of EvilSalmon's quote

1 = +2

2 = +1

3 = -1

4 = -2

Reply #7 Top

Quoting Niedzielan, reply 6


Quoting EvilSalmon,

Also.. I noticed in the XML files say fertile.. I see fertile 1 2 4... I am assuming that 1 is negative 2, and 4 is positive 2? This holds for all <RaceTraits>?



1 = +2

2 = +1

3 = -1

4 = -2

End of Niedzielan's quote

 

Cheers, That was helpful.. I created a fully customizalble race, and used existing leader portraits and all that stuff.

 

I do have one more problem though:

 

I chose:

 

<LeaderThumbnail>GJellyfish_Small.png</LeaderThumbnail>
<LeaderImageFG>Jellyfish_FG.png</LeaderImageFG>
<LeaderImageBG>Spaghetti_BG.png</LeaderImageBG>

<StartupImage>StartGameSol'Faeliaen</StartupImage>( I made this file by combining two existing images(FG/BG from before) by having two layers to mimic the appearance of a leader in a background since all the other images in this folder were thus)

 

But I get the default Terran Foreground, background and all that jazz. Not sure how to change that... I've tried different combos and it's always default Terran. It looks like the Terran image is layered over-top of the ones I entered, because there is a flickering of the image.

 

 

Reply #8 Top

Make sure to delete the movie tags:

        <FactionMoviesFGDef>TerranMoviesFG</FactionMoviesFGDef>
        <FactionMoviesBGDef>TerranMoviesBG</FactionMoviesBGDef>

There are different tags for movie-style foregrounds/backgrounds and static ones, and the movies are later down in the XML so they get loaded afterwards, so they go on top.

 

Edit: You should probably say that you'd already solved it in another thread.

Reply #9 Top

When I want to change a custom race a bit, I simply copy it and make the wanted change.  Then I just delete the old version.  Fast way to change up custom leader names, logos, howeworlds, whatever.

Reply #10 Top

Quoting Yrth, reply 9

When I want to change a custom race a bit, I simply copy it and make the wanted change.  Then I just delete the old version.  Fast way to change up custom leader names, logos, howeworlds, whatever.
End of Yrth's quote

 

True enough. I thought about doing this, but I didn't want to eliminate a race from the game. I copied Terran into a new XML and just modified that, but the game crashes everytime I go through "Generating Map"

Reply #11 Top

And what phrase specifies what ideology your faction will follow?

Reply #12 Top

Quoting pablo1713, reply 11

And what phrase specifies what ideology your faction will follow?
End of pablo1713's quote

 

I didn't see an ideology phrase for the major races in the FactionDefs.xml so I didn't add that line. Is it a requirement?

Reply #13 Top

Quoting pablo1713, reply 11

And what phrase specifies what ideology your faction will follow?
End of pablo1713's quote

Yeh! I would like to Know this too.

It could be that the weighting of the choices you give the AI determine what ideology the AI will use. ie. the personality traits and the race traits.

 As far as choosing the faction to play yourself then it might not matter, you go the path and choose the ideology unlocks yourself as you play the game.

Maybe, but I'm not completely sure.

Reply #14 Top

I'm having the same/similar problem as OP. Made a new custom race via modding XML (because the ingame one lacks control), stuck everything in the proper folders with the right names, and the game crashes to desktop when trying to generate a map.

My custom race is supposed to have a custom star system, which I modded into both StarSystemDefs and PlanetDefs, as well as a slightly modified tech tree. All the XML formats follow the original but it doesn't work. Interesting, because I used the one from stonehold (the Zathras race) as a basic guideline. I kind of suspect that his works fine because he is modifying the Sol system instead of creating a brand new system like I am trying to do, but I want to avoid using that method because I have a feeling it will mess up a game with Terrans present.

I'll send a zip file of what I've got to a dev if they respond (as well as a debug.err file), already sent in a ticket, but I'd like to have a more public response so modders can see what the issue is. I agree with others, making the custom races use some weird compressed file instead of standard xml was a poor choice - there was nothing wrong with the way galciv2 handled custom races (the xml way).

Reply #15 Top

Quoting pablo1713, reply 11

And what phrase specifies what ideology your faction will follow?
End of pablo1713's quote

Quoting In_stasis, reply 13
Quoting pablo1713,

And what phrase specifies what ideology your faction will follow?



Yeh! I would like to Know this too.

It could be that the weighting of the choices you give the AI determine what ideology the AI will use. ie. the personality traits and the race traits.

 As far as choosing the faction to play yourself then it might not matter, you go the path and choose the ideology unlocks yourself as you play the game.

Maybe, but I'm not completely sure.

End of In_stasis's quote

Quoting EvilSalmon, reply 12
Quoting pablo1713,

And what phrase specifies what ideology your faction will follow?



 

I didn't see an ideology phrase for the major races in the FactionDefs.xml so I didn't add that line. Is it a requirement?

End of EvilSalmon's quote

 

<PersonalityTraits>Neutral</PersonalityTraits>

or

<PersonalityTraits>Merciless</PersonalityTraits>

or

<PersonalityTraits>Benevolent</PersonalityTraits>

Reply #16 Top

Quoting Niedzielan, reply 15


Quoting pablo1713,

And what phrase specifies what ideology your faction will follow?




Quoting In_stasis,




Quoting pablo1713,



And what phrase specifies what ideology your faction will follow?



Yeh! I would like to Know this too.

It could be that the weighting of the choices you give the AI determine what ideology the AI will use. ie. the personality traits and the race traits.

 As far as choosing the faction to play yourself then it might not matter, you go the path and choose the ideology unlocks yourself as you play the game.

Maybe, but I'm not completely sure.




Quoting EvilSalmon,




Quoting pablo1713,



And what phrase specifies what ideology your faction will follow?



 

I didn't see an ideology phrase for the major races in the FactionDefs.xml so I didn't add that line. Is it a requirement?



 

<PersonalityTraits>Neutral</PersonalityTraits>

or

<PersonalityTraits>Merciless</PersonalityTraits>

or

<PersonalityTraits>Benevolent</PersonalityTraits>

End of Niedzielan's quote

Ok thanks!