adonthell-devel
[Top][All Lists]
Advanced

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

[Adonthell-devel] On item slots and equipping items


From: Kai Sterker
Subject: [Adonthell-devel] On item slots and equipping items
Date: Mon, 10 Mar 2003 14:30:34 +0100

Some notes about equipping of items. As suggested earlier, characters
that can equip items would have a special "inventory" with a number of
named slots, where equipped items may go to.

So far we haven't really discussed what slots a character may have, so
lets do that now. I'll simply list the slots I can think of, then we can
decide which we want to use. Of course, we can always change things
later on, but for now it would be good to have something we can work
with and rely upon.

Possible Slots:
* Helmet
* Armour
* Weapon
* Left Ring
* Right Ring
* Amulet
* Boots
* Quiver
* Shield
* Gauntlets

Feel free to add more if you want. I just remember from the summer
meeting that we wanted to keep the list limited, but AFAIK we did not
come up with a final result.

Most items of the list should be clear. The only things that would be a
bit special are Quiver and Shield. When equipping a weapon that needs
ammunition, it would look for that in the Quiver slot. The Shield slot
can hold a shield, no matter whether one-handed or two-handed weapons
are equipped. However, shield bonus would only be considered when
one-handed weapons are used. I think that is more convenient than having
a "Left Hand" and "Right Hand" slot that can either hold a one-handed
weapon and a shield or just a two handed weapon.

Also note that slots could differ for different races without problems.
We could even add more slots at runtime. Like joining a certain faction
would allow one to wear some special kind of item in a slot of its own.
Whether we make use of that functionality is up to us and our rule
system. If we need it, functionality is already there. If we don't need
it, we don't have to use it.


The second part of this mail will deal with implementation details:

Equippable items will need a (list) of slots they may go in. That way,
we can automatically determine where an item should go when equipping it
and can also take care that items only go into the proper slot. So a
weapon would go into the "Weapon" slot, while a ring might go into
either "Left Ring" or "Right Ring" slots, etc.

Yesterday, I said that tests whether an item can be equipped by a
character or not should take place in the item's equip method. But now I
think that this is a bad design. Still, each item could optionally
provide a list of constraints, but they would be checked in the
character's equip method. The item::equip method would only be used to
apply any effects the item may have on the character when actually
equipping it.

That way, items can only be equipped by a call to character::equip which
takes care that characters can't equip items that are not meant for
them. That is, direct access to the "equipment inventory" would not be
possible.


Another thing worth mentioning is that the character carrying an item
and the character equipping it need not be the same. If we want, we
could limit this somewhat in the inventory GUI. For example, we could
check whether a path no longer than N units exists between the two
characters.


Well, so much for now. Now I'll go ahead and code some of the stuff.

Kai




reply via email to

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