shaka-dingo Posted September 30, 2025 Share Posted September 30, 2025 hi, i'm aware that i'm far from the first one who's asking for help in similar thing, but i'm very new to modding and the other guides are soo confusing for me... i just want to change the sounds that play when the deerclops is approaching and that's about it, i hope it's not as hard as i think it is...please guide me! Link to comment https://forums.kleientertainment.com/forums/topic/168233-please-help-me-to-create-a-mod-that-changes-deerclops-sound/ Share on other sites More sharing options...
FerniFrenito Posted September 30, 2025 Share Posted September 30, 2025 7 hours ago, shaka-dingo said: hi, i'm aware that i'm far from the first one who's asking for help in similar thing, but i'm very new to modding and the other guides are soo confusing for me... i just want to change the sounds that play when the deerclops is approaching and that's about it, i hope it's not as hard as i think it is...please guide me! I don't think it's possible. The file that makes the sound of my big bro burping before it appears is in the monsterwarningsounds.lua file, but the variable that contains it is local, so it can't be overwritten. In fact, almost everything in that file is local. There's no clean way to do it, but I think it could be done by overwriting a few functions. It's not a good solution and it probably won't be compatible with future updates, but if you really need it, it can be done. Do you want me to write you some code to do it? (I sound like ai, lol) Link to comment https://forums.kleientertainment.com/forums/topic/168233-please-help-me-to-create-a-mod-that-changes-deerclops-sound/#findComment-1837730 Share on other sites More sharing options...
shaka-dingo Posted September 30, 2025 Author Share Posted September 30, 2025 17 minutes ago, FerniFrenito said: I don't think it's possible. The file that makes the sound of my big bro burping before it appears is in the monsterwarningsounds.lua file, but the variable that contains it is local, so it can't be overwritten. In fact, almost everything in that file is local. There's no clean way to do it, but I think it could be done by overwriting a few functions. It's not a good solution and it probably won't be compatible with future updates, but if you really need it, it can be done. Do you want me to write you some code to do it? (I sound like ai, lol) I managed to find something similar to the deerclops' warning sounds by going through C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\sound, then i unzipped the deerclops.fsb file and this is what I saw, If that helps at all. and yes, you can send the code; anything will help. just keep in mind that i won't know what to do with the code if you just send it without explanation xP Link to comment https://forums.kleientertainment.com/forums/topic/168233-please-help-me-to-create-a-mod-that-changes-deerclops-sound/#findComment-1837739 Share on other sites More sharing options...
FerniFrenito Posted September 30, 2025 Share Posted September 30, 2025 -- In modmain.lua local function fckthesound(inst) inst:RemoveAllEventCallbacks() end AddPrefabPostInit("deerclopswarning_lvl1", fckthesound) AddPrefabPostInit("deerclopswarning_lvl2", fckthesound) AddPrefabPostInit("deerclopswarning_lvl3", fckthesound) AddPrefabPostInit("deerclopswarning_lvl4", fckthesound) -- maybe? It's the most elegant thing I found. The first three are mandatory, as I can see in the code, but in testing, I couldn't mute the fourth whine (which makes sense because the code has four warnings, not three, but the code comments only indicated three). That fourth one shouldn't cause any problems, though. If one of the whines keeps playing, then try changing the 4 in the last prefabpostinit to 0. Explanation: When a boss like the Deercolps approaches, the game first plays warnings. This is partially handled by the monsterwarningsounds file, which generates a temporary prefab that plays the sound and then deletes itself. That's why addprefabpostinit is used. Then, to activate the sound, for some reason the "randdirty" event is awaited by setting a listenerforevent (I couldn't find out what or how this event was created). That's why the listener has to be removed, and since the prefab only seems to have one listener, we use the function to remove all of them. Cautions: I don't know when "randdirty" is pushed or if the instruction added to addprefabpostinit is always executed first. Therefore, it's possible that the sound plays before the listener is deleted. If they are in the same thread, the listener deletion should always be executed first. However, if they are in different threads, then it depends on how the "randdirty" event is being handled. 1 Link to comment https://forums.kleientertainment.com/forums/topic/168233-please-help-me-to-create-a-mod-that-changes-deerclops-sound/#findComment-1837782 Share on other sites More sharing options...
shaka-dingo Posted October 1, 2025 Author Share Posted October 1, 2025 thanks! so, where do i go from here? do i put this code in modmain.lua? i have the sound files that i want to replace the deerclop's warning sound with Link to comment https://forums.kleientertainment.com/forums/topic/168233-please-help-me-to-create-a-mod-that-changes-deerclops-sound/#findComment-1837832 Share on other sites More sharing options...
FerniFrenito Posted October 1, 2025 Share Posted October 1, 2025 11 hours ago, shaka-dingo said: thanks! so, where do i go from here? do i put this code in modmain.lua? i have the sound files that i want to replace the deerclop's warning sound with yes, in modmain.lua. If you want to replace the sound, you can copy the original function to create it local function PlayWarningSound(proxy, sound, range, theta, radius) local inst = CreateEntity() --[[Non-networked entity]] inst.entity:AddTransform() inst.entity:AddSoundEmitter() inst.entity:SetParent(TheFocalPoint.entity) --Sound starts fading when source is out of range --At 2x range + RANGE_BUFFER, sound is offset by MAX_SOUND_RANGE local distsq = TheFocalPoint:GetDistanceSqToInst(proxy) if distsq > range * range then radius = easing.inQuad(math.sqrt(distsq) - range, radius, MAX_SOUND_RANGE - radius, range + RANGE_BUFFER) end inst.Transform:SetPosition(radius * math.cos(theta), 0, radius * math.sin(theta)) inst.SoundEmitter:PlaySound(sound) inst:Remove() end i think proxy is the deerclops, sound obiously the name of the sound and range, theta, radius idk 1 Link to comment https://forums.kleientertainment.com/forums/topic/168233-please-help-me-to-create-a-mod-that-changes-deerclops-sound/#findComment-1837921 Share on other sites More sharing options...
shaka-dingo Posted October 2, 2025 Author Share Posted October 2, 2025 (edited) 16 hours ago, FerniFrenito said: yes, in modmain.lua. If you want to replace the sound, you can copy the original function to create it local function PlayWarningSound(proxy, sound, range, theta, radius) local inst = CreateEntity() --[[Non-networked entity]] inst.entity:AddTransform() inst.entity:AddSoundEmitter() inst.entity:SetParent(TheFocalPoint.entity) --Sound starts fading when source is out of range --At 2x range + RANGE_BUFFER, sound is offset by MAX_SOUND_RANGE local distsq = TheFocalPoint:GetDistanceSqToInst(proxy) if distsq > range * range then radius = easing.inQuad(math.sqrt(distsq) - range, radius, MAX_SOUND_RANGE - radius, range + RANGE_BUFFER) end inst.Transform:SetPosition(radius * math.cos(theta), 0, radius * math.sin(theta)) inst.SoundEmitter:PlaySound(sound) inst:Remove() end i think proxy is the deerclops, sound obiously the name of the sound and range, theta, radius idk alllright, i've tried to do something but ofcourse nothing worked out...i'm sorry for being a bother, but could you, by any chance, help me by giving step-by-step instructions on everything we've managed to find to make this mod a reality? I really want to create this mod and would be eternally grateful. I don't want you to do all the work for me, but I'm really a complete zero in coding... take your time to make the instructions, if you want ofcourse. Edited October 2, 2025 by shaka-dingo Link to comment https://forums.kleientertainment.com/forums/topic/168233-please-help-me-to-create-a-mod-that-changes-deerclops-sound/#findComment-1837998 Share on other sites More sharing options...
FerniFrenito Posted October 2, 2025 Share Posted October 2, 2025 6 hours ago, shaka-dingo said: alllright, i've tried to do something but ofcourse nothing worked out...i'm sorry for being a bother, but could you, by any chance, help me by giving step-by-step instructions on everything we've managed to find to make this mod a reality? I really want to create this mod and would be eternally grateful. I don't want you to do all the work for me, but I'm really a complete zero in coding... take your time to make the instructions, if you want ofcourse. What do you think about adding me on Steam? Normally, with code help, you have to write, test, fail, identify the error, fix, test, fail, etc., so I don't want to fill this thread with answers like that. We'd better solve the problem in DM and post the working solution here. My steam friend code: 276943410 Link to comment https://forums.kleientertainment.com/forums/topic/168233-please-help-me-to-create-a-mod-that-changes-deerclops-sound/#findComment-1838091 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now