adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Thoughts on character implementation


From: Kai Sterker
Subject: Re: [Adonthell-devel] Thoughts on character implementation
Date: Sat, 8 Mar 2003 20:40:42 +0100

On Sat, 08 Mar 2003 15:01:29 +0100 Nils Fohrbeck wrote:

> As far as advancement of NPCs is concerned (programmwise). how about
> the following: There is an Object Character (or person) which has all
> the skills, but all of them are set to 0 (so this is pretty useless).
> Depending on which NPC (or even PC) you are you advance from there. So
> for example a wolf would be a character (the object) with improved
> melee, defense and life (but no skills). By defining how much the wolf
> improves per level, we can easily do the table you spoke of (such as
> +1 to all of these per level). The PCs are the only ones who can
> choose what to improve as they advance.

Well, that's not quite how I would do it. Because that way, all
creatures of a given level are exactly alike. That makes it easy for the
player to figure out their weaknesses and beat them.

What I would do is the following. I'll give a simple example. Say a wolf
has the following attributes:

strength, hardness, agility and willpower (plus the properties derived
from those four). No skills or anything else. For all wolves, we had one
global table like the following:

    Attribute   Cost    Maximum
    Strength    4       5
    Hardness    6       5
    Agility     2       8
    Willpower   8       1
 
Say we want a level 5 wolf, which means it had 25 advancement points to
spend. The algorithm would now look at the table, see that there are 4
attributes with given limits and costs and would randomly advance the
wolf until no more advancement points are left.

Code is attached.

Out come different wolves, even if they have the same level. And all in
all it's pretty easy. Of course, you'd also had to make sure that
important stats like health are greater than 0. The code works better if
there are more advancement points to spend (or advancements are
cheaper). But you should get the general idea.

As an improvement, one could add a list of preferred advancements, that
are done first. If advancement points are left afterwards, they would be
distributed randomly.

Kai

Attachment: char_generator.py
Description: Binary data


reply via email to

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