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 5th Sep 2023 at 9:41 PM
Default Is there a way I can have a buff that only appears when my sim is close to a speaker on the high volume?
I'm super new to modding and am using zerbu's mod constructor. I'm trying to make it so that when a sim with a certain trait is close to a speaker playing music on the high volume, they'll get a buff. I've made the trait and the buff, but I can't figure out how to do what I want to do. Does anyone have any advice or is there any way I can do that? Thanks a lot
Advertisement
Instructor
#2 Old 6th Sep 2023 at 9:32 AM
This would probably require the game to actually be tracking a radius around the audio source in order to hook into that. As far as I can tell, stereos and their buffs just track the room they are in.

Your best bet would be if you can recall a game function that already changes by distance specifically. I'm not sure if such a thing exists, as it sounds a little more mathematically intensive than the game bothers to be. But if it does, that is where you will find the related affordances/XML snippets.
Test Subject
Original Poster
#3 Old 6th Sep 2023 at 1:03 PM
Quote: Originally posted by CardinalSims
This would probably require the game to actually be tracking a radius around the audio source in order to hook into that. As far as I can tell, stereos and their buffs just track the room they are in.

Your best bet would be if you can recall a game function that already changes by distance specifically. I'm not sure if such a thing exists, as it sounds a little more mathematically intensive than the game bothers to be. But if it does, that is where you will find the related affordances/XML snippets.


Honestly tracking it by room also works as a solution. I'm just trying to make it so that basically sim hears loud music -> buff is added and them being in the same room as the stereo works great.
Instructor
#4 Old 7th Sep 2023 at 1:33 AM
The most similar thing I could think of is how teens can go through a mood swing, which gives nearby sims a negative buff when they listen to loud music.
(But I did prove myself wrong while looking into it, as there does seem to be some lines relating to radius!)

I worked my way backwards through the related tuning in the TDESC Builder, which you can also use for reference. You just select 'Import EA Tuning' and type in the name or ID.
It consists of a Broadcaster (broadcaster_TeenMoodSwing_LoudMusic), connected to a SuperInteraction (reactions_TeenMoodSwing_LoudMusic), which is where you can add a whitelist for your Trait + is further connected to a Loot (loot_TeenMoodSwing_LoudMusic_Reaction) that determines the Buff.
I'm not sure if making each of these is straightforward in Mod Constructor, but you can add them in Sims4Studio if not. Chop and change parts of the reference tuning as much as you need.

The only thing I couldn't find was what the mood swing broadcaster is actually attached to- if the file doesn't have a matching name, it's quite difficult to find the 'root' of a sequence like that.
The tidiest way would be if you know how to add a test for an object state (which I unfortunately do not), but the quick and dirty way would be to add the broadcaster directly to that object state (AudioVolume_High, in this case).

Hopefully that isn't too confusing! The TS4 forum here is very quiet, I'm not really sure where the experts hang out
Back to top