You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Janeene Beeforth edited this page Nov 20, 2018
·
6 revisions
The leader title is one of the first pieces of data that is set in the save game inside OnMsg.NewMapLoaded or OnMsg.LoadGame. This means that any custom titles need to be set prior to those two message functions being triggered.
Martian Tribune now sends a message "MartianTribuneModLoaded" when the mod has been loaded for a game. This gets fired inside OnMsg.ModsReloaded(), and should be safe to use to determine whether MartianTribune has been loaded into a game. It occurs early enough in the startup process that Leader Titles can be set prior to the game data itself being loaded.
functionOnMsg.MartianTribuneModLoaded()
-- Replace XXXX with the translation number.MartianTribuneMod.Functions.AddLeaderTitleForSponsor(
-- Value of GetMissionSponsor().name for that Sponsor."Jedi",
-- Translated LeaderTitle to use for that Sponsor.T{XXXX, "Jedi Master"}
)
end