Issue with custom sound (game crash)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
n0th1n9
Posts: 5
Joined: Thu Sep 13, 2012 3:16 pm

Issue with custom sound (game crash)

Post by n0th1n9 »

Hi,

I started working on a custom dungeon and added a custom sound to it.

To do so I added my wav file in the sounds folder, and edited the sounds.lua file in the "mod_assets\scripts" folder and added :

Code: Select all

defineSound{
name = "evil",
filename = "mod_assets/sounds/evil.wav",
loop = false,
volume = 1,
minDistance = 30,
maxDistance = 32,
}
Then I added a lua script entity to my dungeon triggered by a pressure plate :

Code: Select all

function evil()
	playSound("evil")
end
At this point I had to restart the dungeon editor to make the whole thing work and hear my sound in the preview mode.
I don't know if this is normal or not... Anyway I managed to hear my sound in preview mode.

But, after exporting my dungeon I tried it in the game and got that message :
Image

Here is the error log :
SpoilerShow
[string "SoundSystem.lua"]:0: Seek failed on file mod_assets/sounds/evil.wav
stack traceback:
[C]: in function 'load'
[string "SoundSystem.lua"]: in function 'defineSound'
mod_assets/scripts/sounds.lua:5: in main chunk
[string "Dungeon.lua"]: in function 'import'
mod_assets/scripts/init.lua:13: in main chunk
[string "Dungeon.lua"]: in function 'loadInitFile'
[string "GameMode.lua"]: in function 'loadDungeon'
[string "GameMode.lua"]: in function 'newGame'
[string "GameMode.lua"]: in function 'startGame'
[string "NewGameMenu.lua"]: in function 'startGame'
[string "NewGameMenu.lua"]: in function 'update'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk

OS Version 6.1

OEM ID: 0
Number of processors: 8
Page size: 4096
Processor type: 586

Total memory: 6068 MB
Free memory: 3347 MB

Display device 0:
Device name: \\.\DISPLAY1
Device string: NVIDIA GeForce GTX 460M
State flags: 00000005

Display device 1:
Device name: \\.\DISPLAY2
Device string: NVIDIA GeForce GTX 460M
State flags: 00000000

Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008

Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008

Display device 4:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008
Is it a bug or am I wrong somewhere?
Mebaru
Posts: 19
Joined: Sun Oct 14, 2012 2:03 pm

Re: Issue with custom sound (game crash)

Post by Mebaru »

I second this! Game is crashing with custom sounds, while they are played without problems in dungeon editor preview.
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: Issue with custom sound (game crash)

Post by msyblade »

Your strings look good and all, you may try removing the indent from "playSound" line, and also try it without the min/max distance lines just to narrow down the variables. also try converting the wav file thru

http://media.io

and see if perhaps youre having a compatability issue.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Mebaru
Posts: 19
Joined: Sun Oct 14, 2012 2:03 pm

Re: Issue with custom sound (game crash)

Post by Mebaru »

I've made a few test and game is crashing when sound is in stereo (though it works without problems in editor).
Post Reply