Space Engineers

Space Engineers

163 ratings
EasyCommands
8
7
4
4
4
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
143.626 KB
28 Dec, 2021 @ 10:48am
14 Jan, 2023 @ 8:01pm
11 Change Notes ( view )

Subscribe to download
EasyCommands

Description
This script makes it easy to automate your creations using human readable commands that you enter into the Custom Data of the Programmable Block. Forget trying to write C# code in the in-game editor, or leaving the game to write code in an editor.

Create scripts in seconds using easy to use commands and mostly plain English.

Examples can be found at:
https://spaceengineers.merlinofmines.com/EasyCommands/examples

Full documentation can be found at:
https://spaceengineers.merlinofmines.com/EasyCommands

The code can be found at:
https://github.com/MerlinofMines/EasyCommands/
Popular Discussions View All (4)
201
6 Apr @ 9:20am
Scripting Questions
Merlin of Mines
72
15 Apr, 2023 @ 12:11pm
Feature Ideas
Merlin of Mines
60
24 Nov, 2023 @ 7:30am
Bugs
Merlin of Mines
152 Comments
Merlin of Mines  [author] 23 Feb @ 1:05pm 
Hey @Experementor, sorry for long delay.

I believe you should be able to get the custom data of an LCD screen by fetching the Terminal Block type for your block name.

set myData to "My LCD Screen" terminal block data
print "My Data: \n" + myData
Experementor 20 Nov, 2024 @ 4:50am 
Hello @Merlin!
I was wondering if there's any way at all to pull text from custom data of an LCD screen. I'm trying to make more or less a dialogue tree thing and I want to store the possible texts in the displays themselves - in Custom Data - but so far couldn't find a way to access it. Help would be very appreciated
solickm 2 Nov, 2024 @ 10:46pm 
@Merlin

"Eureka'd" upon what should be a more elegant solution, but being able to pull the waypoint info from the various AI blocks using EasyCommands would be great if possible.

Mahalos!
solickm 1 Nov, 2024 @ 9:44pm 
@Merlin

Been playing with how it can be used with the AI blocks and such, and have hit a wall.
How can you get the info of the "waypoints" that are made in the AI Recorder block?
My various attempts yields all the various info for the block, EXCEPT for the waypoint info.
Need some form of conditional check of what order the waypoints are in so that the path may be reversed to facilitate auto-docking.
I have the AI Rec/AI Flight working so that my craft can dock, and even so the path is automatically reversed for UN-docking with various other EZComms/timer block actions being made during the process.
But, suppose I pilot the craft out myself instead of having the AI un-dock me, and later wish to auto-DOCK, the AI Recorder flight path will still be set to the UN-dock path.

Perhaps something like the DOCK path could be set as a global variable in EZComms, while the reversed UNDOCK path is another that could be recalled when needed.
Mahalo
Merlin of Mines  [author] 3 May, 2024 @ 7:27pm 
@Sasquatch

Glad you figured it out. I would call out that you *can* name your blocks whatever you want, but in some cases you may need to tell EasyCommands what kind of block to look for in your Selector.

By default, EasyCommands looks at the last block type name in your name to infer the block type, if you haven't specified one. So "Piston Drill" would be looking for a Drill, whereas "Drill Piston" would be looking for a piston.

If needed, you can clarify to EasyCommands what block type to look for by specifying it after the block name.

Here's some examples:

#This would look for a drill
set "Piston Drill" height to 5

#This would look for a piston
set "Drill Piston" height to 5

#This would look for a piston
set "Piston Drill" piston height to 5

#This would look for a drill
turn on "Drill Piston" drill

See Selectors for more information:
https://spaceengineers.merlinofmines.com/EasyCommands/selectors

Hope that helps!
Sasquatch 2 May, 2024 @ 3:18pm 
@Merlin of Mines thanks, ill have alook.

I'm having a problem with pistons, or version of the mod.
if i paste old blueprint(circa2022) i can set piston speed by:
set the "Elevator Piston" velocity to 2
or
set "Elevator Piston" speed to 2
but when i load current version to programming block neither does work, same goes for checking piston current position or reversing them..


As i was typing this i found the problem, Do not name you pistons like: "Piston Drill", Piston Dril" works flawlesly
Merlin of Mines  [author] 2 May, 2024 @ 8:59am 
Hey @Sasquatch.

Unfortunately the Welder block doesn't provide support to detect if it has unfinished blocks in range, so EasyCommands can't detect this.

You can definitely determine if a connector is locked and/or a merge block is merged. Check out the block handlers for these for examples:

https://spaceengineers.merlinofmines.com/EasyCommands/blockHandlers/connector
https://spaceengineers.merlinofmines.com/EasyCommands/blockHandlers/merge
Sasquatch 28 Apr, 2024 @ 10:22am 
Is there a way of checking if welder block has any unfinished blocks in range, or if connector is locked/merge block merged. wleder would be preffered as i can pause pistons on my mineshaft drillers(deep ores mod) until components are manufactured and conveyors welded.
Merlin of Mines  [author] 10 Apr, 2024 @ 8:52pm 
Oh, I guess I didn't answer your original question of how to set a specific display on a sci-fi button panel.

You can do this via:

set "Button Panel" display[0] images to ["Danger", "Offline"]


print "Button Panel" display[0] images joined "\n"

set "Button Panel" display[0] interval to 1.5


or, by name:

#Print Display names
print "Button Panel" display names

#Set the button images
set "Button Panel" display["Numpad 2"] images to ["Danger", "Offline"]

#Set the button image change interval
set "Button Panel" display["Numpad 2"] interval to 0.5
Merlin of Mines  [author] 10 Apr, 2024 @ 8:44pm 
@TheTomRom Forgot to mention, I have an image list here:
https://spaceengineers.merlinofmines.com/EasyCommands/blockHandlers/display

If one is not listed, you can figure this out by adding the image you want to your text panel and then print the images using the command I mentioned, and that'll get you the image name.

Hope that helps!