adonthell-devel
[Top][All Lists]
Advanced

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

[Adonthell-devel] Character thoughts


From: Kai Sterker
Subject: [Adonthell-devel] Character thoughts
Date: Wed, 19 Feb 2003 12:37:21 +0100

I had some thoughts about various character related issues (stats,
inventories, schedules) that I'd like to discuss. So here we go:


Stats or character implementation in general:
=============================================

Seeing how the item implementation works pretty well, I'd suggest
something similar for characters. All the basic character stuff mainly
required by the engine would be kept on C++ side. Everything else
(mainly stats and other game rule related things) would go into a Python
character class. That way, characters will be as flexible as everything
else. Certainly more flexible than the current list of (string, int)
pairs for character attributes.


Inventory and equipment:
========================

Obviously, each character would have an inventory for carrying items
around. The inventory implementation itself is very flexible regarding
any inventory rules. That is, it does not place any constraints on the
amount or weight a character can carry. If we want any limitations, they
have to be implemented in the Python character class or the inventory
GUI, I assume. Again, this gives us a lot of flexibility.

Apart from the inventory with items the character carries, there would
also be an inventory with the items the character wears. Here we could
make use of the "named slots" feature. That is, slots can be given an id
to access them later on via that id. That way, we can define all the
slots a character has for wearing items. Again, we are not limited to a
number or type of slots. Different characters could even have different
slots. The actual rules would again be implemented on Python side. For
example, an item would "know" the slot(s) it fits, so the "equip" method
could make sure that everything goes into the proper slot.

As a benefit, the combat system can easily access equipment relevant for
its calculations. No need to search all items for the one that is
equipped. It'll know the slot id and can easily retrieve the item in
question.


Schedules and interaction:
==========================

My first approach to make character behaviour more life-like was making
schedules modular. That certainly makes them easier to write and more
reusable too, but it does not necessarily improve character behaviour.
Right now I believe that "natural" behaviour involves (and requires)
interaction. That is, characters should not simply act completely on
their own, but should react to other characters and events.

For example, Orloth should not walk randomly up to tables to place or
pick up mugs. Characters that happen to be at the table should "call"
him instead. Basically, that means a character's schedule must be
accessible from other characters, so that they can launch certain
activities. Of course, characters would also have their own "will", so
that they do stuff although nobody interacts with them at the moment.

I think figuring out such interactions and implementing them will not be
that hard. Often, the resulting actions won't be very complex. However,
the more characters interact with each other, the more complex (and
unpredictable) the outcome.

To simplify things even more, we should provide some common
functionality required by different actions. For example some sort of
priority system to resolve conflicts between actions. And a queue for
actions of equal priority. And probably much more ...

Again, the goal is to have "simple" and generic action methods that get
all the important information as arguments at runtime. That is, the
"bring_mug_to_table" action would work with every table and also with
every bartender.

A character schedule itself would be composed of a number of "calls" the
character responds to. Those might of course initiate other actions of
other characters, if possible. That way a single call might indirectly
influence other characters too, and perhaps even the initial sender.
And it would have a mostly unique section, where information required by
those actions could be defined.

Actions could be triggered not only by characters, but also by events,
for example at a certain time.


Well, that was about everything I can think of right now. Maybe I'll
dive a little deeper into the character schedule stuff.

Anyway, comments and suggestions welcome, as usual.

Kai




reply via email to

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