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!
Updating BHAV that was in the middle of running on lot save
Say, I modified an interaction that was taking place when I saved. I guess, the game doesn't like when BHAV code changes in the middle of it running. I've observed such effects as object reset, flashing blue, weird animation, displaced parts, and worse -- game crash on lot load. Is there a way to prevent these problems?
I do that often and never had it cause a crash or flashing blue. When the lot saves the current running op-codes are also saved so somtimes changes aren't immediate, if the changes change the 'tree' that is branches added, changed or removed then the game will usually reset that item (and any sims using it) which is probably the safest outcome.
Almost always an op-code is saved during an idle period or animation because they take time while the rest runs by so quickly it's unlikely to be at any other point when you save. If you keep those idle and animations at the same line numbers so it can come out of them at the same point it went in when saved you may get a better result.
So spaghetti code really is a necessity When it comes to updating old stuff, anyway.
I've tested this on my bed related mod and it had no side effects at all.
1. Without mod. Saved a bunch of sims doing different interactions with beds. Went out. Added mod, cleared cache, went back in. No one on lot was disturbed in the slightest.
2. With mod in, saved sims doing stuff. Went out, removed mod, cleared cache. Loaded my lot. No problems.
In the modded BHAVs I kept all the initial lines intact, only changing pointers and adding/moving new stuff to the bottom.
Will test some more in different circumstances and diff. mods, but so far so good. Thank you, Chris. This rule should be somewhere in a 'must read' section for all modders.