Possible bug with monster_level_info?

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.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Possible bug with monster_level_info?

Post by Gambit37 »

The converted CSB dungeon uses a table called monster_level_info to specify the levels where each creature type can exist. I tried using the same feature in the (now heavily modified) converted DM dungeon with this table:

Code: Select all

monster_level_info = {
	[0] = { "" },
	[1] = { "mummy", "screamer" },
	[2] = { "mummy", "screamer", "rockpile", "trolin" },
	[3] = { "mummy", "screamer", "rockpile", "worm", "ghost", "wasp" },
	[4] = { "screamer", "swampslime", "couatl", "mummy" },
	[5] = { "skeleton", "wizardeye" },
	[6] = { "golem" },
	[7] = { "giggler", "ghost", "mummy", "skeleton" },
	[8] = { "giggler", "rat", "ruster", "vexirk" },
	[9] = { "giggler", "scorpion", "wizardeye", "skeleton" },
	[10] = { "trolin", "wasp", "giggler", "waterelem"},
	[11] = { "knight_armour", "oitu", "materializer" },
	[12] = { "blackflame", "demon", "lordchaos", "knight_armour" },
	[13] = { "dragon" }
}
However, DSB crashes during startup with this error:

Code: Select all

OBJ: 453 total archs
DUNGEON: Attempting to load
Parsing ..\2_build/dungeon.lua
PROGRAM CRASH!
Location: -5 0 0
Reason: Segmentation Fault
Stack Dump:
DSBmain
load_dungeon
src_lua_file(..\2_build/dungeon.lua)
src_lua_file.pcall
lua.dsb_spawn(dragon)
create_instance
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Possible bug with monster_level_info?

Post by Sophia »

The C code doesn't know about the monster_level_info table; it just calls sys_monster_enter_level and the rest is handled with Lua code. So from that stack trace I don't really see a connection to monster_level_info but clearly something isn't working right. At this point I don't know if it's something you did wrong or a bug in DSB, so I'll probably have to look at the dungeon files themselves. (Though if you did do something wrong I should probably fix it to give a more elegant error message than just blowing up!)
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Possible bug with monster_level_info?

Post by Gambit37 »

OK thanks, I'll come back to this one after I've cleaned up my project -- it's rather complex, messy and weird right now and not easy to share...
Post Reply