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!
Instructor
Original Poster
#1 Old 7th May 2017 at 10:14 AM Last edited by whoward69 : 7th May 2017 at 10:26 AM.
Default Stack Object Id vs Stack Object's: object id
I just know I'm going to regret asking this ...

But what, if anything, is the difference between "Stack Object ID (0x0A 0x0000)" and "Stack Object's: object id (0x04 0x000B)"

Edit: And, if there is a difference, is there any way to change SimPE, as they both show as "Stack Object ID" outside of the popup (PJSE?) window

TIA (I think)

W

Just call me William, definitely not Who-Ward
Advertisement
Scholar
#2 Old 7th May 2017 at 4:39 PM
While both would return the same result, the current object id would be the same as the current object's object id, if you are changing the current object Id to something else you must not get them muddled up. To define the stack object id := something is OK but if you do mix them up you'll be trying to change something's id which is both not OK and won't give you the expected result.
keeping track of the current object id is one of the most important and often difficult things when working with op-codes.
Instructor
Original Poster
#3 Old 7th May 2017 at 4:54 PM Last edited by whoward69 : 16th May 2017 at 12:31 PM.
OK, pretty sure I understood that

My problem came from looking at wants satisfaction primitives. I think there's a bug in SimPE that always shows one of the parameters as Stack Object ID (which I've now looked at BHAVs enough to know is 0x0A 0x00 0x00!) even when it isn't. It was 0x03 0x0B 0x00 which looks like Stack Object's: object id (but is actually My: object id) (my confusion coming from a) the possible bug, b) no popup for that primitive and c) the fact that My Person Data and Stack Object's Person Data (0x12 and 0x13) are the other way around!) Couldn't work out why one line worked and another crashed, until I compared the op-codes byte-by-byte and saw the difference!

Edit: You can put any old crap in those three values, eg 0x88, 0x99, 0xAA, and it will still read "Target: Stack Object ID 0x0000"

I just love this stuff

Just call me William, definitely not Who-Ward
just a girl
#4 Old 7th Jun 2017 at 10:58 PM
I've had cases when SimPE doesn't visually reflect changes in operands, but those operands in fact make a difference. Maybe it's because some primitives are not so well-studied or popular. I think, it was Run Tree by Name that caused me to pull my hair out. Even though it has pop-up wizard, it proved to be not fully comprehensive. Had to hunt down the right operands all over the internet and fill them in manually.
Because of that, I try to develop a habit of zeroing out operands when I add new line after another one - to clear junk data that can potentially cause trouble (I'm sure I still forget to do it half the time), and also copying instructions that 100% work in raw format instead of relying on description.

As for Stack Object ID 0 and Stack Object's object ID, I actually fell into their trap a while ago. That they both appear the same, unless you look closely. I had to learn it the hard way.
Back to top