Feature request: ingame script API: expose grid block count

StalkR shared this feedback 2 years ago
Submitted

Hello,

Could you expose grid block count to ingame scripts, e.g. under MyShipMass or IMyShipController?

Rationale: popular mods like Modular Encounters Spawner are using the block count for calculations (e.g. Threat Score), so players find having grid block count useful in ingame scripts (think: LCD showing live Threat Score).

Rightfully, ingame scripts can only GetBlocks for IMyTerminalBlock not IMySlimBlock, which would be too slow and affect server performance. Unfortunately, ingame scripts can still get the block count via even slower means like iterating the grid (min/max x/y/z or neighbor walk). Instead, the number of blocks of the grid could simply be exposed, like the mass already is.

And you might as well expose grid PCU count while you're at it.

Thanks!

Leave a Comment
 
Attach a file