Space Engineers

Space Engineers

Not enough ratings
Planetary Map [OBSOLETE]
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
60.598 KB
21 May, 2018 @ 1:54pm
8 Dec, 2018 @ 3:01pm
16 Change Notes ( view )

Subscribe to download
Planetary Map [OBSOLETE]

Description
THERE IS A NEWER, PRETTIER, AND MUCH MORE STABLE VERSION OF THIS SCRIPT...AND IT'S 3D!!!
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2286117398

A 2D Map for tracking your position relative to a planet.


DISCLAIMER
*************************************************************
This script is still in a very rough state. I'm updating it pretty regularly, fixing bugs and adding features. There's still a very high chance that if you use the code it will break at some point. Feel free to let me know about any bugs you encounter, but also try to be patient, because I might not be capable to fix every problem right away.


HOW TO RUN (quick & dirty)
******************************************************
1) Build at least 1 LCD Block, and include the tag "[MAP]" in its name. The required LCD Tag can be altered in line 4 of the code. Program should support multiple LCD's, but this has not been tested yet.

2) Select a reference block on your ship (ideally a cockpit, pilot seat, or remote control block) and paste the entire name of that block inside the quotation marks in line 5 of the code.

-----EXAMPLE: Cockpit name: Cerberus Cockpit
-------------------- Code line 5: const String COCKPIT_TAG = "Cerberus Cockpit";

3) Map COMMANDS to hotkey bars


COMMANDS
********************************************
You can run the program with the following arguments for the desired effect (don't include quotation marks " "):

"ZOOM_IN"

"ZOOM_OUT"

"FLIP_LEFT" // Rotates the view 90° left

"FLIP_RIGHT" // Rotates the view 90° right

"FLIP_UP" // Pitches the view 90° up

"FLIP_DOWN" // Pitches the view 90° down

"MOVE_UP" // Moves the display upward by a factor of the current scale

"MOVE_DOWN" // Moves the display downward by a factor of the current scale

"MOVE_LEFT" // Moves the display left by a factor of the current scale

"MOVE_RIGHT" // Moves the display right by a factor of the current scale

"CENTER_MAP" // Centers the map on your current position

"SHIP_MODE"
// Sets display to 'Ship Mode'. The map is always centered on the ship.
// Ship mode is indicated by white crosshairs on the display.

"WORLD_MODE"
// Sets display to 'World Mode'. This is the default map mode.
// In World mode, the map remains fixed, and the ship moves across it.

"TOGGLE_MODE"
// Switches between 'WORLD' and 'SHIP' modes.

"LOG_GPS"
// Creates new GPS marker on map, located at your current position.

"NEW_PLANET <PLANET NAME>"
// Creates a new Planet object, with SURFACE POINT 1 set to current position.
// This planet it 'uncharted' and will not show up on the map.

"LOG_NEXT <PLANET NAME>"
// Records subsequent SURFACE POINTS for uncharted planet object.
// Planet requires 4 surface points to be charted.
// Typical operation requires running "NEW_PLANET <NAME>" once
// followed by "LOG_NEXT <NAME>" 3 times.

"UPDATE_PLANET <PLANET NAME>"
//This essentially does the same thing as LOG_NEXT but for charted planets.



VANILLA PLANET COORDINATES:
******************************************************
Paste the following Data into the Custom Data of your programmable block, for the default Space Engineers planet system.

P1|EARTH LIKE|(0,0,0)|60000|GREEN||||
P2|MOON|(16388,136375,-113547)|9394|GRAY||||
P3|MARS|(1032762,134086,1632659)|64606|RED||||
P4|EUROPA|(916410,16373.72,1616441)|9600|WHITE||||
P5|LV-427|(131110.8,131220.6,5731113)|60894.06|MAGENTA||||
P6|TITAN|(36385.04,226384,5796385)|9238.224|CYAN||||


CHARTING NEW PLANETS
******************************************************
This should only be necesarry if you're using a modded planet. In order to chart a new planet, you need to get 4 surface points. To do this:

1) Land at an appropriate site. You want coordinates that are at "sea level" for the planet. Avoid mountain tops.
Wide planes and lake beds are ideal. On moons the insides of really wide craters might also be good.

2) Run the command "NEW_PLANET <PLANET NAME>". Planet names can include spaces. The only forbidden character in this case is the pipe: "|". DON'T USE IT! NEW_PLANET will create a new uncharted planet object. This planet will not appear on the map until it is fully charted, but you will see the planet entry in the Custom Data field of the programmable block. Your new planet will already have its first surface point set to your current position.

3) Run the command "LOG_NEXT <PLANET NAME>" at 3 additional surface points. The farther away these surface points are, the more accurate your map will be. Try to make them at least 10km away from the other points. DON'T fly in a straight line! You don't want points that are "Coplanar", or in the same plane as eachother. It's very unlikely that this will happen, but you don't want points that are nearly coplanar, either. One strategy may to be to fly in a straight line to gather your first 3 points, then make a 90° turn and fly to your 4th surface point.

Once your planet has been charted you may need to refresh the map (by running one of the navigation commands: i.e. "CENTER_MAP") before it actually appears. If your map doesn't seem accurate enough, you can refine your chart by using the "UPDATE_PLANET <PLANET NAME>" command.

Planets and GPS markers can also be manually entered into the program by inserting them into the Custom Data field of the programmable block. Planets have the following format:

<DESIGNATION>|<NAME>|<CENTER>|<RADIUS>|<COLOR>|<POINT 1>|<POINT 2>|<POINT 3>|<POINT 4>

Example:
P1|EARTH LIKE|(0,0,0)|60000|GREEN|(60000,0,0)|(0,60000,0)|(0,0,60000)|(-60000,0,0)


GPS markers have the following format:

<DESIGNATION>|<NAME>|<LOCATION>

Example:
G3|ORBIT POINT 1|(0,0,110000)


DESIGNATIONS: Always a letter followed by a number:
-- P: Planet
-- U: Uncharted Planet
-- G: GPS Waypoint

When an uncharted planet is charted, it's designation will automatically be updated from 'U' to 'P'.
16 Comments
SJ_Omega  [author] 18 Nov, 2020 @ 10:02am 
I have a newer 3D version of this script that uses sprites and is MUCH more stable:
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2286117398
Helratz 22 Sep, 2020 @ 12:26pm 
@MddBillyBlack that terrain mapping. Could it be done with cameras to increase the range. Have you considered doing a script with just that feature projected to and LCD as a sort of SONAR since the water mod is so popular now? Maybe even incorporate ore locations some how?
SJ_Omega  [author] 24 Aug, 2020 @ 1:31pm 
@bookworm408 Sort of. I'm currently working on updating the script for arbitrary rotation, (and also fixing a lot of crashes) but I'm also thinking of adding a feature that would let you map the surface terrain with a proximity sensor. That feature's going to take a lot of work, though, so it's going to be a while.
bookworm408 23 Aug, 2020 @ 5:14pm 
any plans to add surface features?
BLUNT 31 Mar, 2020 @ 5:46am 
Throws lots of errors...doesn't seem to be working.
pobblebonk 9 Nov, 2019 @ 5:19pm 
I'm not much myself a code monkey but I can put 2 and 2 together for manipulating scripts that don't do what i need into doing what i need. I'd look at some popular workshop items that use sprites like Blargs Fancy Flight Info or Whips Turret Based Radar and try reverse engineering how they handle sprites. Also some resources I found that might look helpful after some cursory googling. You also might want to brush up on the new text panel API because it was changed a good bit too since now you don't inherently need LCD/Tex panels anymore. Anything with a screen like a cockpit or a programmable block or even a survival kit can display text and scripts and sprites n the whatnot.

https://forum.keenswh.com/threads/api-or-example-script-for-the-new-lcd.7402966/
https://github.com/malware-dev/MDK-SE/wiki/Sandbox.ModAPI.Ingame.IMyTextPanel
SJ_Omega  [author] 9 Nov, 2019 @ 8:07am 
@pobblebonk Unfortunately, I'm not up to speed on using sprites. Do you know any good resources that could get me started?
pobblebonk 8 Nov, 2019 @ 1:46pm 
Also you should consider using sprites instead of pixels. You can make much more detailed images that are easier to manipulate with programming
pobblebonk 8 Nov, 2019 @ 1:44pm 
If you could make it so that you can put waypoints on the sphere like dots corresponding to gps points near or on the planet, you could make something super useful bc now its not just a flat colored sphere, its a sphere with info
amsedal 27 Feb, 2019 @ 3:38pm 
It's a pleasure! Again..I appreciate your script, being not a scripter myself and relying on those that are. :)