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 Battle | |
Loaded in Frontend |
-
narrative_events.how_they_play(
unique name
string
,
faction key
string
,
trigger message
string
,
on-issued message
[string
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.4
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 154
-
narrative_events.event_message(
unique name
string
,
faction key
string
,
title text key
string
,
primary text key
string
,
secondary text key
string
,
persistent
boolean
,
index
number
,
trigger message
string
,
on-issued message
[string
]
) -
Creates and starts an event message narrative event. An event message with the specified title, primary and secondary text will be shown.
Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Text key of title for the event message to create, in full localised
[table]_[field]_[record_key]
format.4
Text key of primary text for the event message to create, in full localised
[table]_[field]_[record_key]
format.5
Text key of secondary text for the event message to create, in full localised
[table]_[field]_[record_key]
format.6
Persistence flag to pass to
campaign_manager:show_message_event
.7
Index value to pass to
campaign_manager:show_message_event
. This determines the header image shown.8
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 212
-
narrative_events.event_message_not_player_turn_only(
unique name
string
,
faction key
string
,
title text key
string
,
primary text key
string
,
secondary text key
string
,
persistent
boolean
,
index
number
,
trigger message
string
,
on-issued message
[string
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Text key of title for the event message to create, in full localised
[table]_[field]_[record_key]
format.4
Text key of primary text for the event message to create, in full localised
[table]_[field]_[record_key]
format.5
Text key of secondary text for the event message to create, in full localised
[table]_[field]_[record_key]
format.6
Persistence flag to pass to
campaign_manager:show_message_event
.7
Index value to pass to
campaign_manager:show_message_event
. This determines the header image shown.8
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 232
-
narrative_events.intervention(
unique name
string
,
faction key
string
,
configuration callback
[function
],
trigger callback
[function
],
trigger message
string
,
on-issued message
[string
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Intervention configuration callback. If supplied, this is passed to
narrative_event:add_intervention_configuration_callback
to pre-configure theintervention
associated with the narrative event prior to it being triggered. The callback will be passed theintervention
object as a single argument when called.4
optional, default value=nil
Trigger callback to call when the
intervention
is triggered. If supplied, this is passed tonarrative_event:set_trigger_callback
. The callback will be passed thestring
triggering message, and a callback which can be used to prevent the narrative event completing immediately. Call the callback withfalse
as an argument to stop it completing, then later withtrue
as an argument to complete.5
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.6
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 322
-
narrative_events.callback(
unique name
string
,
faction key
string
,
callback
function
,
trigger message
string
,
on-issued message
[string
]
) -
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.
Theallow_issue_completed_callback
passed to the callback may be called withfalse
supplied as an argument to prevent the narrative event from completing automatically. It will only later complete when theallow_issue_completed_callback
is called again withtrue
supplied as an argument. This mechanism allows the callback to control when the narrative event completes, rather than it completing immediately.Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Callback to call.
4
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.5
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 385
-
narrative_events.interval(
unique name
string
,
faction key
string
,
interval
number
,
trigger message
string
,
on-issued message
[string
]
) -
Creates and starts a narrative event that waits a supplied interval in seconds when triggered.
Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Interval in seconds to wait.
4
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.5
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 453
-
narrative_events.set_saved_value(
unique name
string
,
faction key
string
,
value key
string
,
value
value,
trigger message
string
,
on-issued message
[string
]
) -
Creates and starts a narrative event that saves a value to the savegame with
campaign_manager:set_saved_value
when triggered.Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Key of value to save.
4
value
Value to save. Supported data types are
boolean
,number
,string
andtable
.5
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.6
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 521
-
narrative_events.set_advice_string_seen(
unique name
string
,
faction key
string
,
value key
string
,
trigger message
string
,
on-issued message
[string
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Key of value to mark as seen.
4
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.5
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 584
-
narrative_events.fullscreen_movie(
unique name
string
,
faction key
string
,
movie path
string
,
start fade duration
[number
],
end fade duration
[number
],
trigger message
string
,
on-issued message
[string
]
) -
Creates and starts a fullscreen movie narrative event.
Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Path of movie to play. See the documentation of
cm:register_instant_movie
for more information.4
optional, default value=0.5
Duration in seconds over which to fade the picture to black before playing the movie.
5
optional, default value=0.5
Duration in seconds over which to fade back to picture after playing the movie.
6
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.7
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 731
-
narrative_events.scripted_cutscene(
unique name
string
,
faction key
string
,
cutscene duration
number
,
cutscene config
[function
],
trigger message
string
,
on-issued message
[string
]
) -
Creates and starts a scripted cutscene narrative event. The cutscene constructor function
campaign_cutscene:new
is used.Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Duration of scripted cutscene in seconds.
4
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.6
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 911
-
narrative_events.cindy_cutscene(
unique name
string
,
faction key
string
,
cindyscene path
string
,
blend in
number
,
blend out
number
,
cutscene config
[function
],
trigger message
string
,
on-issued message
[string
]
) -
Creates and starts a scripted cutscene narrative event with a cindyscene. The cutscene constructor function
campaign_cutscene:new_from_cindyscene
is used.Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Path to cindyscene, from the working data folder.
4
Cindyscene blend in duration in seconds.
5
Cindyscene blend out duration in seconds.
6
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.8
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 928
-
narrative_events.camera_fade(
unique name
string
,
faction key
string
,
fade duration
number
,
to black
boolean
,
trigger message
string
,
on-issued message
[string
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Duration of camera fade in seconds.
4
Sets whether the camera should fade to black. Supply
false
to fade to picture instead.5
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.6
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1014
-
narrative_events.cancel_mission(
unique name
string
,
faction key
string
,
mission key
string
,
trigger message
string
,
on-issued message
[string
]
) -
Creates and starts a narrative event that cancels a custom mission when triggered.
Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
Key of the mission to cancel, from the
missions
database table. The mission will be cancelled for the specified faction.4
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.5
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1095
-
narrative_events.generic(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
event/conditions
table
,
camera scroll callback
[function
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
],
force_advice
[boolean
]
) -
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 atable
. Advice may optionally be supplied to be issued with the mission.Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
A
table
containing one or more event/condition records. Each record should be atable
with astring
"event" element and a "condition" element that's either a condition function ortrue
.7
optional, default value=nil
A camera scroll callback, to be supplied to
narrative_event:set_camera_scroll_target_callback
.8
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.9
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.11
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
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1284
-
narrative_events.defeat_enemy_army(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
enemy faction key
string
,
target cqi
number
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of target enemy faction, from the
factions
database table.6
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
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1371
-
narrative_events.defeat_initial_enemy_army(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
enemy faction key
string
,
target cqi
number
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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 withnarrative_events.defeat_enemy_army
.Parameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of target enemy faction, from the
factions
database table.6
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
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1394
-
narrative_events.defeat_army_of_culture(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text key
string
,
culture key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Text key of mission ojective to show, in the full
[table]_[field]_[key]
format.6
Key of target culture, from the
cultures
database table. This can also be atable
of strings if multiple target cultures are desired.7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1513
-
narrative_events.defeat_chaos_army(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.6
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.8
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1537
-
narrative_events.gain_pooled_resource(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
resource key
string
,
resource quantity
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of pooled resource, from the
pooled_resources
database table.6
Absolute quantity of pooled resource the faction has to acquire to complete the mission.
7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1613
-
narrative_events.gain_devotion(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
resource quantity
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Absolute quantity of pooled resource the faction has to acquire to complete the mission.
6
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1636
-
narrative_events.gain_supporters(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
resource quantity
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Absolute quantity of pooled resource the faction has to acquire to complete the mission.
6
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1658
-
narrative_events.gain_pooled_resource_scripted(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
pooled resource key
string
,
lower threshold
number
,
upper threshold
number
,
additive
boolean
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the mission_text database table. This must be set up for scripted missions such as this.
6
Key of the pooled resource to monitor, from the
pooled_resources
database table. This may also be atable
ofstring
pooled resource keys if multiple pooled resources are to be monitored.7
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
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
If set to
true
the value of all supplied specified pooled resources is counted towards the threshold value. Iffalse
is supplied, then the mission only completes when one of the pooled resources specified reaches the threshold value.10
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.11
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.13
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 1885
-
narrative_events.capture_settlement(
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
string
or atable
of strings],
scroll target
[value],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
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
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, astring
faction key (region is looked up before faction), or anumber
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
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.9
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.11
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2028
-
narrative_events.raze_or_own_settlements(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
region key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Region key of target settlement, from the
campaign_map_regions
database table. If more than one target settlement is desired atable
of region keys can be supplied.6
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2104
-
narrative_events.control_provinces(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
provinces
[number
],
province key
[string
],
scroll target
[value],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value=1
Target number of provinces to control.
6
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, astring
faction key (region is looked up before faction), or anumber
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
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.9
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.11
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2209
-
narrative_events.enact_commandment(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
enactments
[number
],
commandment key
[string
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value=1
Target number of commandments to enact.
6
optional, default value=nil
Key of specific commamdment to enact.
7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2308
-
narrative_events.destroy_faction(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
target faction key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Faction key of target faction, from the
factions
database table. This may also be a table of multiple target faction keys.6
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2405
-
narrative_events.recruit_units(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
units
number
,
unit key
[string
],
exclude existing
[boolean
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Target number of units to recruit.
6
optional, default value=nil
Optional unit key of unit that must be recruited, from the
land_units
database table. This may also be atable
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
optional, default value=false
Excluding pre-existing units from the count.
8
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.9
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.11
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2504
-
narrative_events.construct_n_of_building_chain(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
buildings
number
,
building chain
[string
],
exclude existing
[boolean
],
scroll target
[value],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Target number of buildings to construct.
6
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 atable
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
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, astring
faction key (region is looked up before faction), or anumber
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
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.10
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.12
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2614
-
narrative_events.construct_building_with_condition(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
condition
[function
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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 theBuildingCompleted
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 returntrue
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key that specifies the objective text, from the
mission_texts
table.6
optional, default value=nil
Condition function to pass. If no condition function is supplied then the condition always passes.
7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2706
-
narrative_events.construct_buildings_with_condition(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
condition
[function
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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 theBuildingCompleted
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 returntrue
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key that specifies the objective text, from the
mission_texts
table.6
optional, default value=nil
Condition function to pass. If no condition function is supplied then the condition always passes.
7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2730
-
narrative_events.construct_technology_enabling_building(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
condition
[function
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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 theBuildingCompleted
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 returntrue
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
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
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2801
-
narrative_events.upgrade_any_settlement(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.6
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.8
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 2952
-
narrative_events.research_technology(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
technologies
number
,
mandatory tech
string
,
additive
[boolean
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Number of technologies that must be researched.
6
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
optional, default value=false
Sets whether pre-existing technologies count towards the total.
8
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.9
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.11
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3036
-
narrative_events.gain_income(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
income
number
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Income level to be gained.
6
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3103
-
narrative_events.reduce_upkeep(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text key
string
,
threshold
number
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission objective text, from the
mission_texts
database table.6
Threshold percentage of upkeep-expenditure to income which the player must reach to succeed the mission.
7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3214
-
narrative_events.recruit_any_hero(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.6
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.8
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3286
-
narrative_events.use_hero(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.6
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.8
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3355
-
narrative_events.win_battles_with_hero(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
win threshold
number
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Number of victories to attain.
6
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3517
-
narrative_events.win_set_piece_battle(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
battle key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of set piece battle, from the
battles
database table.6
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3586
-
narrative_events.perform_ritual(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
num rituals
[number
],
ritual key
[string
],
ritual category key
[string
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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. Seenarrative_events.perform_ritual_scripted
for a version of this function that triggers a scripted missionParameters:
1
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value=1
Number of rituals to enact. If a value other than
1
is specified then any ritual key is disregarded.6
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
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
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.9
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.11
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3683
-
narrative_events.perform_ritual_scripted(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
num rituals
[number
],
ritual keys
[string
],
ritual categories
[string
],
target faction keys
[string
],
listen for completion
[boolean
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
optional, default value=1
Number of rituals to enact.
7
optional, default value=nil
Key(s) of ritual(s) to enact, from the
rituals
database table. This can be astring
ritual key or atable
of strings. If no ritual keys are specified then any rituals match.8
optional, default value=nil
Key(s) of ritual category/categories to enact, from the
ritual_categories
database table. This can be astring
category key or atable
of strings. If no categories are specified then any rituals match.9
optional, default value=nil
Key(s) of any target factions, from the
factions
database table. This can be astring
faction key or atable
of strings. If no target factions are specified then any targets match.10
optional, default value=false
Listen for the ritual being completed, rather than the ritual being started.
11
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.12
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.14
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3873
-
narrative_events.perform_motherland_ritual(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.6
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.8
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3918
-
narrative_events.perform_ascension(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.6
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.8
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 3956
-
narrative_events.concoct_plague(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
quantity
[number
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value=1
Quantity of plagues to to concoct.
6
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.7
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.9
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4000
-
narrative_events.spread_corruption_to_adjacent_region(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
corruption type
string
,
threshold value
number
,
culture key
[string
],
mission text
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Corruption type, from the
pooled_resources
database table.6
Threshold value which the corruption must meet or exceed in an adjacent region for the mission to be completed.
7
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
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.9
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.10
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.12
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4144
-
narrative_events.construct_foreign_slot(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
should be allied
[boolean
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
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
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4220
-
narrative_events.construct_foreign_slot_building(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
should be allied
[boolean
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
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. Ifnil
is supplied, a building constructed in any foreign slot will count.7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4313
-
narrative_events.equip_armory_item(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
item key
[string
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
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 atable
of item keys. Ifnil
is supplied then any item equipped by a character in the subject faction will match.7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4417
-
narrative_events.equip_any_daemonic_gift(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.6
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.8
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4440
-
narrative_events.perform_character_action(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
ability key
[string
],
target faction key
[string
],
character subtype
[string
],
must be success
[boolean
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
optional, default value=nil
The key of the ability to perform, from the
abilities
database table. This may also be atable
of ability keys. Ifnil
is supplied then any ability performed will match.7
optional, default value=nil
The key of the target faction, from the
factions
database table. This may also be atable
of faction keys. Ifnil
is supplied then any faction target will match.8
optional, default value=nil
The subtype key of the performing character, from the
agent_subtypes
database table. This may also be atable
of character subtype keys. Ifnil
is supplied then any performing character will match.9
optional, default value=false
If set to
true
this specifies that the action performed must have had a successful outcome.10
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.11
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.13
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4626
-
narrative_events.embed_agent(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
character subtype
[string
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
optional, default value=nil
The subtype key of the performing character, from the
agent_subtypes
database table. This may also be atable
of character subtype keys. Ifnil
is supplied then any performing character will match.7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4652
-
narrative_events.spread_plagues(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
item key
[string
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
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 atable
of item keys. Ifnil
is supplied then any item equipped by a character in the subject faction will match.7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4750
-
narrative_events.unlock_symptoms(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
num symptoms
[number
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
optional, default value=1
The number of symptoms that must be unlocked for the mission to be succeeded.
7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4845
-
narrative_events.enter_stance(
unique name
string
,
faction key
string
,
advice key
[string
],
mission key
string
,
mission text
string
,
stance number
[number
],
mission issuer
[string
],
mission rewards
table
,
trigger message
string
,
on-issued message
[string
],
on-completed message
[string
],
inherit list
[table
]
) -
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
Unique name amongst other declared narrative events.
2
Key of the faction to which this narrative event applies, from the
factions
database table.3
optional, default value=nil
Key of advice to issue with this mission, if any, from the
advice_threads
database table.4
Key of mission to issue, from the
missions
database table.5
Key of mission text to display, from the
mission_text
database table. This must be set up for scripted missions such as this.6
optional, default value=1
Stance number, as returned by the
stance_adopted()
method provided by theForceAdoptsStance
event.7
optional, default value="clan_elders"
Key of mission issuer, from the
mission_issuers
database table.8
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
Script message on which the narrative event should trigger. This can also be a
table
of strings if multiple trigger messages are desired.10
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
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
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:
nil
defined in ../../Warhammer/working_data/script/campaign/_narrative/wh3_narrative_event_templates.lua, line 4920