- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Modding Discussion >
- Research & Development >
- Advanced Question: RTBN Calls from Inside an Interaction
- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Modding Discussion >
- Research & Development >
- Advanced Question: RTBN Calls from Inside an Interaction
Posts: 363
Thanks: 6877 in 50 Posts
0 = run in my stack
1 = run in Stack Object's stack
2 = push onto my stack
The bits for 3rd operand byte have this meaning:
bit 0 = global STR#, bit 1 = semi-global STR#,
bit 2 = ignore global trees, bit 3 = ignore semi-global trees
bit 4 = specify params, bit 5 = use current params
The way the SimAntics processor finds the BHAV tree is that it examines the "Stack Object" private trees, then if it doesn't find the tree there it looks at the semi-globals for that object, then it looks for a global tree.
If you set bit 3 in the above operand or if you don't have a semi-global for that object, the processor will not look for a tree there.
If you set bit 2 in the above operand the processor will not look for a global tree of that name.
In any case, if the SimAntics processor does not find a tree with that name, the RTBN will return false.
Posts: 46
Thanks: 3919 in 4 Posts
1- calling a bhav of Sto's object
1- calling dynamically a bhav of the current object
You chose the name from local,semi or global ( relative to caller )
The game searches first in the local bhavs, then in the semi and last in the globals (relative to target ).
The main usage of this is defining a template behavior in the semiglobals of an object category, and overriding the behavior in the locals of specific objects.
Posts: 333
Thanks: 2 in 2 Posts
ebruere: Welcome back. We thought you had fallen off the ends of the earth.
Posts: 363
Thanks: 6877 in 50 Posts
Posts: 46
Thanks: 3919 in 4 Posts
The "Stack number out of range" means you are using a Local that does not exist. Change the max number of locals in the BHAV.
Jase,
During some interactions, the Sim is flagged as "Uninterruptible". This disables calls like "Idle" or "go to routing slot"
You have to save "my person data 47", set it to 1 before the call, and restore the value after the call.
My PC had fallen off the ends of the earth. Processor, power supply and Graphic card OUT ( I just got a decent replacement ( and the two EPs :o) )
Posts: 11,682
Thanks: 9675 in 11 Posts
I didn't want to add the new string to the semiglobal strings, and would prefer to put the calling string on the object that holds the BHAV I want to call. Is this possible?
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Posts: 46
Thanks: 3919 in 4 Posts
But you can use ANY existing global or semi-global string and rename your bhav to match this string.
Posts: 11,682
Thanks: 9675 in 11 Posts
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Posts: 363
Thanks: 6877 in 50 Posts
Dizzy, The "Stack number out of range" means you are using a Local that does not exist. Change the max number of locals in the BHAV. |
No offense, but I'm not retarded. What I'm referring to is this:
Object id: 924 name: Lamp - Wall - Pool - New - 1, 0 - Lower Stack size: 5 Error: Stack number out of range. Iterations: 0 Frame 4: Stack Object id: 924 Stack Object name: Lamp - Wall - Pool - New - 1, 0 - Lower Node: 2 Tree: id 8201 name 'Action - Do Fades' version 31 from LampGlobals Prim state: 0 Params: 924 1 100 15 Locals: Frame 3: Stack Object id: 924 Stack Object name: Lamp - Wall - Pool - New - 1, 0 - Lower Node: 3 Tree: id 8207 name 'Action - Fade ON' version 5 from LampGlobals Prim state: 0 Params: 924 Locals: Frame 2: Stack Object id: 924 Stack Object name: Lamp - Wall - Pool - New - 1, 0 - Lower Node: 10 Tree: id 8198 name 'Function - Init' version 32 from LampGlobals Prim state: 0 Params: Locals: Frame 1: Stack Object id: 0 Node: 0 Tree: id 4097 name 'Function - Init( Stub )' version -32757 from Lamp_Wall_Pool Prim state: 0 Params: Locals: Frame 0: Stack Object id: 0 Node: 0 Tree: id -1 name 'No behavior' version 0 from Prim state: 1 Params: Locals:
Please pay attention, here. Notice, for example, that there are no hacks (that I know of, anyway) that replace "Action - Do Fades" tree.
This is the Maxis tree:
# Group = 0x7F60C397, Instance = 0x2009 # Title = Action - Do Fades # # Format = 8007, Params = 4, Locals = 0 # Tree type = 0, Header flag = 4, Tree version = 1F (31) |
Now, explain to me exactly how you can produce that Object Error, if not the way I explain it.
Posts: 266
Thanks: 40121 in 145 Posts
Posts: 46
Thanks: 3919 in 4 Posts
I don't know how params are sent in this case, but error is during the call, trying to send a local. If the error were later during exec of the primitive, you would have had "Undefined transition"
The message for a problem with the stack is "Stack overflow" or "stack underflow"
Ending the loop in the "Main" bhav of an object will cause the underflow.
Posts: 363
Thanks: 6877 in 50 Posts
### # Group = 0x7F60C397, Instance = 0x2009 # Title = Action - Do Fades # # Format = 8007, Params = 4, Locals = 0 # Tree type = 0, Header flag = 4, Tree version = 1F (31) 0: Param 1 > 0; true: 1, false: 1 1: Temp 1 := Param 3; true: 3, false: error 2: Change Light: on object in Param 0, Targeting all lights on Object, Fade duration in Temp 1, Intensity in Temp 0; true: 4, false: error 3: Temp 0 := Param 2; true: 2, false: error 4: Temp 0 := Param 2; true: 5, false: error 5: Change Light: on object in Param 0, Targeting all lights on Object, Fading over a duration of 0 ticks, Intensity in Temp 0; true: true, false: error
Okay, where precisely is this "local" usage?
Posts: 11,682
Thanks: 9675 in 11 Posts
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Posts: 363
Thanks: 6877 in 50 Posts
If that failed to work, it would error EVERY TIME A LIGHT TURNED ON.
The error I'm getting is NOT because of any mythical "local" variable that wasn't designed to be there in the first place. Jeez.
Posts: 11,682
Thanks: 9675 in 11 Posts
It may not be me and Ebruere who are going mad, it might be the Maxis interpreter/compiler or however it does it. We might get a clue about what it *thinks* it's meant to be doing.
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Posts: 363
Thanks: 6877 in 50 Posts
I did *******NOT******* modify that tree in any way. Look it up yourself.
THIS IS A MAXIS TREE. MAXIS. <-- Look
Posts: 11,682
Thanks: 9675 in 11 Posts
For example, Change Light may implicitly take Callers Params
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Posts: 363
Thanks: 6877 in 50 Posts
That would be extremely convenient, and I wouldn't have bothered mentioning it if that were the case, as the problem would have become quite easy to solve at that point. Part of the problem here is that I did *not* call that tree. My mods have NOTHING to do with that error.
Posts: 11,682
Thanks: 9675 in 11 Posts
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Posts: 363
Thanks: 6877 in 50 Posts
So how come it's giving you an error? I play with the debugging on all the time and I don't get object errors from Maxis code. I mean why do you need to "solve" it if it's not your problem? |
Somehow I don't think the important thing is figuring out who to blame.
I think the important thing is that it did happen, and this is why I think it did:
Because Maxis does not call "stub" Init the same way as regular Inits. I think they assume that you're never going to have Idle time, and the Idle time is probably occuring in the fade on the Light tree there. This is a potential problem for any object that uses the "stub" Init function, assuming I'm right about this.
Posts: 266
Thanks: 40121 in 145 Posts
Posts: 11,682
Thanks: 9675 in 11 Posts
My mods have NOTHING to do with that error. |
http://www.moreawesomethanyou.com/s...hp?topic=1437.0 finally explains the problem arose in the context of one of your hacks. It doesn't cause a problem in the game normally. Instead of resorting to telling people they are going mad when they're only trying to take an interest in helping you, why not be prepared to explain the background a little? Otherwise it's like going to the doctor saying you have a pain in your back, but not helping the investigations by explaining you fell down the stairs the day before.
I am not saying your hack *caused* the problem, but it looks like Ebruere and I weren't so insane after all to be at least enquiring about context.
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Posts: 46
Thanks: 3919 in 4 Posts
I've had a problem with a ring I'm creating. I create the ring directly in the finger's slot, and test the slot just after that. result is zero !! with testing cheat, when the message appears, I can see the ring on the finger, the log tells me the ring exists and is contained in the slot.
I've solved the problem by creating the ring "out of world", then Sto ID is OK, I can set the attributes as needed, and then I "snap into" the slot.
I think that some calls require a tick to execute, some will execute in a new thread and allow you to continue. There are some short Idle instructions sometimes in maxis code probably to solve this problem.
Posts: 363
Thanks: 6877 in 50 Posts
Posts: 266
Thanks: 40121 in 145 Posts
Locked thread | Locked by: CynicalChick Reason: Locked by request | |
Who Posted
|