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!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 9th Feb 2015 at 7:53 PM Last edited by 2008knight : 10th Feb 2015 at 1:20 AM.
Default Need help modding
This is my first post here, so I'm sorry if the format of the post is not correct or anything like that.

I was trying to learn how are mods made un XML, so I've been analyzing some already existing mods, but I have one doubt. Is there any way that during an interaction the needs filling behaves differently according to the porcentage of the same (or other) needs?
Let's say for example: The interaction of sleeping increases the energy indicator and it could be easily possible to modify it to make the Hygene go down in the meanwhile, but my question is, is there a way to make it stop going down once it reaches half of the indicator mantaining the sleeping interaction?

Or make the Hygene start going up when the Energy is above half the indicator, but make it decay normally while it is under the half?

(I'm sorry if I didn't make myself clear, english is not my main language)
Advertisement
Deceased
#2 Old 10th Feb 2015 at 6:01 AM
Quote: Originally posted by 2008knight
(I'm sorry if I didn't make myself clear, english is not my main language)


I think you described what effect you want well enough, but unfortunately I don't think there's any way to accomplish that. I'm pretty sure you could make an interaction that changes the rate of a statistic's change by testing a different one at the start of an interaction, but not change rates midway through the interaction. But then again, it may be possible and I just don't know how it would be done!

The only possibility I can think of would involve multiple interactions and it probably wouldn't work right, at least not without a lot of effort... Basically, make the long interaction work in short bursts and have the interaction push the interaction to run again if the original interaction exits successfully. Kind of like a loop. Could be tough though as you want it to appear seamless, taking sleep for an example, unless it was tuned just right (would probably involve editing the animations) they would be getting in and out of bed all night each time the loop ran!
Test Subject
Original Poster
#3 Old 10th Feb 2015 at 11:46 AM
Quote: Originally posted by scumbumbo
I think you described what effect you want well enough, but unfortunately I don't think there's any way to accomplish that. I'm pretty sure you could make an interaction that changes the rate of a statistic's change by testing a different one at the start of an interaction, but not change rates midway through the interaction. But then again, it may be possible and I just don't know how it would be done!

The only possibility I can think of would involve multiple interactions and it probably wouldn't work right, at least not without a lot of effort... Basically, make the long interaction work in short bursts and have the interaction push the interaction to run again if the original interaction exits successfully. Kind of like a loop. Could be tough though as you want it to appear seamless, taking sleep for an example, unless it was tuned just right (would probably involve editing the animations) they would be getting in and out of bed all night each time the loop ran!


thanks for replying, it's kind of a letdown, but I can think of other ways to achieve my goal, thanks =)
Test Subject
Original Poster
#4 Old 11th Feb 2015 at 9:13 PM
so.. sorry for asking for so much assistence... but what I'm trying to do now is have two separate interactions, the regular sleep interaction and a new interaction that is enabled once certain requirements are accomplished. I created the new interaction based in the sleep interaction, and I got it to work, but the problem is that when I manage to get the new interaction working, the sleep interaction seems to break, more specifically, when I use the custom interaction it works perfectly, but when I use the sleep interaction the sims try to rout their way into the bed but show a blocked path "thought".
I want to understand why is this happening, since I haven't changed the sleep interaction itself and I added the new interaction to all beds super_affordances (yes, I didn't do it the python way)

anyone has any idea why is this happening or how to fix it?
(I'm not adding the code here because I haven't chewcked how to use the spoiler, I can do it if you ask me to)
Deceased
#5 Old 12th Feb 2015 at 2:29 AM
Yeah, I'd pretty much have to see what you're trying to do there are so many problems that can cause an interaction to fail like that. You could put it in a spoiler, but it's usually easier to look at if you just attach a zip file with the package or the loose XML files to the message.

To put stuff in a spoiler, just put spoiler tags (in square brackets) around what you want in a spoiler. The code tags are nice for this as well.
Test Subject
Original Poster
#6 Old 12th Feb 2015 at 4:47 AM
so the mod itself doesn't make sense.. but the principles I'm practicing seem to work, I'm sure I'm doing a lot of stuff wrong xD. if you could give me a push in the rigth general direction I would be really thankfull =)

I'm adjunting the interaction and two objects (beds)
Attached files:
File Type: zip  Send.zip (5.9 KB, 7 downloads) - View custom content
Deceased
#7 Old 12th Feb 2015 at 6:35 AM
Took a look and I'm not quite sure what the actual effect of this would be. The sleep action still works fine for me, so not sure why you're seeing a problem with that. I'm not seeing what would actually cause the new interaction to occur - since it isn't autonomous it needs to either have a display_name to put on a pie menu or it needs to be pushed onto a sim by something else. Just putting it into the SAs for the object won't make the interaction occur.
Back to top