Ludeon Forums

RimWorld => Mods => Help => Topic started by: qux on June 05, 2021, 10:48:15 AM

Title: Faction leader is null
Post by: qux on June 05, 2021, 10:48:15 AM
Hi,
I try to create a new faction,
it's work well, but when I load the game, I have a red error ''the faction leader ''name faction'' is null.
Do you know ho can I fix that ?
In pawnkind def I create a leader with <defaultFactionType></defaultFactionType> and <factionLeader>true</factionLeader> so I don't understand what's missing.
Thanks for your help.
Title: Re: Faction leader is null
Post by: GarbageDay on June 05, 2021, 05:09:47 PM
You need to make pawnGroupMaker encounters in your faction def that include the chief, been a little while but think you need BOTH a settlement and Combat+Peaceful encounter kinds that include the chief pawn.

He's an example XML
Title: Re: Faction leader is null
Post by: qux on June 06, 2021, 02:30:26 PM
thanks for the answer !
there is my pawngroupmakers

    <pawnGroupMakers>
      <li>
        <!-- Normal fights, ranged & melee -->
        <kindDef>Combat</kindDef>
        <commonality>100</commonality>
        <options>
     <x1>8</x1>
          <x2>5</x2>
     <x3>4</x3>
     <x4>2</x4>
   <xleader>0.1</xleader>
        </options>
      </li>
      <li>
        <!-- Base defense -->
        <kindDef>Settlement</kindDef>
        <options>
     <x1>8</x1>
          <x2>5</x2>
     <x3>4</x3>
     <x4>2</x4>
   <xleader>0.1</xleader>
        </options>
      </li>
    </pawnGroupMakers>

My leader is in the combat group and in the settlement group, so what's missing ?
I don't have peaceful group because it's a permanent ennemy
Title: Re: Faction leader is null
Post by: Canute on June 06, 2021, 03:49:06 PM
You sure these <xleader> is needed ?
When i compare it with the def from Garbage or from other faction mods i don't find it.
I allways just find <leaderTitle>.
Title: Re: Faction leader is null
Post by: qux on June 07, 2021, 11:36:27 AM
<xleader> is the defname of my pawn which have <factionLeader>true</factionLeader> in his kind def
Title: Re: Faction leader is null
Post by: qux on June 17, 2021, 07:12:35 PM
nobody ?
Title: Re: Faction leader is null
Post by: Canute on June 18, 2021, 03:01:35 AM
Try it at the discord too.
There are more active modder then here.