Adding more Starting Ships

Hi,

I'm trying to recreate my pre crusade race and encountered some difficulties. Maybe some of you experianced modders can help out. I'm trying to add my starting ships to my race but they do not apear in the game. First I just tried to put them in the FactionDefs.xml with the line:

<StartingShips>ColonyStaticBlueprint</StartingShips>

Thats unfortunately not enough in crusade. In fact, this line is completly useless and I dont know why they still have it in the FactionDefs. No matter what I put there, I will get the ship, I placed in the line;

<RaceTraits>SurveyStartingShip</RaceTraits>

So I thought, how about creating a new ability in the AbilityDefs.xml. So I duplicated the SurveyStartingShip ability and altered to my ship. I have a static blueprint for my ship and it's in the FactinShipstyleDefs and the ShipClassDefs. But no matter what I do, I cant find the new ability when I create a new race and with my race there is no starting ship. Only the ships from Crusade.

Any ideas how to get aditional starting ships? Any change I aply to the AbilityDefs.xml for starting ships is completely ignored.

 

EDIT:

Never mind. Figured it out. :)

14,156 views 6 replies
Reply #1 Top

You figured it out, but for the benefit of anyone else who may need to know the answer to this question, "<StartingShips>" no long works. Instead, you need to put a trigger on something. If you want to see how Crusade does it, just open up the AbilityDefs.xml file, and look for the StartingScout ability (names may be slightly misspelled; I'm not on my computer to verify).

Reply #2 Top

The easy way is to create a new ability for your custom race. Just create an xAbilityDefs.xml file in your Mods folder. (x stands for your mod, whatever you name it.)

For example;

<RaceTrait>
    <InternalName>Refugees</InternalName>
    <DisplayName>Refugees</DisplayName>
    <DisplayNameShort>Refugees</DisplayNameShort>
    <Description>No home just some ships.</Description>
    <IsAbility>1</IsAbility>
    <Triggers>
      <OnEvent>OnInitialShips</OnEvent>
      <Scope>Global</Scope>
      <Lifetime>Instant</Lifetime>
      <PerformAction>
        <Action>AwardStartingShip</Action>
        <StringParam>FlagshipStaticBlueprint</StringParam>
      </PerformAction>
    </Triggers>
    <Triggers>
      <OnEvent>OnInitialShips</OnEvent>
      <Scope>Global</Scope>
      <Lifetime>Instant</Lifetime>
      <PerformAction>
        <Action>AwardStartingShip</Action>
        <StringParam>ColonyStaticBlueprint</StringParam>
      </PerformAction>
    </Triggers>
    <Triggers>
      <OnEvent>OnInitialShips</OnEvent>
      <Scope>Global</Scope>
      <Lifetime>Instant</Lifetime>
      <PerformAction>
        <Action>AwardStartingShip</Action>
        <StringParam>ColonyStaticBlueprint</StringParam>
      </PerformAction>
    </Triggers>
    <Triggers>
      <OnEvent>OnInitialShips</OnEvent>
      <Scope>Global</Scope>
      <Lifetime>Instant</Lifetime>
      <PerformAction>
        <Action>AwardStartingShip</Action>
        <StringParam>SurveyStaticBlueprint</StringParam>
      </PerformAction>
    </Triggers>
  </RaceTrait> 

Now you give your race the ability "Refugee" and there you go... Ships, ships, ships... ;)

Reply #3 Top

Intressting - i tried excatly this method just two weeks before but it doesn't work...

Reply #4 Top

Quoting BigfishGalaxy, reply 3

Intressting - i tried excatly this method just two weeks before but it doesn't work...

Did you created a new AbilityDefs.xml file for your Mod?

Did you used StaticBlueprints form the game or custom made?

If custom made, did you made a StaticShipBlueprintDefs.xml file for the ships?

And are these custom ships in the ShipStyleSetDefs and the ShipClassDefs for your Mod?

I copied the file here from my own and when I start my game, all the ships are present.

Reply #5 Top

I just finished trying this and, at first, it wasn't working for me either.  I had to do two things: 1st, I had to disable my antivirus software; and 2nd, I had to (re)validate my local files.  It's a royal pain, when you're modding; but that's life.

Now if I can just get the Star System and planets stuff figured out.

SK 

 

Reply #6 Top

Yeah I have to check those planet files too... My starting system isn't working anymore... >:(