[Top][All Lists]

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

Re: [Adonthell-devel] Adjustments to items.h ?

From: Kai Sterker
Subject: Re: [Adonthell-devel] Adjustments to items.h ?
Date: Thu, 14 Feb 2002 14:02:48 +0100 (CET)

On Thu, 14 Feb 2002 13:16:35 +0100 (CET) Kai Sterker wrote

> That would mean that item or character attributes are stored in a map,
> not as simple ints, so they can be accessed by name.

Actually, the more I think about it, the more convinced I am that item
attributes or modifiers shouldn't be hardcoded into the items.

Like the character or quest variables, they should be stored as
string/value pairs. To do that, you only need to inherit from the storage
class defined in storage.h. Then each item can have exactly the attributes
it needs, no more and no less.

That will make it much easier to add new items with new attributes at
later points without the need to change any existing code. It keeps the
classes smaller and reduces them to item handling. The items themselves
would come as data (in the date package), which only adds to our policy of
keeping code and data seperate.

With an item's possible actions delegated to python, we'll get an item
system that can easily be tailored to individual needs by providing the
according scripts and feeding items with the required attributes, whatever
those might be.

What do you think of that. Mike? Alex? Anyone?


reply via email to

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