Wallsets

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
Mon Ful Ir
Adept
Posts: 221
Joined: Sat Jan 07, 2006 1:54 am
Location: Britain

Wallsets

Post by Mon Ful Ir »

Please could we have a wallset tutorial?
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: DSB Tutorials

Post by Sophia »

What kind of a wallset tutorial?

Wallsets seem to be some sort of a mystery but, basically, I don't understand what people don't understand.
dsb_make_wallset_ext has a mess of parameters, I admit, but it's already documented on the wiki...
Mon Ful Ir
Adept
Posts: 221
Joined: Sat Jan 07, 2006 1:54 am
Location: Britain

Re: DSB Tutorials

Post by Mon Ful Ir »

Sophia wrote:What kind of a wallset tutorial?

Wallsets seem to be some sort of a mystery but, basically, I don't understand what people don't understand.
dsb_make_wallset_ext has a mess of parameters, I admit, but it's already documented on the wiki...
The knowledge that there's a command called dsb_make_wallset_ext is probably all I needed. :)

The wiki page that I know about is this one. I couldn't find any mention of wallsets there, but using dsb_make_wallset_ext as a search term I've been able to find a page called DSB/Exposed functions which has a couple of lines of text about it. I ought to be able to work it out from there (and maybe post a tutorial for others).
Mon Ful Ir
Adept
Posts: 221
Joined: Sat Jan 07, 2006 1:54 am
Location: Britain

Re: DSB Tutorials

Post by Mon Ful Ir »

Nope, looks like I was overconfident there. The syntax is fooling me somehow.

What I wrote was:-

startup.lua

Code: Select all

lua_manifest = {
    "wallset.lua"
}
wallset.lua

Code: Select all

gfx.floor = dsb_get_bitmap("floor", "wallset/floor.png")
gfx.roof = dsb_get_bitmap("roof", "wallset/roof.png")
gfx.pers0 = dsb_get_bitmap("pers0", "wallset/pers0.png")
gfx.pers0alt = dsb_get_bitmap("pers0alt", "wallset/pers0alt.png")
gfx.pers1 = dsb_get_bitmap("pers1", "wallset/pers1.png")
gfx.pers1alt = dsb_get_bitmap("pers1alt", "wallset/pers1alt.png")
gfx.pers2 = dsb_get_bitmap("pers2", "wallset/pers2.png")
gfx.pers2alt = dsb_get_bitmap("pers2alt", "wallset/pers2alt.png")
gfx.pers3 = dsb_get_bitmap("pers3", "wallset/pers3.png")
gfx.pers3alt = dsb_get_bitmap("pers3alt", "wallset/pers3alt.png")
gfx.farwall3 = dsb_get_bitmap("farwall3", "wallset/farwall3.png")
gfx.farwall3alt = dsb_get_bitmap("farwall3alt", "wallset/farwall3alt.png")
gfx.front1 = dsb_get_bitmap("front1", "wallset/front1.png")
gfx.front2 = dsb_get_bitmap("front2", "wallset/front2.png")
gfx.front3 = dsb_get_bitmap("front3", "wallset/front3.png")
gfx.left1 = dsb_get_bitmap("left1", "wallset/left1.png")
gfx.left1alt = dsb_get_bitmap("left1alt", "wallset/left1alt.png")
gfx.left2 = dsb_get_bitmap("left2", "wallset/left2.png")
gfx.left2alt = dsb_get_bitmap("left2alt", "wallset/left2alt.png")
gfx.left3 = dsb_get_bitmap("left3", "wallset/left3.png")
gfx.left3alt = dsb_get_bitmap("left3alt", "wallset/left3alt.png")
--gfx.patch1 = dsb_get_bitmap("patch1", "wallset/patch1.png")
--gfx.patch2 = dsb_get_bitmap("patch2", "wallset/patch2.png")
--gfx.patch3 = dsb_get_bitmap("patch3", "wallset/patch3.png")
gfx.window = dsb_get_bitmap("window", "wallset/window.png")

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.front1, gfx.front2, gfx.front3, gfx.left1, gfx.left1alt, gfx.left2, gfx.left2alt, gfx.left3, gfx.left3alt, null, null, null, null, gfx.window) = mfi_wallset
There's an error in the last line ("unexpected symbol near =") -- huh? Am I not allowed to call my wallset mfi_wallset?

Also, you can see I've commented out patch etc. for the moment. Am I right in thinking that this is how you implement stairs and pits and things?
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: DSB Tutorials

Post by Sophia »

It's just a Lua syntax issue. Assignment always goes on the left.

Code: Select all

wallset.mfi_wallset = dsb_make_wallset_ext(... etc)
"Patches" can be nil for most wallsets and are pretty much deprecated. They were used in the old DM 2.x wallset to cover up the gap between bricks when you had a button on the wall, or something like that. I eventually decided I hated the whole mess and got rid of it all. The current DSB wallset doesn't need them, nor do most custom wallsets.
Mon Ful Ir
Adept
Posts: 221
Joined: Sat Jan 07, 2006 1:54 am
Location: Britain

Re: DSB Tutorials

Post by Mon Ful Ir »

Ah! It's always so simple. Thank you very much. :)

Is there a way to change staircases and pits in association with a particular wallset, or should I just clone a pit and a staircase?
Mon Ful Ir
Adept
Posts: 221
Joined: Sat Jan 07, 2006 1:54 am
Location: Britain

Re: DSB Tutorials

Post by Mon Ful Ir »

Incidentally, in lieu of a tutorial for anyone who needs one, here's an example.

mfi_wallset v0.1
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: DSB Tutorials

Post by Sophia »

Mon Ful Ir wrote:Is there a way to change staircases and pits in association with a particular wallset, or should I just clone a pit and a staircase?
Unlike DM, pits/stairs/etc. aren't special things associated with the wallset. They are just normal dungeon objects, so, yes, just clone them. :)
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Wallsets

Post by Gambit37 »

Wallset question: What's the rendering order for each tile?

I'm trying to make a wallset that's more organic and it's very hard to get the tiling right. It would help to know which walls sit on top of others (at each intersection of side wall and front wall).
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Re: Wallsets

Post by linflas »

@Mon Ful Ir: something was wrong with wallset example, so I've inverted pers1.png and pers1alt.png filenames. Now it looks good in DSB :)
"The only way out is another way in." Try Sukumvit's Labyrinth II
Post Reply