About EasyAPI
From Steam WorkshopEasyAPI makes writing powerful scripts a breeze by providing a simple query API to find and manipulate blocks, inventories, properties, and actions. It also allows you to schedule events so that a…
EasyAPI makes writing powerful scripts a breeze by providing a simple query API to find and manipulate blocks, inventories, properties, and actions. It also allows you to schedule events so that a function gets called when the event occurs. Below is an overview of how easy things are in EasyAPI. There are many more examples in the documentation.
See the EasyAPI Documentation guide for a tutorial and the full documentation of the API.
I have created a GitHub repository for EasyAPI. You can find it at https://github.com/rockyjvec/EasyAPI
The Change Notes tab lists what was added in the latest updates.
Easy Commands
The Easy Commands feature provides a way for people to quickly do things to their ship just using arguments to a PB without doing any programming.
To use this feature, just add EasyAPI to a PB (Programmable Block), and then run the pb with an argument that starts with EasyCommand followed by the command you want to run.
For example, you could put the following as the argument when the PB is run on a button panel:
EasyCommand Blocks.OfTypeLike("Door").ApplyAction("Open_Off");
That command will close all the doors on your ship when the button is pressed. There are tons of block filters and actions built in to easyapi. You can find a (mostly) complete list in the documentation. Just search for "filters" or "actions". Leave a comment below if you need help.
Easy Arguments
Want to toggle all your lights when a button is pressed? It only takes the code below. Just put the PB Run action on any button or cockpit action key you want and use "ToggleLights" for the argument.
Code for toggling lights when button panel button or cockpit key pressed.
public class Example : EasyAPI
{
public void toggleLights()
{
Blocks.OfTypeLike("Light").ApplyAction("OnOff");
}
public Example(IMyGridTerminalSystem grid, IMyProgrammableBlock me, Action<string> echo, TimeSpan elapsedTime) : base(grid, me, echo, elapsedTime)
{
On("ToggleLights", toggleLights);
}
}
Easy Inventory Management
Want to clean all your assembler input inventories by moving all stone to your cargo containers?
Blocks.OfType("Assembler").Items().InInventory(0).OfType("Stone").MoveTo(Blocks.OfTypeLike("Cargo Container"));
Get the number of construction components in all your large cargo containers:
int NumConstructs = Blocks.OfType("Large Cargo Container").Items().OfType("Construct").Count();
Easy Block Actions
To turn off all the Spotlights on your ship that have "Front" in their names:
Blocks.OfType("Spotlight").NamedLike("Front").Off();
Actions specific to a block are also supported. Let's say you want to make all the sound blocks on your ship play at once:
Blocks.OfType("Sound Block").ApplyAction("PlaySound");
Easy Setting/Getting Block Properties
This example syncs the gravity field width, height, and depth of all the gravity generators on your ship. If you change one of those properties in "Gravity Generator 1" the new value will automatically get copied to the rest of them:
public class Example : EasyAPI
{
public void UpdateGravGens()
{
EasyBlocks AllGravGens = Blocks.OfType("Gravity Generator");
EasyBlocks SourceGravGen = AllGravGens.Named("Gravity Generator 1");
Single Height = SourceGravGen.GetProperty<Single>("Height");
Single Width = SourceGravGen.GetProperty<Single>("Width");
Single Depth = SourceGravGen.GetProperty<Single>("Depth");
AllGravGens.SetProperty<Single>("Height", Height);
AllGravGens.SetProperty<Single>("Width", Width);
AllGravGens.SetProperty<Single>("Depth", Depth);
}
public Example(IMyGridTerminalSystem grid, IMyProgrammableBlock me, Action<string> echo, TimeSpan elapsedTime) : base(grid, me, echo, elapsedTime)
{
Every(1 * Seconds, UpdateGravGens);
}
}
Easy to Learn
A tutorial, lots of examples, and the full documentation are available in my EasyAPI Documentation guide. I keep adding new features and examples.
Add-On Modules
These are extra features that are designed to work with EasyAPI
- EasyMenu - Design menus to control your ship's systems.[/*]
- EasyLCD - This is currently included in the EasyAPI script.[/*]
If you have designed an add-on module, let me know in the comments below and I'll add it to this list.
Make your own scripts and mods
Please feel free to use and include this script in your own Steam Workshop scripts/mods.
Collaborate to make it better!
I have created a GitHub repository for EasyAPI. You can find it at https://github.com/rockyjvec/EasyAPI
Have an idea that you would like to see implemented in EasyAPI? Feel free to fork EasyAPI and implement your feature or make a suggestion in the comments or discussions below.
Thanks!
I would like to thank the following people for their contributions to EasyAPI:
- Bush Tucker Man[/*]
- LukeStrike[/*]
Highlights
From source dataFootprint
A 33 KB download, rated a light load on a server.
Last update
Its author last shipped an update 8 yr ago.
EasyAPI on Nxeon
From our catalogue- One-click install
- Not available. One-click install isn't available for this game's mods yet. Download it and upload it to your server in Files.
- Server load
- light
- Smallest plan we suggest
- Space Engineers — 8 GB (8 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- 2018-11-07, released 2018-11-07, 33 KB
Game versions by loader
| Loader | Game versions | Newest |
|---|---|---|
| Workshop |
From 1 recorded build of EasyAPI.
Run EasyAPI on a Space Engineers server
Deploy a server above, then upload the file in Files.
What kind of mod it is
From the catalogLibraries & compatibility
Foundations and fixes other mods build on. Usually installed because something else needs it.
Compatibility
- Game
- Space Engineers
- File size
- 33 KB
Verified at the source
- ✓Steam WorkshopOfficial listing, checked 2026-10-10Open ↗
- ✓Authorrockyjvec, as published on Steam Workshop
- ✓LicenseNot published by the sourceFree
