Custom Racial Abilities and Tech Trees

So I've been really trying to get into modding in unique races, and I want to include unique tech trees and with how the new crusades trees are built the only way I can see to do that is with the addition of Custom racial abilities that cause a crash because the the values for the custom techs isn't enumerated in the xsd files. If they are added into the StatTypes.XSD file directly beside the other tech tree ability enumerations it does allow the game to be launched and the ability to be selected but results in an infinite load if you attempt to launch a game.

Suggestions, comments? Is this just impossible to do currently? Are we limited to only generic tech tree changes and those that the developers build into the racial abilities? or am I missing something?

 

I haven't tried to create a copy of the master techtree and manipulate that and xml edit a custom race to use it. I'll work on that, while I wait for feedback.

Yesh ok so can confirm that doesn't work to my admittedly limited knowledge. That just causes total crash on new game launch with the selected race.

15,836 views 4 replies
Reply #1 Top

You create a new race trait, then new techs that require said race trait. (Sett he trait to IsAbility)

Reply #2 Top

I did that and the game refused to launch because it said that the ability tag wasn't enuemerated. I used another techtree ability and ability requiring techs as templates, matched all the values, gave unique identifiers to both sides, and it didn't work. 

 

 

<RaceTrait>

    <InternalName>ImperiumAbility</InternalName>

    <DisplayName>ImperiumAbility_Name</DisplayName>

    <DisplayNameShort>ImperiumAbility_ShortName</DisplayNameShort>

    <Description>ImperiumAbility_Dec</Description>

    <IsAbility>1</IsAbility>

    <Mod>

      <EffectType>ImperiumAbility</EffectType>

      <Target>

        <TargetType>Faction</TargetType>

      </Target>

      <BonusType>Flat</BonusType>

      <Value>1</Value>

    </Mod>

  </RaceTrait>

 

<Tech>

    <InternalName>MasterImperiumTechs</InternalName>

    <GenericName>ImperiumTechs</GenericName>

    <DisplayName>ImperiumTechs_Name</DisplayName>

    <TechTree>Master_Tree</TechTree>

    <ShortDescription>ImperiumTechs_ShortDec</ShortDescription>

    <Description>ImperiumTechs_Dec</Description>

    <ColorDef>TechPurple</ColorDef>

    <Icon>GC3_Colonization_Icon.png</Icon>

    <Bink>GC3_Colonization_Temp.bk2</Bink>

    <ResearchCost>48</ResearchCost>

    <TechPoints>1</TechPoints>

    <AICategoryWeight>

      <Military>1</Military>

      <Growth>1</Growth>

      <Tech>1</Tech>

      <Diplomacy>1</Diplomacy>

      <Expansion>1</Expansion>

      <Wealth>1</Wealth>

      <Influence>1</Influence>

      <Fortification>1</Fortification>

    </AICategoryWeight>

    <Prerequ>

      <Techs>

        <Option>EnvironmentalEngineering</Option>

      </Techs>

      <RaceTrait>

        <Option>ImperiumAbility</Option>

      </RaceTrait>

      <TechAge>

        <Option>AgeOfExpansion</Option>

      </TechAge>

    </Prerequ>

  </Tech>

Reply #3 Top

I just made this Ability and it works fine, I have not linked techs to it yet though, not that it should matter.

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<RaceTraitList
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/RaceTraitDefs.xsd">
    <!-- Created by ModBuddy on 9-May-17 18:22:06 -->

    <RaceTrait>
        <InternalName>AssimilateAbility</InternalName>
        <DisplayName>AssimilateAbility_Name</DisplayName>
        <DisplayNameShort>AssimilateAbility_ShortName</DisplayNameShort>
        <Description>AssimilateAbility_Desc</Description>
        <IsAbility>1</IsAbility>
        <DisallowedForSynthetic>1</DisallowedForSynthetic>

        <Mod>
            <EffectType>CanColonizeExtremeWorld</EffectType>
            <Target>
                <TargetType>Faction</TargetType>
            </Target>
            <BonusType>Flat</BonusType>
            <Value>1</Value>
        </Mod>

        <Triggers>
            <OnEvent>OnConquerPlanetFirstTime</OnEvent>
            <Target>
                <TargetType>Planet</TargetType>
            </Target>
            <Lifetime>Instant</Lifetime>
            <PerformAction>
                <Action>TerraformTilesOnPlanet</Action>
                <ValueParam>1</ValueParam>
                <ValueParam>3</ValueParam>
                <ValueParam>0.1</ValueParam>
            </PerformAction>
        </Triggers>
        <Triggers>
            <OnEvent>OnColonizePlanet</OnEvent>
            <Target>
                <TargetType>Planet</TargetType>
            </Target>
            <Lifetime>Instant</Lifetime>
            <PerformAction>
                <Action>TerraformTilesOnPlanet</Action>
                <ValueParam>1</ValueParam>
                <ValueParam>3</ValueParam>
                <ValueParam>0.1</ValueParam>
            </PerformAction>
        </Triggers>
        <Triggers>
            <OnEvent>OnStartTurn</OnEvent>
            <CriteriaTurnNum>1</CriteriaTurnNum>
            <PerformAction>
                <Action>TerraformTilesOnPlayerPlanets</Action>
                <ValueParam>2</ValueParam>
                <ValueParam>3</ValueParam>
                <ValueParam>0.1</ValueParam>
            </PerformAction>
        </Triggers>
       
    </RaceTrait>
   
</RaceTraitList>

 

+1 Loading…
Reply #4 Top

Thx, I compared and the big difference was this section

<Mod>

      <EffectType>ImperiumAbility</EffectType>

      <Target>

        <TargetType>Faction</TargetType>

      </Target>

      <BonusType>Flat</BonusType>

      <Value>1</Value>

 

Which was present in the base game tech abilities.

Upon removal I double checked everything loads up fine and works as expected thankyou again.