Modifying Medieval Times Artisan Table

Started by sgtarpin, November 23, 2017, 10:23:12 PM

Previous topic - Next topic

sgtarpin

I'm trying to modify the Artisan Table from Medieval Times to be able to craft normal sculptures from it as well. I'm hoping to learn a bit about modding as well. I thought that I should be able to either allow the artisan table to use the sculpture recipes either through the table's def or though the def for the objects that can already be created at the table. There are no recipes listed that the table can craft in the table's def, and adding the sculpture recipes to the location of the arts that the mod adds in does nothing either. I'm not sure what I'm missing. I'm not sure I understand how the mod is telling the table that it can craft the things it can, and in general, how to tell the table it can craft the arts from core. Can someone help me do this and explain why it works?

kaptain_kavern

#1
I bet you searching for WorkGiverDef

For Vanilla, this can be found in  Core/Defs/WorkGiverDefs/WorkGivers.xml

 
<WorkGiverDef>
    <defName>DoBillsSculpt</defName>
    <label>sculpt</label>
    <giverClass>WorkGiver_DoBill</giverClass>
    <workType>Art</workType>
    <priorityInType>100</priorityInType>
    <fixedBillGiverDefs>
      <li>TableSculpting</li>
    </fixedBillGiverDefs>
    <verb>sculpt</verb>
    <gerund>sculpting at</gerund>
    <requiredCapacities>
      <li>Manipulation</li>
    </requiredCapacities>
    <prioritizeSustains>true</prioritizeSustains>
  </WorkGiverDef>



But I'm not sure I understand what you're trying to achieve and I don't know the mod's code

Edit:
For Sculptures recipes, search for <recipeMaker> in Core/Defs/ThingDefs_Buildings/Buildings_Art.xml

sgtarpin

I am trying to take the things from here:

Core/Defs/ThingDefs_Buildings/Buildings_Art.xml

and allow them to additionally be crafted at the Artisan Table in the Medieval Times mod.

I can see that the job that tells the pawn to do the bills at the workstation is in the MedTimes_WorkGivers.xml. I can see that the Artisan workstation is defined in the MedTimes_Buildings_Medieval.xml. I can see that the objects that are created at the station are defined in the MedTimes_Buildings_Art.xml.

I don't know what property for the workstation determines what bills are possible, and I don't know how the objects that are created are linked to those bills.

jamaicancastle

Quote from: sgtarpin on November 23, 2017, 11:53:40 PM
I don't know what property for the workstation determines what bills are possible, and I don't know how the objects that are created are linked to those bills.
Recipes can be assigned in three different ways: they can be specified in the worktable def, in the recipe def, or in the product def's "recipeMaker" block. The base sculptures use the last method. In Buildings_Art.xml, you should find the following:

  <ThingDef ParentName="BuildingBase" Name="SculptureBase" Abstract="True">
    [...]
    <recipeMaker>
      <recipeUsers>
        <li>TableSculpting</li>
      </recipeUsers>
    [...]
    </recipeMaker>
  </ThingDef>


You should be able to add them to another building by patching each of the sculptures' recipeMaker -> recipeUsers to include a new list item with the def of the artisan table.

sgtarpin