General Dungeon Editor glitches and problems

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: General Dungeon Editor glitches and problems

Post 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.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: General Dungeon Editor glitches and problems

Post by Komag »

Ah, very interesting bug, glad to know that detail!
Finished Dungeons - complete mods to play
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: General Dungeon Editor glitches and problems

Post 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 :)
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: General Dungeon Editor glitches and problems

Post by Komag »

Maybe you could just clone the secret with the same name but add some other inert property you could check for?
Finished Dungeons - complete mods to play
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: General Dungeon Editor glitches and problems

Post by Neikun »

Why is this?
SpoilerShow
Image
EDIT:
Simple mistake. It's replacesWall = true,
not replacesWall = yes,
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: General Dungeon Editor glitches and problems

Post by Skuggasveinn »

replacesWall = true,

not yes
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: General Dungeon Editor glitches and problems

Post 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
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Phitt
Posts: 442
Joined: Tue Aug 14, 2012 9:43 am

Re: General Dungeon Editor glitches and problems

Post 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.
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: General Dungeon Editor glitches and problems

Post 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
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: General Dungeon Editor glitches and problems

Post 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!
Finished Dungeons - complete mods to play
Post Reply