PA Personal Mod

Started by dustysniper, June 15, 2015, 08:03:23 AM

Previous topic - Next topic

dustysniper

Hi,

Im making a personal mod so that I can craft Project Armory weapons. I can get the crafting table to appear, I can even get the bill to queue on tab. But the colonists well not make the weapon they just stand around. I put all the items in the stockpile made sure colonists have the crafting ability toggled with right ability level, and made sure I had the right resources. Anyways Im hoping you guys can help.

credit:


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

<ThingDef Name="BuildingBase" Abstract="True">
<category>Building</category>
<soundImpactDefault>BulletImpactMetal</soundImpactDefault>
<selectable>true</selectable>
<drawerType>MapMeshAndRealTime</drawerType>
<terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
<repairEffect>Repair</repairEffect>
<leaveResourcesWhenKilled>true</leaveResourcesWhenKilled>
<filthLeaving>BuildingRubble</filthLeaving>
</ThingDef>

<ThingDef ParentName="BuildingBase">
<DefName>WW1CraftingTable</DefName>
<label>WW1 Crafting Table</label>
<ThingClass>Building_WorkTable</ThingClass>
<Description>A workbench to produce weapons from the early 1900's.</Description>
<graphicPath>Things/Building/Building_Structure_WW1</graphicPath>
<graphicClass>Graphic_Single</graphicClass>
<constructEffect>ConstructWood</constructEffect>
<CostList>
<WoodLog>50</WoodLog>
<Steel>40</Steel>
</CostList>
<AltitudeLayer>Waist</AltitudeLayer>
<fillPercent>0.5</fillPercent>
<useHitPoints>True</useHitPoints>
<statBases>
<WorkToMake>1000</WorkToMake>
<MaxHitPoints>180</MaxHitPoints>
<Flammability>1.0</Flammability>
</statBases>
<Size>(3,1)</Size>
<graphicOverdraw>False</graphicOverdraw>
<DesignationCategory>Production</DesignationCategory>
<Passability>PassThroughOnly</Passability>
<pathCost>70</pathCost>
<hasInteractionCell>True</hasInteractionCell>
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
<itemSurface>True</itemSurface>
<recipes>
<li>CraftLMGHuot</li>
</recipes>
<inspectorTabs>
<li>ITab_Bills</li>
</inspectorTabs>
<building>
<spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
</building>
</ThingDef>
</ThingDefs>


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

<RecipeDef>
<defName>CraftLMGHuot</defName>
<label>Craft LMG Huot</label>
<description>The Huot Automatic Rifle is an experimental gas piston operated light machine gun dating back to the first world war.</description>
<jobString>Building LMG Huot.</jobString>
<workAmount>3000</workAmount>
<workSpeedStat>SmeltingSpeed</workSpeedStat>
<effectWorking>Smelt</effectWorking>
<soundWorking>Recipe_Smelt</soundWorking>
<skillRequirements>
<li>
<skill>Crafting</skill>
<minLevel>2</minLevel>
</li>
</skillRequirements>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Steel</li>
</thingDefs>
</filter>
<count>40</count>
</li>
<li>
<filter>
<thingDefs>
<li>WoodLog</li>
</thingDefs>
</filter>
<count>50</count>
</li>
</ingredients>
<products>
<Gun_Huot_PA>1</Gun_Huot_PA>
</products>
<fixedIngredientFilter>
<thingDefs>
<li>Steel</li>
<li>WoodLog</li>
</thingDefs>
</fixedIngredientFilter>
<workSkill>Crafting</workSkill>
</RecipeDef>

</RecipeDefs>

skullywag

You got a workgiver? Check core defs for examples.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

dustysniper

#2
This is what I understood from it and they still do the same thing. If it helps I cant right click on my production table to prioritize the bill.

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

  <WorkGiverDef>
    <defName>FinishUnfinishedWeapons</defName>
    <giverClass>WorkGiver_FinishUnfinishedThings</giverClass>
    <workType>Crafting</workType>
    <priorityInType>116</priorityInType>
    <singleBillGiverDef>WW1BuildingProduction</singleBillGiverDef>
    <verb>crafting</verb>
    <gerund>crafting at</gerund>
    <requiredCapacities>
      <li>Manipulation</li>
    </requiredCapacities>
  </WorkGiverDef>

  <WorkGiverDef>
    <defName>DoBillsMakeWeapons</defName>
    <giverClass>WorkGiver_DoBill</giverClass>
    <workType>Crafting</workType>
    <priorityInType>115</priorityInType>
    <singleBillGiverDef>WW1BuildingProduction</singleBillGiverDef>
    <verb>crafting</verb>
    <gerund>crafting at</gerund>
    <requiredCapacities>
      <li>Manipulation</li>
    </requiredCapacities>
  </WorkGiverDef>
 
 
</WorkGivers>

mipen

The defname you use for the table in the workgiver is different from the table's defname. Try changing
<singleBillGiverDef>WW1BuildingProduction</singleBillGiverDef>

to

<singleBillGiverDef>WW1CraftingTable</singleBillGiverDef>

dustysniper

Quote from: mipen on June 17, 2015, 10:13:04 AM
The defname you use for the table in the workgiver is different from the table's defname. Try changing
<singleBillGiverDef>WW1BuildingProduction</singleBillGiverDef>

to

<singleBillGiverDef>WW1CraftingTable</singleBillGiverDef>

Gave it a try to the same effect. They just wander around near the table.

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

  <WorkGiverDef>
    <defName>FinishUnfinishedWeapons</defName>
    <giverClass>WorkGiver_FinishUnfinishedThings</giverClass>
    <workType>Crafting</workType>
    <priorityInType>116</priorityInType>
    <singleBillGiverDef>WW1CraftingTable</singleBillGiverDef>
    <verb>crafting</verb>
    <gerund>crafting at</gerund>
    <requiredCapacities>
      <li>Manipulation</li>
    </requiredCapacities>
  </WorkGiverDef>

  <WorkGiverDef>
    <defName>DoBillsMakeWeapons</defName>
    <giverClass>WorkGiver_DoBill</giverClass>
    <workType>Crafting</workType>
    <priorityInType>115</priorityInType>
    <singleBillGiverDef>WW1CraftingTable</singleBillGiverDef>
    <verb>crafting</verb>
    <gerund>crafting at</gerund>
    <requiredCapacities>
      <li>Manipulation</li>
    </requiredCapacities>
  </WorkGiverDef>
 
 
</WorkGivers>

skullywag

perhaps youd get on better doing this like tailoring in core and add the recipes to the table itself, check apparel_various for example.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?