Problem with new worktables

Started by koni, April 01, 2017, 03:31:09 AM

Previous topic - Next topic

koni

Hello,

I created some new apparel and weapons. First I said, they are craftable at the vanilla tailoring benches/smithies. Until this point everything was fine, but then I added my own tailoring benches/smithies. These were also problemless included into the game, expect of that thing, that these benches ignore the orders to produce the apparel/weapon. The bills were in the tabs, but no colonist did anything. I also tried to force them with right click, but that was also ignored.

Did I defined my workbenches wrong or is the mistake done in the apparel/weapons?

Thanks in advance

RawCode

lupus!

since you provided no logs, no XML and no code, it's lupus.

koni

Here are the both workbenches


<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>



  <ThingDef ParentName="BenchBase">
    <DefName>AR_TailoringBench</DefName>
    <label>roman tailor bench</label>
    <ThingClass>Building_WorkTable</ThingClass>
    <Description>A workbench for tailoring clothes by hand.</Description>
    <graphicData>
      <texPath>Buildings/Production/TableTailorRome</texPath>
      <graphicClass>Graphic_Multi</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>
    <costStuffCount>80</costStuffCount>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <AltitudeLayer>Building</AltitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2000</WorkToBuild>
      <MaxHitPoints>185</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>
</building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
<placeWorkers>
<li>PlaceWorker_ShowFacilitiesConnections</li>
</placeWorkers>
    <researchPrerequisites>
      <li>AR_Project_Civil</li>
    </researchPrerequisites>
  </ThingDef>


  <ThingDef ParentName="BenchBase">
    <DefName>AR_Smithy</DefName>
    <label>roman smithy</label>
    <ThingClass>Building_WorkTable</ThingClass>
    <Description>A wood-fueled station equipped for smithing non-mechanical weapons and tools.</Description>
    <graphicData>
      <texPath>Buildings/Production/TableSmithingRome</texPath>
      <graphicClass>Graphic_Multi</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>
    <CostList>
      <Steel>100</Steel>
    </CostList>
    <constructEffect>ConstructWood</constructEffect>
    <AltitudeLayer>Building</AltitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>3000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <Cleanliness>-3</Cleanliness>
    </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>
</building>
    <comps>
      <li Class="CompProperties_Refuelable">
        <fuelConsumptionRate>80.0</fuelConsumptionRate>
        <fuelCapacity>50.0</fuelCapacity>
        <fuelFilter>
          <thingDefs>
            <li>WoodLog</li>
          </thingDefs>
        </fuelFilter>
        <consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
      </li>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
    <placeWorkers>
      <li>PlaceWorker_ShowFacilitiesConnections</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>AR_Project_Military</li>
    </researchPrerequisites>
  </ThingDef>

 
</ThingDefs>


and here the weapons


<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>


  <ThingDef Name="BaseMeleeWeapon_Rome" Abstract="True" ParentName="BaseMeleeWeapon">
    <techLevel>Medieval</techLevel>
<smeltable>true</smeltable>
    <recipeMaker>
      <recipeUsers>
        <li>AR_Smithy</li>
      </recipeUsers>
</recipeMaker>
  </ThingDef>

<ThingDef ParentName="BaseMeleeWeapon_Rome">
    <defName>AR_Gladius</defName>
    <label>roman gladius</label>
    <description>Same as the vanilla one.</description>
    <graphicData>
      <texPath>Things/Item/Equipment/WeaponMelee/Gladius</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <soundInteract>InteractPistol</soundInteract>
    <costStuffCount>50</costStuffCount>
    <statBases>
      <WorkToMake>10000</WorkToMake>
      <Mass>0.85</Mass>
      <MeleeWeapon_DamageAmount>12</MeleeWeapon_DamageAmount>
      <MeleeWeapon_Cooldown>1.95</MeleeWeapon_Cooldown>
    </statBases>
    <equippedAngleOffset>-65</equippedAngleOffset>
    <stuffCategories>
      <li>Metallic</li>
    </stuffCategories>
<weaponTags>
<li>RomanSoldier</li>
</weaponTags>
    <verbs>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <hasStandardCommand>true</hasStandardCommand>
        <meleeDamageDef>Cut</meleeDamageDef>
      </li>
    </verbs>
  </ThingDef>

<ThingDef ParentName="BaseMeleeWeapon_Rome">
    <defName>AR_Xiphos</defName>
    <label>xiphos</label>
    <description>Same as a gladius, but greek.</description>
    <graphicData>
      <texPath>Items/Weapons/Xiphos</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <soundInteract>InteractPistol</soundInteract>
    <costStuffCount>50</costStuffCount>
    <statBases>
      <WorkToMake>10000</WorkToMake>
      <Mass>0.85</Mass>
      <MeleeWeapon_DamageAmount>12</MeleeWeapon_DamageAmount>
      <MeleeWeapon_Cooldown>1.95</MeleeWeapon_Cooldown>
    </statBases>
    <equippedAngleOffset>-65</equippedAngleOffset>
    <stuffCategories>
      <li>Metallic</li>
    </stuffCategories>
<weaponTags>
<li>Hellenic</li>
</weaponTags>
    <verbs>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <hasStandardCommand>true</hasStandardCommand>
        <meleeDamageDef>Cut</meleeDamageDef>
      </li>
    </verbs>
  </ThingDef>
 
<ThingDef ParentName="BaseMeleeWeapon_Rome">
    <defName>AR_Falcata</defName>
    <label>falcata</label>
    <description>A sword which is at its concave side sharpened. Good for cutting, bad for fencing. It is also called Kopis</description>
    <graphicData>
      <texPath>Items/Weapons/Falcata</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <soundInteract>InteractPistol</soundInteract>
    <costStuffCount>60</costStuffCount>
    <statBases>
      <WorkToMake>10000</WorkToMake>
      <Mass>0.85</Mass>
      <MeleeWeapon_DamageAmount>14</MeleeWeapon_DamageAmount>
      <MeleeWeapon_Cooldown>2.5</MeleeWeapon_Cooldown>
    </statBases>
    <equippedAngleOffset>-65</equippedAngleOffset>
    <stuffCategories>
      <li>Metallic</li>
    </stuffCategories>
<weaponTags>
<li>Hellenic</li>
<li>Barbarian</li>
</weaponTags>
    <verbs>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <hasStandardCommand>true</hasStandardCommand>
        <meleeDamageDef>Cut</meleeDamageDef>
      </li>
    </verbs>
  </ThingDef>

<ThingDef ParentName="BaseMeleeWeapon_Rome" Class="FactionColors.FactionItemDef">
    <thingClass>FactionColors.FactionItem</thingClass>
    <defName>AR_Lance</defName>
    <label>lance</label>
<techLevel>Medieval</techLevel>
    <description>A longer polearm tipped with a sharp point for stabbing opponents in melee combat.</description>
    <graphicData>
      <texPath>Items/Weapons/Lance</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
<ItemMeshSize>(2.0, 1.0, 1.0)</ItemMeshSize>
    <soundInteract>InteractPistol</soundInteract>
    <statBases>
  <WorkToMake>10000</WorkToMake>
      <Mass>1</Mass>
      <MeleeWeapon_DamageAmount>14</MeleeWeapon_DamageAmount>
      <MeleeWeapon_Cooldown>2.5</MeleeWeapon_Cooldown>
    </statBases>
<costList>
      <Steel>50</Steel>
      <WoodLog>100</WoodLog>
    </costList>
    <equippedAngleOffset>-70</equippedAngleOffset>
<weaponTags>
<li>Spearmen</li>
</weaponTags>
    <verbs>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <hasStandardCommand>true</hasStandardCommand>
        <meleeDamageDef>Stab</meleeDamageDef>
      </li>
    </verbs>
  </ThingDef>
 
</ThingDefs>

Granitecosmos

Quote from: koni on April 01, 2017, 03:31:09 AM
The bills were in the tabs, but no colonist did anything. I also tried to force them with right click, but that was also ignored.

Seems like you forgot to make a WorkGiver.xml file. It's really easy to make, don't worry.

<?xml version="1.0" encoding="utf-8" ?>
<WorkGivers>
<WorkGiverDef>
<defName>DoBillsMakeWeapons_AR</defName>
<label>make weapons</label>
<giverClass>WorkGiver_DoBill</giverClass>
<workType>Smithing</workType>
<priorityInType>115</priorityInType>
<fixedBillGiverDefs>
<li>AR_Smithy</li>
</fixedBillGiverDefs>
<verb>smith</verb>
<gerund>smithing at</gerund>
<requiredCapacities>
<li>Manipulation</li>
</requiredCapacities>
<prioritizeSustains>true</prioritizeSustains>
</WorkGiverDef>
</WorkGivers>

I added this, grabbed your Smithy and your Gladius code then tested in-game. Solves all your problems. You'll have to make one for your Tailoring Bench too.

Quote from: RawCode on April 01, 2017, 04:35:03 AM
lupus!


Canis Lupus.

koni

Yes, it was the workgiver. Thans

That wolf joke I don't get.

jimthenoob

its a play on words involving the Latin name for the species

RemingtonRyder