Space Engineers

Space Engineers

Threat Score
10 Comments
Dark_453 Feb 19, 2024 @ 4:03am 
Hey there, Was the Block Count Ever Fixed, Been awaiting last patch to fix some error's was checking my subs and i was watching this. - *sorry to open older comments*
StalkR  [author] Jul 27, 2023 @ 7:54am 
No modded blocks shouldn't be a problem, then it means too many blocks and my script is not well optimized so it's my fault :) sorry!
Abisius Xarvenius Carbensius Jul 25, 2023 @ 10:42am 
@StalkR
already did that before making my last comment.

atm the grid has just 20674 blocks and is a planetary base build on pertam, maybee it has probs with some of the modded blocks or mods in use?

made a collection of the mods i have atm in use on that world https://steamcommunity.com/sharedfiles/filedetails/?id=2425314026
StalkR  [author] Jul 25, 2023 @ 10:01am 
@Abisius: as per the comment in the script, if you get "script too complex" it means the grid is too large, so make sure to use `multiGrid = false` then press `i` to open the info tab, read the total number of blocks on the grid, and write it in the script `totalBlocks = 0` (replace 0 with the total number of blocks on the grid).
Abisius Xarvenius Carbensius Jul 16, 2023 @ 2:41pm 
does anyone else have probs with the programmable block saying that the script is too complex?
StalkR  [author] Oct 30, 2022 @ 3:23am 
SylphicXen: thanks, that's a good idea! Filed https://github.com/StalkR/Space-Engineers-Stuff/issues/1 for tracking and further discussion.
SylphicXen Oct 29, 2022 @ 5:41pm 
Might I suggest a possible way to estimate the block count of armor? If you can accurately get the counts of functional blocks that are exposed to in-game scripting, you can subtract their combined weights (since weights of default blocks at the very least don't change) and guess that the nonfunctional blocks are light armor or heavy armor, depending on user choice.

It won't be accurate, but perhaps it can be an alternative for people who don't want to look up the block count in info, and/or don't need a completely accurate estimation of the score.

You can even provide a prefix to the result like ≈ to show that it's not completely accurate.
StalkR  [author] Jul 30, 2021 @ 8:32am 
Workshop updated with latest version from github: if hitting 'too complex' error, you can now provide the number of blocks of the grid with `int totalBlocks = XXX` (and set multiGrid = false) so it doesn't need to count (expensive). Upvote https://support.keenswh.com/spaceengineers/pc/topic/feature-request-ingame-script-api-expose-grid-block-count so we can properly automate this :)
StalkR  [author] Jul 23, 2021 @ 2:43am 
@mppc2001 yes unfortunately the game doesn't expose the total number of blocks of the grid, and trying to count them doesn't scale well. In that case just look up the block count of the grid under the 'info' tab and provide it to the script then it won't need to count it (and disable multigrid). Use this slightly modified script https://github.com/StalkR/SpaceEngineersStuff/blob/master/threat_score.cs and add the block count on line 27 (I'll update the workshop version some other time).
mppc2001 Jul 22, 2021 @ 3:20am 
This is a great script and worked well on smaller ships, but when I tried with Warships it gave error: Script execution terminated, script is too complex. Please edit and rebuild script.
Hope you can make it work, cheers!