Faction doesn't appear to work

Started by SlimeCrusher, January 28, 2015, 02:09:38 PM

Previous topic - Next topic

SlimeCrusher

I made a custom faction and made a custom pawn i made use it, but i can't see the faction on the debug menu (Using "raid from"), i don't know what's wrong as there are no errors on the console...
Also, the pawn itself works, but it behaves like a squirrel, completely ignoring my colonists when it should attack them  :-\

Here's the code from BaseFactionDefs:
Quote<?xml version="1.0" encoding="utf-8" ?>
<FactionDefs>




  <!-- Special non-humanoid factions -->

  <FactionDef>
    <defName>Xen</defName>
    <label>xen</label>
    <description>bla</description>
    <pawnsPlural>xenians</pawnsPlural>
    <requiredCountAtGameStart>1</requiredCountAtGameStart>
    <fixedName>xen</fixedName>
    <raidCommonality>67</raidCommonality>
    <humanoidFaction>false</humanoidFaction>
    <hidden>true</hidden>
    <canFlee>false</canFlee>
    <techLevel>Ultra</techLevel>
    <startingGoodwill>
      <min>-100</min>
      <max>-100</max>
    </startingGoodwill>
    <naturalColonyGoodwill>
      <min>-100</min>
      <max>-100</max>
    </naturalColonyGoodwill>
    <spawnGroups>
      <li>
        <selectionWeight>100</selectionWeight>
        <kinds>
          <li>Headcrab</li>
        </kinds>
      </li>
    </spawnGroups>
    <homeIconPath>World/FactionHomes/DefaultHome</homeIconPath>
    <homeIconColor>(150,150,150)</homeIconColor>
  </FactionDef>



</FactionDefs>
What did i do wrong? I literally just copy-pasted the code from "a mechanoid hive" faction and changed it a bit...

Rikiki

Have you created a new world?
New faction need a fresh world.

SlimeCrusher

... Oh... I knew i was supposed to make a new thing, i thought it was a colony and not a world lol
Thanks about that  ;D

But im having a problem, when i force a raid from "xen", i get an error on the console and the pawn doesn't move, the error is "Xen_Headcrab7473 threw exception while determining job: System.NullReferenceException: Object reference not set to an instance of an object". The pawn worked before but now it doesn't...

Rikiki

Please post the pawn XML def so we can look at it. :)
Your full project in .zip would be best.

SlimeCrusher

#4
Edit: Nevermind just fixed the console problem (I changed the thinktree from "Mechanoid" to "StandardHerbivore", that seemed to work), but im back on where i started:
The pawns don't attack humans...

I even tried putting ALOT of my pawns, and then a centipede, the centipede then started shooting at my headcrabs, but only one went and tried to attack him. Another strange thing, my colonists will try to kill the headcrabs if i give them a weapon or make them walk in the way of the headcrab...
Any idea on how to make a pawn attack? :/

Rikiki

Have you tried to put <thinkTree>Mechanoid</thinkTree>?
It is normal that peaceful animals don't attack (for now...).

SlimeCrusher

#6
Yea, did that, you know, the cause of the console errors problem WAS putting "<thinkTree>Mechanoid</thinkTree>"  :P
It may be because im not using the baseMechanoid thing and instead im using baseAnimal, that was so my pawn wasn't made out of metal lol

Edit: Do i simply give up? I will try adding the baseMechanoid thing maybe that works, but it'll be made out of metal... I remember back in alpha 3 where you just put the default faction to "Raider" and the pawn was automatically hostile :/