CampaignGameStarter
Last updated
Was this helpful?
Last updated
Was this helpful?
This class can be used to introduce behaviours, dialog, menus and models for campaigns, and implements the IGameStarter interface. This is useful in the OnGameStart
method in , which is shown in the example.
NOTE: This page is incomplete, so if you find anymore information on the subject, please create a pull request and add to this growing Modding Documentation!
public void ClearEmptyObjects()
(Work in progress)
public void AddBehavior(CampaignBehaviorBase campaignBehavior)
Adds the to the current campaign.
public void AddModel(GameModel model)
Adds the to the current campaign.
public void LoadGameTexts(string xmlPath)
(Work in progress) Loads XML file at the inputted path, introducing more texts to the game. These texts are in the same format as the comment_strings.xml file, with their purpose currently not determined.
public void LoadGameMenus(Type typeOfGameMenusCallbacks, string xmlPath)
(Work in progress) Loads XML file at the inputted path, introducing more menus to the game.
public void AddGameMenu(string menuId, string menuText, OnInitDelegate initDelegate, GameOverlays.MenuOverlayType overlay = GameOverlays.MenuOverlayType.None, GameMenu.MenuFlags menuFlags = GameMenu.MenuFlags.none, object relatedObject = null)
public void AddWaitGameMenu(string idString, string text, OnInitDelegate initDelegate, OnConditionDelegate condition, OnConsequenceDelegate consequence, OnTickDelegate tick, GameMenu.MenuAndOptionType type, GameOverlays.MenuOverlayType overlay = GameOverlays.MenuOverlayType.None, float targetWaitHours = 0f, GameMenu.MenuFlags flags = GameMenu.MenuFlags.none, object relatedObject = null)
(Work in progress)
public void AddGameMenuOption(string menuId, string optionId, string optionText, GameMenuOption.OnConditionDelegate condition, GameMenuOption.OnConsequenceDelegate consequence, bool isLeave = false, int index = -1, bool isRepeatable = false)
NOTE: All of these are get/read only
public readonly bool IsTutorial
Whether or not the campaign starts with a tutorial.
public ICollection<CampaignBehaviourBase> CampaignBehaviors
public IEnumerable<GameModel> Models
See for use.
See for use.
Collection of all registered .
Enumerable Set of all registered
This is used within our class: