Outcomes

From Wildermyth Wiki

Outcomes are things that happen! Generally, you'll be seeing these in the context of Effects. Outcomes can make a lot of things happen, usually via events and abilities. Event Outcomes usually include things like granting resources or relationship points, applying a Theme or Aspect to a hero, starting a Mission, or causing another event to happen. Ability Outcomes generally include things like making an attack roll, dealing damage, moving, adjusting stats in some way, or modifying scenery on the map.

(For some less technical descriptions, take a look at the Types of Outcomes we support. For a more general overview of how outcomes relate to other parts of Wildermyth, see the Data Format Overview)

General

All Outcomes have the following fields:

  • STUB: for developer-facing documentation, or to note unimplemented but intended functionality.
  • choose: Sometimes there is more than one target for a given role. If so, does this outcome apply to all targets? or one at random?
  • target: Who (or what) does this outcome affect? All of the individual pieces will target this entity.

Description

Show a story dialog! This shows a story with no player choices at the end (unlike CHOICE targets, which are used to show stories with choices at the end)

  • lightweight: If true and if the context is appropriate, show this content in-world instead of in a full Story Dialog. (i.e. the comic panels will be shown at the bottom of the screen instead of full-screen, like with callDownVolleyOfArrows)
  • blockOtherChanges: If true, the outcomes after this won't occur until after this Description is over. Useful for cases when you want this event to grant an item or add calamities after the comic shows.
  • finalButtonText: Should the final button of this comic have specific text? (By default, the final button will show "Done")
  • script: The actual comic panels to show. (Edit using the comics editor)

RelationshipPoints

Adds relationship points to the given roles, or changes the relationship between roles.

  • amount: The number of relationship points to grant
  • who: Who to grant the relationship points to (RP is distributed evenly between all relationship pairs)
  • scaling: What to multiply the amount by. None: Distribute exactly the amount of RP given. People: Multiply by the number of individuals in the given roles. Ships: multiply by the number of relationship pairs. (i.e. each relationship will get the given amount of RP)
  • forceChangeRelationshipTo: Force the relationship type between individuals (for lover/rival, "who" must contain exactly two individuals)

GrantXP

Grant XP to the given target

  • grantXP: The amount of XP to grant

UpgradeGear

Shows a Gear Choice popup allowing heroes to replace an existing item.

  • query: Run this query on the target (hero) and offer the results to the player
    • forceItemId: Create a specific item by id
    • itemIdByExpression: Grant the first item in this list for which the expression meets the threshold
      • expression: Expression to check against the threshold
      • threshold: If expression meets this threshold, grant the item
      • itemId: Item to grant
    • chapterModifier: Add this modifier to the chapter we pick gear for (i.e. if chapterModifier=1, the created gear will be better tier, something you would generally expect to see in the next chapter)
    • allowArmor: Can the created item be armor?
    • allowWeapon: Can the created item be a weapon?
    • allowAugment: Can the created item be an augment?
    • allowOffhand: Can the created item be an offhand?
    • specificAugment: Create a specific type of augment
    • element: Create an elemental weapon! This is commonly used with UpgradeGear.upgradeWeapon to turn a weapon into an elemental weapon. Note that granting an elemental weapon will always unlock that weapon group for crafting.
  • chapterModifier: If not null, add this modifier to the chapter we pick gear for (i.e. if chapterModifier=1, the created gear will be better tier, something you would generally expect to see in the next chapter) (Overwrites query.chapterModifier, useful if you want to use an Expression)
  • restrictTo: If not null, this item can only be given to the provided role(s)
  • upgradeWeapon: The specific weapon being upgraded. This is used with upgradeFromSpirit or element to try and create a similar elemental weapon.
  • upgradeFromSpirit: If this is an elemental upgrade from a spirit, this is the Role of the spirit, from which an elemental type is taken.

Mission

Starts a fight to the death. A fair amount of stuff can be specified here.

  • goal: What is this fight about? Used by mission victories and followups to tell the right stories.
  • combatants: Who is fighting in this Mission? By default, it's "party" against "foes", but any roles can be put in (More info below)
  • combatModifiers: Add advantages or disadvantages to the player (More info below)
  • site: The site this Mission is taking place at
  • missionPlanOverride: Overrides the site plan (environment) that the mission takes place in (cave, forest shrine, library, etc.)
  • format: Overrides the format of the mission (assault, defense, ambushed, or arena)
  • musicOverride: Overrides the music played during the mission
  • skipDefaultPlots: If true, don't use the regular plot based on the format - a custom plot is being used.
  • mutators: Apply mutators that affect the layout of the mission in certain ways. (e.g. randomFires, closeAllDoors, forbidSpirits, etc.)
  • victoryEventIds: If set, the mission victory will be one of these events (testing from first to last), or no event if none match. (The event type this links to should usually be set to OTHER)
  • failureEventIds: If set, the mission failure will be one of these events (testing from first to last), or no event if none match. (The event type this links to should usually be set to OTHER)

Combatants

The people and monsters fighting in this battle.

You can set the role of a combatant and their side. You don't need to use party or foes, so if you want an event with only one player fighting, go for it. You can also put NPCs on your side, which you'll be able to control. (Even monsters! Though, maybe use with caution? It's not really supported right now?)

Use roles (instead of the above role) to group several roles into a single combatant; useful for displaying multiple roles on a single enemy card.

You can specify a customThreat, which can include a flavor and strength (if not set, they use the defaults), or you can specify specific monsterTracks.

You can add custom items to humans, either via ID or by Role. By ID is nice and easy, standard items. By Role is probably for when you want an item to have certain aspects, and you create it beforehand in the implications. In both cases, items will be equipped to the combatant for the duration of the mission. If you want a player to keep an item afterward, you can add an AddGear Outcome to manage that.

Specify a customCard if you want to override the default way the enemy shows up in cards at the start of a mission.

CombatantCustomCard.png

  • role: Who is fighting?
  • roles: Use this list (instead of the above role) to group several roles into a single combatant; useful for displaying multiple roles on a single enemy card
  • side: What side is this role fighting for? Note that you shouldn't put a hero on the enemy side unless you actually want them to die. (For things like facing a possessed hero, use implications and set "cloneRelatedEntity" to true in the query)
  • addAspects: Add aspects to this combatant for the duration of the mission
  • customThreat: Contains custom options for specifying threats
    • threatFlavor: If set, this will override the threat flavor, i.e. gorgons, drauven, etc.
    • threatStrength: If non-zero, this will override the threat strength, i.e. how many cards are drawn
    • useExtraChapterCards: Should this threat use extra cards based on what chapter it is?
    • monsterTracks: If set, this threat will use the given monster cards instead of random ones. threatFlavor and threatStrength will be ignored.
  • customIndividuals: Create the given individuals by ID
  • customIndividualsByExpression: Create the given individuals for which the expression meets the threshold
    • expression: Expression to check against the threshold
    • threshold: If expression meets this threshold, spawn the individuals
    • individuals: Individuals to spawn
  • byExpressionOnlySpawnFirst: If true, only spawns the first matched set of individuals in customIndividualsByExpression. If false, spawns all matched sets.
  • customItemsById: these items (created by ID) are added to the combatant for the duration of the mission
  • customItemsByRole: these items (chosen by Role) are added to the combatant for the duration of the mission
  • customCard: Can be used to give specific combatants custom name and description that show up on the monster card at the beginning of the mission. (Doesn't work with threats, only specific individuals or groups)

Combat Modifiers

Combat Modifiers add advantages or disadvantages to the player faction

  • type: Should the player have an advantage, or a disadvantage?
  • number: How many advantages/disadvantages should the player have? (This many will be picked randomly based on the type)
  • specificModifiers: If set, these specific modifiers will override the type and number fields.

Modifiers include the following:

Advantages:

  • Fortitude: All party members gain 1 temporary hitpoint
  • Courage: All party members gain +1 damage/potency (3 turns)
  • Cunning: Flanking attacks this combat deal +1 damage
  • Intimidation: All foes suffer 2 damage to start the mission
  • Insight: Double the stunt chance for all party members
  • Endurance: All party members gain 1 armor and 1 warding (2 turns)

Disadvantages:

  • Nausea: All party members lose 1 hitpoint.
  • Disorder: Walling provides no armor this combat.
  • Misalignment: All augment bonuses are nullified this combat.
  • Dismay: All foes gain 1 hitpoint to start the mission.
  • Wound: One party member loses half hit points to start combat.
  • Disable: One party member gains stun(2) to begin combat

Some Other Notes on Missions

  • If you want to fight someone from your party (as a doppelganger or possessed or whatever), don't just put the actual player on the enemy side, because then they'll actually die. Instead, make a clone of them in Implications!

MissionExtension

"HA! You thought it was over?!" -the enemies, probably

An extension to a mission. Returns to the Mission (with all heroes where they left off), generally spawning a new entity that must be defeated. (See missionVictory_jigsawPart2 for an example of use)

  • createEntities: What should be spawned for this mission extension? Typically, you'll want setLocation = true, and setLocationType = closestPossible, which will spawn the entity near the target for this Outcome. (For more on creating entities, see the createEntity section)
  • victoryEventIds: If set, the mission victory will be one of these events (testing from first to last), or no event if none match. (The event type this links to should usually be set to OTHER)
  • failureEventIds: If set, the mission failure will be one of these events (testing from first to last), or no event if none match. (The event type this links to should usually be set to OTHER)

ModifyStats

Modifies an individuals stats by a value. This can be used for gameplay stats (health, injury, potency, etc.) and personality stats (bookish, snark, etc.), and can be permanent or only last for the mission or chapter.

  • stat: Stat to modify
  • value: How much to modify the stat by
  • lifespan: How long should this stat modification last?

Aspects

Add, remove, or consume Aspects.

  • addAspects: list of aspects to add/merge
    • id: The id of the aspect
    • value: The value to add/remove to the aspect
    • merge: How should this value be added to the existing value?
    • atTiles: add a templated region aspect by passing in a list of coords from a matched target
    • inRelationTo: The aspect is a relationship that must be templated with an entity id. (ex: interfusedWithMystic|_ENTITY_) (See also: Aspect Parameters)
    • mutual: if this aspect is in relation to another entity, also add a corresponding mutual aspect.
  • consumeAspects: list of aspects to consume partially
    • Same fields as addAspects
  • removeAspects: list of aspects to remove entirely
  • consume: Consume the aspect associated with this effect.

CopyAspects

Copies temporary advantage or disadvantage aspects from one entity to another. (Useful if you want to transform an entity into another entity, but still keep status effects etc. See thrixlBuffThrusk for an example)

  • copyTo: The Role to copy temporary aspects to

AddHistory

Add History lines to this entity. This should generally be used if you want to apply permanent aspects and effects to an entity due to some event that happens.

  • inlineHistory: Create a history line and add it to the target
    • id: The id of the history line; should be unique!
    • text: What the history line will say.
    • associatedAspects: These aspects will be added along with the history line
    • forbiddenAspects: For human history generation - don't apply this history line if the entity has any of these aspects.
    • persistOverLegacy: Should this history line persist when you recruit a legacy hero with it?
    • showInSummary: Should this history entry show up in the character sheet?
    • removeAspects: If these aspects are on the entity, they will be removed.
    • name: Set the name of the target
    • nameGenData: Use if generating related names (e.g. children)
    • staticName: Sets the name of the target to a localizable name
    • itemLayers: Add images to the skin (e.g. eyepatch)
    • relationships: Bind an entity to this history line so we can reference it by name in the text
  • addHistory: Add an existing history line to the target

AddResources

Adds the given resources to the company.

  • resourceName: Selects a resource type based on name (overrides resourceType, useful for if you want to pass in a resource string as a parameter to an effect)
  • resourceType: The type of resource to add
  • amount: How much of the resource to add

ApplyTheme

Apply a Theme or add a theme piece to an individual

  • theme: The theme to apply
  • piece: A specific theme piece from the given theme to apply
  • historyTextKey: Key for history text associated with getting this theme, if any
  • replaceInjuredLimbs: Should all injured (maimed) limbs be replaced with theme pieces, where possible?
  • oneRandom: If true, grants one random theme piece

RemoveTheme

Remove a theme or specific theme piece or theme slot from an individual

  • specificTheme: Theme to remove (removes full theme if specificPiece is null)
  • specificPiece: Specific theme piece to remove
  • clearSlot: Clear this specific theme slot of any theme pieces

DoAll

Executes all Outcomes within this

ForEach

Executes the given Outcome for each matched target in the given roles, storing the individual target in a separate role when executing the outcomes

  • fromRoles: The roles to execute the outcome on
  • toRole: The role to store each individual entity in when looping through
  • outcome: The outcome to execute for each role

DoFirstValid

Execute each Outcome until one succeeds

  • outcomes: Execute each of these outcomes until one succeeds

DoOneRandom

Select one outcome randomly from a weighted list

  • weightedOutcomes: The weighted list of outcomes to choose from

Test

Defines a test that can be passed or failed, leading to different outcomes. Roll will PASS if roll evaluates to equal or greater than target.

  • value: The value to test
  • threshold: If value is greater than or equal to this expression, Pass. Otherwise, Fail.
  • onPass: Outcome to execute if value >= threshold
  • onFail: Outcome to execute if value < threshold

IfPlayerChose

Executes an outcome if the player chose the given option for the given choice target.

  • ifPlayerChose: Execute this outcome if the player selected the given option. (Note: this field can be edited by clicking the outcome's header)
  • playerChoiceTarget: Which choice are we talking about? (usually there's only one.) (Note: this field can be edited by clicking the outcome's header)
  • then: Execute this outcome if the player chose the given option
  • otherwise: Execute this outcome if the player didn't choose the given option

IfRolesArePresent

Executes outcomes based on whether or not a given role is present

  • rolesArePresent: Roles to check
  • then: If all the given roles are present, execute this outcome
  • otherwise: If not all the given roles are present, execute this outcome

SetRole

Sets the given role to the target. This can be useful when used with choose=oneRandom (ex: mysticRecipeDiscus uses it to choose a random second target)

  • role: The role to set

IfAnyTrigger

Fires the given trigger on the target, executing further outcomes depending on whether any matches were found. For example, injuryLeadsToDeath uses this to check whether there are any ENCOUNTER_DEATH_CHOICE triggers, and if not, kills the entity immediately.

  • ifAnyTrigger: Fire this trigger on the target, resolving immediately, and execute the rest of the outcome only if at least one match was found.
  • then: Execute if a match was found
  • otherwise: Execute if no matches were found

AttackRoll

Most mission attacks and abilities should go through this outcome. This handles things like who is attacking or defending, the strength (accuracy) of the ability, how the defender defends against the ability, what happens when the ability hits or misses, as well as handling a large amount of animation timing, sounds, and effects. This includes things like updating health bar visuals and showing damage and status effect text at the right time.

Note that due to all the animation handling this outcome does, it's useful for abilities that aren't attacks too, despite its name.

  • defender: this target will be marked as the "defender" and used as the target of the onHit or onMiss, depending on the result of the roll
  • intermediateRole: If set, the attacker will be treated as "attacking" this role, and the defenders will be treated as "defending" against this role. Specifically useful for mystic interfusion recipes.
  • attackAnimationType: What type of attack should this animate as? If null, uses defenseRollTags to figure it out as a fallback.
  • showAbilityName: Should this effect stop to show its name above the character using it?
  • stopBlockingTime: When should the associated attack animation stop blocking other scripts? By default, it blocks until slightly after the entire animation is over, but this isn't what we want for certain situations, like nested AttackRolls, when we want another attack animation to start partway through.
  • minimumBlockTime: This attack roll will block for at least this much time, in milliseconds
  • minimumBlockTimeOnMiss: This attack roll will block for at least this much time, in milliseconds, if the attack misses
  • timingOverride: Used to override different timings of the attack animation
  • particles: Any particles that this AttackRoll should spawn
  • audioOverride: Play specific audio during the attack
  • attackerAnimationOverride: Override the attacker's animation (empty string for no animation)
  • defenderAnimationOverride: Override the defender's animation (empty string for no animation)
  • cameraSnapToStartPositionOnEnd: Should the camera snap back to its starting position once the animation ends? Usually, this should be false for abilities that cause the individual to move.
  • markForFlanking: Does this attack allow subsequent attacks to flank?
  • flankMarkOrigin: if non-null, the role which should be used to calculate the origin of the flank mark. If null, attacker (=self) is the origin of the mark
  • flankingBoostsAttackRoll: If this attack is considered flanking, does it get an attack roll bonus?
  • defenseRollTags: What defenses apply?
  • attackStrength: The attack roll
  • separateRolls: If true, each defender faces a separate attack roll. Useful for AOE, if you want to roll separately for each.
  • wield: [DEPRECATED]
  • applyCover: Should cover protect adjacent units from this attack?
  • always: This Outcome always happens, regardless of success or failure of the AttackRoll.
  • onHit: Do this if the attack hits
  • onMiss: Do this if the attack misses
  • onAbilitySuccess: Do this if there was a successful attack roll (or no defenders)
  • onAbilityFailure: Do this if all attack rolls failed
  • onHitCover: Do this if the attack hits cover

Damage

Deal damage and/or shred to the target. (This will most often be seen within AttackRolls)

  • originator: Who's dealing the damage?
  • amount: Amount of damage to deal to the subject
  • flankingBonusDamage: if attack is flanking, do extra damage
  • shred: Shred deals damage to armor. Shred is applied before damage is applied, so shred counts toward this attack as well.
  • type: What type of damage? (Generally meaning, can armor or warding protect against this damage? Armor protects against PHYSICAL, warding protects against MAGIC, nothing protects against TRUE)
  • pierce: how much armor or warding to ignore
  • minRemainingHealth: Don't take the target below this health threshold.
  • weapon: The weapon being used to do this attack. Might be null. Stunt effects will be determined using this.
  • useEquippedWeaponForStunt: If true, this damage will use the equipped weapon to calculate stunts
  • overrideStuntDamage: If not null, this expression will be used for stunt damage instead of the default weapon-based damage calculation
  • stopBlockingOnStunt: If true, stop blocking time when the stunt happens. Useful if onStunt triggers a BranchAbility you want to happen immediately.
  • onStunt: execute this outcome if the attacks stunts - can be use to give special on-stunt effects to theme attacks, etc..
  • numDefenders: The chance to stunt is divided by this number, so that attacks that hit multiple targets aren't OP
  • showSpecialAnimationEffectIf: If this expression evaluates to >=1, show the ability's specialAnimationEffect
  • showInTooltip: Should this damage be shown in tooltips? (ex: set to false for damage that interfusion abilities do to scenery)

Animate

Play a specific animation script, swap a scenery image, or spawn particles

  • script: id of the script to run (client side animation)
  • swapSceneryImage: If the target is scenery, swap the current scenery image with this image
  • particles: Spawn particles

ActionPoints

Consumes action points. This is generally used in the "cost" of the "self" target for abilities.

(To make an ability that doesn't cost anything, just don't add in any Action Point cost)

  • actionPoints: Consume this number of action points
    • one: requires and consumes one action point
    • two: requires and consumes two action points
    • attack: by default, require one action point, consume all. certain conditions (abilities: battledance) can modify the cost of attacks.
    • all: require one, consume all. e.g. turn-ending abilities like "guard"
    • any: consume any action points, but don't require any. e.g. "wait"
    • free: (renamed "swift") a hero can use one swift action for free every turn; after that, swift actions cost one

GrantActionPoints

Grants the given number of action points to the target

  • actionPoints: The number of action points to grant

TempHP

Grants the given amount of temporary HP to the target

  • grantTempHp: The amount of temporary HP to add

ChangeSceneryState

Change the state of the target piece of scenery. (e.g. changing a lamp from "default" to "off")

  • newState: The state to change the target scenery to (e.g. "default" or "off" for a lamp)

ModifyOverlandTile

Change the target overland tile's condition or biome

  • changeCondition: Change the condition of the overland tile (e.g. "flooded")
  • changeBiome: Change the biome of the overland tile
  • renameOnBiomeChange: If the biome was changed, generate a new name for the tile

Trigger

Test this trigger for the target entity, queue any matching effects

  • entityTrigger: The trigger to test for the target entity

Branch

Spawn an event by ID and inject all of the current roles into it.

  • branchEvent: the event to spawn, by id

BranchAbility

Use another ability identified by a branchableAbility tag. ex: Guard uses this to find the right attack ability to use

  • branchType: what kind of branchable ability type are we looking for?
  • targetRole: what entity is this ability targeting/attacking?
  • branchAbility: branch to a specific effect id (used instead of branchType)

CreateJobAtSite

Creates the given job at the given location. Usually used as a continuation of a story.

  • jobId: The ID of the job that will be added to the site.
  • siteTemplateId: What kind of site should be created? (e.g. Wilderness, Cave, Windmill)
  • siteName: If set, this will be the site's name, rather than a randomly generated name.

SnapshotFollowup

Creates a snapshot of a specific moment in time, which can show up during the credits.

  • script: A comic that can show up in the credits, with the heroes exactly as they are in this moment
  • score: How likely is this snapshot to be shown in the credits?

AllowFollowup

Allows the event with the given id to be shown during the interval in the years of peace, or during the credits. Useful for events that have repercussions in the future that you want to show. (Also see: Tidings)

  • id: will be used to match followup effects - should be unique - autogenerated by the tool.

Impact

Affect the associated calculation. Relevant for attack and defend modifiers, e.g. ATTACK_ROLL, DAMAGE_ROLL, DEFENSE_ROLL, etc.

  • impact: The impact to have on the attack or defense calculation.

DefenseResults

Can be used in DEFENSE type effects. Executes onDefenseSuccess or onDefenseFailure, depending on whether or not the defense succeeded.

  • onDefenseSuccess: if this defense succeeded
  • onDefenseFailure: if this defense failed

NewJob

Creates a new job from the given effect id.

  • effectId: the effect to create a job from
  • post: What is this job connected to? Usually a site. If post is null, use outcome target.
  • injectedRoles: Roles to inject into the job effect
  • choices: Who should start out chosen for this job?
  • promptSlotsImmediately: If true, immediately show a hero select (slots) dialog.

NewPlot

Creates a new plot

  • plot: The plot to create
  • outcomeTargetAsSelf: the target of this outcome will be set as the "self" role for the plot. This is usually what you want, if the plot is centered on this entity.
  • injectRoles: A list of roles that the plot needs.
  • strings: Strings passed to the plot
  • floats: Floats passed to the plot
  • integers: Integers passed to the plot
  • initialStep: What step should this plot start on?

Spawn

Spawn an entity, hazard, or modify terrain. This can be used to spawn entities like sites on the overland map, as well as spawning individuals, monsters, and scenery in mission maps.

  • addRole: when spawning things, assign them this role in the effect context, so that subsequent Outcomes can operate on them!
  • modifyTerrain: Change the terrain on the given mission tiles (ex: splinterblast makes the terrain where the object was destroyed walkable and spreads debris)
  • ignoreBlockingEntities: These roles will be ignored when determining where the entity can be spawned. (Useful if you're spawning something on top of an entity that's going to be deleted)
  • forceSpawn: If true, the spawn will succeed even on blocked tiles
  • createEntity: Create the given entity (More info below)
  • addFire: Add a fire entity to the affected tile
  • addHazard: Add some kind of hazard to the affected tile

createEntity

  • query: Details on what entity to create (More info below)
  • useExisting: Gets an existing entity from the given role, rather than generating a new one. This can be used instead of query.
  • stationQuery: SITE: What kind of environment? (cave, forest shrine, library, etc.) (This is the same as query.siteTemplateId)
  • addAspects: Additional aspects to add, if any
  • control: who controls the entity
  • controlRelativeTo: Set entity control relative to this role (i.e. will be the ally or enemy of this role, depending on what control is set to)
  • additionalOutcome: An outcome to apply to this entity upon creation. This is useful for doing things like adding gear (AddGear) to an individual or modifying their stats (ModifyStats). (Note that you can use a DoAll Outcome to execute multiple Outcomes here.)
  • setLocation: Should this entity be placed on the mission map? (Only works if placeOnMap is true, a Mission is taking place, and this is in an Outcome)
  • setLocationType: If setLocation is true, how should the entity be spawned relative to this Outcome's target? (closestPossible is used for things like large pets, which spawn into the mission next to a hero)
  • placeOnMap: Should this entity be placed on the Mission/Overland map? (Mission map if setLocation is true, Overland map otherwise)

query

  • type: What is type of thing being created? (Individual, town, item, site, etc.) For NPCs and specific monsters, use INDIVIDUAL.
  • baseTag: Is this a human, a goat, a drauven haunt?
  • inRelationTo: A role that several other fields can be set based on. (see: cloneRelatedEntity, setGender, setAttraction, setClass, setAge)
  • cloneRelatedEntity: If true, this will create a clone of the inRelationTo Role. This can be used to, for example, put a clone of a hero on the enemy side.


  • setGender: INDIVIDUAL: Male or female. Can also be random, or chosen based on the gender or attraction of the inRelationTo role.
  • setAttraction: INDIVIDUAL: Men or Women. Can also be random (normal), or chosen based on the gender of the inRelationTo role.
  • setClass: INDIVIDUAL: Farmer, warrior, hunter, or mystic. Can also be any, any non-farmer, or the same as the inRelationTo role.
  • setAge: INDIVIDUAL: Some general age brackets. Can also be sameAs or closeTo the inRelationTo role.
  • exactAge: INDIVIDUAL: An exact numeric age.
  • setName: A specific name. Overrides default name generation.
  • setEquipment: Create this entity with a certain type or tier of clothes, weapons, etc.
  • primaryStoryStat: If set and the query is human, the human will be very likely to have this as their primary personality stat. (Only use this with personality stats, like GOOFBALL)
  • looksSimilarTo: An individual that the generated entity should look similar to (i.e. family members)


  • itemId: ITEM: A specific item to spawn. (Overrides itemCategory and itemTier)
  • itemCategory: ITEM: Picks a random item of the given item category.
  • itemSubCategory: ITEM: Picks a random item of the given item subcategory.
  • itemElement: ITEM: Gives the item this element.
  • itemTier: ITEM: Picks a random item of the given tier. (Can be used in conjunction with itemCategory)
  • owner: Generally for items. Who owns this item?


  • nameAlgorithm: Used for sites, and maybe could be used to override default names?
  • siteTemplateId: SITE: What kind of environment? (cave, forest shrine, library, etc.)
  • siteMissionPlanId: SITE: The Mission Plan id for the created site.
  • exactSiteTemplate: SITE: An exact template for the site. Supports creating a fully custom site with custom map icon. (Untested)
  • tileId: Overland tile to place this entity on.
  • overlandLocation: Overland tile to place this entity on, based on the tile another role is on (this takes precedence over the location of inRelationTo)


  • threatFlavor: THREAT: The type of monster card to spawn.
  • applyCalamities: If this is a monster, apply relevant calamity buffs to it.
  • aspectValues: Apply the given aspect values to the created entity.
  • coordinates: used when generating scenery
  • biome: used when generating a detached (fake?) overland tile
  • findExisting: If true, the result may be an entity that is already present in the game world.
  • customPersonality: Specify this entity's personality
  • customHistory: Specify this entity's history
  • forbiddenHistoryAspects: Specify history aspects that should be forbidden for this entity. (ex: When children of heroes are generated, the historyTag_orphan/adopted/unknownOrigin/parents aspects are forbidden)

Interrupt

interrupt any actions in the context tree that are taken by the given entity (actions where the given entity is "self") Example: movement

ChangeControl

Changes who controls the target. Used to make an entity a temporary or permanent member of a side (player or enemy)

Using something like becomeAllyOf: party and makeHero: true will recruit the given role to your party!

  • removeAllControl: Removes all control; this entity will be controlled by no one.
  • becomeAllyOf: What role should the target be allied with? (If recruiting a hero, this will generally be the "party" role)
  • makeHero: Should the target be turned into a hero?
  • removeHero: Should the target's hero status be removed?

AddPet

Gives the target a large pet that will spawn into battles with them and show up in their character sheet. The target and pet will get aspects linking them. For the target, "largePet|_ENTITY_", for the pet, "isLargePet|_ENTITY_".

  • pet: What is the pet that the target will be given? This will generally be an entity created in implications.

Interact

Used for special actions, like opening doors. (In fact, that's the only thing this outcome does currently)

  • openDoor: Open the door

MoveEntity

Moves an entity either directly to a tile, or along a path.

  • directlyToTile: Move target entity directly to this tile, without taking steps in between
  • alongPath: Move target entity along a path (specified by a target of type PATH)
  • recordMoveDistanceAs: Store the move distance as a certain string (useful for things like adding extra damage due to knockback distance)
  • ignoreEntitiesOnTile: If true, won't disallow moving the entity onto a tile that already has something on it. Useful in cases where the effect will displace the existing entities (ex: thrixlBurrow)
  • animationType: How should the movement be animated?

FormParty

Forms a party of heroes (on the overland) that can be given orders, like travelling to a tile or attacking a site.

  • members: Who should be in the party?
  • orders: What should the party do? (e.g. travel to a tile, attack a site)
    • type: Type of order
    • target: The target that the order acts on (e.g. the site to travel to or attack)

AssignToPlot

Take roles, strings, or numbers from the event and put them in the associated plot. This allows the plot to access them.

  • assignRolesToPlot: Assign the given roles to the plot
  • integers: Assign the given integers to the plot
  • floats: Assign the given floats to the plot
  • strings: Assign the given strings to the plot

AddGear

Immediately equips the given gear on the target. (If granting gear to an existing player-controlled hero, UpgradeGear may be a better choice, since it allows the player to choose whether or not they want the gear)

  • itemById: Create a specific item by id
  • itemByRole: role points to an un-owned item that should be granted.
  • acquisitionLine: history category

RemoveGear

Immediately removes the given gear from the target.

  • itemById: Removes a specific item by id
  • itemByRole: role points to an owned item that should be removed.

EquipCarriedItem

Swaps the individual to a specific carried weapon (most commonly used to swap to secondary weapon).

  • eqiupCarriedItem: The carried item to equip

AssociatedLight

Add a light and associate it with the target.

  • remove: Remove any associated light
  • intensity: Brightness of the light
  • addLightById: Id of a light to create

MapRegion

Create a region on the mission map that can have associated effects when allies or enemies enter it. (ex: guard, fire, walling, jumpjaw trap)

  • region: the region definition associated with this effect.
    • id: The id to give this region
    • elements: elements - relative coordinates
    • physicallyPresent: true if the associated entity is physically occupying this region
    • visibleAtLocation: If true, if this tile is visible, the associated entity will also be visible
    • entryCostSameFaction: Extra movement cost for the same faction to enter this region
    • exitCostSameFaction: Extra movement cost for the same faction to exit this region
    • entryCostOtherFaction: Extra movement cost for the other faction to enter this region
    • exitCostOtherFaction: Extra movement cost for the other faction to exit this region
    • entryCostDangerousPath: How dangerous is this region to enter for this faction? (entities will try to path around dangerous regions)
    • entryCostDangerousPathOtherFaction: How dangerous is this region to enter for the other faction? (entities will try to path around dangerous regions)
    • feedbackType: Tile feedback to show for this region
    • floorsOnly: only affect walkable areas.
    • tileFilter: only affect a specific kind of tile.
    • blockVision: Region will block vision/line of sight
    • tags: Tags for the region
    • entryTriggerEffects: a list of effects that trigger upon a unit entering this region. The effect use the region parent as the self, and use a special "INTERLOPER" role to target the unit that is moving in to the region.
    • movementTriggerEffects: a list of effects that trigger upon a unit initiating a move when in this region. The moving target is assigned the INTERLOPER role.
    • spatialRelationship: Add or check aspect relationships between the region's "owner" and the "interloper"
      • testAspects: Test other's aspects to make sure this relationship is valid
      • testMyAspects: Test my aspects to make sure this relationship is valid.
      • myAspect: The owner of this region will get this aspect, as a relationship aspect with the other entity.
      • otherAspect: The other entity will get this aspect as a relationship with the region owner.
  • aura: The region has a range of this far around the target tile(s)
  • presence: use the footprint of the entity for the region tiles
  • associateWithFaction: Associate the region with the target's faction (e.g. for trap regions that should only affect the enemy faction)
  • doorInterior: this is a door, and the region tiles are the door interior tiles
  • elements: hard coded list of elements
  • elementsString: soft coded list of elements (suitable for template param..) The format is "x,y,x,y,x,y" where x and y are ints, relative to the mapLocation of the unit.

Delete

The target will be deleted. (should only use this on transient entities like fire and debris. Units and Items should just be marked dead or broken, not deleted, with certain exceptions like monster transformations)

Special

Special actions, like causing Game Over or Victory, withdrawing units from missions, building bridges or passes, and more!

  • specialAction: The action to do
  • addToLegacy: Add the target to the player's persistent Legacy to be reused in subsequent games.
  • grantKillCredit: grant kill credit for this entity (self) to the affected role.
  • disbandParty: disband the party

RevealHiddenEntities

Check the location for hidden units, reveal them. Optionally assign a role and/or apply outcomes to them.

  • chance: The chance to reveal the target, with 1 being a 100% chance
  • addRole: If specified, set any found entities to this role in the current context.
  • forEach: If defined, this outcome will be executed on each found entity.

AddCalamities

Add calamity cards!

  • calamitiesToAdd: List of calamity cards to be spawned.
    • quantity: How many calamities should be drawn? (Can also be negative to remove calamities)
    • flavor: What flavor should the calamities be? If null, auto-chooses the flavor.

UnlockLegacyAspect

Unlocks a given legacy aspect that is added to the player's legacy, and can be checked in future games

  • legacyAspect: The legacy aspect to add/unlock

EncounterResult

Set the result of a mission

  • setResult: The mission result
  • resultPriority: If there are multiple results, the one with the highest priority takes precedence

SetGlobal

Stores or sets a global value that can be accessed from any expression throughout a campaign.

  • globalId: The id to store a value in
  • tag: Set a global value with a specific tag. Used to override existing values.
  • clear: If true, clears the given global id. If used with tag, will clear the id with the given tag, allowing the value to return from an overridden value back to a lower priority value.
  • value: Value to set the given global id to
  • priority: The highest priority value assigned to a globalId is used.

MatchTarget

Match a target. Useful in cases where you want to match a target for each match in another role, e.g. calculating knockback for each defender in an AttackRoll

  • abilityTarget: The ability target to match

ClearRole

Clears the given role. Useful when looping through matches along with the MatchTarget Outcome, so the role can be cleared each time to allow for matching something for the next target.

  • role: The role to clear