adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Hello Hello


From: Kai Sterker
Subject: Re: [Adonthell-devel] Hello Hello
Date: Fri, 2 May 2003 18:33:39 +0200

On Fri, 02 May 2003 07:00:29 -0700 Mike Avery wrote:

> Kai, am I correct in my observation that currently the character
> classes don't have provisions for an "equipped" inventory?  Everything
> else seems to be in palce to facilitate it.

There's a python version of the character class that has some code in
place. It's among the code attached to this mail:
char-test/character/humanoid.py

I haven't added these things to the C++ side yet, as I am not entirely
sure how the character code should be organized. Besides, it's easier to
try things out in python, as there is no need to recompile.


> We can have the character class create an iventory for itself with
> named slots for:
> 
> head
> neck
> arms
> right_hand
> left_hand
> r_ring_finger
> l_ring_finger
> legs
> feet

Yeah. However, I suggested once that it might be better to have a weapon
and shield slot instead of right and left hand. That means you could
have a shield equipped, but it would not apply as long as you are using
a two-handed weapon. But at least there is no need to remove/equip a
shield whenever switching from one-handed to two-handed weapons and
back. Otherwise its okay.


> Does this make sense to you?  I see that some of the item code
> mentions the items storing methods to equip /  unequip iteself from a
> character slot, but I see no implementation.  Do we want to have the
> item class have these methods, or should the manager do this based on
> flags in the item object? The manager performing the actions seems to
> me as offering better code/data separation.

Yeah, I think so. Since items no longer apply their properties to the
character when being equipped, the manager could easily handle
equipping. The item would just provide the criterias, as you suggested.


> You mentioned that there was some code that wasn't in CVS.  What is
> the nature of this code?  Does it begin this work?

Not really. It's some python code I've written to test the item and
inventory implementation (Some sample items and some test cases). Some
code to implement the rules, and recently some code for damage effects.

It's all attached. Most of it needs to be rewritten, others (like the
base class for item templates (item.py)) should be pretty much okay,
although it might lack a few things. Have a look and see for yourself.

Most of that code requires pydonthell to run (which you'll find in the
tools directory of the adonthell code). Some code may not even work
anymore. What you may want to have a look at is char_generator.py, as it
now makes use of the effect objects. Which is the direction we want to
go. However, the current implementation is still very rough.

Anyway, have a look to see if something useful is among the code.

Kai

Attachment: char-test.tar.gz
Description: GNU Zip compressed data


reply via email to

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