Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Anvil_Pants

#1
RimWorld 0.17.1557 rev1146

Exception in RimWorld.ThinkNode_Priority_GetJoy TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.JoyGiver_TakeDrug.BestIngestItem (Verse.Pawn pawn, System.Predicate`1 extraValidator) [0x00000] in <filename unknown>:0
  at RimWorld.JoyGiver_Ingest.TryGiveJobInternal (Verse.Pawn pawn, System.Predicate`1 extraValidator) [0x00000] in <filename unknown>:0
  at RimWorld.JoyGiver_Ingest.TryGiveJob (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at RimWorld.JobGiver_GetJoy.TryGiveJobFromJoyGiverDefDirect (RimWorld.JoyGiverDef def, Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at RimWorld.JobGiver_GetJoy.TryGiveJob (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_JobGiver.TryIssueJobPackage (Verse.Pawn pawn, JobIssueParams jobParams) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn, JobIssueParams jobParams) [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_PrioritySorter:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Tagger:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
RimWorld.ThinkNode_Conditional:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.Pawn_JobTracker:DetermineNextJob(ThinkTreeDef&)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:EndCurrentJob(JobCondition, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


I'm causing this in vanilla, with this patch:

<?xml version="1.0" encoding="utf-8" ?>
<Patch>
  <Operation Class="PatchOperationSequence">
    <success>Always</success>
    <operations>
      <li Class="PatchOperationTest">
        <xpath>*/NeedDef[defName = "Joy"]/colonistAndPrisonersOnly</xpath>
      </li>
      <li Class="PatchOperationRemove">
         <xpath>*/NeedDef[defName = "Joy"]/colonistAndPrisonersOnly</xpath>
      </li>
    </operations>
  </Operation>

  <Operation Class="PatchOperationSequence">
    <success>Always</success>
    <operations>
      <li Class="PatchOperationTest">
        <xpath>*/NeedDef[defName = "Joy"]/neverOnPrisoner</xpath>
      </li>
      <li Class="PatchOperationRemove">
         <xpath>*/NeedDef[defName = "Joy"]/neverOnPrisoner</xpath>
      </li>
    </operations>
  </Operation>

  <Operation Class="PatchOperationAdd">
    <xpath>*/NeedDef[defName = "Joy"]</xpath>
    <value>
      <neverOnPrisoner>false</neverOnPrisoner>
    </value>
  </Operation>

  <Operation Class="PatchOperationSequence">
    <success>Always</success>
    <operations>
      <li Class="PatchOperationTest">
        <xpath>*/NeedDef[defName = "Joy"]/colonistsOnly</xpath>
      </li>
      <li Class="PatchOperationRemove">
         <xpath>*/NeedDef[defName = "Joy"]/colonistsOnly</xpath>
      </li>
    </operations>
  </Operation>

  <Operation Class="PatchOperationAdd">
    <xpath>*/NeedDef[defName = "Joy"]</xpath>
    <value>
      <colonistsOnly>false</colonistsOnly>
    </value>
  </Operation>

</Patch>


Edit: With patch, lock up a prisoner with a joy item and hit the prisoner with -20% joy until they try to play.

It's similar to this closed issue on Mantis.

Here's the full log. In that test I had Hospitality loaded as well, just to be thorough in my own testing. I discovered the exception because Prisoner Joy's author tried to use colonistAndPrisonersOnly=true on Joy NeedDef, and that stopped Hospitality's guests from doing joy things. I think that the patch above is the right way to do it.
#2
Personal shield is a technologically advanced device, and should have either a manual on/off toggle switch or a weapon-dependent on/off mode, either of which would detour and replace the well known game message that a ranged user has a shield equipped. It could make good sense to have both manual and automatic modes coded, and then let game difficulty setting determine which one is in play and whether or not the warning message is given.