Profession

Profession

Represents a character profession with associated traits, equipment, and behavioral patterns. Defines the template for creating characters with specific professional backgrounds.

Constructor

new Profession(paramsopt)

Description:
  • Creates a new Profession instance.

Source:
Parameters:
Name Type Attributes Default Description
params Object <optional>
{}

Configuration parameters for the profession

Properties
Name Type Attributes Default Description
names Array.<String> <optional>
[]

Possible names for this profession (all are synonyms)

kit String <optional>
null

A tag query to select an equipment kit for this profession

seeds Array.<String> <optional>
[]

Starting traits common to all characters holding this profession

traits Object <optional>
{}

Traits that this character may be trained or experienced in

tags Array.<String> <optional>
[]

Array of tags to categorize this profession

frequency String <optional>
"common"

How commonly this profession appears (common, rare, etc.)

postprocess function <optional>

Optional post-processing function to apply after character creation

Extends

Members

tags

Description:
  • An array of string tags that characterize this item.

Source:
Overrides:
Properties:
Name Type Description
tags Set

An array of string tags that characterize this item.

Methods

asJSON() → {String}

Description:
  • Converts the model to JSON, converting sets to arrays.

Source:
Overrides:
Returns:

JSON

Type
String

has(tag) → {Boolean}

Description:
  • Does this model have the given tag?

Source:
Overrides:
Parameters:
Name Type Description
tag String
Returns:

true if it does, false otherwise

Type
Boolean

is(tag) → {Boolean}

Description:
  • Does this model have the given tag?

Source:
Overrides:
Parameters:
Name Type Description
tag String
Returns:

true if it does, false otherwise

Type
Boolean

not(tag) → {Boolean}

Description:
  • Does this model not have the given tag?

Source:
Overrides:
Parameters:
Name Type Description
tag String
Returns:

true if it does not have the tag, false otherwise

Type
Boolean

typeOf(prefix) → {String}

Description:
  • Given a prefix like ammo or media, will return the specific tag for this item, such as ammo:22 or media:35mm.

Source:
Overrides:
Parameters:
Name Type Description
prefix String

the prefix to match

Returns:

the first tag found that matches this prefix

Type
String