Trait to add Ship on Start

Good day to you, I am trying to figure out how to make a trait that gives the owner a special ship on start, like how you get a colony ship, scout and survey ship, I'd like to add a trait that starts you with a combat ship of my design, Any help on this would be wonderful.

6,360 views 9 replies
Reply #1 Top

In your races' FactionDef look for the following xml and edit accordingley.

 

<StartingShips>ColonyStaticBlueprint</StartingShips>
<StartingShips>SurveyStaticBlueprint</StartingShips>
<StartingShips>ScoutStaticBlueprint</StartingShips>

Reply #2 Top

I see, then this might be the problem, I can not find this file anywhere, I've gone to where the game is installed and in my documents, but sadly can't find my custom  faction anywhere.

 

This tells me how to add it to my custom faction with out a trait but how would one do it with a trait?

Reply #3 Top

Quoting Seldion, reply 2

can't find my custom faction anywhere.
End of Seldion's quote

Is your faction created using the faction editor or using xml?

To do what you wish you will require an xml mod of your faction. If you used the games faction editor then your faction is stored as a faction file in ...\Documents\My Games\GalCiv3\Factions. What you will need to do is learn how to make an xml mod in ...\Documents\My Games\GalCiv3\Mods. A good way to start would be to download a race xml mod and reverse engineer it to your liking. There a few on this forum, some more complicated than others with custom star systems and ships sets, etc.. Explore and have fun.

Reply #4 Top

Thank you for your help, Tho I am still wondering how this got posted in its own thread, I am pretty sure I posted in a general modding help thread.

But Thanks a ton, I really am grateful for your help in this.

Also I will use the base factions as my template, Tho I have a few questions about this, Where it says the faction traits, 1-2 are the positives and 3-4 are the negatives right?

 

As far as everything else I just edit the file path to the movies, logos and pictures I want to use correct?

Reply #5 Top

Quoting Seldion, reply 4

Also I will use the base factions as my template, Tho I have a few questions about this, Where it says the faction traits, 1-2 are the positives and 3-4 are the negatives right?
End of Seldion's quote

Yes that's correct. There in the RaceTraitDefs.xml and are named like Productive1, Productive2 ,Productive3, Productive4. Productive1 being the most positive and Productive4 being the most negative. There is also the AbilityDefs.xml and PesonallityTypes.xml for that part of the FactionDef editing.

The images are straight forward except for the foreground/background images. Delete the entries for FactionMoviesFGDef and FactionMoviesBGDef and add

<LeaderImageFG>Devilgirl_FG.png</LeaderImageFG>
<LeaderImageBG>Devilgirl_BG.png</LeaderImageBG>

Place these entries underneath LeaderThumbnail.

You can either put the images in ...\Documents\My Games\GalCiv3\Factions or you can add a Gfx folder to your mod folder and reproduce the folder structure from the Factions folder in the Gfx folder with LeaderBG, LeaderFG, etc.

Reply #6 Top

The Ominous Thank you, They can now bring they're Ways to the universe and bring order to all, this is very good, Thank you again I really am grateful for your help.

 

Reply #7 Top

Your welcome.

Reply #8 Top

Specifically to add a race trait that will do this add the following trigger to any race trait or ability.

<Triggers>
<OnEvent>OnStartTurn</OnEvent>
<CriteriaTurnNum>1</CriteriaTurnNum>
<PerformAction>
<Action>AwardShipOfClass</Action>
<StringParam>SurveyStaticBlueprint</StringParam>
</PerformAction>
</Triggers>

You can replace SurveyStaticBlueprint with any blueprint or even with a custom blueprint, though you should be aware that unless it is available to all races it will cause the game to crash on map load if you use that trait with a race for which that blueprint does not exist.