Ludeon Forums

Ludeon Forums

  • December 16, 2019, 12:00:48 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Question about def inheritance regarding ThinkTreeDefs  (Read 364 times)


  • Muffalo
  • *
  • Posts: 6
  • Refugee
    • View Profile
Question about def inheritance regarding ThinkTreeDefs
« on: February 12, 2017, 02:01:12 AM »

A bit of a setup, my question is at the bottom but might not make sense without context.  I've never fiddled with ThinkTreeDefs before, I've mostly fiddled with ThingDefs and dipped my toes into code.

I've been trying to fix up some errors in Combat Realism, in particular I was looking at how when a visitor showed up you'd almost certainly see something like "<name> has null dutyDefToSubNode"

I tried to follow the code flow, hit it with a fair number of troubleshooting tricks, including breaking things to see what starts working.  Stumbled on when Combat Realism's ThinkTreeDefs/Humanlike.xml failed to load the error went away.  So I started working on Combat Realism's Humanlike.xml until figuring out that the presence of <treeDef>LordDutyConstant</treeDef> was causing the error.

That didn't make a bit of sense as that same bit is in Core's Humanlike.xml.  I noticed that LordDutyConstant is defined in the Core file SubTrees_Duty.xml so I copied that over to Combat Realism and the error went away.

What I'm confused about is that LordDutyConstant isn't abstract and it is defined in Core so shouldn't it have remained defined in Combat Realism?