Space Engineers

Space Engineers

Blarg's Fancy Ruler
74 Comments
Unruly 15 Mar, 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 2 Mar, 2024 @ 4:44pm 
Most of us will have to wait till Blarg reads this comment section and fixes the script.
Unruly 20 Feb, 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 6 Dec, 2023 @ 11:17pm 
Still not working unfortunately...
JingleBellWarrior 4 Oct, 2023 @ 8:30pm 
yeah I second the comment below, I believe blarg's ruler got screwed by the ai update :(
Rightraoedhelontidae 1 Sep, 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 6 Nov, 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 6 Nov, 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 7 Sep, 2022 @ 6:37am 
I also wanted to ask: I'm getting 'no scan data' on asteroids that Spectrometry ( https://steamhost.cn/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 5 Sep, 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?
09Klr650 30 May, 2022 @ 12:14pm 
Tried this recently on a multiplayer server. Either I messed up or it does not currently work. Could be either.
Dabigatran 9 Apr, 2022 @ 3:33am 
Still works?
Blacky Watchy 3 Jan, 2021 @ 11:25am 
is there a way to stop the script ad clean the lcd screen?
TeNNeX15 10 Oct, 2019 @ 6:22pm 
is there a way to send the gps cords to a programmable block on a different grid?
HostageRPG 15 Sep, 2019 @ 8:15pm 
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1864606736

I used both this script and your Ascent Cruise Control in this small grid build, to great effect.
Wicked One 31 Aug, 2019 @ 11:44am 
@RobRendell:
Sorry for the late response. Could have sworn I was subscribed to the thread.
Good that I checked ;)

But thank you very much. This is exactly what i meant.
Now my non-programming buddies can use it inside their cockpit too ;)
RobRendell 12 Jul, 2019 @ 3:11pm 
@WickedOne the version I have up on GitHub allows you to direct the output to a different screen on a multi-display block using the syntax I suggested below (so in your case, you'd add #Ruler@3 to the name of your industrial cockpit... or possibly #Ruler@2, if by screen 03 you mean the third screen in the list, since the first screen is @0).

I don't want to actually publish my modified script to the workshop, since it's Blargmode's work, but if you like you can copy the text of the version I have up on GitHub (without the "using", "namespace" or "class" declarations, so from line 14 to line 1237 inclusive) and paste it into a programmable block.
Wicked One 24 Jun, 2019 @ 2:23am 
While you guys are at it:
I just (locally) added a quick&dirty fix to PanelPrint(), to have it display its output on my Screen 03 of the industrial Cockpit.
Obviously some config parameters (code/custom data) so set up a cockpit screen would be the clean solution.
i just couldn't be arsed to add a TextSurface collection all the way through your code to grab it during init().
At least not for my quick little "I want it on THAT display...NOW" adjustment...

However, Rob seems to be up for the task, so I thought I'd mention it ;)
HostageRPG 10 Jun, 2019 @ 10:13pm 
This script is perfect for ship periscope subgrids! Spy ships are now much more viable. The weak range of regular sensors now seems even more pathetic in comparison
RobRendell 11 May, 2019 @ 3:55pm 
Ok - I've rearranged my git history and committed what I have to GitHub. The latest version is https://github.com/RobRendell/SEProgrammableBlocks/blob/master/FancyRuler.cs , or you can look at individual commits to see the deltas of each change.
Blargmode  [author] 11 May, 2019 @ 4:13am 
@RobRendell Yes I'd love to!
RobRendell 10 May, 2019 @ 3:13pm 
Hi, Blargmode. I've made some changes to your script - updated it to 1.190, added the multi-camera support I suggested and added a new "project (range)" command which makes a DistanceInfo for a point at the nominated distance forward from the #Ruler cameras, in case you have a HUD marker you want to translate into a GPS. Are you interested in having a look at what I've done?
Blargmode  [author] 7 May, 2019 @ 2:09am 
It does not. I'm not sure it's the direction I want to take this script either. Check out Whip's turret based radar.
foxhoundusmc 6 May, 2019 @ 5:42pm 
Any support for turreted camera? ie. surveillance type turrets. I'd like to have a nose turret scouring for targets, and then display range and IFF info on a screen in my fighter's cockpit
RobRendell 29 Apr, 2019 @ 9:36pm 
Awesome! Thanks again!
Blargmode  [author] 29 Apr, 2019 @ 6:40pm 
Support for multi-display blocks is planned, as well as using the new sprite rendering. The @-syntax is a good idea!
The multi camera idea is very good! I'll add that to the todo-list. Can't give you an ETA on either though.
RobRendell 29 Apr, 2019 @ 5:54pm 
Thanks for this script, @Blargmode! Are you open to some feature suggestions/requests?

You could potentially support displays with multiple surfaces (like cockpits) if the keyword you add to the block supported an optional index as a suffix, e.g. a IMyTerminalBlock with a name containing #Ruler@1 would cause the script to write its info to that block's second display (since the displays are 0-indexed). It would default to @0 if the block has a name containing just #Ruler.

Also, multi-camera support (in the same direction) would be nice. If multiple cameras are tagged with #Ruler, the script could use the camera with the lowest accumulated charge >= the requested range, so your longer-range cameras could continue to accumulate charge for a future long-range scan. For an unlimited scan, you'd use the camera with the highest current charge, and that would be the range the LCDs would display as the current range also.
Vorg 1 Apr, 2019 @ 5:16pm 
Yea, found it after posting. Thanks
Blargmode  [author] 1 Apr, 2019 @ 2:55am 
@Vorg The GPS coordinates from the scan is be printed in Custom Data of the programmable block, as well as in Custom Data of any connected LCD. Just copy that and create a gps coordinate from clipboard.
Vorg 31 Mar, 2019 @ 6:53pm 
I like this script better then another I tried which I found to would often fail to scan when it should. This one is more dependable, but not seeing how to get the GPS so I can save it and tag roids for scouting.
Grimm Spector 2 Mar, 2019 @ 8:44am 
I got it working actually, it just took an inordinate amount of time to start running (despite it's claim after compile), and then didn't do the #fancy part. A lot of scripts seem to be having execution time, or improper repetition on their callbacks. Yours seems to work fine once it starts actually running. Might not be something you can fix. I just won't be turning off PBs on small ships to save power anymore.
Blargmode  [author] 2 Mar, 2019 @ 6:44am 
@Grimm Spector Alright thanks for telling me. I'll have a look at it after I'm done with the updates to my airlocks script
Grimm Spector 1 Mar, 2019 @ 10:19pm 
I think this isn't working since the big update yesterday. Any chance of it getting updated? I'm scanning an asteroid a dozen meters ahead of me with max range set to 2km, and it just doesn't see it at all.
Blargmode  [author] 31 Aug, 2018 @ 2:43pm 
@supersquid2000 This script can't do it, but it can send the scan-data to another programmable block every time you do a scan. Just tag the other programmable block (and recompile).
supersquid2000 28 Aug, 2018 @ 6:15pm 
Is there any way to make this program save entries with user input that could later be viewed on an LCD and then plotted as a course? i.e. drive around surveying asteroids with a click of a button and then going back later to look at the data to figure which one to mine first? I wouldn't be opposed to using a second PB that parses the data for recall.
Blargmode  [author] 14 Aug, 2018 @ 4:44pm 
@Ryukki No, the raycast sees what it hits, no matter what that is.
Ryukki 12 Aug, 2018 @ 1:46pm 
Is there anyway to make it ignore the planet? I'm trying to scan for bases and ships.
Gamblewamble 13 Jul, 2018 @ 8:52am 
Great work dude, thx a lot !
Audiacious 8 May, 2018 @ 1:35pm 
Alright I was worried about the different grids. I'll test it thanks. Would be an interesting way to make guided missiles.
Blargmode  [author] 8 May, 2018 @ 1:02pm 
Yes, I'm pretty sure you can. I haven't tried it though.
Audiacious 8 May, 2018 @ 2:03am 
can you put a camera on a rotor and aim it with say mouse aiming and then run this script??
foxhoundusmc 21 Feb, 2018 @ 10:43pm 
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1309194506
Here's my ship I'm using with your scripts!
Keep making awesome stuff!
DarthSandpaper 30 Dec, 2017 @ 2:38pm 
The camera, text panel, and programable block are already set to me. Still nothing.
Blargmode  [author] 28 Dec, 2017 @ 7:55am 
Hard to tell what might be wrong. Maybe it's a simple ownership problem? Make sure the ownership of both is set to you, and press recompile, then run in the programmable block with the argument empty.
DarthSandpaper 28 Dec, 2017 @ 12:22am 
I put it in the name. The script didn't see it.
Blargmode  [author] 28 Dec, 2017 @ 12:21am 
The tag is supposed to be in the name. And don't forget to add a timer to run it every few seconds if you want it to automatically update. (I have an update in the works that gets rid of the timer block, but I'm not at home so I can't finish it for the time being).
DarthSandpaper 27 Dec, 2017 @ 7:17pm 
How exactly do I get a Text Panel on a small grid to connect to this? I got the script to connect to the camera but the Text Panel I named it #Raycast and typed in #Raycast into it so now I see #Raycast wen I look at it. Still no glorified mesuring stick appearing.
foxhoundusmc 10 Dec, 2017 @ 7:59am 
@Blargmode, That's a bummer. I was hoping to set up something like this: https://www.lockheedmartin.com/content/dam/lockheed/data/mfc/photo/arrowhead/mfc-mtads-main-photo-01-h.jpg
Put it on the front of a fighter/gunship, and have it actively track and provide info about the target it's tracking, distane, position, IFF, etc.

Also perhaps have an additional function in the script to cycle through available targets with a button press (such as a "run" command to the hotbar), to allow the pilot to select which target to monitor?

What is the issue with turrets not allowing it? Do their cameras function differently than the fixed ones?

Thanks for all the work you do!
Blargmode  [author] 10 Dec, 2017 @ 4:15am 
@foxhoundusmc It isn't possible with turrets, but cameras can do it (Limited to their field of view; 45° in each direction). I got so inspired that I started making it immediately. It isn't ready yet, because its a complete rewire and I have to make sure it can do everything it currently can. But it's coming.
EnjoyCoke 10 Dec, 2017 @ 3:13am 
This is so awesome I love it.