SpecKey

From HEWIKI
Jump to: navigation, search

A SpecKey refers to a Spec in a Spec Oracle. This SpecKey is then used to build the spec's unique file name, or retrieve the Spec via HeroScript.

A Spec Oracle is a prototype which contains a map of unique SpecKeys to a prototype representing the Spec.

Specs are given unique names based on a combination of a prefix associated with a particular Spec Oracle, and the SpecKey. For example, in an Item Spec Oracle, all of the item specs would have prototypes named "ItemSpec + <SpecKey>".

Specs require a unique file extension, which is specified in the associated Class Methods Script. When a spec is saved to the Repository, it is assigned a name of "<SpecKey> + FileExtension".

In HeroScript, Specs are retrieved by their SpecKey. For example, to get a Spec on the Server:

oracle.GetSpecByKey( key )

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox