Space Engineers

Space Engineers

Not enough ratings
Jump Distance Dialer
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
11.310 KB
Jul 19, 2015 @ 2:31am
Oct 23, 2018 @ 10:41am
8 Change Notes ( view )

Subscribe to download
Jump Distance Dialer

Description
This script allow you to set the precise distance you want to jump

UPDATE (04/30/17) changelog:
- This script now supports digi's control module mod, setup instructions below.

UPDATE (08/30/16) changelog:
- you no longer need camera blocks in your toolbar, you can now use programmable block arguments
- fixed crash after jump
- fixed jump distance lock no longer working

Features
- Dial the jump distance using the toolbar
- Show info in an LCD panel, including the dialed number, GPS location, actual jump distance and so on
- Lock the jump distace (usefull if your ship is under attack and lose mass, if active your jump distance will not change significantly)
- The dial mode can be disabled to enter in argument mode (slightly faster to setup)

Set up (Without digi's control module)

If DialMode is enabled:
- put a timer block, a programmable block, a jump drive
- rename the jump drive "jump" (this name can be customized)
- add to the toolbar the programmable block 13 times, each time with one of this arguments: "D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","D_Point","D_Enter","D_Cancel"
- Set the timer to trigger itself and run the programmable block
- if you set StatusLCD to true (Default, recommended): put a Text panel called "(LCD)" (this name can be customized)
- if you set UseDistLock to true (Default): put an additional programmable block in the toolbar with this argument: "DistLock"

If DialMode is disabled:
- put a programmable block and a jump drive called "Jump" (this name can be customized)

How to use (Without digi's control module)

If DialMode is enabled:

NOTE: it's strongly recommended that you enable StatusLCD.

This arguments ("D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","D_Point","D_Enter","D_Cancel") act as buttons
- form D0 to D9: this buttons are used to write the correspondig digits
- D_Point: writes a decimal separator
- D_Enter: set the jump distance using the number you dialed and deletes it
- D_Cancel: deletes the number you dialed
The argument called "DistLock" acts as a switch, it toggles on/off the Lock of the jump distance

If DialMode is disabled:

write the distance you want to jump in the argument section of the programmable block, run the script and jump.

Set up (With digi's control module)

NOTE: This only works with DialMode enabled

- put a timer block, a programmable block, a jump drive
- rename the jump drive "jump" (this name can be customized)
- add this line to the end of the name of the programmable block:
{ControlModule:input:num0 num1 num2 num3 num4 num5 num6 num7 num8 num9 numdecimal numsubtract nummultiply numdivide}
- change UseDigisControlModule setting to true (line 26 inside the script)
- set the timer to trigger itself and run the programmable block WITH the argument: timer (all lower case, no spaces)
- if you set StatusLCD to true (Default, recommended): put a Text panel called "(LCD)" (this name can be customized)

How to use (With digi's control module)

NOTE: it's strongly recommended that you enable StatusLCD.

Default keybindigs:
- 0 to 9 Numpad keys: used to write the correspondig digits
- Point Numpad Key: writes a decimal separator
- Minus Numpad Key: (enable and enter key) Used to toggle the input (if not pressed all other keys do nothing), if the input was off this key toggles it on, if it was already on this key ACT AS THE ENTER KEY by setting the jump distance to the number you dialed, AND also toggles of the input automatically.
- Multipy Numpad Key: (cancel key) deletes the number you dialed AND toggles off the input
- Divide Numpad Key: (distlock key) toggles on/off the Lock of the jump distance (like other keys it works only if input is enabled)

How to customize keybindigs for digi's control module
- first you have to modify the list of keys in the control module setting page of the programmable block
- then open the script editor and modify the list of keybindings at line 37
- more info inside the code

Issues

- If DialMode is enabled after the jump the script will crash because during the jump it cant find the blocks, you will have to recompile it. this issues has to be solved by Keen, but maybe i can use a second timer to stop the execution of the script during the jump, this will require knowing when the ship is jumping, but for now the only way to do it (maybe) is by checking power usage, recharge time and things like that, i think the best way to do it is by waiting until keen releases a documentation for the jump drive.

- if you save & exit when the script is running it will crash, so the next time you enter the world you will need to recompile it (click on check code).


Links

- Example blueprint (updated): http://steamcommunity.com/sharedfiles/filedetails/?id=754892409
- Check out also my Easy Action Sequencer script: http://steamcommunity.com/sharedfiles/filedetails/?id=481346976
50 Comments
CBFasi Dec 29, 2024 @ 4:31am 
Script faults present :(
Vanidas Jul 8, 2020 @ 11:32am 
Is this still functional?
B1487E May 2, 2020 @ 6:51pm 
It does not work
TheWarMaster97  [author] Oct 23, 2018 @ 10:43am 
@A Stormtrooper i update it but not tested it, tell me if it works now, thanks.
TheWarMaster97  [author] Oct 23, 2018 @ 9:49am 
@A Stormtrooper, that's a huge number, i guess 32 bit floats are not enough to store it, so it becomes a negative number, it maybe can be solved by changing floats to double but i'm not sure beacuse maybe floats are required by the API, i'll try to fix it.
B1487E Oct 18, 2018 @ 3:26pm 
GPS coords: X: -19742.44 Y: 370.93 Z: 3830.4

Dialed distance: 0 km

Actual distance: 5 km (Unlocked)

Min distance: 5 km

Max distance: -2147483648 km

Press enter to set the distance...

How do I fix the maximum distance? The max distance without the script is 54,000,000,000,000,000 kilometers, but the script automatically sets it to 5 kilometers.
B1487E Oct 18, 2018 @ 1:13pm 
@TheWarMaster97 thanks for the fast response :D
TheWarMaster97  [author] Oct 18, 2018 @ 11:56am 
@A Stormtrooper i updated the script, now it should work. Thank's for the bug report.
B1487E Oct 17, 2018 @ 3:07pm 
Tried this script with the "Mega Jump Drive (OP)" mod, doesn't seem to do anything. I am not using DialMode, nor am I using Digi's Control Module. I am using the script in argument mode, I don't get any errors, it just doesn't do anything.
TheWarMaster97  [author] May 20, 2017 @ 12:42am 
Try without any mod, If it works maybe a mod is interfering