Show / Hide Table of Contents

Class MyCampaignManager

Inheritance
System.Object
MyCampaignManager
Namespace: Sandbox.Game
Assembly: Sandbox.Game.dll
Syntax
public class MyCampaignManager : Object

Constructors

MyCampaignManager()

Declaration
public MyCampaignManager()

Fields

AfterCampaignLocalizationsLoaded

Declaration
public static Action AfterCampaignLocalizationsLoaded
Field Value
Type Description
System.Action

OnCampaignMissionFinished

Declaration
public Action<string> OnCampaignMissionFinished
Field Value
Type Description
System.Action<System.String>

Properties

ActiveCampaign

Declaration
public MyObjectBuilder_Campaign ActiveCampaign { get; }
Property Value
Type Description
VRage.Game.ObjectBuilders.Campaign.MyObjectBuilder_Campaign

ActiveCampaignLevels

Declaration
public IEnumerable<string> ActiveCampaignLevels { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

ActiveCampaignName

Declaration
public string ActiveCampaignName { get; }
Property Value
Type Description
System.String

CampaignNames

Declaration
public IEnumerable<string> CampaignNames { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

Campaigns

Declaration
public IEnumerable<MyObjectBuilder_Campaign> Campaigns { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<VRage.Game.ObjectBuilders.Campaign.MyObjectBuilder_Campaign>

CrossPlatform

Declaration
public bool CrossPlatform { get; }
Property Value
Type Description
System.Boolean

IsCampaignRunning

Declaration
public bool IsCampaignRunning { get; }
Property Value
Type Description
System.Boolean

IsNewCampaignLevelLoading

Declaration
public bool IsNewCampaignLevelLoading { get; }
Property Value
Type Description
System.Boolean

IsScenarioRunning

Declaration
public bool IsScenarioRunning { get; }
Property Value
Type Description
System.Boolean

LocalizationLanguages

Declaration
public IEnumerable<string> LocalizationLanguages { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

RefreshSubscribedModDataResult

Declaration
public (MyGameServiceCallResult, string) RefreshSubscribedModDataResult { get; }
Property Value
Type Description
System.ValueTuple<VRage.GameServices.MyGameServiceCallResult, System.String>

Static

Declaration
public static MyCampaignManager Static { get; }
Property Value
Type Description
MyCampaignManager

Methods

FindStartingState(MyObjectBuilder_CampaignSM)

Finds starting state of the campaign SM. For purposes of first load.

Declaration
public MyObjectBuilder_CampaignSMNode FindStartingState(MyObjectBuilder_CampaignSM stateMachine)
Parameters
Type Name Description
VRage.Game.ObjectBuilders.Campaign.MyObjectBuilder_CampaignSM stateMachine
Returns
Type Description
VRage.Game.ObjectBuilders.Campaign.MyObjectBuilder_CampaignSMNode

ForceRefreshModData()

Declaration
public void ForceRefreshModData()

GetCampaign(String)

Declaration
public MyObjectBuilder_Campaign GetCampaign(string scfFilePath)
Parameters
Type Name Description
System.String scfFilePath
Returns
Type Description
VRage.Game.ObjectBuilders.Campaign.MyObjectBuilder_Campaign

HasStartedAsCampaign(String)

Declaration
public bool HasStartedAsCampaign(string campaignName)
Parameters
Type Name Description
System.String campaignName
Returns
Type Description
System.Boolean

Init()

Loads campaign data to storage.

Declaration
public void Init()

IsCampaign(String, Boolean, UInt64)

Declaration
public bool IsCampaign(string campaignName, bool isVanilla, ulong modPublishedFileId)
Parameters
Type Name Description
System.String campaignName
System.Boolean isVanilla
System.UInt64 modPublishedFileId
Returns
Type Description
System.Boolean

IsCampaign(MyObjectBuilder_CampaignSessionComponent)

Declaration
public bool IsCampaign(MyObjectBuilder_CampaignSessionComponent ob)
Parameters
Type Name Description
MyObjectBuilder_CampaignSessionComponent ob
Returns
Type Description
System.Boolean

LoadCampaignLocalization()

Declaration
public void LoadCampaignLocalization()

NotifyCampaignFinishing()

Called from MyCampaignSessionComponent when campaign finishing. Do not use anywhere else.

Declaration
public void NotifyCampaignFinishing()

PublishActive(String[], String[])

Runs publish process for active campaign.

Declaration
public void PublishActive(string[] tags, string[] serviceNames)
Parameters
Type Name Description
System.String[] tags
System.String[] serviceNames

RefreshModData()

Declaration
public Task RefreshModData()
Returns
Type Description
ParallelTasks.Task

ReloadMenuLocalization()

Declaration
public void ReloadMenuLocalization()

RunCampaign(String, Boolean, Boolean)

Declaration
public bool RunCampaign(string path, bool runAsInstance = true, bool crossPlatform = false)
Parameters
Type Name Description
System.String path
System.Boolean runAsInstance
System.Boolean crossPlatform
Returns
Type Description
System.Boolean

RunNewCampaign(String, MyOnlineModeEnum, Int32, Boolean, Boolean)

starts new campaign

Declaration
public CloudResult RunNewCampaign(string campaignName, MyOnlineModeEnum onlineMode, int maxPlayers, bool crossPlatform, bool runAsInstance = true)
Parameters
Type Name Description
System.String campaignName
MyOnlineModeEnum onlineMode
System.Int32 maxPlayers
System.Boolean crossPlatform
System.Boolean runAsInstance
Returns
Type Description
VRage.GameServices.CloudResult

SetExperimentalCampaign(MyObjectBuilder_Checkpoint)

Declaration
public void SetExperimentalCampaign(MyObjectBuilder_Checkpoint checkpoint)
Parameters
Type Name Description
MyObjectBuilder_Checkpoint checkpoint

SwitchCampaign(String, Boolean, UInt64, String, String, Boolean)

Changes the manager state to given campaign.

Declaration
public bool SwitchCampaign(string name, bool isVanilla = true, ulong publisherFileId = 0UL, string publisherServiceName = null, string localModFolder = null, bool crossPlatform = false)
Parameters
Type Name Description
System.String name
System.Boolean isVanilla
System.UInt64 publisherFileId

0 is default value or local mod value.

System.String publisherServiceName
System.String localModFolder
System.Boolean crossPlatform
Returns
Type Description
System.Boolean

Events

OnActiveCampaignChanged

Declaration
public static event Action OnActiveCampaignChanged
Event Type
Type Description
System.Action

OnCampaignFinished

Declaration
public event Action OnCampaignFinished
Event Type
Type Description
System.Action

OnCampaignFinishing

Declaration
public event Action OnCampaignFinishing
Event Type
Type Description
System.Action
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾