adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] items & inventory


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] items & inventory
Date: 25 Mar 2002 10:39:25 +0100

> > The item_base class looks fine for me (so far), and I thought about 
> > creating a inventory class where item_base objects are stored. Each 
> > character_base then has an associated inventory object. Therefore it
> > is reasonable to store the amount of money that a character posseses
> > in that inventory class as well.
> 
> Yes. That's reasonable.

Just fine!

> However, the inventory(_base) shouldn't get too character specific. For
> instance, containers like chests or bags and the like would possibly
> have an inventory as well. As might have whole maps, to store all items
> located on the map. Each of them will have special requirements, but it
> would probably make sense if they'd share a common base class.

Right. This kind implementation obviously appear to be the right way to
do it.

> > The inventory class has member functions that allow to add/remove 
> > items, add/subtract money, iterate through the inventory and move
> > items from one inventory to another.
> > Of course the character_base has to hold a pointer of the character's 
> > inventory.
> > 
> > So we have the dependencies
> > character_base --> inventory_base --> item_base
> > 
> > I think there should also be pointers to the respective parents in the
> > item_base/inventory_base classes.
> > Well, tell me what you think :-)
> 
> Yes, looks good so far :). 

Nothing to add! Be carefull about the way to save the inventories. There
are certainly several possible ways, but they depend on the way the
objects are stored. They can all be saved with the inventory (bad way,
I'd say) or, as objects are rather represented by Python objects, the
inventory should maybe contain the names of each object, plus their
state (will have to save the objects state as well!). But there's no
need to worry too much about this for now, not before something basic is
working. All your proposal makes full sense to me! :)

> > PS: some general note on the CVS code: the _only_ versions of 
> > autoconf/automake/libtool that worked for me were autoconf 
> > 2.13/automake 1.4 and libtool 1.3.4... especially newer libtool 
> > versions seem to be a problem. Just to let you know, maybe there
> > should be some hint on the webpage...
> 
> Oh. I'll add a note on this tomorrow. Never really tried anything else.
> Currently running 2.13/1.4/1.35 on this box.

Maybe we should try to make newer versions working as well - could you
give more details on what the problem is?

Oh, btw, sorry for the lack of participation these days (seems to be
general ;)) - have a few work at univ, and spent most of my time making
drafts for the pseudo-3D representation of objects. It REALLY seems to
be the right thing to do. Ah, haven't forgot about the Windows port
neither - it should be coming soon! ;)

Alex.
-- 
http://www.gnurou.org





reply via email to

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