SE v202 modding & scripting changes - THDigi/SE-ModScript-Examples GitHub Wiki
Moved to SE wiki: https://spaceengineers.wiki.gg/wiki/Modding/Reference/Patch_Changes/1.202
Old content
I compared the decompiled Space Engineers' game code for v202.124 against v201.014 and this is what I found that is relevant to modding and scripting (including PB).-
v202.124 additions:
- Dedicated server config (IMyDedicatedConfig) got
RemoteApiIP
.
- Dedicated server config (IMyDedicatedConfig) got
-
v202.112 additions:
- Dedicated server config (IMyDedicatedConfig) had
string WorldPlatform
replaced withbool CrossPlatform
.
- Dedicated server config (IMyDedicatedConfig) had
-
World settings got (
MyAPIGateway.Session.SessionSettings
):-
EnableSpaceSuitRespawn
=true (Enables player to respawn in space suit) -
MatchRestartWhenEmptyTime
=0 (Server will restart after specified time [minutes], when it's empty after match started. Works only in PvP scenarios. When 0 feature is disabled.) -
EnableFactionVoiceChat
=false (Faction Voice Chat removes the need of antennas and broadcasting of the character for faction.) -
EnableOrca
=true (Enable advanced Optimal Reciprocal Collision Avoidance) -
MaxProductionQueueLength
=50 (Maximum allowed length of a production queue. Can affect performance.)
-
-
v202.112 additions:
- Fonts (folder) got 3 new characters (the platform icons) which are added before every player's name.
- Fonts.sbc got a
SwappedPath
attribute per<Path>
tag which is used in PlayStation when "AreEnterBackButtonsSwapped" which is never true on PC (also we don't have the XML they point to, gonna be tricky for mod.io font mods).
-
New block types:
- EventControllerBlock (CubeBlocks_Automation.sbc)
- PathRecorderBlock (CubeBlocks_Automation.sbc)
- BasicMissionBlock (CubeBlocks_Automation.sbc)
- FlightMovementBlock (CubeBlocks_Automation.sbc)
- DefensiveCombatBlock (CubeBlocks_Automation.sbc)
- OffensiveCombatBlock (CubeBlocks_Automation.sbc)
- EmotionControllerBlock (CubeBlocks_GridAiPack.sbc)
-
All block definitions got:
- <EnableUseObjectSimpleTargeting> (bool, defaults false) which if set true I think ignores the visual model when targetting an UseObject (terminal, inventory, etc)
- <MechanicalTopInitialPlacementOffset> (Vector3, defaults null) which is used only by rotors/pistons/suspensions to offset the top part spawn point, used by 2x2 suspensions.
-
Camera block got a
camera
dummy option which is used for position offset only (no rotation). -
AirVent definition got <RotationSpeed>, <SpinUpSpeed>, <SpinDownSpeed>.
- these are for the new rotating subpart support, which grabs the very first subpart it finds no matter the name.
-
Missile ammo definition got <MissileRicochetAngle> (float, -1, degrees), <MissileRicochetDamage> (float, 0), <MissileRicochetProbability> (float, 0)
-
EntityComponents got a <RemoveExistingComponentOnNewInsert> (bool, true), where setting it false allows this component to be used multiple times on the same entity.
-
Detailed info got color support (bottom right in terminal):
-
[color=#AARRGGBB]
for custom colors (in hex format),[/color]
closing tag. - surround with
[
and]
for yellow. - to print [ or ] without coloring, use
[[
or]]
.
-
-
New objects:
IMyEventControllerBlock
IMyOffensiveCombatBlock
IMyDefensiveCombatBlock
IMyBasicMissionBlock
IMyFlightMovementBlock
IMyPathRecorderBlock
IMyEmotionControllerBlock
IMySearchlight
IMyWindTurbine
- and a few others that are accessible from the interfaces above.
-
IMyOxygenTank
was removed (it was obsolete for several years). -
IMyThrust
gotCurrentThrustPercentage
. -
IMyPistonBase
gotNormalizedPosition
. -
IMyTurretControlBlock
gotIsSunTrackerEnabled
. -
IMyShipConnector
'sIsConnected
is no longer tagged obsolete. -
IMyCubeGrid
gotLinearVelocity
andSpeed
(accessible viablock.CubeGrid
). -
IMyInventory
gotVolumeFillFactor
. -
Vector3D
&Vector3
got a staticAngle()
. -
⚠️ Caution:Vector3D
&Vector3
got an instancedNormalized()
which returnsVector3[D].Normalize(this)
, easily mistaken forNormalize()
which mutates the vector. -
⚠️ Caution:Vector2
andVector2D
are now implicitly castable (accidental precision loss). -
BoundingBoxD
&MyOrientedBoundingBoxD
gotGetCorner()
.
-
v202.112 additions:
- MyEntity got UpdateDuration (get only, overrideable by custom entity classes).
- MyRenderComponentBase.TextureChanges (Entity.Render) changed from
string
key toMyStringId
key. - [I]MyEntity.SetTextureChangesForSubparts() changed its dictionary parameter from
string
key toMyStringId
key.
NOTE: the previous method still exists and it allocates a new dictionary! - IMyDedicatedConfig had
string WorldPlatform
replaced withbool CrossPlatform
. - MyLog got ReportCodeLine().
- MyUtils got GetFixedInvalidFileNameChars() and GetFixedInvalidPathChars().
-
New objects:
-
IMyStoredPowerRatio
(cast a power-storing block or component to it). -
IMyComponentStack
(access fromIMySlimBlock.ComponentStack
). -
MyModAPINaturalGravityComponent
,IMyModAPINaturalGravityComponent
,IMyNaturalGravityComponent
(seeMyAPIGateway.GravityProviderSystem
). MyAutopilotComponent
-
IMyEventControllerEntityComponent
,IMyEventComponentWithGui
-
IMyWorkAreaTool
(cast ship tools to it)
-
-
MyFakes.ENABLE_TYPES_FROM_MODS
was set totrue
which means custom OBs can be declared in mods. -
PathUtils.GetFilesRecursively()
was added...⚠️ it restricts to local mods folder and user folder only, it won't work after mod is published. -
MyAPIGateway.GravityProviderSystem
was added which can get/add/remove gravity providers. -
MyGamePruningStructure.Instance
was added which cloned all methods there, can't tell if there's new stuff. -
MyRadioBroadcasters
was made public. -
MyCubeGrid
changes:-
ColorBlocks()
andSkinBlocks()
lost thevalidateOwnership
arg. -
ColorGridOrBlockRequestValidation()
lost itsplayer
arg. -
ContainerOpened()
andCompetetiveContainerOpened()
got anentityId
arg. - lost 2 overloads of
BuildBlockRequest()
, lostRequestSetToConstruction()
. - lost a bunch of methods regarding multiblocks (which is not a supported SE feature anyway).
- got
ChangePowerProducerState()
,BlocksWaitingOnAttachUpdate
,InternalInitFinished
,NaturalGravity
,LockedByCount
. - got
GetConnectedGrids(GridLinkTypeEnum, Action\<MyCubeGrid\>)
,MechanicalConnectionBlockAttachUpdateStatusChanged()
. - got static
ShowAiInfo
. - got events:
OnMinMaxChanged
,OnConnectionChangeCompleted
,OnTargetLockLost
,OnDeschedule
.
-
-
IMyCubeGrid
gotGetMaxThrustInDirection()
,RvoAgentId
,IsBlockTrasferInProgress
,NaturalGravity
. -
IMyCubeGrid
got events:OnGridBlockDamaged
,OnTargetLocked
,OnNaturalGravityChanged
,SpeedChanged
,OnMaxThrustChanged
,OnBlockIntegrityChanged
. -
IMyGridControlSystem
gotCurrentShipController
(accessible fromgrid.ControlSystem
). -
IMyGridGasSystem
gotForcePressurize
(accessible fromgrid.GasSystem
; NOTE: server-side only). -
IMySlimBlock
gotComponentStack
,BlockGeneralDamageModifier
,IsMovedBySplit
. -
MyCubeBlock
'sResourceSink
setter is now accessible, gotGetEmissiveStateHashFromComponent
,OnUpdateBeforenextFrame
events. -
IMyCubeBlock
gotCubeGridChanged
event. -
IMyTerminalBlock
gotIsDetailedInfoDirty
,ClearDetailedInfo()
,GetDetailedInfo()
,SetDetailedInfoDirty()
. -
IMyControllableEntity
gotIsAutopilotControlled
,RelativeDampeningDistance
andRelativeDampeningTarget
. -
MyRemoteControl
has a billion changes... -
MyShipController
'sPriority
getter was made public. -
IMyCockpit
got,IsOccupied
,IsOccupiedChanged
. -
MyDoorBase
gotOpenChanged
event. -
IMyDoor
gotOnDoorOpen
,OnDoorClosed
events. -
IMyThrust
gotThrustChanged
event. -
IMyMechanicalConnectionBlock
gotOnAttachedChanged
event. -
IMyMotorStator
gotAngleChanged
event. -
IMyPistonBase
gotNormalizedPositionChanged
event. -
IMyShipConnector
gotIsConnectedChanged
andAttachFinished
events. -
IMyShipMergeBlock
gotMergeStateChanged
event. -
IMyPowerProducer
gotCurrentOutputRatioChanged
event. -
IMyStoreBlock
gotCreateStoreItem()
(4 overloads),GetStoreItems()
,GetStoreItemById()
,InsertStoreItem()
,RemoveStoreItem()
. -
IMyInventory
gotOnVolumeChanged
event. -
IMyCharacter
gotCharacterGeneralDamageModifier
. -
IMyConfigDedicated
gotDedicatedId
. -
MyEntities got IsShapePenetrating()(which we cannot use because it asks forHkShape
). -
MyEntities
'TestPlaceInSpace()
got 2 new args. -
MyGridTargeting
got many changes. -
MyPhysics.CollisionLayers
gotOpenableSubpartLayer
(4). -
MyVisualScriptLogicProvider
gotTriggerTimerBlockForNonFriendlyPlayer()
,GetPlayerRespawnPoints()
,GoToPostMatchState()
,ReportMatchEndToAnalytics()
,SetScenarioWinTypeForAnalytics()
. -
Setting
MyEntity.Name
now automatically callsMyEntitiesInterface.SetEntityName()
. -
Billboard reflections now work: