A Torch plugin that fix several data validate issue

Deprecated! Keen fixed all exploits.

Github Link


A Torch plugin which fix several data validate issue for SpaceEngineers server.

The SpaceEngineers server NOT validate some important two-way sync variable received from client.

For example, open the file located in SpaceEngineers\Content\Data\CubeBlocks\CubeBlocks_Automation.sbc(XML) and search for text MyObjectBuilder_SensorBlockDefinition.

Modify MaxRange of this BlockDefinition then save it.

Use this modified client to connect to dedicated server, you will find that you can set LeftExtend, RightExtend and other options in SensorBlock UI to very large value.

Those data NOT ONLY display on client, server actually accept them.

Use ProgramBlock to get data from SensorBlock with Sandbox.ModAPI.Ingame.IMySensorBlock.DetectedEntities.

Player can get as many grids' position as he want by increase the MaxRange in XML.

This plugin add extra validate logic in server to void the problem above.

Current fixed block

  • MySensorBlock(LeftExtend, RightExtend, BottomExtend, TopExtend, BackExtend, FrontExtend)

  • MyWarhead(Countdown)

  • MyLargeTurretBase(ShootingRange)

  • MyOreDetector(Range)

  • MyMechanicalConnectionBlockBase(SafetyDetach)

  • MyPistonBase(MaxVelocity, MaxLimit, MinLimit, MaxImpulseAxis, MaxImpulseNonAxis)

  • MyMotorStator(Torque, BrakingTorque, TargetVelocity)

  • SafeZone(Box size)(modified client will display the fake border until rejoin to server)

  • MyMotorSuspension(MaxSteerAngle, Power, Strength, Height, Friction, SpeedLimit, PropulsionOverride, SteeringOverride)

  • MyThrust(ThrustOverride)

  • MyJumpDrive(JumpDistanceRatio)

  • MyGyro(OverrideVelocity)

  • MyBeacon(Radius)

  • MyRadioAntenna(Radius)

  • MyLightingBlock(Radius, Falloff, BlinkInterval, BlinkLength, BlinkOffset, Intensity, LightOffset)

TODO blocks

  • MyLaserAntenna(this patch cause crash, i don't know why)
  • Sound(i don't find the block class)

Script fix

NaN value

If script in ProgramBlock try to pass float.NaN to property of those fixed block, value of that property will be reset to minimum legal value.

For example, player run such code in game:

c# (GridTerminalSystem.GetBlockWithName("GyroName") as IMyGyro).Pitch = float.NaN;

Pitch will be reset to -30(depend on BlockDefinition in server side).

Enum out of range

Enums in c# are not checked, player can crash server by in-game script:

c# (GridTerminalSystem.GetBlockWithName("BatteryName") as IMyBatteryBlock).ChargeMode = (ChargeMode) 3;

With this plugin, IMyBattertyBlock.ChargeMode will not be changed if the Enum underlying value(max to 2) not valid.

For more Enum in game please create an issue on Github to tell me.

Projector fix

~~If player use a modified blueprint in Projector, items in some block inventory will NOT be clear. Player can create items for free.~~

~~This plugin current fix(If you find more block in blueprint can use this bug, please create an issue on Github):~~

~~* OxygenGenerator(All ice in inventory will be clear)~~

~~* JumpDrive(Stored power will be reset to zero)~~

~~* GatlingGun, MissileLauncher(All ammo in inventory will be clear)~~

(Keen fixed it)


The game will automatically correct the wrong data when loading world. If the player created illegal data before, Those data will be cleared after the server restarts(to nearest legal value). So no more step need to be done, just install this plugin and restart server.


Apache 2.0

Beta? Version Note Date Download DL Count
v1.0.2.3 Keen fixed all exploits, please remove this plugin 8/7/21 6:03:27 PM Download 106
v1.0.2.2 optimize code 3/28/21 3:37:22 PM Download 198
v1.0.2.1 fix Enum out of range 1/3/21 3:48:57 PM Download 212
v1.0.2.0 keen fixed projector problem 12/1/20 3:26:06 PM Download 175
v1.0.1.3 fix GatlingGun, MissileLauncher in blueprint 7/2/20 4:41:03 PM Download 357
v1.0.1.2 projector fix 6/15/20 4:28:46 PM Download 207
v1.0.1.1 Beacon, Antenna, LightBlock 6/14/20 10:04:10 AM Download 169
v1.0.1.0 fix NaN 6/10/20 4:51:56 PM Download 155
v1.0.0.2 MyGyro 6/10/20 2:34:43 PM Download 133
v1.0.0.1 JumpDrive 4/28/20 2:54:31 PM Download 188
v1.0.0.0 init 4/27/20 3:23:59 PM Download 109