Assembly: VRage.Game.dll

public interface IMySession

ModAPI giving access to MySession functions and properties for modders

Events

Member Description
OnSessionLoading Called when session started loading
OnSessionReady Called when session is ready

Properties

Member Description
AssemblerEfficiencyMultiplier Gets game session global assembler efficiency multiplier
AssemblerSpeedMultiplier Gets game session global assembler speed multiplier
AutoHealing Gets if game settings allows auto healing
AutoSaveInMinutes Gets auto save game setting
BlocksInventorySizeMultiplier Gets game session global block inventory size multiplier
Camera Gets current camera
CameraController Gets current camera controller
CameraTargetDistance Gets or sets the third person camera distance.
CargoShipsEnabled Gets if game settings allows auto healing
CharactersInventoryMultiplier Gets game session global characters inventory size multiplier
Config Obtaining values from config is slow and can allocate memory! Do it only when necessary.
ControlledObject
CreativeMode Gets whether current create game is in creative mode
CurrentPath Gets current game save path
DamageSystem Gets ModAPI interface providing control over damage system
Description Gets or sets current game description (used in MOTD)
ElapsedPlayTime Gets time elapsed since the start of current session
EnableCopyPaste Get whether current player can copy/paste grids.
EnvironmentHostility Gets current game environment hostility setting
Factions Gets ModAPI interface providing control over faction
GameDateTime Gets and sets game date time, that is a sum of 2081 Jan 1 at 0:00:00 and ElapsedPlayTime Note using setter, would change ElapsedPlayTime as well
GameplayFrameCounter Gets current game amounts of ticks passed from start. Only gets updated when the game is not paused
GPS Gets ModAPI interface providing control over gps coordinates
GrinderSpeedMultiplier Gets game session global grinder speed multiplier
HackSpeedMultiplier Gets game session global hacking speed multiplier
HasCreativeRights Checks if the local player is an admin or is promoted to space master (or higher).
InventoryMultiplier Not used
IsCameraAwaitingEntity Not used
IsCameraControlledObject Gets if the current camera is the current controlled object (not spectator)
IsCameraUserControlledSpectator Gets if the current camera is the user controlled spectator
IsServer Gets whether this game instance is server. (Not if game is multiplayer)
LocalHumanPlayer Gets player that playing on this game window. Always null, when called on dedicated server instance, and not null in any other cases
MaxBackupSaves Gets maximum backups allowed in game settings
MaxFloatingObjects Gets maximum floating objects allowed in game settings
MaxPlayers Gets maximum players allowed in game settings
Mods Gets or sets mods added to current game
MultiplayerAlive Gets or sets whether there is connection with server. When it is false, a warning would appear.
MultiplayerDirect
MultiplayerLastMsg Gets or sets time in seconds, from last message from server
Name Gets or sets name of the game
NegativeIntegrityTotal Gets or sets amount of damage applied to blocks
OnlineMode Gets current session online mode
OxygenProviderSystem Gets ModAPI interface providing control oxygen system
Password Gets or sets password, that player must enter to join server
Player
PositiveIntegrityTotal Gets or sets amount of integrity added to blocks
PromoteLevel Gets the local player's promote level.
RefinerySpeedMultiplier Gets or sets global refinery speed multiplier
SessionSettings
ShowPlayerNamesOnHud Gets whether player names should be drawn on hud
SurvivalMode Gets whether current create game is in creative mode
ThrusterDamage Gets whether thruster damage setting is enable
ThumbPath Gets current game path to thumbnail
TimeOnBigShip Gets time spent on controlling large grid
TimeOnFoot Gets time spent on foot
TimeOnJetpack Gets time spent flying on jetpack
TimeOnSmallShip Gets time spent on controlling small ship
TotalBotLimit Gets limitation on maximum bot amount
Version Get version of Space Engineers
VoxelMaps Gets ModAPI interface providing control over voxel maps
WeaponsEnabled Gets whether weapons are enabled in current game
WeatherEffects Gets MySectorWeatherComponent ModAPI interface
WelderSpeedMultiplier Gets current game welder speed global multiplier
WorkshopId Gets current game scenario workshop id
WorldBoundaries Gets world boundaries. Not letting character leaving them
ClientCanSave Obsolete: Client saving not supported anymore
HasAdminPrivileges Obsolete: Use HasCreativeRights

Methods

Member Description
BeforeStartComponents() Triggers BeforeStart for each game session component, resets game timer.
Draw() Calls Draw on all game session components
GameOver() Does nothing
GameOver(MyStringId?) Does nothing
GetCheckpoint(string) Gets current game save. Game is saved in several files. This function returns object builder for file: Sandbox.sbc
GetComponentByInterfaceType()
GetSector() Gets current game save. Game is saved in several files. This function returns object builder for file: SANDBOX_0_0_0_.sbs
GetUserPromoteLevel(ulong) Gets a remote player's promote level.
GetVoxelMapsArray()
GetWorld() Gets information what receives client when connecting to server
IsPausable() Get whether game is pauseable (not multiplayer)
IsUserAdmin(ulong) Checks if a given player is an admin (or higher).
IsUserIgnorePCULimit(ulong) Gets whether user can ignore pcu and block limits
IsUserIgnoreSafeZones(ulong) Gets whether user can ignore safezone settings
IsUserInvulnerable(ulong) Gets whether user is invulnerable
IsUserKeepOriginalOwnershipOnPaste(ulong) Gets whether user can keep original BuiltBy of blocks when pasting grid
IsUserShowAllPlayers(ulong) Gets whether user can see all players
IsUserUntargetable(ulong) Gets whether user can't be targeted by turrets
IsUserUseAllTerminals(ulong) Gets whether user can see use all terminals
RegisterComponent(MySessionComponentBase, MyUpdateOrder, int) Registers game session component for updates.
Save(string) Saves game
SetAsNotReady() Making game "not ready", preventing joining server for EOS server
SetCameraController(MyCameraControllerEnum, IMyEntity, Vector3D?) Sets mode of camera controller
SetComponentUpdateOrder(MySessionComponentBase, MyUpdateOrder) Change the update order of a session component. There is a proxy for this method in the session component itself.
TryGetAdminSettings(ulong, out MyAdminSettingsEnum) Gets enabled admins settings
TryGetComponentByInterfaceType(out T)
Unload() Unloads current game session. Calls UnloadDataComponents() , UnloadMultiplayer()
UnloadDataComponents() Unloads data components. Shouldn't be called directly. Use Unload() instead
UnloadMultiplayer() Unloads data components. Shouldn't be called directly. Use Unload() instead
UnregisterComponent(MySessionComponentBase) Unregisters components from updates and calls.
Update(MyTimeSpan) Updates games. Does 1 simulation tick
UpdateComponents() Updates games. Does 1 simulation tick, but without any other logic, that is executed in Update(MyTimeSpan)
IsUserPromoted(ulong) Obsolete: Use GetUserPromoteLevel