The classes in the model system are (at least in mid-July 2005), in a vague UML-ish syntax, arranged somewhat like:


(Editable Visio version)

Random Actors

(Original discussion)

Selections are made at three levels:

  • Global - e.g. "Winter".
  • Entity - e.g. "Chop".
  • Actor - e.g. "Helmet B". (The same selections are used for the base actor and all prop actors.)

Global-level selections are currently unimplemented.

Entity-level selections are set by CUnit::!SelectEntityVariant(name) (currently only one selection can be made at a time, since I assume that's the most convenient interface), which is called by the entity when its state changes (e.g. when it starts chopping wood). (TODO: Determine what "state" means, and the exact strings that should be used.)

Actor-level selections are usually either specified when reading the map (for units that were created in the editor, or for loading a saved game), or else are not specified at all. When they are not specified, random selections will be made and then added to the actor selections list. (TODO: Should/can this be network-synchronised?)

The selections, and the resultant variation, are remembered in the !ObjectEntry. When changes are made to the selections, the !ObjectEntry rebuilds its model data to match the new variation.

Last modified 14 years ago Last modified on Feb 23, 2008, 4:18:59 AM
Note: See TracWiki for help on using the wiki.