Space Engineers

Space Engineers

163 个评价
EasyCommands
8
7
4
4
4
2
2
   
奖励
收藏
已收藏
取消收藏
标签: other_script
文件大小
发表于
更新日期
143.626 KB
2021 年 12 月 28 日 上午 10:48
2023 年 1 月 14 日 下午 8:01
11 项改动说明 ( 查看 )

订阅以下载
EasyCommands

描述
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/
热门讨论 查看全部(4)
201
4 月 6 日 上午 9:20
Scripting Questions
Merlin of Mines
72
2023 年 4 月 15 日 下午 12:11
Feature Ideas
Merlin of Mines
63
10 月 28 日 上午 10:45
Bugs
Merlin of Mines
152 条留言
Merlin of Mines  [作者] 2 月 23 日 下午 1:05 
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 2024 年 11 月 20 日 上午 4:50 
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 2024 年 11 月 2 日 下午 10:46 
@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 2024 年 11 月 1 日 下午 9:44 
@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  [作者] 2024 年 5 月 3 日 下午 7:27 
@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 2024 年 5 月 2 日 下午 3:18 
@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  [作者] 2024 年 5 月 2 日 上午 8:59 
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 2024 年 4 月 28 日 上午 10:22 
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  [作者] 2024 年 4 月 10 日 下午 8:52 
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  [作者] 2024 年 4 月 10 日 下午 8:44 
@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!