Page 15 of 17

Re: General Dungeon Editor glitches and problems

Posted: Mon Nov 26, 2012 4:34 pm
by Skuggasveinn
Its a know fact that playSoundAt needs to have mono sounds.
But during this weekend a was making some sound effects and got the error that I was trying to play a no mono sound in 3d space.
No problem, convert it to mono and reloaded the project, but that didn't fix it.
Reloaded the project again, but that didn't fix it, made 110% sure that the file had been converted to mono, it was.
Then I remembered that wav files get loaded into memory, perhaps its not reloading my file for some reason when I refresh the project.
Turned off the editor and on again, and everything was ok.
This happened again just today.

That is strange since version 1.2.12 texture and sounds should get reloaded when you click Reload Project, but in my case sounds don't get reloaded IF I have tried to play them with script, if I convert something to mono that I haven't tried to play before it works normal. (I loaded up a project that had stereo sound defined, with the editor on I converter the file to mono and reloaded the project, all was good, I did this again but this time I ran the script to get the error, then converted the file, and sure enough I needed to restart the editor to get it going again.)

Skuggasveinn.

Re: General Dungeon Editor glitches and problems

Posted: Mon Nov 26, 2012 4:48 pm
by Komag
Ah, very interesting bug, glad to know that detail!

Re: General Dungeon Editor glitches and problems

Posted: Tue Nov 27, 2012 8:29 pm
by Xanathar
If I define a custom secret as:

Code: Select all

cloneObject
{
	name = "auto_secret",
	baseObject = "secret",
}
It's not counted in the statistics screen (but it's counted when activated, thus I can get a dungeon where Secrets: 1/0).

The purpose of this, is that I have a function that at startup adds automagically an hidden pressure plate, party only, silent, for every "auto_secret" I have :)

Re: General Dungeon Editor glitches and problems

Posted: Tue Nov 27, 2012 9:22 pm
by Komag
Maybe you could just clone the secret with the same name but add some other inert property you could check for?

Re: General Dungeon Editor glitches and problems

Posted: Wed Nov 28, 2012 4:13 am
by Neikun
Why is this?
SpoilerShow
Image
EDIT:
Simple mistake. It's replacesWall = true,
not replacesWall = yes,

Re: General Dungeon Editor glitches and problems

Posted: Wed Nov 28, 2012 4:26 am
by Skuggasveinn
replacesWall = true,

not yes

Re: General Dungeon Editor glitches and problems

Posted: Thu Nov 29, 2012 3:28 am
by Neikun
It seems that Grimrock will fail to load until it is finished updating. (Workshop items are considered game updates)
Without a prompt telling the player to wait for the game to update before it starts, it leaves the computer unusable until it updates (untested) or you ctrl+alt+del out of the program.
Side note, trying to run Grimrock while it is updating causes the applications memory usages to go upwards of 900k

Re: General Dungeon Editor glitches and problems

Posted: Sun Dec 02, 2012 10:14 pm
by Phitt
There is a bug with playSoundAt. The level parameter doesn't work properly, the function only plays sounds that are on the same level as the player and unfortunately it also plays them on any other level. For example if you are on level 4 and use playSoundAt("my_sound", 4, 12, 20) the sound will play properly, but you can also hear it on other levels, like 3, 5, whatever unless you save and reload while not on level 4. If you use the same parameters while you are not on level 4 when the script is triggered the sound will not play at all.

This is quite a problem if you want to use looping sounds, basically it makes using looping sounds impossible (which is hard enough to set up right now anyway). Unless you only use them on the last level and make sure the player can't go back to a previous level.

Re: General Dungeon Editor glitches and problems

Posted: Fri Dec 07, 2012 12:59 am
by Xanathar
Let's say that we want to create a "recycle bin" altar, which destroys everything put on it.
Create an altar, and connect it to a scripting entity with:

Code: Select all

function dododoodadadaa()
	for o in altar_1:containedItems() do
		o:destroy()	
	end
end
Put items on the altar, they get destroyed, everything ok.
Throw an item towards the altar, and the game/editor crashes, with the below stack.
SpoilerShow
[string "SoundSystem.lua"]:0: attempt to index a nil value
stack traceback:
[string "SoundSystem.lua"]: in function 'playSound3D'
[string "Item.lua"]: in function 'onProjectileHit'
[string "Projectile.lua"]: in function 'update'
[string "Item.lua"]: in function 'update'
[string "Map.lua"]: in function 'updateEntities'
[string "Dungeon.lua"]: in function 'updateLevels'
[string "GameMode.lua"]: in function 'update'
[string "DungeonEditor.lua"]: in main chunk
[C]: in function 'xpcall'
[string "DungeonEditor.lua"]: in function 'preview'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk
stack traceback:
[C]: in function 'error'
[string "DungeonEditor.lua"]: in function 'handleError'
[string "DungeonEditor.lua"]: in function 'preview'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk

OS Version 6.2

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

Total memory: 8073 MB
Free memory: 5676 MB

Display device 0:
Device name: \\.\DISPLAY1
Device string: Intel(R) HD Graphics 3000
State flags: 00000005

Display device 1:
Device name: \\.\DISPLAY2
Device string: Intel(R) HD Graphics 3000
State flags: 08000000

Display device 2:
Device name: \\.\DISPLAY3
Device string: NVIDIA NVS 4200M
State flags: 00000000

Display device 3:
Device name: \\.\DISPLAY4
Device string: NVIDIA NVS 4200M
State flags: 00000000

Re: General Dungeon Editor glitches and problems

Posted: Fri Dec 07, 2012 1:50 am
by Komag
have you tried debugging it by commenting the destroy for now and putting in print(i.id) and i.name and other helpful info, maybe good ol' alcove:getItemCount() just to be sure, etc.

I recently had an issue with destroying things from alcoves, the second time always failed, no matter how many different ways I set it up, so I changed it to destroy the item and then the alcove itself, then spawn a new alcove immediately so you don't notice, then the new alcove is clean and ready to go. It happened that even after the old item was destroyed, when I checked with alcove:getItemCount() it said 1!