Ludeon Forums

RimWorld => Mods => Help => Topic started by: Jamestec on October 17, 2016, 08:46:20 AM

Title: Best way to replace JobGiver_Haul in Animal ThinkTreeDefs?
Post by: Jamestec on October 17, 2016, 08:46:20 AM
What is the best way of replacing JobGiver_Haul in Animal ThinkTreeDefs?

I have thought of the following options:

Edit: alternatively to 3, do the same thing but make each a separate SubTree instead of subNodes.
Title: Re: Best way to replace JobGiver_Haul in Animal ThinkTreeDefs?
Post by: Dingo on October 17, 2016, 09:27:04 AM
I think detouring the jobgiver directly (so that would be #1?) is probably the simplest/best way to do it.
Title: Re: Best way to replace JobGiver_Haul in Animal ThinkTreeDefs?
Post by: 1000101 on October 17, 2016, 11:03:14 AM
Detours should be avoided unless all other, better options (and all other options are better) have been exhausted.

Detours are intended to be a "last resort, nothing else can achieve the goal I am aiming for."

If using some XML to fix it doesn't work (and you may need to clone the entire sub-tree to do it) then it's time to start looking at other solutions.

Final note, there are two mods already which will allow you to control the animal hauling.
Title: Re: Best way to replace JobGiver_Haul in Animal ThinkTreeDefs?
Post by: Dingo on October 17, 2016, 11:12:59 AM
If you use XML to override the ThinkTree you're doing something inherently incompatible while overriding a specific job is compatible with mods that do change the ThinkTree for broader purposes... I'm sure CCL offers a good solution to this.
Title: Re: Best way to replace JobGiver_Haul in Animal ThinkTreeDefs?
Post by: 1000101 on October 17, 2016, 05:07:30 PM
CCL adds additional injection points in the think trees as well as a mechanic to detour methods.  That being said, I still advocate avoiding detours unless no other option exists.
Title: Re: Best way to replace JobGiver_Haul in Animal ThinkTreeDefs?
Post by: RawCode on October 18, 2016, 01:41:26 AM
hooks are not last resort, you do not need to limit yourself.
just do what you want in way you like, don't waste time on "better solutions".

when (if) some issue appear later, in form of compatability or stability issue, you will fix it later.

trying to make everything "perfect" initially will have "bad" results.