[ARCHIVE] SimAntics & World Development

Status
Not open for further replies.
lol1.png

lol3.png


Lol I'm not sure how did this happen. But I Clicked that flipper earlier and game was running a while on background while I was translating finnish. It was normal after I clicked some object again.
 
Last edited:
Turns out I was looking at slots the wrong way completely. What they actually do is search out in a cone shape from the base position, as you can see here:
CrowdSitter06.jpg

The altar object is facing NORTH, and has RSFlags set to search NORTH from the altar's direction (i.e in front of it). The avatars then turn to face the altar to adhere to the slot property "FacingTowardObject" (facing = -2), not limited to just 8 directions!

Slots inherently have a scoring mechanism, which is the greatest at an Optimal Proximity but decreases towards the max and min proximity. This scoring mechanism can help decide whether to stand or sit in certain situations, via 3 ints in the slot definition (sitting/standing/ground). When any of these are zero, routing to it in that way is completely ignored - otherwise slots where these are possible (eg, seats) are given a score bonus depending on the number in sitting/standing/ground.

For example, the TV has a standing score bonus of 1, but a sitting score bonus of 1000. This pretty much means that sims will always prefer a seat over standing while watching TV, since the difference in proximity score could never possibly span that range. Sims will still prefer seats closest to the Optimal Proximity though!

In this example the minimum proximity is 16 (one tile), but for things like the TV the minimum proximity can be multiple tiles, allowing for edge cases where sims will refuse to sit or stand right in front of a TV.

To get just one tile in front of the altar, you can search NORTH and then sneakily set the min AND max proximity to 16. The distance to the diagonal tiles in front of the altar will be slightly higher than 16 (22.63 via some quick math) so it will not come through in the slot result!

Gradient (float) probably defines the change in score per unit (1/16th tile), which is generally about 0.025. The meaning of snaptargetslot is still shrouded in mystery...
 
For example, the TV has a standing score bonus of 1, but a sitting score bonus of 1000. This pretty much means that sims will always prefer a seat over standing while watching TV, since the difference in proximity score could never possibly span that range. Sims will still prefer seats closest to the Optimal Proximity though!
*spits his drink out* My Sims 1 prima guide goes into some detail over the AI and object advertising.
 
What I was describing are routing slots, which are completely separate from the Free Will functionality which uses said advertisements. The primitive that drives this, "Find best action", is only used for the pets in TSO, so it can be shelved for later.
 
The goto primitives detect if the sim is sitting and call the relevant function to eject the sim before routing to the location if the route does not resolve to the chair they're already sitting in.
 
Fixed door random crash - was a bug with set to next (actually the whole implementation was wrong). Now doors open correctly!
upload_2015-1-28_22-47-11.png
Also fixes parts of the bull object persisting - aka not changing to invisible when they switch to the 3d mesh version of the bull.
upload_2015-1-28_22-46-53.png
 
I got it a while back - just used the debugger to step through a problematic scenario. The Mechanical Bull object was calling Set To Next (part of multitile object) on the stack object and on true looping back on true to a condition which could never be true - looping back to the Set To Next again forming an infinite loop.

It has been stated that the "part of multitile object" selector could only return false for single tile objects, so it didn't make sense at first how this would ever break out off the loop. That is, until I tried it in the debugger - it instantly returns false. The reason is that the "part of multitile object" variant advances through the object group of the object previously selected in the specified variable, not the callee. In the infinite loop case, this was the Stack Object ID, which started as 0, the null object. Because the null object does not have an object group, the primitive returns zero.

Either way, this part in the code actually has no purpose whatsoever, apart from fixing my Set to Next implementation. So I guess it's worth thanking. 8O|
 
First sim killed in Project Dollhouse:
upload_2015-1-29_2-22-38.png
He's facing the wrong way and the mesh isn't switching to the skeleton - but it played all the sounds and stuff, including the death sting, electric shock, etc. Game crashes soon after due to not implementing the dialog primitives.

Admittedly, I didn't expect it to happen. :oops:

upload_2015-1-29_2-27-47.png
 
Status
Not open for further replies.
Back
Top