Tried to SetFactionDirect on a building error.

Started by EzraN, August 12, 2016, 06:20:02 PM

Previous topic - Next topic

EzraN

There is a problem when I try to create a new type of table in the game and spawn it in, it will say Tried to SetFactionDirect on VaultTable4848 which cannot have a faction..
I've looked through the xml file to see if "SetFactionDirect" is in the file, but I can't find it. The output log says: (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

Tried to SetFactionDirect on VaultTable4848 which cannot have a faction.

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

Setting up 1 worker threads for Enlighten.
  Thread -> id: 4a0 -> priority: 1


And the table xml file reads:
<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>

 
  <ThingDef>
    <DefName>VaultTable</DefName>
    <label>Vault construction table</label>
    <ThingClass>Building_WorkTable</ThingClass>
    <Description>Info on bench...</Description>
    <graphicData>
      <texPath>Things/VaultTable</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <castEdgeShadows>true</castEdgeShadows>
    <staticSunShadowHeight>0.20</staticSunShadowHeight>
    <costStuffCount>75</costStuffCount>
    <CostList>
      <Steel>50</Steel>
      <Component>3</Component>
    </CostList>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <AltitudeLayer>Building</AltitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToMake>2500</WorkToMake>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <Size>(3,1)</Size>
    <DesignationCategory>Production</DesignationCategory>
    <Passability>PassThroughOnly</Passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
      <unpoweredWorkTableWorkSpeedFactor>0.4</unpoweredWorkTableWorkSpeedFactor>
    </building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
      <li Class="CompProperties_Breakdownable"/>
    </comps>

  </ThingDef>
 
</ThingDefs>


Am I missing something from this?

skullywag

Just so this is answered and someone else hits this, add the abstract "BuildingBase" to your mod and set it as parent to the your def, problem solved, I just hit this until i realised my error lol.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?