From The Mana World

I have been working / thinking on how an inventory system might be implemented in the new server. While doing this, I came across some problems with naming conventions. To resolve these issues I would like to propose the following:


Renaming stats to attributes

The current use of these in the code are:

  • Rawstats, defined during character creation and increased after level up. The rawstats are; strength, agility, vitality, intelligence, dexterity and luck.
  • Statistics or calculated stats. These are calclated from the rawstats. The statistics are; heat, attack, defence, magic, accuracy and speed.


My problem with the current use of stats or statistics

First of lets start with the word itself, The Free Dictionary defines statistics as:

  1. (used with a sing. verb) The mathematics of the collection, organization, and interpretation of numerical data, especially the analysis of population characteristics by inference from sampling.
  2. (used with a pl. verb) Numerical data.


So basically statistics would mean numerical data, I expect there will be a lot of that in the code base, as it nears completion. Especially statistics spring to mind, as in number_of_attacks, monsters_killed or beers_drunken to name a few. My point being: it is not precise enough.

Secondly, my work on equipment and attribute modifying items, has let me to conclude that four lists of attributes are needed to describe the characteristics of a single being:

  • Base attributes - the character without equipment or items.
  • Base modifiers - additions to or subtractions from the base, both time based and permanent (for example Gloin's Axe Of Glory And Increased Strength or Wicked Potion Of Double Intelligence For Two Minutes).
  • Derived attribute modifiers - the bonuses or maluses to the derived (calculated) attributes of the character. Originating from equipment and items (for example; simple weaponry, which increases attack; or quid-pro-quo items like an Amulet Of The Barbarian increasing attack and speed at the cost of defence an accuracy).
  • Compound attributes - a list of all base and derived attributes after the modifiers have been applied.

And, quite frankly, I ran out of adjectives which could be used with statistics in a meaningfull way.

For additional information on naming conventions in RPG games I would like to direct you to A comprehensive Wikipedia page on the subject.


Renaming Player to Character on the account server

In my view Player should allways be the interpretation or representation of the physical human who's playing the game. On the account server that would be the person owning an account, which has several characters. On the game-server that would be the playable character. The main reason for my renaming proposal is the current PlayerData class. The game server's Player class inherits from both Being and PlayerData, these classes do not fit together. The base attributes of a being, for example, are reimplemented in the PlayerData class to be available to the account server. The implementation of inventory is simplistic, as it should be on the account server, which would cause multiple calls to ItemManager for every action of a Player on the game server. Concluding, the Player class needs specialisation which PlayerData can not provide.

I would therefore propose moving PlayerData to the account-server directory and renaming it to CharacterData, after which it can be modified to fit the specific needs of the account server. The Player class, or it's members, can then be modified to fit better and perform faster on the game server. I would propose (based on Bjørn's suggestion) renaming the Player class to Character for the sake of consistency.


I would welcome your thought and comments on both subjects. As a side note, I've completed the account server side of the Player to Character renaming in my working copy allready. Avaniel 19:06, 12 February 2007 (CET)