adonthell-devel
[Top][All Lists]
Advanced

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

[Adonthell-devel] Creature IDs


From: Andrew Phillips
Subject: [Adonthell-devel] Creature IDs
Date: Sun, 9 Jul 2006 15:52:10 -0500

As I was looking over the character class definition, I began to
wonder how we want to handle assigning unique IDs to each creature,
npc, and character, but for the engine, and for the editor.

My idea is to assign IDs to the npcs in the order they are created.
Determining the next ID in the sequence would be as simple as reading
in the last record from a given data file and incrementing that ID.

It seems to get a little more complex when dealing with creatures and
monsters, as they would be created once in the editor and then
possibly instantiated many times over. In order to deal with this
one-to-many relationship, I suggest that the template for each
creature have a multi-digit ID, where the first one or two digits are
the creature's type ID and the last one or two digits can be used to
track the number of instances.

For example, a given section of the map is occupied by winter wolves,
badgers, bears, and venomous snakes. The winter wolves have a base ID
of 1500. The Badgers are in the 1600 sequence,  the bears in 1700, and
the snakes in 2150. An individual wolf might be 1541.

Andrew




reply via email to

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