adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Doors and chests


From: Kai Sterker
Subject: [Adonthell-devel] Doors and chests
Date: Fri, 11 Sep 2009 21:00:14 +0200

I should probably be creating more models and then the Waste's Edge
ground floor map (and I might do some more of that over the weekend),
but right now I'm more into design and writing new code.

One piece that we will need for the Waste's Edge remake is
opening/closing of doors (the gate and entrance to the inn come to
mind). In v0.3, they weren't handled in a special way. The opening and
closing of the gate was tied to the intro script (or initial
dialogue). And the entrance to the inn was triggered by entering or
leaving the tile in front of the door.

For v0.4, doors should be objects with a state (open, closed, locked)
that is reflected by a matching sprite. I imagine that they could be
implemented as "items" via a generic "door" template that would take
care of additional door properties. To mind come id/name of the key
that fits to the door, difficulty of the lock (for lock-picking) or
strength of the door (for forcing it open). OTOH, unlike items, doors
can't be picked up and they behave somewhat different. As much as I'd
like to have generic code, I think it might be better to implement
them similar to items, but separate.

Quite similar to doors are chests (or more generally speaking,
containers). They can be opened, closed, locked and (possibly) broken
and thus share the same attributes as doors. On top of that, they have
an inventory and can contain some items. But regardless of that I
still think that containers fall into the same category as doors and
could share a common implementation.

So here is what would be required:
* Another type of map object together with an implementation to take
care of the sprite handling (much like world::character).
* An implementation on rpg side, similar to rpg::item, except specific
to doors and containers
* The integration with the action scripts
(test/data/schedules/char/actions.py) to open/close/unlock/lock/bash
doors and containers.

I won't start immediately with the implementation, so if somebody
wants to step in, feel free.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]