Permanent Variable Usage

Object Variables (OV's) are persistant variables. They are always specific to the particular agent and so can be used to record some information about any agent in the world. For example, you could use an OV to record the age of an agent (how many ticks it has existed for) ... how hungry the agents is ... or many other uses that involve recording and altering some persistant information about state.

For many of the animal agents in Creatures 3 OV's were used consistently across multiple agents. This has many advantages, a few of which are listed below:
- Easy readability: If OV's are used in a standard way then it makes it easier for others to read through your COS files.
- Easy communication: If one agent wants to check something about another agent (by checking the value of an OV), it is simpler to do if the OV's are used in a standard way. For example, if you want to check the age of an agent it is trivial if you know that all agents use OV01 to record age. But if there were no standards then you'd need to know the specifics of that agent, and how it used OV's.

The table below shows how OV's were used in the creation of animal agents in Creatures 3 (plants and machinery generally used different schemes because the states needed to be stored had little in common with animals).

Object VariableNameDescription
OV00StateMost agents have a specific set of states that they can be in ... by concensus OV00 is used to record this. The actually states defined by OV00 can vary with each agent.
OV01AgeThis is used to keep track of how long an agent has 'lived' for. This is usually incremented in a timer script (for example, each timer that is executed increments this value by 1) and can be used to trigger age related behaviour. Examples include: dying of old age, reaching sexual maturity with age, counting individuals of a certain age range etc.
OV02Energy levelThis is used to keep track of an agents' individual energy store. This is usually increased when the agent feeds and decreased while it moves or lives. Death can be triggered in an agent when this goes below zero ... or frantic behaviour triggered when health is low.
   
OV05Stage of LifeThis can be used (in conjunction with OV01) to record a general age grouping for the agent. The scheme that is used is: 0=baby, 1=youth, 2=adult.
OV06GenderUsed to specify a gender for an agent. Not all agents use gender, but those that do use the following scheme: 0=male, 1=female.
OV07Caste (role)Used to differentiate between members who share a classifier but perform different functions. An example would be for Bees ... with one value representing a worker and another value representing a queen.
   
OV10X-heading

Used to store the X direction the agent is moving in (or intends to move in). Values are: -1=left, 0=none, +1=right.
This is often used to work out the animation to be played, or utilised by another agent to work out which way it is heading.

OV11Y-headingUsed to store Y direction the agent is moving in (or intends to move). Values are: -1=up, 0=none, +1=down.
OV12 - OV15other velocity related informationThese variables were used in specific agents if more information needed to be stored relating to velocity (for example, previous velocity, previous heading etc)
OV16Current targetThis stores the agent who is the focus of the current agent. For example, if the grazer is looking for a plant ... and finds some grass within range it will store the ID of the grass in this variable so that it can then home in on it.
OV17 - OV19TARG related variablesThese variables are used by various agents to store pointers to other objects. These are generally used because the agent needs to store more than one targ ID and so OV16 is not sufficient.
OV20 - OV29Drive related variablesWhen we created agents that replicated a drive system in them we used these variables to store the state of the drives.
OV30 - OV49Base pose number variablesWe used these variables to store pose information about an agent. For example, many agents of 'sets' of animation in the sprite file - say 12 eating frames starting at image 34. These variables were used to set the base command whenever one of these sets was queued for playing ... this provided many advantages including the fact that pose information was contained in one place (at the beginning of the COS file) so that any changes to the sprite file were easy to adapt. If this method wasn't used then it would have been a harder job to change the COS file if the sprite file changed because all instances of pose changing would have to be investigated and altered, rather than simply changing one variable.
   
OV60Wetness monitorThis variable was used by the wetness designator agent and was responsible for making things drip if they went in the water. The wetness agent automatically increases this variable whenever the agent is in water ... and decreases it and produces a drip when it leaves the water. A value of 0 means it has no need to drip at the moment.
OV61Bioenergy of agentThis variable records the bioenergy of the agent. The bioenergy value is used to calculate the cost to replicate the agent (using the replicator agent) and also states how much bioenergy the ship gains if the agent is recycled.

Values of 0 mean that the agent can not be recycled or replicated.