dsb 43 bug

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

dsb 43 bug

Post by Joramun »

- ESB let the designer put 2559 as skill 7 value, which then prevents DSB and ESB to open the dungeon.

- trigger with no sound defined are not silent by default, resulting in a crash with complaint from dsb_3dsound not getting a sound as an input:

Code: Select all

Parsing D:\Jeux\DM\DSB\dungeons\dm/dungeon.lua
FATAL LUA ERROR: Lua Function monster_generator.msg_handler[100000]: base/util.lua:203: dsb_3dsound requires Sound in param 1
@@@ LUA STACK @@@
[N:0][N:1417][N:100000][N:0][N:1463][S:base/util.lua:203: dsb_3dsound requires Sound in param 1]
@@@@@@
- the light level at dungeon startup is always the maximum, resulting in a sudden darkening if the current level is actually dark.
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: dsb 43 bug

Post by Sophia »

Joramun wrote:ESB let the designer put 2559 as skill 7 value, which then prevents DSB and ESB to open the dungeon.
It's because the max was defined elsewhere as 2550. Fixed now.
Joramun wrote:trigger with no sound defined are not silent by default, resulting in a crash with complaint from dsb_3dsound not getting a sound as an input
I'm not sure what you mean by "no sound defined." I think the problem here is that a sound exvar is defined, but there is no corresponding entry in the snd table with that name. It's probably bad design that it gives such an ambiguous error message, but it's also not the kind of thing I can do much about without metatable hacking that may have other unforeseen consequences. I can have it silently fail or non-fatally complain instead of dump out, I guess, if that's better...
Joramun wrote:the light level at dungeon startup is always the maximum, resulting in a sudden darkening if the current level is actually dark.
Fixed.
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: dsb 43 bug

Post by Joramun »

The sound problem comes from my dungeon, sorry.
What Is Your Quest ?
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: dsb 43 bug

Post by Joramun »

FATAL LUA ERROR: Lua Function fireball.on_impact: base/damage.lua:263: Invalid instance 1200
@@@ LUA STACK @@@
[{@OBJ}][{@OBJ[FIREBALL]}][S:base/damage.lua:263: Invalid instance 1200]
@@@@@@
When fireballing "he is my prisonner, let him suffer". Instance 1200 is a floor trigger.
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: dsb 43 bug

Post by Sophia »

Joramun wrote:When fireballing "he is my prisonner, let him suffer". Instance 1200 is a floor trigger.
This problem is kind of messy. When the fireball explodes, the explode_square function creates a list of the instances in the tile and proceeds to iterate over it, handling the explosion for each thing. The mummy's death untriggers the trigger, which fires off an activate to a relay and causes the trigger the mummy was standing on to be destroyed. All this happens on the mummy's death, so by the time explode_square's iterator gets to the trigger, the trigger is gone. There are a few ways to fix this, the various solutions becoming increasingly robust and "correct" and causing increasing amounts of messiness for me. For now, I'm just going to make dsb_find_arch return an empty table on an invalid input, instead of erroring out. It'll make bad code a little harder to debug, but it won't change working code one bit.

tl;dr version: Fixed
Post Reply