Wallitems multiple views / offsets

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
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Wallitems multiple views / offsets

Post by Gambit37 »

I've found some issues with wallitems:

* I can't seem to set an alternate flipped side view for asymetrical items
* Offsets aren't calculated correctly (things look great at front view, but med and far views can be off by a few pixels, so some items that align with the floor seem to be floating)
* How do I offset a cloned wallwriting text and change the line spacing and font colour (for the street sign thing I discussed previously)?

Any way of overcoming these issues? Ideally, I'll like to be able to control the offsets manually for every distant view, and assign another bitmap for the flipped side view.
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Wallitems multiple views / offsets

Post by Sophia »

Gambit37 wrote:I can't seem to set an alternate flipped side view for asymetrical items
Yes you can. Use the other_side property when defining the arch.
Gambit37 wrote:Offsets aren't calculated correctly (things look great at front view, but med and far views can be off by a few pixels, so some items that align with the floor seem to be floating)
You can use mid_y_tweak and far_y_tweak to compensate for this. Look for examples in base/graphics.lua.
Gambit37 wrote:How do I offset a cloned wallwriting text and change the line spacing and font colour (for the street sign thing I discussed previously)?
The font is set as part of the arch (in the font property) and for its position it uses whatever the position would be of the normal bitmap, i.e., the scraggly text you get at a distance. The internal offsets for the writing are currently hardcoded, but I'll fix that.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Wallitems multiple views / offsets

Post by Gambit37 »

Aha, right, I thought you'd previously mentioned other offset types, but I couldn't find them. Thanks :-)
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Wallitems multiple views / offsets

Post by Gambit37 »

Sort of related, is it possible to place a wallitem on the floor and still have it appear in the dungeon as a walliietm? The editor allows it, but the objects don't show up in game.
There are some design issues that I could much more easily overcome with wallitems placed in this way, rather than doing very complicated and strange hacks with regular floor items ;-)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Wallitems multiple views / offsets

Post by Sophia »

Well, I'd have to make it an option, because otherwise pretty much every standard dungeon would break. They all expect that movable walls with wallitems on them will hide the wallitems when they deactivate, not leave wallitems floating in space.

That's not a huge deal. However, I'm not sure what's to be gained here that can't be accomplished by flooruprights.

I mean, if I make them just "show up," there will be some significant problems with these floating wallitems that I have no intention of exerting any effort to fix, because my todo list is long enough and this request is kind of weird.

:arrow: They'll only be visible from one side, because wallitems on the "back" of a wall are never drawn-- since there's a wall in the way.
:arrow: They won't be drawn if you're in the same square as them, because that would normally mean you're inside a wall which is an undefined state in DM.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Wallitems multiple views / offsets

Post by Gambit37 »

OK, I see, yes it's a weird request, I was just wondering if it was possible.

I was thinking it might be possible to use this effect to create the sliver-like fences from Bloodwych, where they sit on the border between two tiles, but I now realised that handling all the collision detection and blocking for that would be hugely problematic in the DM engine (given that blockers are expected to take up space within an entire tile, not at the edges of it), so yeah, probably best to leave well alone ;-)

So, thinking about floor-items instead, is there a way of allowing creatures to enter the space occupied by a blocking floor-item, but still have the floor-item block the party's movement?

EDIT: I think somehting like this might work?

Code: Select all

obj.party_blocker = {
	type="FLOORUPRIGHT",
	col=table_collision,
	no_monsters = false
}
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Wallitems multiple views / offsets

Post by Sophia »

Gambit37 wrote:I think somehting like this might work?
That code will allow objects and monsters into the square, but not allow the party. So if that's what you want, that will work fine. :)
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Wallitems multiple views / offsets

Post by Gambit37 »

Cool 8)
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Wallitems multiple views / offsets

Post by Gambit37 »

I tried doing these 'sliver' type blockers that should look as though they are on the borders of tiles. It *is* doable, but it's pretty complicated and time consuming to design and setup (requires qswappers, directional triggers, and multi-view items for each possible orientation), so I decided to forget about it and just do a normal blocker that sits in the middle of a tile. It does make the effect look a little odd now (it seems as if the party are being blocked by something a few feet away), but it's not too bad and saves a ton of work. ;-)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Wallitems multiple views / offsets

Post by Sophia »

I think that if any sort of "fence" type walls will ever be supported in DSB, they'd be need to be given support within the engine itself for them to result in anything that isn't completely terrible.
Post Reply