Questions about DSB/ESB
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
Yes, the subrenderer size is hardcoded. There is a bunch of code, mostly related to the resurrection/reincarnation interface, that is expecting things to be a certain size, so the clickzones can go in a certain location. At some point, I'll go digging around and clean this all up, but don't hold your breath.
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
OK, glad I checked, I was going to do something fancy with a larger one. I'll leave it well alone...!
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: Questions about DSB/ESB
Okay, I'm now officially intrigued to see what interface Gambit is in the process of cooking up.
At this rate we're not far short of being able to clone Eye of the Beholder with the DSB engine.
At this rate we're not far short of being able to clone Eye of the Beholder with the DSB engine.
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Don't expect any major changes. DSB core is still tied into rendering the DM interface, so anything majorly different isn't really possible. (Currently anyway )
Some elements can be customised quite well, such as the runes interface or the movement arrows, but stuff like the inventory screen and the portrait areas/stat bars are not fully editable yet as they are handled by the core -- well, as far as I can tell anyway.
Some elements can be customised quite well, such as the runes interface or the movement arrows, but stuff like the inventory screen and the portrait areas/stat bars are not fully editable yet as they are handled by the core -- well, as far as I can tell anyway.
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Next question: is it possible to override a scroll's default subrenderer, and instead show a fullscreen renderer? I'd like larger scrolls with longer messages, those DM ones are so tiny!
Another question: I remember a test dungeon that had a subrenderer showing a poison bar with green markers -- anyone know where that is?
Another question: I remember a test dungeon that had a subrenderer showing a poison bar with green markers -- anyone know where that is?
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
Yes, that's not that difficult.Gambit37 wrote:Next question: is it possible to override a scroll's default subrenderer, and instead show a fullscreen renderer?
You could give it an attack method that triggers a fullscreen renderer, or place it in the on_look event, or both!
(EDIT: Wrong event name)
That was the old test_dungeon. I never bothered to port that over because it really was a terrible hack.Gambit37 wrote:I remember a test dungeon that had a subrenderer showing a poison bar with green markers -- anyone know where that is?
Since DSB gives you full control over the drawing of the food and water bar subrenderer now, if you want to do something like that, you're really better off just putting it all in that code.
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
OK. But I don't think I can pass exvars from the scroll arch to the full-screen renderer though?
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
Well, no. But there are plenty of ways around that.
A temporary global variable will work well, I think.
(You are only going to be invoking one fullscreen renderer at a time, so it shouldn't create any real problems.)
A temporary global variable will work well, I think.
(You are only going to be invoking one fullscreen renderer at a time, so it shouldn't create any real problems.)
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Right, that makes sense. I'll give it a go, thanks
Last question for today: can DSB read external text files? I think for long strings of text (for a scroll) it may make more sense to store it externally for easier editing...
Last question for today: can DSB read external text files? I think for long strings of text (for a scroll) it may make more sense to store it externally for easier editing...
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
No, but that doesn't mean you can't create something called strings.lua that only contains your text strings.
Then just set it up to use an entry in strings rather than using an exvar directly.
(i.e., instead of using exvar[id].text, use strings[exvar[id].string], or whatever)
Code: Select all
strings = {
my_scroll = "Some text! You can write a big long string if you want.",
another_scroll = "Another scroll. All the strings are here so it's easy to edit."
}
(i.e., instead of using exvar[id].text, use strings[exvar[id].string], or whatever)
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
In the wiki, there's a dsb_wakeup() but I can't find an associated dsb_sleep(). How do I send the party to sleep?
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
You can't.Gambit37 wrote:How do I send the party to sleep?
I honestly couldn't think of any time when this would be needed.
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
OK, let me phrase it another way Is there a way of moving the zZZ button out of the inventory and into the main interface area, so it's always available?
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
Oh, I get it now.Gambit37 wrote:Is there a way of moving the zZZ button out of the inventory and into the main interface area, so it's always available?
Not at the moment. I'll look into this, too!
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
I'd like to create a creature that both walks and flies. But I'm not sure how to get it to swap 'modes' and bitmaps?
-
- Adept
- Posts: 221
- Joined: Sat Jan 07, 2006 1:54 am
- Location: Britain
Re: Questions about DSB/ESB
Create flying_creature and walking_creature as separate monsters and have triggers or attack modes that swap them?
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Looks like dsb_qswap(id, new_arch) does what I need, and will preserve the HP. Nice
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Is there a way of looping a monsters move sound? When I tried it, the sounds remained playing all over the map, even though the monsters were now dead (makes sense I guess). Basically, I'd like the sound to repeat while the monster is stationary, but then reset and start again when it moves. Think in terms of a bee buzzing... it doesn't only buzz when it moves from tile to tile, but continuously.
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
No, but I'll add this for the next version.Gambit37 wrote:Is there a way of looping a monsters move sound?
(It's complicated enough it's best integrated into the base code instead of something you patch in yourself)
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Cool, thanks I got my flying/walking creature working, it all works really well. So much better than RTC for this sort of thing
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Is it possible to dynamically change the bitmaps/speed of animations used by an instance of a creature? I know I can do animations at the setup stage, but then all creatures animate in sync which looks un-natural when they are in groups.
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
Ok, another one that is best handled as a feature request.
The current animation system is kind of a mess anyway. It'll be a lot cleaner internally in DSB 0.53.
(End users won't notice anything if I did it right)
The current animation system is kind of a mess anyway. It'll be a lot cleaner internally in DSB 0.53.
(End users won't notice anything if I did it right)
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
How do I pass an array of gfx entries to dsb_animate()? Seems like it won't accept an array as a passable parameter and that I have to write out the full list of frames? I'm trying to build an array like gfx.frame00, gfx.frame01, ... etc using a loop to avoid having to hard code names in my source.
When I pass an array, DSB crashes:
This is my code, it creates both a string and an array. Neither can be passed to dsb_animate without it crashing:
When I pass an array, DSB crashes:
Code: Select all
PROGRAM CRASH!
Location: -5 0 0
Reason: Segmentation Fault
Stack Dump:
DSBmain
manifest_files
execute_stacktop_manifest
src_lua_file(dungeon/_lua/ui_title.lua)
src_lua_file.pcall
lua.dsb_animate
setup_animation
Code: Select all
snow_frames = ""
snow_array = {}
for i = 0,63 do
label = "snow"
if (i < 10) then label = label .. "0" end
label = label .. i
gfx[label] = dsb_get_bitmap(path .. label)
-- Create a string of frames
snow_frames = snow_frames .. "gfx." .. label
if (i < 63) then snow_frames = snow_frames .. "," end
-- Create an array of frames
snow_array[i] = "gfx." .. label
end
- Sophia
- Concise and Honest
- Posts: 4249
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Questions about DSB/ESB
You set it up wrong. I should probably figure out why this just goes ahead and tries to use the bad input and crashes rather than printing an error, but anyway, you're passing it an array of strings when what you really want are graphics table entries:
The 0 in the call to dsb_animate is the number of frames parameter, which is not needed and ignored when you're passing a table.
Code: Select all
snow_array = {}
for i = 0,63 do
label = "snow"
if (i < 10) then label = label .. "0" end
label = label .. i
gfx[label] = dsb_get_bitmap(path .. label)
-- Create an array of frames
snow_array[i+1] = gfx[label]
end
gfx.animated_snow = dsb_animate(snow_array, 0, delay)
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Argh, right, that's me totally once again misunderstanding the difference between a string ("gfx." .. label) and the actual pointer to the graphics entry (gfx[label])
I *keep* doing that. Mostly I find it and fix it, but I just didn't spot it this time
I *keep* doing that. Mostly I find it and fix it, but I just didn't spot it this time
- Gambit37
- Should eat more pies
- Posts: 13728
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Questions about DSB/ESB
Does an object's TYPE affect its rendering in the viewport in any way? For example, does setting to FLOORFLAT rather than FLOORUPRIGHT change the rendering order of items on a tile?
Similarly, does the CLASS affect rendering order?
Similarly, does the CLASS affect rendering order?