There are several objects that must be globally available to all game modes because they are used in more than one mode. For example, items, equipment, and characters. This page provides an overview of the global classes in Allacrost, how to manipulate these objects, and how they interact with one another. A skeleton view of these classes is below in the UML class diagram.
GlobalObject is an abstract class that represents all of the inanimate, tangible things that the player may have possession of. Every object in the game has a unique ID number, and this ID number is what is used to refer to that specific object. The only exception to this is the ID number "0", which is not assigned to any particular object.
GlobalItem represents all classes of items that may be used by the player. This includes special/key/event objects, which are required for the player to be able to proceed through certain parts of the game, but can never truly be "used" by the player otherwise. Some items may only be used if certain criteria are met, such as items that may only be used during battle. Items can do virtually anything imaginable, but the most common usages are to better the state of characters or worsen the state of enemies.
GlobalWeapon is a class that represents all brands of weapons, from swords to bows to staves. The only distinction between the types of weapons (as far as the class is concerned) is a single member of the class that indicates which characters may equip the weapon. Because the distinction between the types of weapons is so minimal, there exists only this single class to represent all weapons which may be equipped. Weapons effectively serve to boost the character's attack rating, and sometimes may also provide small bonuses to other character stats. There are actually two types of attack ratings: physical and metaphysical, and a weapon may increase either one or both of those ratings. Attack ratings are further discussed later.
GlobalArmor represents any piece of defensive wear that a character (or sometimes an enemy) may equip. There are four types of armor in Allacrost: head armor, torso armor, arm armor, and leg armor. Except for the fact that these armor can only be equipped on certain parts of the body, they are identical in structure and thus do not merit having their own sub-class; The different types of armor are discerned by a "types" member inside the class. It is important to note that armor can only protect what it is equipped on. For example, equipping a piece of torso armor with a very high defense rating does absolutely nothing to protect the character's head.
An actor is a general name given for living, animate beings in the world of Allacrost. Here, we discuss actors as entities which may have a presence in battles, either as characters or enemies. There is an abstract GlobalActor class that both character and enemy classes inherit from, but this class is mostly for convenience and code re-use.
All actors share the common attributes in the table below
|Attribute Name||Description / Purpose|
|Health||The current number of hit points (HP).|
|Maximum Health||The highest number of hit points (HP) that an actor may have.|
|Skill Points||The current number of skill points (SP).|
|Maximum Skill Points||The highest number of skill points (SP) that an actor may have.|
|Experience Level||A single number representing the general experience of the actor.|
|Experience Points to Next Level||The number of experience points (XP) required to increase the experience level.|
|Strength||Affects physical attack rating|
|Vigor||Affects metaphysical attack rating|
|Fortitude||Affects all defense ratings|
|Stamina||Affects the rate of recovery between actions|