Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Field Researcher
#26 Old 2nd Nov 2005 at 12:56 PM
Just as an update (thanks to Shy), the stack frame you use is designated by the 6th operand this way:

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.
Advertisement
Lab Assistant
#27 Old 4th Nov 2005 at 8:04 PM
There are basically two uses of the RTBN function :

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.
Systemic Anomaly
Original Poster
#28 Old 6th Nov 2005 at 8:37 AM
I haven't followed this thread for almost 2 months now *lol* I should point out, I ultimately discovered the hard way that if you call RTBN from inside an interaction, just like check trees, you cannot invoke a primitive which yields (Idle, Wait for Notify, Go To Routing Slot, etc.). In many cases, I discovered an error will be generated inside the called tree and RTBN will silently swallow the error and return false to the caller with no indication of what went wrong. There is some logic to this if you think about it. If you're yielding then you're attempting to do something asychronously, which in this case, the best solution is to prefer Push Interaction over RTBN.

ebruere: Welcome back. We thought you had fallen off the ends of the earth.
Field Researcher
#29 Old 6th Nov 2005 at 4:20 PM
I wonder if this could be the cause of those otherwise unexplained "Stack number out of range." errors I've seen on various things. Perhaps its not that anything in the function is literally out of "range" as defined by the function. Perhaps what it really means is that the stack pointer itself has produced a range error.
Lab Assistant
#30 Old 9th Nov 2005 at 2:10 PM
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.

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) )
One horse disagreer of the Apocalypse
#31 Old 10th Nov 2005 at 10:19 AM
I am making a semi-global patch, and want to call a BHAV which is on one of my own objects.

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)
Lab Assistant
#32 Old 10th Nov 2005 at 3:30 PM
No, the string can only use the caller's locals.
But you can use ANY existing global or semi-global string and rename your bhav to match this string.
One horse disagreer of the Apocalypse
#33 Old 10th Nov 2005 at 3:31 PM
Hey that's quite an ingenious work-around, thanks for the idea :D

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
#34 Old 10th Nov 2005 at 6:36 PM
Quote: Originally posted by ebruere
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:

Code:
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:

Quote:
# 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.
Field Researcher
#35 Old 10th Nov 2005 at 7:12 PM
I observed similar things several times too.... I think it's not about numbers of locals or params.... (don't know) -_-
Lab Assistant
#36 Old 10th Nov 2005 at 8:57 PM
Dizzy, the error here is produced during the call to the "Change light" primitive.
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.
Field Researcher
#37 Old 10th Nov 2005 at 9:43 PM
Code:
###
# 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?
One horse disagreer of the Apocalypse
#38 Old 10th Nov 2005 at 11:40 PM
Maybe the parsing of the call isn't complete/accurate in your output? I mean I don't have any idea if it is, but that could be one theoretical reason why you're getting an error connected with a local var in the call.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
#39 Old 11th Nov 2005 at 3:21 AM
Inge, have you lost it? That's a Maxis-designed tree, not mine. Think about it.

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.
One horse disagreer of the Apocalypse
#40 Old 11th Nov 2005 at 7:21 AM
Dizzy why don't you post your actual listing (operator: operands) so we can look at it next to the Disasim output?

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)
Field Researcher
#41 Old 11th Nov 2005 at 8:30 AM
Inge, please. Are you even bothering to read my posts?

I did *******NOT******* modify that tree in any way. Look it up yourself.

THIS IS A MAXIS TREE. MAXIS. <-- Look
One horse disagreer of the Apocalypse
#42 Old 11th Nov 2005 at 9:15 AM
Sorry Dizzy, I was mixing what you were calling with what what you were calling was calling. Still it would be interesting to see your original call to Action Do Fades, in terms of operator: operands

For example, Change Light may implicitly take Callers Params

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
#43 Old 11th Nov 2005 at 5:28 PM
*double sigh*

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.
One horse disagreer of the Apocalypse
#44 Old 11th Nov 2005 at 5:32 PM
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?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
#45 Old 11th Nov 2005 at 11:30 PM
Quote: Originally posted by Inge Jones
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.
Field Researcher
#46 Old 12th Nov 2005 at 4:22 AM
I think it's somewhat natural for Inge to think so. You know, this kind of thing just doesn't happen in everybody's game. I think probably she never experienced this thing. Well, It's not related with the matter discussed above, but I see my sims are making errors and disappear when there is a sim who die platinum. They showed a pretty strange error when they saw the Maxis made hoola dancers. And it never happened before NL and it's just ridiculous. Of course, this happens with no hacks too. Anyway these things are weird -_-;;
One horse disagreer of the Apocalypse
#47 Old 17th Nov 2005 at 8:04 AM
Quote: Originally posted by dizzy2
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)
Lab Assistant
#48 Old 18th Nov 2005 at 1:29 AM
I think that during the init and some time after, the object is not yet fully existing.
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.
Field Researcher
#49 Old 19th Nov 2005 at 7:24 AM Last edited by dizzy2 : 19th Nov 2005 at 7:38 AM.
deleted... dammit
Field Researcher
#50 Old 19th Nov 2005 at 7:36 AM Last edited by christianlov : 19th Nov 2005 at 7:41 AM.
Deleted too. Let's talk about something else please.
Locked thread | Locked by: CynicalChick Reason: Locked by request
Page 2 of 3
Back to top