More Awesome Than You!
Welcome, Guest. Please login or register.
2024 April 23, 21:43:11

Login with username, password and session length
Search:     Advanced search
540270 Posts in 18066 Topics by 6512 Members
Latest Member: jennXjenn
* Home Help Search Login Register
+  More Awesome Than You!
|-+  The Bowels of Trogdor
| |-+  The Small Intestines of Trogdor
| | |-+  Question regarding Set to Next: Verify Neighbor ID in Stack Object
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Question regarding Set to Next: Verify Neighbor ID in Stack Object  (Read 7439 times)
syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
Question regarding Set to Next: Verify Neighbor ID in Stack Object
« on: 2005 December 21, 23:38:49 »
THANKS THIS IS GREAT


I'm trying desperately to mod something, and the code appears to be correct. I had to debug this the brute force way with Break Points, and I've narrowed it down to the following issue, namely:

Sims that I would think are supposed to be considered alive (well... maybe they're brain dead Tongue), but for some reason they are returning true for the test:

Quote
0: Death - Is Sim Dead? (NID)(Param 1); true: false, false: 1
Operands: 0901000A00000A00000A000001000000

Specifically, I've been testing this on the Pleasant family. I further narrowed it down to this line:

Quote
###
# Group = 0x7FD46CD0, Instance = 0x301
# Title = Death - Is Sim Dead? (NID)
#
# Format = 8009, Params = 1, Locals = 1
# Tree type = 0, Header flag = 18, Tree version = FFFF800B (-32757), Cache flags = 0

     0: Verify - Neighbor is Linked(Param 0); true: 1, false: true

And even further still:

Quote
# Group = 0x7FD46CD0, Instance = 0x39D
# Title = Verify - Neighbor is Linked
#
# Format = 8009, Params = 1, Locals = 0
# Tree type = 0, Header flag = 0, Tree version = FFFF8008 (-32760), Cache flags = 0

     0: Stack Object := Param 0; true: 1, false: error
     1: Set to Next: Verify Neighbor ID in Stack Object; true: 2, false: 3
     2: Neighbor's Object Definition type (0x9) == 17 (0x11); true: false, false: true

What exactly does this line do? And why, Why, WHY? is it returning false? From just reading it, the name itself implies to me that it is verifying if the NID in the Stack Object is in deed a true NID.

There is a bit more info in SimPE,where it says:

Set to Next: (Verify Neighborhood ID in Stack Object, result in Stack Object, excluding disabled objects)

Is this last part about excluding disabled objects tripping me up? I guess I shouldn't bother checking if these sim's are dead? Roll Eyes

The thing is, one would assume that Daniel and Mary-Sue Pleasant are indeed alive. But for some reason, they are retuning as not linked. I can't figure it out, and I've checked the node version and operands, and it looks like it should be ok. I must be missing something. I'll post the error log as well.

Incidentally, I stole borrowed this code from norandomflirtwants which was a "CT - " type BHAV. Does that make a difference? I simply cloned and renamed it in my mod. Is there some special setting somewhere that might be affecting how Params are passed?

Feel free to burninate this thread if it is far too trivially weak and feeble. Tongue

Ste

[attachment deleted by admin]
Logged

J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26281



View Profile
Re: Question regarding Set to Next: Verify Neighbor ID in Stack Object
« Reply #1 on: 2005 December 22, 00:18:20 »
THANKS THIS IS GREAT

What exactly does this line do? And why, Why, WHY? is it returning false? From just reading it, the name itself implies to me that it is verifying if the NID in the Stack Object is in deed a true NID.
That's what it is doing, yes. That would return false if the NID being fed into it is invalid for some reason. Is the sim's character-data shredded? That might cause it.
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
question about norandomflirtwants?
« Reply #2 on: 2005 December 22, 02:44:20 »
THANKS THIS IS GREAT

I think I know what the problem was. I was assuming that the params I should be passing in were supposed to be Stack Objects of type person/sim. But I think they are actually supposed to be of type person's data 0x1f - Neighbor ID.

So far... that seems to have fixed the errors I was getting. Anyways, I was looking at the code below, and for the most part I understand it. However, I have a few questions about the following lines of code, in particular the ones I made bold.

Quote
     A: Stack Object := 0; true: B, false: B
     B: Temp 0 := Param 0; true: C, false: C
     C: Temp 1 := Const 0x11C(Relationship - UI Flags):0x2; true: D, false: D
     D: Set to Next: NeighborID with rel var 1 & temp 1; true: E, false: F
  E: Death - Is Sim Dead? (NID)(Stack Object); true: B, false: false

Above, you are looking for the next NID that is in love with the object in Param 0. The Set to Next finds that NID and stores it in the Stack Object. You then test if that Stack Object is a Dead sim. Essentially, this tests if there are any living sims that the subject (Param 0) is in love with. If this is true, then you exit since we don't want them to get random flirt wants. Otherwise, if all of the sims they loved are dead, or if you couldn't find any at all, we move onto the checks for Engaged or Married.

Quote
     F: Stack Object := 0; true: 10, false: 10
    10: Temp 0 := Param 3; true: 11, false: 11
    11: Temp 1 := Const 0x11C(Relationship - UI Flags):0x3; true: 12, false: 12
    12: Set to Next: NeighborID with rel var 1 & temp 1; true: 13, false: 14
13: Death - Is Sim Dead? (NID)(Param 3); true: 10, false: false
    14: Stack Object := 0; true: 15, false: 15
    15: Temp 0 := Param 3; true: 16, false: 16
    16: Temp 1 := Const 0x11C(Relationship - UI Flags):0x4; true: 17, false: 17
    17: Set to Next: NeighborID with rel var 1 & temp 1; true: 18, false: true
18: Death - Is Sim Dead? (NID)(Param 3); true: 15, false: false

In the above lines of code, why is that you are checking Param 3 instead of the Object Stack? Does the Set to Next in this case also change the value of Param 3? When I looked at the lines in SimPE, it still says the Set to Next instruction is storing the result in the Stack Object. Does it additionally change the value of Param 3? I'm still not quite sure how these relationship checks and comparisons work. Setting flag bits and what not, it's kinda confusing to me.

I was just curious why this was different, since I'm stealing borrowing the code for my own changes.  Grin

Ste
Logged

crammyboy
Dimwitted Dunce
*
Posts: 197



View Profile
Re: Question regarding Set to Next: Verify Neighbor ID in Stack Object
« Reply #3 on: 2005 December 22, 02:57:50 »
THANKS THIS IS GREAT

where did you get that code. I can't find it in my object listing.
Logged
syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
Re: Question regarding Set to Next: Verify Neighbor ID in Stack Object
« Reply #4 on: 2005 December 22, 04:08:27 »
THANKS THIS IS GREAT

where did you get that code. I can't find it in my object listing.

The code I quoted? It's from FFS norandomflirtwants.package

The original "CT - Flirt with Sim" is only two lines. This additional code I think prevents sims from rolling up wants to flirt with random sims other than their own steady, finacee, or spouse, unless they are already in love as well (having an affair).

Ste
Logged

syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
Re: Question regarding Set to Next: Verify Neighbor ID in Stack Object
« Reply #5 on: 2005 December 23, 01:18:37 »
THANKS THIS IS GREAT

Quick question about the new code in norandomflirtwants:

Quote
    10: Temp 1 Set Flag Const 0x11C(Relationship - UI Flags):0x2; true: 11, false: 11
    11: Temp 1 Set Flag Const 0x11C(Relationship - UI Flags):0x3; true: 12, false: 12
    12: Temp 1 Set Flag Const 0x11C(Relationship - UI Flags):0x4; true: 13, false: 13
    13: Temp 1 Set Flag Const 0x11C(Relationship - UI Flags):0x7; true: 14, false: 14
    14: Set to Next: NeighborID with rel var 1 & temp 1; true: 15, false: true

So you are setting all the flags now, does this return sims with any of these flags set? Or with all of these flags set? My guess is the former, but I just wanted to be certain.

Thanks!  Cheesy

Ste
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.05 seconds with 19 queries.