Frontend
The frontend object is automatically provided by the frontend game environment to script, and provides functionality specific to the frontend. The functions it provides may be called directly on the object in the following form. This interface is part of the UI - as such, the functions it provides may be called after the UICreated event is received.
Example:
frontend.<function_name>(<args>)
| Loaded in Campaign |
|
| Loaded in Battle |
|
| Loaded in Frontend |
|
-
frontend.start_named_battle(keystring) -
Starts a named battle specified by key from the
battlestable.Parameters:
1
key
Returns:
nil
defined in ../../common/UIDll/Source/FrontEnd/FrontendUIScriptInterface.cpp, line 179
-
frontend.start_campaign(campaign keystring,faction keystring,political party keystring) -
Starts the specified campaign, by string key from the
campaignstable. A faction key from thefactionstable and a political party key frompolitical_partiestable.Parameters:
1
campaign key
2
faction key
3
political party key
Returns:
nil
defined in ../../common/UIDll/Source/FrontEnd/FrontendUIScriptInterface.cpp, line 197
-
frontend.load_campaign(file pathstring, [from cloudboolean]) -
Loads a campaign save file by name.
Parameters:
1
file path
2
optional, default value=false
from cloud
Returns:
nil
defined in ../../common/UIDll/Source/FrontEnd/FrontendUIScriptInterface.cpp, line 220
-
frontend.continue_campaign([from cloudboolean]) -
Loads the most recently saved campaign game.
Parameters:
1
optional, default value=false
from cloud
Returns:
nil
defined in ../../common/UIDll/Source/FrontEnd/FrontendUIScriptInterface.cpp, line 246
-
frontend.campaign_saves_exist() -
Returns whether any singleplayer campaign save files exists.
Returns:
saves existboolean
defined in ../../common/UIDll/Source/FrontEnd/FrontendUIScriptInterface.cpp, line 269
-
frontend.campaign_saves_exist_mp() -
Returns whether any multiplayer campaign save files exists.
Returns:
saves existboolean
defined in ../../common/UIDll/Source/FrontEnd/FrontendUIScriptInterface.cpp, line 283
-
frontend.register_scripted_startup_movie(movie keystring) -
Registers a startup movie to be played prior to the main menu being displayed. Any movie/movies registered using this command will be shown after the corporate movies.
Parameters:
1
Path/key of movie to play. This should be the path to the movie file from data/movies, minus the
.ca_vp8file extension, and an entry for the specified movie should exist in thevideostable.Returns:
nil
defined in ../../common/UIDll/Source/FrontEnd/FrontendUIScriptInterface.cpp, line 297