- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Modding Discussion >
- How to prevent robots from doing interaction? (Solved)
- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Modding Discussion >
- How to prevent robots from doing interaction? (Solved)
Replies: 12 (Who?), Viewed: 7696 times.
#1
3rd Dec 2016 at 9:06 PM
Last edited by Lamare : 14th Dec 2016 at 12:56 PM.
Reason: mark Solved
Posts: 1,530
Thanks: 15787 in 76 Posts
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
#2
3rd Dec 2016 at 10:00 PM
Posts: 355
Thanks: 65 in 4 Posts
There is another global 0x4DC Sim - Is Robot? Maybe it's worth trying?
#3
3rd Dec 2016 at 10:44 PM
Posts: 1,530
Thanks: 15787 in 76 Posts
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.
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.
#4
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.
What I lack in decorum, I make up for with an absence of tact.
#5
4th Dec 2016 at 12:11 AM
Last edited by Lamare : 4th Dec 2016 at 12:39 AM.
Posts: 1,530
Thanks: 15787 in 76 Posts
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.
... So I did it and put it in spoiler:
Ok, so there's Function - Allow Intersection - Portal. It's original maxis function, that has something to do with allowing sims to intersect the beach portal (go in and out of the ocean). This:
It calls Verify - Person ID, which looks like this:
Looks like it's a person in stack object, but I might be wrong.
If Verify - Person ID returnes False, there goes Function - Allow Intersection - Slope:
Does it mean stack object changes to pirate ship? And if it does, what do I do? Is there something I can use instead of Stack Object, or how do I turn it back to sim?
Before I posted it, I tried something and it didn't help - robots still go swimming. That's what I did.
The main BHAV looks like this (my custom BHAV Sim Type - Is a Robot? has an arg Stack Object ID):
In my custom BHAV Sim Type - Is a Robot? I added an expression before the robot check.
I guess, I did it wrong and Stack Object is still not the sim in question.
It calls Verify - Person ID, which looks like this:
Looks like it's a person in stack object, but I might be wrong.
If Verify - Person ID returnes False, there goes Function - Allow Intersection - Slope:
Does it mean stack object changes to pirate ship? And if it does, what do I do? Is there something I can use instead of Stack Object, or how do I turn it back to sim?
Before I posted it, I tried something and it didn't help - robots still go swimming. That's what I did.
The main BHAV looks like this (my custom BHAV Sim Type - Is a Robot? has an arg Stack Object ID):
In my custom BHAV Sim Type - Is a Robot? I added an expression before the robot check.
I guess, I did it wrong and Stack Object is still not the sim in question.
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.
#6
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.
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.
#7
11th Dec 2016 at 4:19 PM
Posts: 1,530
Thanks: 15787 in 76 Posts
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.
#8
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.
Creations can be found on my on tumblr.
#9
11th Dec 2016 at 4:39 PM
Posts: 1,530
Thanks: 15787 in 76 Posts
Can't wait to see what it does. Hope our mods won't conflict
#10
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.
Creations can be found on my on tumblr.
#11
11th Dec 2016 at 6:27 PM
Posts: 1,530
Thanks: 15787 in 76 Posts
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.
#12
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.
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.
#13
11th Dec 2016 at 7:29 PM
Posts: 1,530
Thanks: 15787 in 76 Posts
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
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
Who Posted
|