Aspect

From Wildermyth Wiki
Revision as of 02:50, 22 December 2019 by Peffers (talk | contribs) (→‎Hooks)

Aspects are named markers tied to entities, usually reflecting their narrative state, that add stats or apply specific effects.

For heroes, aspects are just facts about the hero. Stuff like "human", "female", "attractedToMen", "hunter", "missingLeftArm". Aspects can carry stat modifiers and Effects. Aspects are the workhorse of the dynamic content in the game, almost everything you need to know about a hero, site, anything really, can be accessed as an aspect (other than stat values). Aspects can be queried to find out almost anything about an entity (other than history, but that applies aspects that can be queried).

Aspects can be temporary, like status effects (poisoned) or combat modifiers (combatModifier_buff_courage), or more permanent, like theme pieces (themePiece_fire_leftArm) or class upgrade abilities (hunterDeck_quellingmoss).

(For a more general overview of how aspects relate to other parts of Wildermyth, see the Data Format Overview)

Aspect Parameters

Aspects can be parameterized, which looks like this: "boss_knockbackMelee|6|6+1d3".

Parameterized aspects work by literally doing a find/replace in the aspect json itself, so when creating a parameterized aspect, use a parameter name that's unique, and then define the parameter in the parameters section. You can then use that parameter value to pass the entity id to the effect, and the effect can read it using matchSpecial -> parameter1

The pipe character | delimits parameters for both effects and aspects, parameters need to be defined for aspects in order to be passed on, but they don't need to be explicitly defined for effects.

Aspect parameters can be used to store a relationship with a particular entity. In this case the entity's id will be used as the parameter content, and be passed down to effects as well. Effects can also target based on aspect relationships.

Hooks

Hooks are a special subcategory of aspects, which are usually designated when a hero is first generated, and are used to trigger hook quests.