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!
just a girl
Original Poster
#1 Old 3rd Dec 2016 at 9:06 PM Last edited by Lamare : 14th Dec 2016 at 12:56 PM. Reason: mark Solved
Default How to prevent robots from doing interaction? (Solved)
I have this autonomous ocean swimming mod and try to ban robots/servos out of it, cause swimming are bad for them and they should know better then voluntary self-destruction.

I've tried to figure it out by myself. Found the "Robot - Sim Is Servo?" op-code, but it doesn't work just by throwing it there, I need to do something extra. Peeked into some maxis examples of sorting out humans from others, like pregnancy check, and some custom mods with robots-related stuff. Took wild guesses and tried non-sence. I just can't get it and I think it's time I asked for help...

Here's my main BHAV. I need to squeeze in the robo-check in there somewhere. I highlighted the line, where it is currently located.



After "just throwing it there" didn't work, I created new BHAV for the purpose of filtering robots and started toying with "Stack object id" and whatnot. Here's just one of the attempted non-sence arragements:



Clearly I don't understand what I am doing there. The result - robots are still swimming and smoking after.

Any tips on how do I make it work?
Advertisement
Field Researcher
#2 Old 3rd Dec 2016 at 10:00 PM
There is another global 0x4DC Sim - Is Robot? Maybe it's worth trying?
just a girl
Original Poster
#3 Old 3rd Dec 2016 at 10:44 PM
I saw "Robot - Sim Is Servo?" in use by maxis and modders, so I focused on it. But you're right, it's worth a try, so I tried.

The problem is, I'm not sure what do I do with it - what attributes do I put in, do I declare local or parameter before this global?



Tried sticking "Stack Object ID" as an argument, but it's wrong or not enough. I'm having trouble understanding the whole concept - how do I make these globals actually check sims for being robots. Test shows that robots swim, so I have two outcomes: 1. interaction as a whole didn't break, 2. the robot check is not happening.
Née whiterider
retired moderator
#4 Old 3rd Dec 2016 at 11:11 PM
It sounds like your current stack object isn't the sim who's doing the interaction. I usually keep a chart of what the stack object is at each point in a BHAV, because I lose track otherwise. Can you find the instruction where you last changed the stack object ID, and see what it was changed to?

What I lack in decorum, I make up for with an absence of tact.
just a girl
Original Poster
#5 Old 4th Dec 2016 at 12:11 AM Last edited by Lamare : 4th Dec 2016 at 12:39 AM.
I guess, some of the premade op-codes may contain stack object id, so I'm going to go through main BHAV (Test - Get in?) line by line and post what I find out...

... So I did it and put it in spoiler:



Edit:
By the way, thanks for trying to help me, guys.
Let me know, if it'd be more comfortable for you to read BHAVs not by screenshots but by text. I'll copy-paste it here. I'm not sure what's best way to provide details.
Mad Poster
#6 Old 11th Dec 2016 at 3:38 PM
As I mentioned in the PM I have a mod that checks to see if Sim is a servo and I imagine since your mod is for the same thing what I did ought to work for you too. Here's how it's set up in my mod (deleted all the excess code for the sake of this picture, that's not the entire mod xD)


Raw entry box code 121F0007010000000000000001000000

I can't take credit for figuring out how to set it up, I found the global and then BoilingOil told me what to put (in this post) Hopefully that works for you too.

Creations can be found on my on tumblr.
just a girl
Original Poster
#7 Old 11th Dec 2016 at 4:19 PM
gummilutt, yes, it works, thank you so much! You and BoilingOil. I will give it more testing, but from the first test it looks very promising.
Mad Poster
#8 Old 11th Dec 2016 at 4:35 PM
Glad to hear it seems to work It's really quite amusing that you should ask today of all days. I'm uploading a ocean swimming related mod myself today

Creations can be found on my on tumblr.
just a girl
Original Poster
#9 Old 11th Dec 2016 at 4:39 PM
Can't wait to see what it does. Hope our mods won't conflict
Mad Poster
#10 Old 11th Dec 2016 at 5:24 PM
Don't worry, they don't. If anything they complement each other

Creations can be found on my on tumblr.
just a girl
Original Poster
#11 Old 11th Dec 2016 at 6:27 PM
So it does work. Servos wouldn't want to get in sea by themselves. BUT. Unfortunatly, there is a loophole. If they want to interact with a sim who's about to start swimming, servos would go after that sim and MAY end up in the water, even though it was not their intention to get there and swim. And then they suffer the consequences... The only workaround for this would be (in theory) to restrict servos from being able to intersect beach portals. The downside is, even if player commands, they wouldn't be able to get in sea, whining about route failure, kind of like if the door was locked.
Mad Poster
#12 Old 11th Dec 2016 at 7:01 PM
Good, glad to hear it officially works The loophole sounds like maxis oversight and not something caused by your mod, so I wouldn't feel obligated to fix it just because you're preventing autonomous swimming for Servos. It's a fairly uncommon scenario and water doesn't kill servos, the worst that happens is they break (or can they electrocute other Sims when they break? I never use them so I'm not sure) and need a repair, so I'd personally leave it be. But I'm sure there's some person out there that would be very grateful for a fix if you feel like taking it on, even if it means they can't direct Sims to water-suicide

Speaking of, I had a closer look at your mod description because I mention it in my upload and I noticed you credited me in it. Aww :lovestruc Poking my nose into other peoples mods is how I've learned, it's strange to think someone would do so with mine

Creations can be found on my on tumblr.
just a girl
Original Poster
#13 Old 11th Dec 2016 at 7:29 PM
I'm more on the side of leaving it be, too. Because overwriting another global function means one more potential conflict with some other mod out there.

About that credit. At the time I was researching my mod I stumbled upon your "seasonal pool autonomy", and even though we achived our results differently, I think it helped me understand what's what in BHAV (it's my first BHAV mod), especially with seasonal checks. I feel like the best way to learn something is to take apart something that works and figure out what makes it work. The second best way is to ask someone to help you
Back to top