Space Engineers

Space Engineers

Not enough ratings
Rosa's Astral Codex
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
390.065 KB
May 30, 2023 @ 8:06pm
Jun 7, 2023 @ 6:12pm
6 Change Notes ( view )

Subscribe to download
Rosa's Astral Codex

Description
Rosa's Astral Codex allows you to scan asteroids using a camera to add them to the script's database, where you can then add nodes about the asteroid, search the notes from previous asteroids, and activate autopilot to fly to any selected asteroid.

This script also supports sharing asteroid data with other grids through the antenna system, so you can synchronize all of your ships and share your prospecting results with your friends.

Blocks used

All blocks are optional. Add the following blocks to unlock new functionality:

  • Camera - Point at an asteroid and run the "scan" command to record the asteroid's position to the database. Must have
    [Codex]
    in its name.
  • LCD - Display information about the currently selected/scanned asteroid. Must have
    [Codex]
    in the name. (See below for more LCD uses).
  • Antenna - Broadcasts asteroid locations to other grids running this script, and receive asteroid locations from them.
  • Remote Control - Allows you to use the "go" argument to fly to an asteroid on autopilot.
  • A "Whip's Turret-Based Radar" setup - see asteroids on your radar when you add them to the database.

Be warned, if the programmable block running this script gets destroyed, then your data could be lost! Run this script on multiple grids within antenna range to protect your investment.

Commands

Command
Description
scan
If pointing at an asteroid, the asteroid's location will be saved to the database, and will be selected for the other commands
note
Sets notes for the currently-selected asteroid. For example, "note iron" will set the selected asteroid's notes to "iron".
note+
Similar to the "note" command, but adds text to the end of the note instead of replacing it.
find
Searches the asteroid database and selects the closest asteroid with a matching note. For example "find iron" would select the closest asteroid that has "iron" in its notes
go
Starts autopilot to fly to the selected asteroid.
delete
Removes the selected asteroid from the database.
clear
Removes all asteroids from the database.

Configuration

The behavior of the script can be tweaked in the custom data in a section named "Astral Codex". All values are optional.

Key
Default
Description
raycastRange
15000.0
The maximum range, in meters, that cameras are allowed to scan. That this is meant to match the render distance of the game.
enableRadioReplication
true
Allow the script to broadcast the locations of asteroids to other grids running this script.
replicationKey
ASTRALCODEX
Allows you to keep your asteroid broadcasts separate from others. If you want to keep your asteroids private, but still synchronize their locations between your ships, change this value to any other text. It's kind of like a password.
enableRadarBroadcast
true
Allows the script to broadcast the locations of asteroids to Whip's Turret-Based Radar
radarRange
50000.0
Broadcasts all asteroids within this distance from you to Whip's Turret-Based Radar (if enabled).
stoppingDistance
1000.0
The distance (in meters) away from an asteroid that the autopilot will stop at.

Here is an example containing the default values:

[Astral Codex] raycastRange=15000.0 enableRadioReplication=true replicationKey=ASTRALCODEX enableRadarBroadcast=true radarRange=50000.0 stoppingDistance=1000.0


Passive Scanning

Add the "[Codex Passive]" tag to the name of a camera to slowly but surely scan for asteroids automatically. Since each scan attempt takes time to charge, more cameras are better.

Any sensor with "Detect Asteroids" enabled will also automatically add an asteroid to the database if it is within range of the sensor.

Asteroid Radar

This script broadcasts asteroid locations to Whip's Turret-Based Radar, so you can see asteroids around you if you've scanned them.

Set up Whip's Radar like you would normally, and any ship in antenna range of this script will see asteroids on their radar.

Remember that you can increase the range of the radar display with the "range" command. For example, running "range 20000" on the Radar script will allow you to see the asteroids farther away from you.

LCD Configuration

By default, an LCD that has "[Codex]" in the name will display information about the selected asteroid.

There is another mode that allows you to show the closest asteroids matching a search term. For example, the following custom data will make the LCD display the nearest iron asteroids.

[Astral Codex] mode=searchResults searchTerm=iron

Source Code

Source code is available on GitHub[github.com].

Acknowledgements

Many thanks go to Cruel Sun for the Astronomicon script. Astral Codex can be considered a rewrite of Astronomicon.
30 Comments
cupcake  [author] Apr 19 @ 2:06pm 
Gotcha, I added you :)
Spite Apr 19 @ 10:37am 
Sure, I'm not sure how to do that unless I add you?
cupcake  [author] Apr 19 @ 9:30am 
@Spite I’d be really happy if you added me as a contributor :) thank you!

@Mortus Eclipse I’m glad you like it!
Mortus Eclipse Apr 15 @ 6:11pm 
Though I am using Spites Version. I felt I should give this a thumbs up to. It's a very useful script.
Empada Apr 15 @ 6:33am 
Ok, thanks!
Spite Apr 15 @ 6:24am 
@emapda, I've uploaded the version with the extra features here: https://steamcommunity.com/sharedfiles/filedetails/?id=3464356983

Lets continue the conversation there, instead of spamming Cupcake?

@Cupcake, let me know if you would like me to add you as contributor? It is almost all your code after all!
Spite Apr 15 @ 4:45am 
Are you trying to use Rosa's Astral Codex with another script?

Here is what I figured out today:
I can export a list of GPS points, where the "name" section is the name of the asteroid and its notes.

The list is just GPS points, I did it like this so I can batch import asteroids to SJOmega's Planet Map 3D and keep the notes.
Empada Apr 15 @ 4:24am 
Thanks! it will help a lot, because I will need to take a huge amount of asteroid data from the block. and well... since you are going to work on that, could you also add some option to add notes or a marker in bulk? so one can know which ones was already copied. I know it is possible to just clear the data to start again, but it incurs the risk of getting the same asteroid again. And if you replicate it to other programmable block after you could also copy the GPS of the same asteroid again.
Spite Apr 14 @ 8:33pm 
Oh, let me see if I can do that (very new to scripts in SE)
Empada Apr 14 @ 6:25pm 
Thanks!
But how can I take, for exemple, the GPS from 30 Asteroids at once? because with my Argus project I will have to take this or more from time to time.