DoomRL > Modding
sound.lua
GrimmC:
Having some trouble with the aforementioned file. As per the wiki, the end of my file looks like this:
--- Code: ---powerup = "wav/dsgetpow.wav",
#include "newsounds.lua"
}
--- End code ---
When I have lightning fast reflexes, it says something about a global variable being assigned nil or somesuch.
However, even my previous additions straight to the file didn't work. A typical change:
--- Code: ---reload = "newsounds/dsglkin.wav",
--- End code ---
newsounds being a folder I created in the main directory. But this also crashed. Help?
tehtmi:
Sorry, the wiki page you are talking about is for an old version that doesn't use lua for the sound file.
I believe Skulltag Arena has custom sounds, and it's updated to 0.9.9.2. Sound stuff is probably about the same. So you can use that as a reference.
You shouldn't use #include anywhere, it doesn't mean anything in lua.
Are you actually trying to make a mod or just change sound bindings?
More details would be helpful. What sound are you trying to change/add? What is the error message? Maybe attach your entire sound.lua to your post?
GrimmC:
I'm just changing the sound bindings. For example, importing the supershotgun reload sound from Doom 2 instead of the generic weapon pickup sound in place now.
There is also a mod I'm working on for Doom 2 which expands the enemy sound sets, among other things, so Lost Souls, Cacodemons, and others have their own pain sounds now.
EDIT: Turned out I had messed up some of the filenames, which caused DoomRL to crash. Is there some parameter I can include to make it wait for <enter> until it shuts the window. Right now I'm just hitting the pause key frantically.
GrimmC:
Putting
--- Code: ---dofile "newsounds.lua"
--- End code ---
after sound.lua in the config causes DoomRL to fail loading.
Putting it at the end of sound.lua loads normally, but doesn't change anything.
Putting it at the beginning causes DoomRL to fail.
Any suggestions? I'd like to make an add-on file so I don't have to modify the original sound.lua...
tehtmi:
--- Quote from: GrimmC on May 04, 2011, 13:06 ---Is there some parameter I can include to make it wait for <enter> until it shuts the window. Right now I'm just hitting the pause key frantically.
--- End quote ---
I've attached a replacement for doomrl.bat that will wait for you to press a key before closing the window if there was an error. You could also just run doomrl from the command line.
--- Quote from: GrimmC on May 04, 2011, 13:42 ---Any suggestions? I'd like to make an add-on file so I don't have to modify the original sound.lua...
--- End quote ---
If you want to add or change sound bindings in a different file, then it will have to use different syntax. To edit or add an entry, you should do something like
--- Code: ---Sound.door.open = "soundfile.wav"
Sound.reload = "othersoundfile.wav"
Sound.newitem = {
fire = "firesound.wav"
reload = "blah.wav"
}
-- and so one...
--- End code ---
(I haven't tested this, but I'm pretty sure it should work.)
As you said, make sure to run this after the usual sound.lua (either of the places you said should work).
Navigation
[0] Message Index
[#] Next page
Go to full version