Space Engineers

Space Engineers

177 ratings
Blarg's Fancy Ruler
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
9.406 KB
Feb 11, 2017 @ 1:39pm
Jan 27, 2018 @ 6:54pm
9 Change Notes ( view )

Subscribe to download
Blarg's Fancy Ruler

In 1 collection by Blargmode
Blargmode's scripts
5 items
Description
This script allows you to measure the distance between your camera and some asteroid or whatever. It shows you some basic info about the object: What it is, if it’s hostile, how far away it is, and how long it will take you to get there.

It uses the either Monospace pixels to display data on the main LCD, or regular text, and regular text on a secondary corner LCD. Of course, you don’t need to use either of the LCDs, you can just look in the programmable block’s output. Or you can have 12 main and 50 corner-LCDs.

You’ll find the GPS coordinates to what you scanned in the Custom Data field. Both on the PB and the LCDs.

Range: The range increases with 2000m per second. By default it tries to measure as far as possible and all of the built up charge is consumed. You can limit the range to conserve charge, and therefore be able to measure several times in rapid succession.

Note that the pictures above are taken with one of my mods active. It’s called Reduced Bloom and it does exactly what is says on the tin. Vital for anyone using LCDs.

Setup
You need:
  • One Programmable block.
  • One Camera with the tag #Ruler in the name.
  • #Ruler tags on the LCDs you want to use. To get the graphic panel, add #Fancy as well.

Usage
  • Run with the argument “scan” to measure the distance to whatever the camera is pointing at.

Additional ways to use it
  • Run with the argument “scan #” to ignore the range setting and shoot a ray # meters long.
  • Run with the argument “range #” to change the range setting on the fly (can also be changed in the settings).
  • Tag a Timer block or a Sensor with #Ruler to trigger them when you scan something.
  • Tag a programmable block to run it when you can something, with the GPS coordinates of what you scanned as the argument.
  • Previous 2 points can be set to only trigger if the target is an enemy.
  • Create GPS-points on your hud by copying the coordinates from Custom Data of the programmable block or LCD panels.

Also, try using this with my Dot Matrix font! It looks way better on large LCDs.
74 Comments
Unruly Mar 15, 2024 @ 3:20pm 
It's a trivial fix, and it seems most likely Blargmode isn't coming back, but up to you of course.
Darth Porgus Mar 2, 2024 @ 4:44pm 
Most of us will have to wait till Blarg reads this comment section and fixes the script.
Unruly Feb 20, 2024 @ 10:09am 
The API for text surfaces changed. Run your copy through https://jsonformatter.org/csharp-formatter so you can read it, then change all instances of 'writepublictext' to 'writetext' and simply comment out the showpublictext lines. There will also be one syntax error where the beautifier erroneously adds a space between e and $ on line 1020 of the prettified code. It should pass code check now and seems to run fine. No guarantees expressed or implied, ymmv, don't call us we'll call you, etc etc.

I still get 'no scan data' on objects Spectrometry returns data for. Anyone know what's going on there?
toke.exhale Dec 6, 2023 @ 11:17pm 
Still not working unfortunately...
JingleBellWarrior Oct 4, 2023 @ 8:30pm 
yeah I second the comment below, I believe blarg's ruler got screwed by the ai update :(
Rightraoedhelontidae Sep 1, 2023 @ 11:42am 
i guess it doesn't work since the last update, says "assembly not found, please recompile script" on vehicles where it worked perfectly fine before
dichebach Nov 6, 2022 @ 8:11am 
BTW, I see that some folks have recently commented that it doesn't seem to be working for them. It DOES seem to be working for me. There is a large amount of obscure telemetry it spits out when first plugging it all in which suggest incompatibilities between some of the syntax or identifiers used in this script and the latest version of the game. And moreover, I had to fiddle with it and seemingly " give it some time" to get going. But it has now spit out some data for me on an asteroid so it does seem to work as of 6 November 2022 :steamhappy:
dichebach Nov 6, 2022 @ 8:03am 
What syntax constraints on the "tag?" For example, will:
IVE: Camera #Ruler
IVE: #Ruler Camera
and
#Ruler Camera
all work equally well?

I generally try to append an affix to each device that isn't hidden on each construct, e.g., "IVE" = Ion_Vessel_Eleithylia vs. "BAB" = Base_Bat_Cave, etc.
Unruly Sep 7, 2022 @ 6:37am 
I also wanted to ask: I'm getting 'no scan data' on asteroids that Spectrometry ( https://steamcommunity.com/sharedfiles/filedetails/?id=2687324923 ) is returning information for, both blocks on the same grid. Range is not the issue. *Sometimes* futzing around and aiming at different parts of the asteroids will get a range, but usually not. Is there something we can do to get a range more reliably?
Unruly Sep 5, 2022 @ 3:13pm 
Hi, thanks for your mods.

I realise that it's a been a while, but do you have any suggestions for a workaround for using other mods that also want to put or get data from the LCD's custom field? I'm trying to use Hud LCD v2 to put the data your ruler creates on the suit hud, but it's config options are either in the block name of the lcd (buggy, and needs refreshed every login) or the custom field, which your mod erases every scan. Perhaps a [Blarg's Ruler] section tag for the custom field?