SE v203 modding & scripting changes - THDigi/SE-ModScript-Examples GitHub Wiki

I compared the decompiled Space Engineers' game code for v203.505 against v202.124 and this is what I found that is relevant to modding and scripting (including PB).

For server admins (affects ModAPI too):

  • v203.505

    • World settings got <EnableTrashSettingsPlatformOverride>, game's description of it: "Enable trash settings to be overriden by console specific settings"
    • <SyncDistance> is capped to 2000 for crossplay dedicated servers.
    • <ViewDistance> gets capped to 7000 for console clients (not sure what that means if it's larger and a PC player joins, they probably don't have it capped?).
  • New session settings (sandbox_config.sbc)

    • UpdateRespawnDictionary = false
      Unknown, but it is set to true in the Space Standoff scenario.
    • BlueprintShare = true
      Allows players to share blueprints with other online players (players can also turn it off for themselves in game settings).
    • BlueprintShareTimeout = 30
      Timeout between sharing blueprints.
    • PrefetchShapeRayLengthLimit = 15000
      Max distance weapons can interact with voxels.
    • EnemyTargetIndicatorDistance = 20
      Max distance to show enemy character indicator when aiming at them.

SBC modding/modelling (affects modAPI too)

  • v203.505

  • Breaking changes:

    • Missile ammo definition's <MissileRicochetAngle> was replaced by <MissileMinRicochetAngle> and <MissileMaxRicochetAngle>.
    • Missile ammo definition's <MissileRicochetProbability> was replaced by <MissileMinRicochetProbability> and <MissileMaxRicochetProbability>.
  • New Entity Components: RotatingSubpartComponent, RandomMovementSubpartComponent, ParticleEntityComponent, LcdSurfaceComponent, MultiTextPanelComponent.

  • Weapon definition's <MissileAmmoData tag got RicochetSoundName attribute.

  • Block definitions got <WheelPlacementCollider> tag (see wheel blocks).

  • Block definition's <MountPoint tag got CouplingTag and AllowCouplingWithItself attributes.
    See Hidden SBC tags/features @ Mountpoints features

  • TextPanel block definition got <MaterialNamesToHideWhenOffline> (see Holo LCD).

  • TurretControlBlock block definition got:

    • <PidGainProportional> = 1.1
    • <PidGainIntegral> = 0.5
    • <PidGainDerivative> = 0.005
    • <PidGainFilter> = 1
  • DefensiveCombatBlock block definition got:

    • <FleeDistanceMin> = 1
    • <FleeDistanceMax> = 50000
    • <EvasiveManeuverAngleMin> = 0
    • <EvasiveManeuverAngleMax> = 90
    • <EvasiveManeuverIntervalRangeMin> = 1
    • <EvasiveManeuverIntervalRangeMax> = 30
  • Cockpit and CryoChamber definitions got <CharacterAnimations> (see decorative pack 3).

  • Beacon block definition got <EnableLight> (defaults true).

  • TargetLockingComponent and TargetLockingBlockComponent got:

    • <LockingModifierCharacter> = 2
    • <LockingTimeMinCharacter> = 1
    • <LockingTimeMaxCharacter> = 10
    • <LockingModifierDistanceCharacter> = 10

PB API (affects ModAPI too):

  • New objects:
    • IMyComponentContainer (replaces the MyComponentContainer in block.Components).
  • block.Components.TryGet<T>() now supports inputting interfaces (Get<T>() still does not).
  • Obsolete methods and properties were removed from IMyTextPanel.
  • Vector3/D.Angle() was fixed to clamp the value before calling Acos().

ModAPI:

  • v203.505

    • MyExplosionFlags got FORCE_CUSTOM_END_OF_LIFE_EFFECT.
    • MyParticlesManager.TryCreateParticleEffect() got a int keepXFramesAhead = 0 parameter.
    • MyExplosionInfo got GetCueByExplosionType() and GetExplosionEffect().
    • MyExplosionInfoSimplified got CustomSound field.
    • MySoundPair got GetCueName().
  • New objects:

    • IMyEntityComponentContainer
    • IMyResourceSinkComponent
    • IMyLcdSurfaceComponent
    • IMyMultiTextPanelComponentOwner
    • IMyRenderWithLights
    • MyCustomRenderEntitySubpart<T>
  • VRage.Game.Components.Interfaces is now whitelisted.

  • MyUpdateOrchestrator was removed.

  • PathUtils got EnsureSafePath()
    WARNING: it only works for appdata folder or game data folder, it will NOT allow from published mod folders.

  • MyObjectBuilderSerializer methods got changed to check PathUtils.EnsureSafePath().

  • MyLog now only allows Init() in specific folders (see PathUtils.EnsureSafePath()).

  • DictionaryExtensions got GetValueOrNew().

  • MyEntityUpdateEnum got EACH_FRAME_AFTER; EntityFlags got NeedsUpdateAfter; MyParallelUpdateFlags got EACH_FRAME_AFTER.

  • MyEntity:

    • Changed Components prop to IMyEntityComponentContainer type.
    • Added ctor(bool testingPurpouses) and InitComponentsForTesting().
    • Added OnDebugDraw event.
    • Added protected virtual void BeforeGameLogicInit().
    • Changed InstantiateSubpart() to use the first non-null entity given.
    • Added OnModelRefresh event (was since 202 but somehow missed it).
  • IMyCockpit got AttachPilot(IMyCharacter, int animation) overload.

  • IMyOffensiveCombatHitAndRun got GetFirstWeaponForwardVector delegate.

  • IMyShipConnector got DetachFinished event.

  • IMyTargetingCapableBlock got SetLockedTarget(IMyCharacter).

  • MyBlockVariantGroup got HasNewContent() and MarkAsViewedContent().

  • MyCubeBlockDefinitionGroup and MyGuiBlockCategoryDefinition got CreateNewContentNotificator().

  • MyVisualScriptLogicProvider got ChangeDoorState().

  • MyRenderComponentPlanet (which is internal) got override for RemoveRenderObjects() (which is accessible from MyRenderComponent/Base).

  • MyRenderComponentScreenAreas got HideScreenArea(int).

  • IMyUpdateOrchestrator got GetStats(), StatsFilter, StatsViewDirFilter, ClearStats().

  • MyAutopilotWaypoint got IsCorrectRotationNeeded, static AreEqualByResultCoordinates().

  • MyCockpit.AttachPilot() got int seed parameter (which is the seating animation).

  • MyCubeGrid:

    • Added MassSyncProperty prop and OnGridMarkedDirty event.
    • Removed DebugDrawRange() and DebugDrawPositions().
  • MyGamePruningStructure got GetAproximateDynamicClustersForSizeDebug().

  • MyPlanet got GetHeightFromSurface().

  • MySafeZone got IsActionAllowed(MySafeZoneAction, long, BoundingBoxD?, BoundingSphereD?, Vector3D?) (and something similar for MySessionComponentSafeZones too),

  • MyShipController got AreBreaksOn, PreviousController, SetLockedTarget(IMyCharacter).

  • MyVoxelBase got IsAnyOfPointInside().

  • IMyTargetLockingComponent got MyEntity TargetEntity and MyCubeGrid Target was marked obsolete.

  • MyGridTargeting got TrackedCharactersChanged event; SetLockedGrids() was renamed to SetLockedGridsOrCharacters().

  • MyIngameScriptComponent replaced NextUpdate with UpdateFrequency.

  • MyLightingLogic got IsPreview.

  • MyDefinitionManager got TryGetContainerDefinition() and TryGetComponentDefinition().

  • MyDefinitionId got static DropToStringCache().

  • MyDefinitionBase got CheckDefinitionDLCs().

  • BoundingBox got IsBetween().

  • MyDynamicAABBTreeD got GetAproximateClustersForAabbDebug().