Jump to content

Remove WX-78 charge sound


Recommended Posts

Hello,

I think it would be useful to  have the option to disable WX's charged state sound in the game menu settings similar to Wigfrids umlauts. It can drive one crazy on the long term.

Since it is not there I was wondering if there is an existing mod that does that, the steam workshop gives no results. Would it be hard to remove that sounds effect? Could I simply delete the sound file in the game files?

 

Edited by t1morino88eex
Link to comment
Share on other sites

Thank you DarkXero for the lead, I managed to find the wx.lua in prefabs game folder and added the inst.SoundEmitter:KillSound("overcharge_sound") to a few more functions and it did the trick. Not an elegant one since I'll have to do the same additions for every update most likely. Thank you for the help!

Edited by t1morino88eex
Link to comment
Share on other sites

I think I just managed to create a small little mod for the first time. It seems to be working great, not sure if I did ok by making it a server mod, as in if it would have worked as a client one, but it does the job as it should.

If anyone is up for uploading it in the steam workshop please go ahead. :)

Edited by t1morino88eex
Link to comment
Share on other sites

4 hours ago, t1morino88eex said:

Tried setting it up as a client mod, doesn't work though.

Whoops.

AddPrefabPostInit("wx78", function(inst)
	if GLOBAL.TheWorld.ismastersim then
		inst:ListenForEvent("ms_overcharge", function(inst)
			inst:DoTaskInTime(0, function(inst)
				inst.SoundEmitter:KillSound("overcharge_sound")
			end)
		end)
	else
		inst:DoPeriodicTask(1, function(inst)
			if inst.SoundEmitter:PlayingSound("overcharge_sound") then
				inst.SoundEmitter:KillSound("overcharge_sound")
			end
		end)
	end
end)

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...