Deploy people next to facilities?

Started by Morrneyo, April 14, 2016, 07:03:26 AM

Previous topic - Next topic

Morrneyo

I was practicing modding about turret thingy, but I have a problem.
I was trying to make gun bunker which people can deploy next to it to fire bullets.
But I couldn't even interact with bunker because I couldn't right click it.
What's the problem?

<!--=============== gun complex ===============-->
  <ThingDef ParentName="BuildingBase">
    <defName>GunComplex</defName>
    <label>gun complex</label>
    <thingClass>Building_TurretGun</thingClass>
    <graphicData>
      <texPath>Things/Building/Security/GunComplex</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3,1)</drawSize>
    </graphicData>
    <uiIconPath>Things/Building/Security/GunComplex_menuicon</uiIconPath>
    <altitudeLayer>Waist</altitudeLayer>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <statBases>
      <MaxHitPoints>225</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <WorkToMake>3000</WorkToMake>
      <Beauty>-40</Beauty>
    </statBases>
    <tickerType>Normal</tickerType>
    <comps>
      <li Class="CompProperties_Explosive">
        <explosiveRadius>1</explosiveRadius>
        <explosiveDamageType>Bomb</explosiveDamageType>
      </li>
      <li>
        <compClass>CompForbiddable</compClass>
      </li>
      <li>
        <compClass>CompMannable</compClass>
      </li>
     </comps>
    <description>A perimeter mounted gun is designed to work regardless if you have power or not as long as somebody is manning it.</description>
    <size>(3,1)</size>
    <passability>PassThroughOnly</passability>
    <pathCost>50</pathCost>
    <castEdgeShadows>true</castEdgeShadows>
    <fillPercent>0.65</fillPercent>
    <stuffCategories>
      <li>Metallic</li>
      <li>Stony</li>
    </stuffCategories>
    <costStuffCount>100</costStuffCount>
    <costList>
      <Steel>150</Steel>
      <Components>2</Components>
    </costList>
    <terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
    <designationCategory>Security</designationCategory>
    <specialDisplayRadius>55</specialDisplayRadius>
    <building>
      <turretGunDef>Gun_GunComplex</turretGunDef>
      <turretBurstCooldownTicks>18</turretBurstCooldownTicks>
      <turretTopgraphicPath>Things/Building/Security/GunComplexGun</turretTopgraphicPath>
    </building>
    <staticSunShadowHeight>0.40</staticSunShadowHeight>
    <designationHotKey>G</designationHotKey>
    <researchPrerequisites><li>MilitaryComplex</li></researchPrerequisites>
  </ThingDef>

Shinzy

You'll probably need the Job worker thing for it aswell
Check the JobDefs

Morrneyo

Quote from: Shinzy on April 14, 2016, 07:08:38 AM
You'll probably need the Job worker thing for it aswell
Check the JobDefs

What is that? Actually I'm new to working with a mod.

Shinzy

when you have somekind of building that is useable by a pawn
you need to have somekind of WorkGiverDef for it and a JobDef
so the pawns will know there's an actual job for them to do

I don't actually remember anything in any detail and I've never done it with a turret and am mostly just assuming and you know what they say about "when you assume"

I'd just start on studying those files in the core mod. While waiting someone with more detailed info to pass by =P

Morrneyo

Quote from: Shinzy on April 14, 2016, 08:38:41 AM
when you have somekind of building that is useable by a pawn
you need to have somekind of WorkGiverDef for it and a JobDef
so the pawns will know there's an actual job for them to do

I don't actually remember anything in any detail and I've never done it with a turret and am mostly just assuming and you know what they say about "when you assume"

I'd just start on studying those files in the core mod. While waiting someone with more detailed info to pass by =P

Now I get it.

      <li Class="CompProperties_Forbiddable"/>
      <li Class="CompProperties_Mannable">
        <manWorkType>Violent</manWorkType>

This part was a problem. I mistakenly add extra spacebar between those, so it didn't work.
Thank you!

Shinzy

Well! I didn't really help none but you're welcome! ;D
Edit: Go me! *celebrates*