Page 1 of 1

DSB Version 0.77

Posted: Mon May 04, 2020 2:37 am
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

Re: DSB Version 0.77

Posted: Fri May 08, 2020 11:58 pm
by Stingm
Thanks again for all your work Sophia.

Re: DSB Version 0.77

Posted: Sun May 17, 2020 6:26 pm
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...! :)

Re: DSB Version 0.77

Posted: Fri Oct 30, 2020 11:24 pm
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?

Re: DSB Version 0.77

Posted: Sat Oct 31, 2020 8:19 pm
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?

Re: DSB Version 0.77

Posted: Sun Nov 01, 2020 1:47 pm
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}

Re: DSB Version 0.77

Posted: Sun Nov 01, 2020 7:07 pm
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.

Re: DSB Version 0.77

Posted: Sun Nov 01, 2020 7:22 pm
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?

Re: DSB Version 0.77

Posted: Sun Nov 01, 2020 7:29 pm
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.

Re: DSB Version 0.77

Posted: Mon Nov 02, 2020 11:01 am
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.

Re: DSB Version 0.77

Posted: Mon Nov 02, 2020 11:55 am
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.