BaseActor

documents. BaseActor

The base Actor model definition which defines common behavior of an Actor document between both client and server.

Constructor

new BaseActor()

Properties:
Name Type Description
data data.ActorData

The constructed data object for the document.

Extends

  • Document

Members

(static) metadata

(static) schema

effects

A reference to the Collection of embedded ActiveEffect instances in the Actor document, indexed by _id.

items

A reference to the Collection of embedded Item instances in the Actor document, indexed by _id.

Methods

(async) _preCreate()

(async) _preUpdate()

migrateSystemData(options) → {object}

See:
  • mergeObject

Migrate the system data object to conform to data model defined by the current system version.

Parameters:
Name Type Description
options object

Options which customize how the system data is migrated.

Properties
Name Type Description
insertKeys boolean

Retain keys which exist in the current data, but not the model

insertValues boolean

Retain inner-object values which exist in the current data, but not the model

enforceTypes boolean

Require that data types match the model exactly to be retained

Returns:

The migrated system data object, not yet saved to the database

Type
object