Narrative Event Templates

The narrative_events table contains a list of narrative event templates that campaign scripts can use to create narrative events. See the page on narrative for an overview of the narrative event framework. See also the narrative_event documentation for detailed information about the narrative_event object interface.

Loaded in Campaign Loaded in Campaign
Loaded in Battle Loaded in Battle
Loaded in Frontend Loaded in Frontend
Back to top

Event Messages

narrative_events.how_they_play(
  
string unique name,
  string
faction key,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a how-they-play narrative event. This shows the how-they-play event message for the supplied faction key in singelplayer mode. In multiplayer mode nothing is shown and the narrative flow proceeds immediately.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

4

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 154

narrative_events.event_message(
  
string unique name,
  string
faction key,
  string
title text key,
  string
primary text key,
  string
secondary text key,
  boolean
persistent,
  number
index,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts an event message narrative event. An event message with the specified title, primary and secondary text will be shown.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

Text key of title for the event message to create, in full localised [table]_[field]_[record_key] format.

4

string

Text key of primary text for the event message to create, in full localised [table]_[field]_[record_key] format.

5

string

Text key of secondary text for the event message to create, in full localised [table]_[field]_[record_key] format.

6

boolean

Persistence flag to pass to campaign_manager:show_message_event.

7

number

Index value to pass to campaign_manager:show_message_event. This determines the header image shown.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 212

narrative_events.event_message_not_player_turn_only(
  
string unique name,
  string
faction key,
  string
title text key,
  string
primary text key,
  string
secondary text key,
  boolean
persistent,
  number
index,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts an event message narrative event. An event message with the specified title, primary and secondary text will be shown. It will be shown as it is triggered, regardless of which faction is taking their turn.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

Text key of title for the event message to create, in full localised [table]_[field]_[record_key] format.

4

string

Text key of primary text for the event message to create, in full localised [table]_[field]_[record_key] format.

5

string

Text key of secondary text for the event message to create, in full localised [table]_[field]_[record_key] format.

6

boolean

Persistence flag to pass to campaign_manager:show_message_event.

7

number

Index value to pass to campaign_manager:show_message_event. This determines the header image shown.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 232

Back to top

Interventions

narrative_events.intervention(
  
string unique name,
  string
faction key,
  [function
configuration callback],
  [function
trigger callback],
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a narrative event that starts an intervention with the supplied configuration and trigger callbacks. This allows the calling script to customise what happens within the intervention. It can also be used to trigger an intervention with a customised setup (e.g. must-trigger) which can be useful for starting a series of narrative events that would otherwise wait behind an event panel.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

function

optional, default value=nil

Intervention configuration callback. If supplied, this is passed to narrative_event:add_intervention_configuration_callback to pre-configure the intervention associated with the narrative event prior to it being triggered. The callback will be passed the intervention object as a single argument when called.

4

function

optional, default value=nil

Trigger callback to call when the intervention is triggered. If supplied, this is passed to narrative_event:set_trigger_callback. The callback will be passed the string triggering message, and a callback which can be used to prevent the narrative event completing immediately. Call the callback with false as an argument to stop it completing, then later with true as an argument to complete.

5

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

6

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 322

Back to top

Callbacks and Intervals

narrative_events.callback(
  
string unique name,
  string
faction key,
  function
callback,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a narrative event that calls a supplied callback when triggered. When called, the supplied callback will be passed the narrative event, the key of the faction to which it applies, the triggering message, and the allow_issue_completed_callback as four arguments.
The allow_issue_completed_callback passed to the callback may be called with false supplied as an argument to prevent the narrative event from completing automatically. It will only later complete when the allow_issue_completed_callback is called again with true supplied as an argument. This mechanism allows the callback to control when the narrative event completes, rather than it completing immediately.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

function

Callback to call.

4

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

5

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 385

narrative_events.interval(
  
string unique name,
  string
faction key,
  number
interval,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a narrative event that waits a supplied interval in seconds when triggered.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

number

Interval in seconds to wait.

4

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

5

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 453

Back to top

Advice and Savegame Values

narrative_events.set_saved_value(
  
string unique name,
  string
faction key,
  string
value key,
  value
value,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a narrative event that saves a value to the savegame with campaign_manager:set_saved_value when triggered.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

Key of value to save.

4

value

Value to save. Supported data types are boolean, number, string and table.

5

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

6

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 521

narrative_events.set_advice_string_seen(
  
string unique name,
  string
faction key,
  string
value key,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a narrative event that marks an advice string as 'seen' in the advice history. This is useful for marking that a particular stage has been reached in the narrative flow of events, and it can be later tested with narrative_queries.advice_history. The string is reset if the player resets the advice history.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

Key of value to mark as seen.

4

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

5

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 584

Back to top

Movies and Cutscenes

narrative_events.fullscreen_movie(
  
string unique name,
  string
faction key,
  string
movie path,
  [number
start fade duration],
  [number
end fade duration],
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a fullscreen movie narrative event.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

Path of movie to play. See the documentation of cm:register_instant_movie for more information.

4

number

optional, default value=0.5

Duration in seconds over which to fade the picture to black before playing the movie.

5

number

optional, default value=0.5

Duration in seconds over which to fade back to picture after playing the movie.

6

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

7

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 731

narrative_events.scripted_cutscene(
  
string unique name,
  string
faction key,
  number
cutscene duration,
  [function
cutscene config],
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a scripted cutscene narrative event. The cutscene constructor function campaign_cutscene:new is used.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

number

Duration of scripted cutscene in seconds.

4

function

optional, default value=nil

This function will be called after the cutscene is created and before it is played. It can be used by client scripts to configure the cutscene object and populate it with actions. The function will be passed the cutscene object as a single argument.

5

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

6

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 911

narrative_events.cindy_cutscene(
  
string unique name,
  string
faction key,
  string
cindyscene path,
  number
blend in,
  number
blend out,
  [function
cutscene config],
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a scripted cutscene narrative event with a cindyscene. The cutscene constructor function campaign_cutscene:new_from_cindyscene is used.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

Path to cindyscene, from the working data folder.

4

number

Cindyscene blend in duration in seconds.

5

number

Cindyscene blend out duration in seconds.

6

function

optional, default value=nil

This function will be called after the cutscene is created and before it is played. It can be used by client scripts to configure the cutscene object and populate it with actions, if required. The function will be passed the cutscene object as a single argument.

7

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

8

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 928

narrative_events.camera_fade(
  
string unique name,
  string
faction key,
  number
fade duration,
  boolean
to black,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a narrative event that fades the camera to black or to picture when triggered.
If the fade is to black, the narrative system will wait for the fade to finish before continuing. If the fade is to picture, then the narrative system continues immediately without waiting for the fade to complete.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

number

Duration of camera fade in seconds.

4

boolean

Sets whether the camera should fade to black. Supply false to fade to picture instead.

5

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

6

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1014

Back to top

Missions

narrative_events.cancel_mission(
  
string unique name,
  string
faction key,
  string
mission key,
  string
trigger message,
  [string
on-issued message]
)

Creates and starts a narrative event that cancels a custom mission when triggered.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

Key of the mission to cancel, from the missions database table. The mission will be cancelled for the specified faction.

4

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

5

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1095

narrative_events.generic(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  table
event/conditions,
  [function
camera scroll callback],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list],
  [boolean
force_advice]
)

Creates and starts a narrative event that issues a generic scripted mission. One or more event/condition pairs to pass to the underlying mission_manager must be supplied in a table. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

table

A table containing one or more event/condition records. Each record should be a table with a string "event" element and a "condition" element that's either a condition function or true.

7

function

optional, default value=nil

A camera scroll callback, to be supplied to narrative_event:set_camera_scroll_target_callback.

8

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

9

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

10

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

11

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

12

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

13

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

14

boolean

optional, default value=nil

this is used to override the default advice priority logic - by setting this to true, the supplied advice key will always be played regardless of advice level

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1284

narrative_events.defeat_enemy_army(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
enemy faction key,
  number
target cqi,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to defeat an army belonging to a specific enemy faction. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of target enemy faction, from the factions database table.

6

number

Camera scroll target character cqi. If this is supplied the camera will scroll to the specified character when the mission is issued (assuming the narrative event decides to move the camera), otherwise it will scroll to the nearest character in the target faction to the local player's forces.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1371

narrative_events.defeat_initial_enemy_army(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
enemy faction key,
  number
target cqi,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to defeat an army belonging to a specific enemy faction. Advice may optionally be supplied to be issued with the mission. narrative_event:set_category is used to give this narrative event a higher priority than one created with narrative_events.defeat_enemy_army.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of target enemy faction, from the factions database table.

6

number

Camera scroll target character cqi. If this is supplied the camera will scroll to the specified character when the mission is issued (assuming the narrative event decides to move the camera), otherwise it will scroll to the nearest character in the target faction to the local player's forces.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1394

narrative_events.defeat_army_of_culture(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text key,
  string
culture key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to defeat an army belonging to a specified culture or list of cultures. Advice may optionally be supplied to be issued with the mission.
As this is a scripted mission a text key for the mission objective must be supplied.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Text key of mission ojective to show, in the full [table]_[field]_[key] format.

6

string

Key of target culture, from the cultures database table. This can also be a table of strings if multiple target cultures are desired.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1513

narrative_events.defeat_chaos_army(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to defeat an army belonging to a specified. Advice may optionally be supplied to be issued with the mission.
As this is a scripted mission a text key for the mission objective must be supplied.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

6

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

7

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

8

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

9

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

10

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1537

narrative_events.gain_pooled_resource(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
resource key,
  string
resource quantity,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to gain a specified amount of a specified pooled resource. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of pooled resource, from the pooled_resources database table.

6

string

Absolute quantity of pooled resource the faction has to acquire to complete the mission.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1613

narrative_events.gain_devotion(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
resource quantity,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to gain a specified amount of the Kislev Devotion pooled resource. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Absolute quantity of pooled resource the faction has to acquire to complete the mission.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1636

narrative_events.gain_supporters(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
resource quantity,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to gain a specified amount of the Kislev Supporters pooled resource. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Absolute quantity of pooled resource the faction has to acquire to complete the mission.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1658

narrative_events.gain_pooled_resource_scripted(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  string
pooled resource key,
  number
lower threshold,
  number
upper threshold,
  boolean
additive,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission for the specified faction to gain a specified amount of one or more specified pooled resources. Unlike narrative_events.gain_pooled_resource this sets up a scripted mission, where script is responsible for the completion of the mission. This allows multiple pooled resources to be considered at the same time, either additively or not, allowing mission constructs such as "earn x of pooled resources a, b and c together", or "earn x of pooled resources a, b or c".
As it is a scripted mission, mission objective text must be supplied. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

string

Key of the pooled resource to monitor, from the pooled_resources database table. This may also be a table of string pooled resource keys if multiple pooled resources are to be monitored.

7

number

Lower threshold level of the pooled resource(s) at which the mission completes. If not supplied, then there is no lower pooled resource bound at which the mission completes.

8

number

Upper threshold level of the pooled resource(s) at which the mission completes. If not supplied, then there is no upper pooled resource bound at which the mission completes. One or both of the lower and upper thresholds must be provided.

9

boolean

If set to true the value of all supplied specified pooled resources is counted towards the threshold value. If false is supplied, then the mission only completes when one of the pooled resources specified reaches the threshold value.

10

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

11

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

12

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

13

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

14

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

15

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1885

narrative_events.capture_settlement(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [string
enemy faction key],
  [string
target region key. Key of specific target region(s). This can be a string or a table of strings],
  [value
scroll target],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to capture a settlement, optionally belonging to a specific enemy faction. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

optional, default value=nil

Key of target enemy faction, from the factions database table. If no key is specified then the capture of any settlement qualifies.

6

string

optional, default value=nil

if multiple target settlements are desired. If no value is supplied then the capture of any settlement qualifies.

7

value

optional, default value=nil

Camera scroll target. This can be a string region key, a string faction key (region is looked up before faction), or a number character cqi. If this is supplied the camera will scroll to the specified target when the mission is issued (assuming the narrative event decides to move the camera).

8

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

9

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

10

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

11

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

12

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

13

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2028

narrative_events.raze_or_own_settlements(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
region key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to raze or own all specified settlements. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Region key of target settlement, from the campaign_map_regions database table. If more than one target settlement is desired a table of region keys can be supplied.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2104

narrative_events.control_provinces(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [number
provinces],
  [string
province key],
  [value
scroll target],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to control a number of provinces. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

optional, default value=1

Target number of provinces to control.

6

string

optional, default value=nil

Key of specific province to control. This may also be a table of string keys if multiple are desired.

7

value

optional, default value=nil

Camera scroll target. This can be a string region key, a string faction key (region is looked up before faction), or a number character cqi. If this is supplied the camera will scroll to the specified target when the mission is issued (assuming the narrative event decides to move the camera).

8

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

9

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

10

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

11

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

12

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

13

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2209

narrative_events.enact_commandment(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [number
enactments],
  [string
commandment key],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to enact one or more commandments. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

optional, default value=1

Target number of commandments to enact.

6

string

optional, default value=nil

Key of specific commamdment to enact.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2308

narrative_events.destroy_faction(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
target faction key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to destroy one or more factions. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Faction key of target faction, from the factions database table. This may also be a table of multiple target faction keys.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2405

narrative_events.recruit_units(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  number
units,
  [string
unit key],
  [boolean
exclude existing],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to recruit a number of units across all armies. Unit keys may optionally be supplied . Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

Target number of units to recruit.

6

string

optional, default value=nil

Optional unit key of unit that must be recruited, from the land_units database table. This may also be a table of string unit keys. If a value is supplied here then recruited units only count towards the total if their unit keys match. If no value is supplied then any unit matches.

7

boolean

optional, default value=false

Excluding pre-existing units from the count.

8

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

9

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

10

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

11

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

12

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

13

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2504

narrative_events.construct_n_of_building_chain(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  number
buildings,
  [string
building chain],
  [boolean
exclude existing],
  [value
scroll target],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to construct a number of buildings of zero or more building chains. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

Target number of buildings to construct.

6

string

optional, default value=nil

Key of building chain the building must be a part of, from the building_chains database table. This may also be a table of string chain keys. If a value is supplied here then the constructed buildings only count towards the total if they belong to a specified chain. If no value is supplied then any constructed building counts towards the total.

7

boolean

optional, default value=false

Excluding pre-existing buildings from the count.

8

value

optional, default value=nil

Camera scroll target. This can be a string region key, a string faction key (region is looked up before faction), or a number character cqi. If this is supplied the camera will scroll to the specified target when the mission is issued (assuming the narrative event decides to move the camera).

9

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

10

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

11

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

12

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

13

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

14

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2614

narrative_events.construct_building_with_condition(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [function
condition],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission that completes when a building is completed by the specified faction, optionally passing a supplied condition function. Advice may optionally be supplied to be issued with the mission.
If supplied, the condition function will be passed the building provided by the BuildingCompleted event and the narrative event object as separate arguments. It should return a value that evaluates to a boolean to indicate whether the condition has passed. It can also return true as a second returned value to suppress output from this function. This can be useful if the condition function produces its own output.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key that specifies the objective text, from the mission_texts table.

6

function

optional, default value=nil

Condition function to pass. If no condition function is supplied then the condition always passes.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2706

narrative_events.construct_buildings_with_condition(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [function
condition],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission that completes when a building is completed by the specified faction, optionally passing a supplied condition function. The condition function is run on every building in the faction when a building is completed and if the number passing the test is greater than a supplied threshold then the mission is successfully completed. Advice may optionally be supplied to be issued with the mission.
If supplied, the condition function will be called for each building in the faction when the BuildingCompleted event is received. When called, it will be passed the building and the narrative event object as separate arguments. It should return a value that evaluates to a boolean to indicate whether the condition has passed. It can also return true as a second returned value to suppress output from this function. This can be useful if the condition function produces its own output.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key that specifies the objective text, from the mission_texts table.

6

function

optional, default value=nil

Condition function to pass. If no condition function is supplied then the condition always passes.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2730

narrative_events.construct_technology_enabling_building(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [function
condition],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission that completes when a building that unlocks technologies is completed by the specified faction, optionally passing a supplied condition function. Advice may optionally be supplied to be issued with the mission.
If supplied, the condition function will be passed the building object provided by the BuildingCompleted event and the narrative event object as separate arguments. It should return a value that evaluates to a boolean to indicate whether the condition has passed. It can also return true as a second returned value to suppress output from this function. This can be useful if the condition function produces its own output.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

function

optional, default value=nil

Additional condition function to pass. If a condition is supplied, it will need to be passed in addition to the base "unlocks technologies" requirement.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2801

narrative_events.upgrade_any_settlement(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to upgrade any settlement. An optional building level that the settlement building must reach may be supplied. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

6

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

7

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

8

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

9

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

10

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2952

narrative_events.research_technology(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  number
technologies,
  string
mandatory tech,
  [boolean
additive],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to research one or more technologies. An optional list of technologies that must be included may be supplied. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

Number of technologies that must be researched.

6

string

The key of any mandatory technology that must be researched before the mission can be completed. This may be supplied as a table of strings if multiple are desired.

7

boolean

optional, default value=false

Sets whether pre-existing technologies count towards the total.

8

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

9

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

10

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

11

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

12

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

13

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3036

narrative_events.gain_income(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  number
income,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to gain a certain level of income. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

Income level to be gained.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3103

narrative_events.reduce_upkeep(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text key,
  number
threshold,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to reduce upkeep. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission objective text, from the mission_texts database table.

6

number

Threshold percentage of upkeep-expenditure to income which the player must reach to succeed the mission.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3214

narrative_events.recruit_any_hero(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to recruit any hero. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

6

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

7

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

8

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

9

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

10

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3286

narrative_events.use_hero(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to use any hero against the enemy. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

6

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

7

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

8

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

9

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

10

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3355

narrative_events.win_battles_with_hero(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  number
win threshold,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to win a supplied number of battles with any hero. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

Number of victories to attain.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3517

narrative_events.win_set_piece_battle(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
battle key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to win a set piece/quest battle. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of set piece battle, from the battles database table.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3586

narrative_events.perform_ritual(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [number
num rituals],
  [string
ritual key],
  [string
ritual category key],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to perform one or more rituals. Advice may optionally be supplied to be issued with the mission.
An optional total number of rituals may be specified, or a ritual key or a ritual category. If a total number greater than one is specified then the ritual key is disregarded. See narrative_events.perform_ritual_scripted for a version of this function that triggers a scripted mission

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

optional, default value=1

Number of rituals to enact. If a value other than 1 is specified then any ritual key is disregarded.

6

string

optional, default value=nil

Key of ritual to enact, from the rituals database table. If no ritual is specified then any ritual counts. This is disregarded if the total is greater than one.

7

string

optional, default value=nil

Category key of ritual to enact, from the ritual_categories database table. If no ritual category is specified then any ritual counts.

8

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

9

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

10

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

11

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

12

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

13

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3683

narrative_events.perform_ritual_scripted(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [number
num rituals],
  [string
ritual keys],
  [string
ritual categories],
  [string
target faction keys],
  [boolean
listen for completion],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to perform one or more rituals. Advice may optionally be supplied to be issued with the mission.
An optional total number of rituals may be specified, and zero or more ritual keys, ritual categories and target faction keys. As this is a scripted mission, a mission text key must be specified also.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

number

optional, default value=1

Number of rituals to enact.

7

string

optional, default value=nil

Key(s) of ritual(s) to enact, from the rituals database table. This can be a string ritual key or a table of strings. If no ritual keys are specified then any rituals match.

8

string

optional, default value=nil

Key(s) of ritual category/categories to enact, from the ritual_categories database table. This can be a string category key or a table of strings. If no categories are specified then any rituals match.

9

string

optional, default value=nil

Key(s) of any target factions, from the factions database table. This can be a string faction key or a table of strings. If no target factions are specified then any targets match.

10

boolean

optional, default value=false

Listen for the ritual being completed, rather than the ritual being started.

11

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

12

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

13

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

14

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

15

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

16

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3873

narrative_events.perform_motherland_ritual(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to perform a kislev motherland ritual. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

6

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

7

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

8

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

9

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

10

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3918

narrative_events.perform_ascension(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to perform a daemon prince ascension. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

6

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

7

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

8

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

9

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

10

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3956

narrative_events.concoct_plague(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [number
quantity],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to concoct a Nurgle plague. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

number

optional, default value=1

Quantity of plagues to to concoct.

6

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

7

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

8

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

9

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

10

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

11

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4000

narrative_events.spread_corruption_to_adjacent_region(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
corruption type,
  number
threshold value,
  [string
culture key],
  string
mission text,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to construct a foreign slot. It must be specified whether foreign slot is allied to the settlement owner or not. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Corruption type, from the pooled_resources database table.

6

number

Threshold value which the corruption must meet or exceed in an adjacent region for the mission to be completed.

7

string

optional, default value=nil

Culture key of region owner to exclude. If an eligible region has a faction owner with this culture, the region will not be included.

8

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

9

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

10

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

11

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

12

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

13

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

14

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4144

narrative_events.construct_foreign_slot(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [boolean
should be allied],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to construct a foreign slot. It must be specified whether foreign slot is allied to the settlement owner or not. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

boolean

optional, default value=false

Should the foreign slot be allied to the owner of the settlement in which it's created to count towards this mission.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4220

narrative_events.construct_foreign_slot_building(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [boolean
should be allied],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to construct any building in any foreign slot. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

boolean

optional, default value=nil

Should the building be constructed in an allied foreign slot. If false is supplied, the building should be constructed in a non-allied foreign slot. If nil is supplied, a building constructed in any foreign slot will count.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4313

narrative_events.equip_armory_item(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [string
item key],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to equip an armory item. An optional armory item (or list of armory items) may be supplied, which the equipped armory item must match for the mission to succeed. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

string

optional, default value=nil

The key of an armory item, from the armory_items database table, that the equipped item must match. This may also be a table of item keys. If nil is supplied then any item equipped by a character in the subject faction will match.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4417

narrative_events.equip_any_daemonic_gift(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to equip any daemonic gift armory item. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

6

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

7

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

8

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

9

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

10

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4440

narrative_events.perform_character_action(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [string
ability key],
  [string
target faction key],
  [string
character subtype],
  [boolean
must be success],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission for a character in the specified faction to perform a character/hero action. Optional lists of qualifying abilities, target factions and/or performing character subtypes may be supplied which the ability performed must match. It may also be specified that the action must have been successful. As with other narrative events, advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

string

optional, default value=nil

The key of the ability to perform, from the abilities database table. This may also be a table of ability keys. If nil is supplied then any ability performed will match.

7

string

optional, default value=nil

The key of the target faction, from the factions database table. This may also be a table of faction keys. If nil is supplied then any faction target will match.

8

string

optional, default value=nil

The subtype key of the performing character, from the agent_subtypes database table. This may also be a table of character subtype keys. If nil is supplied then any performing character will match.

9

boolean

optional, default value=false

If set to true this specifies that the action performed must have had a successful outcome.

10

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

11

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

12

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

13

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

14

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

15

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4626

narrative_events.embed_agent(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [string
character subtype],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission for a character in the specified faction to embed a hero in an army. An optional list of hero character subtypes may be supplied, which specify eligible hero types to embed. It may also be specified that the action must have been successful. As with other narrative events, advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

string

optional, default value=nil

The subtype key of the performing character, from the agent_subtypes database table. This may also be a table of character subtype keys. If nil is supplied then any performing character will match.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4652

narrative_events.spread_plagues(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [string
item key],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to spread a number of Nurgle plagues. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

string

optional, default value=nil

The key of an armory item, from the armory_items database table, that the equipped item must match. This may also be a table of item keys. If nil is supplied then any item equipped by a character in the subject faction will match.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4750

narrative_events.unlock_symptoms(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [number
num symptoms],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to unlock a number of Nurgle plague symptoms. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

number

optional, default value=1

The number of symptoms that must be unlocked for the mission to be succeeded.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4845

narrative_events.enter_stance(
  
string unique name,
  string
faction key,
  [string
advice key],
  string
mission key,
  string
mission text,
  [number
stance number],
  [string
mission issuer],
  table
mission rewards,
  string
trigger message,
  [string
on-issued message],
  [string
on-completed message],
  [table
inherit list]
)

Creates and starts a narrative event that issues a mission to enter a particular military force stance. Advice may optionally be supplied to be issued with the mission.

Parameters:

1

string

Unique name amongst other declared narrative events.

2

string

Key of the faction to which this narrative event applies, from the factions database table.

3

string

optional, default value=nil

Key of advice to issue with this mission, if any, from the advice_threads database table.

4

string

Key of mission to issue, from the missions database table.

5

string

Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.

6

number

optional, default value=1

Stance number, as returned by the stance_adopted() method provided by the ForceAdoptsStance event.

7

string

optional, default value="clan_elders"

Key of mission issuer, from the mission_issuers database table.

8

table

Rewards to add to the mission. This should be a table of strings. See the documentation for mission_manager:add_payload for more information on the string formatting and available options.

9

string

Script message on which the narrative event should trigger. This can also be a table of strings if multiple trigger messages are desired.

10

string

optional, default value=nil

Message to trigger when the narrative event has finished issuing. This can be a table of strings if multiple on-issued messages are desired.

11

string

optional, default value=nil

Message to trigger when the mission has completed. This can be a table of strings if multiple on-completed messages are desired.

12

table

optional, default value=nil

Table of string names of other narrative events to inherit the rewards from. If this narrative event triggers before another that it's set to inherit from, this narrative event will add the mission rewards from the other to its own mission rewards, and prevent the other narrative event from triggering.

Returns:

  1. nil

defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4920

Last updated 12/08/2022 11:56:58