Chapter Missions
The chapter mission system is a simple wrapper for the traditional method of packaging chapter missions. It triggers the mission within an intervention
to better control the flow of events on-screen, and optionally plays advice and infotext that can add flavour.
This system is due a rewrite to allow them to use mission_manager
's and also allow chapter missions to be constructed from strings at runtime.
Loaded in Campaign | |
Loaded in Battle | |
Loaded in Frontend |
-
chapter_mission:new(
chapter number
number,
faction key
string,
mission key
string,
advice key
[string],
infotext
[table]
) -
Creates a chapter mission object. This should happen in the root of the script somewhere, so that the object is declared and set up by the time the first tick happens so that it can be properly restarted from a savegame.
Parameters:
1
number
Chapter number. All numbers from 1 to n should be accounted for, where n is the last chapter in the sequence. When a chapter mission completes it automatically starts the next chapter mission in the sequence.
2
string
Faction key of the faction receiving the mission.
3
string
Mission key of the chapter mission.
4
string
optional, default value=nil
Key of advice to deliver alongside the mission.
5
table
optional, default value=nil
table of string infotext keys to deliver alongside advice.
Returns:
chapter_mission
Chapter mission object
defined in ../../warhammer/working_data/script/_lib/lib_campaign_mission_manager.lua, line 1727
Once a chapter_mission
object has been created with chapter_mission:new
, functions on it may be called in the form showed below.
Example - Specification:
<chapter_mission_object>:<function_name>(<args>)
Example - Creation and Usage:
local chapter_one_mission = chapter_mission:new(1, "wh_main_emp_empire", "wh_objective_empire_01")
chapter_one_mission:manual_start()
-
chapter_mission:has_been_issued()
-
returns whether the chapter mission has been issued.
Returns:
boolean
has been issued
defined in ../../warhammer/working_data/script/_lib/lib_campaign_mission_manager.lua, line 1863
-
chapter_mission:has_been_completed()
-
returns whether the chapter mission has been completed.
Returns:
boolean
has been completed
defined in ../../warhammer/working_data/script/_lib/lib_campaign_mission_manager.lua, line 1871
-
chapter_mission:manual_start()
-
Manually starts the chapter mission. It should only be necessary to manually start the first chapter mission in the sequence - the second will start automatically when the first is completed, and so on.
Returns:
nil
defined in ../../warhammer/working_data/script/_lib/lib_campaign_mission_manager.lua, line 1890