More Awesome Than You!

TS2: Burnination => The Podium => Topic started by: Marvin Kosh on 2009 April 11, 09:56:23



Title: Six trees, one chainsaw-wielding maniac
Post by: Marvin Kosh on 2009 April 11, 09:56:23
I'm doing what I thought would be a simple mod of visitors.  But I've only really started to get a handle on what the following nest of functions does:

CT - Start Visiting (group 0x7F92C866E, instance 0x1001)
 - [private 0x100A]  Start Visiting - Knock on Door()
 - - [prim 0x001C] Run Tree by Name("CT - Knock On Door")

The thing I'm not sure about is which of the six variants of "CT - Knock On Door" is actually used for visitors that have been invited to the lot (I managed to comprehend that the one that is used depends on the type of object - Sim in this case).  I'm think it could be the one in group 0x7FD0DEBA because the others seem to be specifically for service and scenario NPCs.  But the past six hours reading code and testing the mod tends to suggest that I could be wrong.  :P



Title: Re: Six trees, one chainsaw-wielding maniac
Post by: J. M. Pescado on 2009 April 12, 10:13:41
A local CT for the given knocked object will be executed first if it exists. If there is no local (0x1XXX) for a specific object that the sim is trying to knock on, the semiglobal one (0x2XXX) will be executed instead. If this doesn't exist, the global one will be used (there isn't one). If none of these exist, the entire thing returns false and nothing is run.


Title: Re: Six trees, one chainsaw-wielding maniac
Post by: Marvin Kosh on 2009 April 30, 20:12:14
That makes things a bit clearer.

Thankfully, I didn't have to modify any of those trees.  The reason why Sims would walk far far away after knocking was staring me in the face (top level) the whole time.  Some Eaxian bright spark decided it would be fun to roll a d100 to see whether the Sim wanders about or wanders about, making for a whole lot of unnecessary and annoying code.


Title: Re: Six trees, one chainsaw-wielding maniac
Post by: J. M. Pescado on 2009 April 30, 23:03:20
I still think the best BHAV in the game is 0x1D2, "Coin Flip".