DSB Version 0.77

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
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

DSB Version 0.77

Post by Sophia »

What's new:

- Added (experimental!) DSB+ESB integration to be able to visualize and edit your dungeon in realtime
- Added on_stuck_in_monster(self, id, monster_id, monster_arch) called when a projectile gets stuck in a monster
- Added consume_effect so food items can have additional effects beyond the normal things
- Added dsb_current_champion, which returns the party position (ppos) of the currently offered mirror champion, or nil if you aren't looking in a mirror
- Added dsb_get_lookmode, which returns two bools indicating whether the eye or the mouth is being queried (currently, both cannot be true at the same time)
- Added dsb_get_attackppos, which returns the party position whose attack result was last displayed
- Added more flexibility for how to display resurrection and reincarnation options
- Fixed newly created pits not dropping anything
- Fixed errors when throwing an object with no mass
- Fixed system renderers not respecting alpha channels
- Fixed undefined behavior when requesting a subrenderer target outside of a subrenderer function
- Optimized handling of exvars when reloading from a save
- Localtext.txt string length limit vastly increased
- Disallowed exvar values that cause ESB to freeze or crash on save

Download it here
Stingm
Apprentice
Posts: 58
Joined: Wed Jan 26, 2011 7:36 pm

Re: DSB Version 0.77

Post by Stingm »

Thanks again for all your work Sophia.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: DSB Version 0.77

Post by Gambit37 »

Thanks for the update Sophia. I'm quiet on DSB again as it's dropped down my list of priorities: our baby is due imminently so I suspect I won't be doing any dungeon delving for quite a while now...! :)
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: DSB Version 0.77

Post by Gambit37 »

I've just updated to 0.77 and all my custom sys_render_other zones have stopped working. Any ideas what would cause that?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: DSB Version 0.77

Post by Sophia »

Can you be more specific what "stopped working" entails?

Also, are you adding to the info tables or have you completely redefined them?
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: DSB Version 0.77

Post by Gambit37 »

After some digging around, it seems that dsb_current_inventory() now only returns "nil" in 0.77. Previously it returned an integer (ppos), for example in my sys_render_other I do this sort of thing and it no longer works:

Code: Select all

	if (gui_name == "inventory") then
		local current_inv_ppos = dsb_current_inventory()
		if (current_inv_ppos) then
			local who = dsb_ppos_char(current_inv_ppos)
			{more code}
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: DSB Version 0.77

Post by Sophia »

I didn't change dsb_current_inventory and it works fine for me, so something else must be wrong. I tested with both the 0.78 WIP and the distributed version of DSB 0.77 and they both worked fine.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: DSB Version 0.77

Post by Gambit37 »

I don't know what else to tell you. It worked fine in 0.76. With 0.77, I've not changed anything else other than updating my /base folder to use the files from 0.77, and updating the dsb.exe and esb.exe to the 0.77 exes.

To answer your other question, I completely redefine the gui_info table, but it includes all the original sections from /base.

What else might I look for?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: DSB Version 0.77

Post by Sophia »

I don't know either! Can you send me your dungeon?

If something needs to be fixed I'd rather be able to include the fix in 0.78.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: DSB Version 0.77

Post by Gambit37 »

I'll send you the dungeon via PM. By the way, the test version of 0.77 that you sent me dated 23/March at 18:29 doesn't have this problem and dsb_current_inventory works correctly in that version.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: DSB Version 0.77

Post by Gambit37 »

I'm an idiot. dsb_current_inventory does work in 0.77, I was reading my results wrong. And I've found the problem. In sys_render_other, I clear the bitmap to powerpink. But I wasn't using dsb_bitmap_clear, I was using a function you previously gave me, bitmap_clear_alpha:

Code: Select all

function bitmap_clear_alpha(bitmap, clearcolor)
	dsb_bitmap_clear(bitmap, clearcolor)
	dsb_set_pixel(bitmap, 0, 0, clearcolor, 0)
end
That code works in 0.76, but in 0.77 nothing appears at all. I can see now that when the entire bitmap is cleared to alpha value 0, drawing anything more onto it won't make any difference -- it won't be seen. And I'm assuming that was broken in 0.76 because the system renderers couldn't accept alpha channels until you fixed it for 0.77?

Anyway, I've reverted to dsb_bitmap_clear(bmp, color.powerink) and my other gui zones are now drawing correctly.
Post Reply