ChampagneFerret Posted December 31, 2017 Share Posted December 31, 2017 Hello! I am revisiting after being away from the game for a bit. I'd like to create a mod to mute Chester, as I find him very loud. I've gone so far as to leave him a little ways from my base to avoid hearing him. Where would I start on something like this? I've seen mods to mute critters but no luck for Chester. Any ideas? Link to comment https://forums.kleientertainment.com/forums/topic/85990-mod-to-mute-chester/ Share on other sites More sharing options...
Hekkaryk Posted January 1, 2018 Share Posted January 1, 2018 (edited) I'll add that option to my mod - [Hk]Control++ (client-side) If you want it now, try this: RemapSoundEvent("dontstarve/creatures/chester/pant", "nil") -- this is Chester's panting / idle sound RemapSoundEvent("dontstarve/creatures/chester/hurt", "nil") RemapSoundEvent("dontstarve/creatures/chester/death", "nil") RemapSoundEvent("dontstarve/creatures/chester/open", "nil") RemapSoundEvent("dontstarve/creatures/chester/close", "nil") RemapSoundEvent("dontstarve/creatures/chester/pop", "nil") RemapSoundEvent("dontstarve/creatures/chester/boing", "nil") RemapSoundEvent("dontstarve/creatures/chester/lick", "nil") On the other hand I'm unable to find a way to mute Mandrake's "annoy" song - any ideas, anybody ^_^" Name of sound is not in prefab/brains/stategraph EDIT: Note that above solution will fill client_log.txt with FMOD Error: Can't play event <sound name here>: An invalid parameter was passed to this function. it's a simple sound remapping... there might be a way to remove sound from everything related to Chester but it would be time-consuming at best. If anybody knows default silence sound I'd gladly use it instead of "nil" EDIT2: Here's Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=1116211359 Edited January 1, 2018 by Hekkaryk Link to comment https://forums.kleientertainment.com/forums/topic/85990-mod-to-mute-chester/#findComment-988946 Share on other sites More sharing options...
Aquaterion Posted January 1, 2018 Share Posted January 1, 2018 35 minutes ago, Hekkaryk said: I'll add that option to my mod - [Hk]Control++ (client-side) If you want it now, try this: RemapSoundEvent("dontstarve/creatures/chester/pant", "nil") -- this is Chester's panting / idle sound RemapSoundEvent("dontstarve/creatures/chester/hurt", "nil") RemapSoundEvent("dontstarve/creatures/chester/death", "nil") RemapSoundEvent("dontstarve/creatures/chester/open", "nil") RemapSoundEvent("dontstarve/creatures/chester/close", "nil") RemapSoundEvent("dontstarve/creatures/chester/pop", "nil") RemapSoundEvent("dontstarve/creatures/chester/boing", "nil") RemapSoundEvent("dontstarve/creatures/chester/lick", "nil") On the other hand I'm unable to find a way to mute Mandrake's "annoy" song - any ideas, anybody ^_^" Name of sound is not in prefab/brains/stategraph EDIT: Note that above solution will fill client_log.txt with FMOD Error: Can't play event <sound name here>: An invalid parameter was passed to this function. it's a simple sound remapping... there might be a way to remove sound from everything related to Chester but it would be time-consuming at best. If anybody knows default silence sound I'd gladly use it instead of "nil" EDIT2: Here's Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=1116211359 does RemapSoundEvent not allow you to use actual nil (not a string with "nil" inside)? Link to comment https://forums.kleientertainment.com/forums/topic/85990-mod-to-mute-chester/#findComment-988949 Share on other sites More sharing options...
Hekkaryk Posted January 1, 2018 Share Posted January 1, 2018 2 hours ago, Aquaterion said: does RemapSoundEvent not allow you to use actual nil (not a string with "nil" inside)? No, it crashes with: Quote [00:00:06]: ModIndex:GetModsToLoad inserting moddir, [Hk]Control++ [00:00:06]: modimport: ../mods/workshop-343753877/announcestrings_english.lua [00:00:06]: [string "scripts/modutil.lua"]:514: bad argument #1 to 'RemapSoundEvent' (string expected, got nil) LUA ERROR stack traceback: =[C] in function 'RemapSoundEvent' scripts/modutil.lua(514,1) in function 'RemapSoundEvent' ../mods/[Hk]Control++/modmain.lua(226,1) in function 'DisableSound' ../mods/[Hk]Control++/modmain.lua(234,1) in main chunk =[C] in function 'xpcall' scripts/util.lua(709,1) in function 'RunInEnvironment' scripts/mods.lua(511,1) in function 'InitializeModMain' scripts/mods.lua(485,1) in function 'LoadMods' scripts/main.lua(259,1) in function 'ModSafeStartup' scripts/main.lua(319,1) =[C] in function 'SetPersistentString' scripts/mainfunctions.lua(25,1) in function 'SavePersistentString' scripts/modindex.lua(77,1) =[C] in function 'GetPersistentString' scripts/modindex.lua(64,1) in function 'BeginStartupSequence' scripts/main.lua(318,1) in function 'callback' scripts/modindex.lua(539,1) =[C] in function 'GetPersistentString' scripts/modindex.lua(513,1) in function 'Load' scripts/main.lua(317,1) in main chunk [00:00:06]: [string "scripts/mainfunctions.lua"]:1023: variable 'global_error_widget' is not declared LUA ERROR stack traceback: =[C] in function 'error' scripts/strict.lua(23,1) scripts/mainfunctions.lua(1023,1) =[C] in function 'SetPersistentString' scripts/mainfunctions.lua(25,1) in function 'SavePersistentString' scripts/modindex.lua(77,1) =[C] in function 'GetPersistentString' scripts/modindex.lua(64,1) in function 'BeginStartupSequence' scripts/main.lua(318,1) in function 'callback' scripts/modindex.lua(539,1) =[C] in function 'GetPersistentString' scripts/modindex.lua(513,1) in function 'Load' scripts/main.lua(317,1) in main chunk Link to comment https://forums.kleientertainment.com/forums/topic/85990-mod-to-mute-chester/#findComment-988969 Share on other sites More sharing options...
ChampagneFerret Posted January 2, 2018 Author Share Posted January 2, 2018 10 hours ago, Hekkaryk said: I'll add that option to my mod - [Hk]Control++ (client-side) If you want it now, try this: RemapSoundEvent("dontstarve/creatures/chester/pant", "nil") -- this is Chester's panting / idle sound RemapSoundEvent("dontstarve/creatures/chester/hurt", "nil") RemapSoundEvent("dontstarve/creatures/chester/death", "nil") RemapSoundEvent("dontstarve/creatures/chester/open", "nil") RemapSoundEvent("dontstarve/creatures/chester/close", "nil") RemapSoundEvent("dontstarve/creatures/chester/pop", "nil") RemapSoundEvent("dontstarve/creatures/chester/boing", "nil") RemapSoundEvent("dontstarve/creatures/chester/lick", "nil") On the other hand I'm unable to find a way to mute Mandrake's "annoy" song - any ideas, anybody ^_^" Name of sound is not in prefab/brains/stategraph EDIT: Note that above solution will fill client_log.txt with FMOD Error: Can't play event <sound name here>: An invalid parameter was passed to this function. it's a simple sound remapping... there might be a way to remove sound from everything related to Chester but it would be time-consuming at best. If anybody knows default silence sound I'd gladly use it instead of "nil" EDIT2: Here's Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=1116211359 Woah! Thanks so much! I'm not sure how to use the coding part, but I'll look into it and give your mod a shot! Link to comment https://forums.kleientertainment.com/forums/topic/85990-mod-to-mute-chester/#findComment-989056 Share on other sites More sharing options...
Hekkaryk Posted January 2, 2018 Share Posted January 2, 2018 11 hours ago, ChampagneFerret said: Woah! Thanks so much! I'm not sure how to use the coding part, but I'll look into it and give your mod a shot! In case you ever want to quickly made your own mod, below is the bare minimum (2 files in a folder placed mods directory): modinfo.lua Bare minimum: name = "Mod name" description = "Mod description" author = "Mod author" version = "1.0.0" forumthread = "" api_version = 10 dst_compatible = true dont_starve_compatible = false reign_of_giants_compatible = false all_clients_require_mod = false -- true for most server mods client_only_mod = true -- false for server mods server_filter_tags = {} configuration_options = {} Example: -- you can any comments after prepending then with -- name = "Mod name" description = [[Sample description allowing simple multiline formating ;)]] author = "Mod author" version = "1.0.0" forumthread = "" -- leave blank to point to Steam Workshop's page of the mod api_version = 10 dst_compatible = true dont_starve_compatible = false reign_of_giants_compatible = false all_clients_require_mod = false client_only_mod = true server_filter_tags = {"first tag", "second tag"} -- if you mod don't use options: configuration_options = {} -- if you mod use options: -- sample, 100% optional functions -- creates option for use in configuration option local function option(description, data, hover) return { description = description, hover = hover, data = data } end -- sample, 100% optional function that creates configuration option in simpler way local function config(name, label, hover, options, default) return { name = name, label = label, hover = hover, options = options, default = default } end -- here ends optional part configuration_options = { { name = "first_option_name", label = "1st label", hover = [[First option hover - this can be long but won't wrap support multilines tho]], options = { { description = "value 1", hover = 'it\'s easy to quote here "I do not know what to quote tho"', data = true }, { description = "value 2", hover = "value 1 hover\nalternative way of line breaks", data = false } }, default = true }, { name = "second_option_name", label = "2nd label", hover = "this can also be defined this way", options = { { description = "value 1", hover = "out of ideas, numeric demo", data = 1 }, { description = "value 2", -- sadly, DST copies any other hover for option if left nil data = 2 }, { description = "value 2", hover = "yeah, I skipped hover in last value and repeated description - it's allowed", data = 3 } }, default = 2 }, config( "simpler_way_option", "Option label", "Option hover", { option("first", "first_value", "first value hover - yes, options can be strings"), option("second", "second_value") -- sadly, DST copies any other hover for option if left nil }, "first_value" ) } modmain.lua Bare minimum: Example: if GetModConfigData("first_option_name") then print("first_option_name was true so I'm muting Chester! ^_^") RemapSoundEvent("dontstarve/creatures/chester/pant", "nil") RemapSoundEvent("dontstarve/creatures/chester/hurt", "nil") RemapSoundEvent("dontstarve/creatures/chester/death", "nil") RemapSoundEvent("dontstarve/creatures/chester/open", "nil") RemapSoundEvent("dontstarve/creatures/chester/close", "nil") RemapSoundEvent("dontstarve/creatures/chester/pop", "nil") RemapSoundEvent("dontstarve/creatures/chester/boing", "nil") RemapSoundEvent("dontstarve/creatures/chester/lick", "nil") else print("first_option_name was nil or false so mod is doing nothing :P") end Link to comment https://forums.kleientertainment.com/forums/topic/85990-mod-to-mute-chester/#findComment-989152 Share on other sites More sharing options...
ChampagneFerret Posted January 3, 2018 Author Share Posted January 3, 2018 10 hours ago, Hekkaryk said: In case you ever want to quickly made your own mod, below is the bare minimum (2 files in a folder placed mods directory): modinfo.lua Thanks again! I've been wanting to try and make a mod, so this is a great start! Thanks for all the help. Total newbie at this but it's nice to meet helpful people Link to comment https://forums.kleientertainment.com/forums/topic/85990-mod-to-mute-chester/#findComment-989275 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