Off-world Sim being removed outside of my code
#1 18-08-2020 
So I have a weird modding problem, and am hoping that someone on here may have run into something similar in the past and can throw some "try looking at this" ideas at me, as I'm pretty much stumped.

In my Break Up By Phone mod, a Sim can call a soon-to-be-ex and break-up with them. I'm using the Maxis Sim2Sim Just Talk phone call objects and BHAVs as my starting point, as the premise is pretty similar.

As I need both the NID and OID of the callee Sim (memories, for instance, need their OID), I've created the callee Sim off-world ([prim 0x002A] Create New Object Instance (Neighbour in stack object, place: out of world (put new object id in Stack Object), Create object normally,)) which works just fine. I can use their OID and even push an immediate interaction onto them (as wants/fears operate on My) - all seems to work correctly.

Now here's the odd bit, at a random point during one of the caller's animations ([prim 0x006A] Animate Sim (animation: "a2o-phone-call-loop100-listen-disagree-med" ...), the callee object 'vanishes' (ie [global 0x014B] Verify - Person ID (1 arg: Person ID=Param 0x0000 (OOW OID))) fails. Not sure if something is deleting it, or if it's being removed after causing an unreported error. This wouldn't be a problem (as I've finished with the callee by then) EXCEPT that memories may be broadcasting messages to other family members and those messages include the (now invalid) OID of the callee. Kaboom! Error dialog Sad

I've gone through the Maxis code with a fine-tooth comb and have set the callee's greet status and the caller's animation reaction flags the same as when calling an OOW Sim on the phone. I've also sprinkled [global 0x0118] Idle (1 arg: ticks=Literal 0x0001) calls through the main call sequence to give the callee and memories processor time - these helped a bit, in that the memories don't always fail, but sometimes the cascading memories are still a problem.

I'm stumped. At the moment I'm looking at hacking the failing memory BHAV to just make it fail silently and not barf with an error message.

Any thoughts/ideas/past experiences greatly appreciated

William

0
#2 18-08-2020 
Hi William,

I thought for quite a while that I was a modder, but apparently I've been mistaken all this time. Because I have no idea what you're talking about most of the time. The only thing I am wondering about, is if it's really a good idea to create the callee. For all I ever understood of it, that might just create a clone of the sim in question.

However, I think that the "disagree" animation indeed kills the conversation (just like when chatting, if one sim disagrees, the other walks away). Since the caller (your sim) disagrees, the callee (the other sim) walks away, or in this case, because they aren't even physically present, are thrown from the stack. THAT is your problem, right there, I think.

Maybe you should investigate how JMP does this whole thing in his phone hack, because sims on the phone frequently disagree without losing the connection. The callee stays connected, and therefor its NID and OID remain valid.

0
#3 18-08-2020 
Thanks for the thoughts. The bog-standard Maxis Just Talk code creates the callee - now whether following Maxis code is a good idea or not is open to debate ...

I think you may be on to something with the "walk away when disagreeing" animation effect, as I know from experience that trying to send an OOW Sim to a routing slot is guaranteed to screw up big time.

I shall investigate later ...

Later ... and much later. Nope, nothing doing. Checked, re-checked and double checked the Maxis phone call code and those anims (which are a2o anims with an IK object of the phone handset/mobile and not the callee Sim) are all used within the standard phone call code. Tried setting the "disable look ats" and "disable all reactions" flags on the callee just in case, but still nothing doing.

Will probably just wait for the error to pop-up again and hack the BHAV to behave itself!
(This post was last modified: 19-08-2020 04:41 PM by whoward69.)

0


Sorry, that is a members only option