WorkGiver/JobGiver question

Started by StukaJU87c, July 21, 2019, 01:24:36 PM

Previous topic - Next topic

StukaJU87c

I'm trying to make cleaning available for animals and am running into an issue that I believe stems from a lack of understanding of the differences between WorkGiver and JobGiver. I've looked at the (pretty sparse) tutorials on the matter linked in the wiki, but they don't actually touch on this topic it all.

What is the difference between the two, and how does that affect usability?

I'm trying to add cleaning to the Animal ThinkTree, but get an invalid cast exception for WorkGiver_CleanFilth. Here's the code I'm using (It's just a modified section of the XML for Haul, I wasn't sure how to patch this being lists inside of lists so I just added to the file for now)

<!-- Test Clean -->
<li Class="ThinkNode_ChancePerHour_Constant">
              <mtbHours>1.5</mtbHours>
              <subNodes>
                <li Class="ThinkNode_ConditionalTrainableCompleted">
                  <trainable>RT_Clean</trainable>
                  <subNodes>
                    <li Class="ThinkNode_Tagger">
                      <tagToGive>TrainedAnimalBehavior</tagToGive>
                      <subNodes>
                        <li Class="WorkGiver_CleanFilth" />
                      </subNodes>
                    </li>
                  </subNodes>
                </li>
              </subNodes>
            </li>