Page 1 of 1

Wallset

Posted: Sat Feb 02, 2013 10:59 pm
by Ser Xav
Is it possible to have more than one type of wallset graphic on the same level? Ie can I have a plain wall - wallset_front1.pcx, wallset_pers1.pcx, etc- and also on the same level have a wallset_front1_alternative1.pcx, wallset_pers1_alternative1.pcx, etc?

Re: Wallset

Posted: Sun Feb 03, 2013 4:34 am
by Sophia
I'm not totally sure what you're asking.

You can specify alternative bitmaps within the same wallset (as is done in DM) and you can also specify different wallsets on the same level, by defining another wallset and then using the ability of ESB to paint wallsets. (Choose one from under "Wallsets")

Note: The first time you use a wallset, you'll have to tell ESB it exists by typing it into the dungeon's "Global Options" window. After that, you'll be able to select it.

Re: Wallset

Posted: Sun Feb 03, 2013 9:31 pm
by Ser Xav
Oh I see, so taking your test dungeon example, this defines a new wallset:

Code: Select all

 
wallset.redfloor = dsb_make_wallset_ext(gfx.redfloor, gfx.redroof, gfx.pers0, gfx.pers0alt,
	gfx.pers1, gfx.pers1alt, gfx.pers2, gfx.pers2alt, gfx.pers3, gfx.pers3alt,
	gfx.farwall3, gfx.farwall3alt, gfx.front1, gfx.front2, gfx.front3,
	gfx.left1, gfx.left1alt, gfx.left2, gfx.left2alt, gfx.left3, gfx.left3alt, gfx.wallwindow)
...where wallset.redfloor defines a wallset called 'redfloor'.

And in that code all of the standard wallset graphics are present and correct except those that have been defined as additional to the default graphicd by placing a custom bitmap for the two new ones, through this code:

Code: Select all

gfx.redfloor = dsb_get_bitmap("REDFLOOR")
gfx.redroof = dsb_get_bitmap("REDROOF")
...which defines the custom bitmaps, and which the the wallset.redfloor then references.

Is there something special about the order of the bitmaps names in the new wallset definition? Is the first slot always the 'floor', for example, the fifth slot always the equivalent of the gfx.pers1alt?

Re: Wallset

Posted: Sun Feb 03, 2013 10:19 pm
by Sophia
Actually, what's happening is that dsb_make_wallset_ext creates a new wallset inside of the DSB core. A reference to that new wallset is then stored in wallset.redfloor. There is nothing requiring that wallsets be stored in the wallset table, but DSB and ESB are designed around the expectation that they will be, and there's really no good reason (that I can think of right now, anyway) to break that.

Otherwise, you have the right idea.
ebeneezergude wrote:Is there something special about the order of the bitmaps names in the new wallset definition? Is the first slot always the 'floor', for example, the fifth slot always the equivalent of the gfx.pers1alt?
Correct. Each parameter expects the bitmap associated with a certain position in the viewport.

Re: Wallset

Posted: Mon Feb 25, 2013 4:05 pm
by Ser Xav
So have tried to create a wallset, using this code in the graphics.lua file (replacing only one graphic for now):

Code: Select all


gfx.darkwall = dsb_get_bitmap("DARKWALL")

wallset.darkwall = dsb_make_wallset_ext(gfx.floor, gfx.roof, gfx.pers0, gfx.pers0alt,
	gfx.pers1, gfx.pers1alt, gfx.pers2, gfx.pers2alt, gfx.pers3, gfx.pers3alt,
	gfx.farwall3, gfx.farwall3alt, gfx.darkwall, gfx.front2, gfx.front3,
	gfx.left1, gfx.left1alt, gfx.left2, gfx.left2alt, gfx.left3, gfx.left3alt, gfx.wallwindow)

...with a "darkwall.bmp" file sitting in the dungeon folder.

The problem is, this new wallset does not show up as an entry in ESB. Am not sure what I am doing wrong... any suggestions? :?

Thanks :)

EDIT: Just saw your note on the GlobalInfo box where I needed to add the wallset name in there. All works fine now. Thanks anyway.