Placeholders
MachineEngine's placeholders are zMenu placeholders, for machine menus:
write them as %zmenu_machineengine_<key>% in a menu file. There is no
PlaceholderAPI expansion.
Inside a machine's menu they show that machine. To check the values of a
machine, run /machineengine placeholders while looking at it.
The machine
| Key | Value |
|---|---|
type | The machine type, e.g. mekanized:crusher. |
type_namespace | Its namespace (mekanized). |
type_value | Its value (crusher). |
state | active, scheduled, waiting, blocked, sleeping or disabled. |
placeholder | true if the machine belongs to a missing addon. |
last_wake | Why it last woke up (a key), or empty. |
error | Its last error, or empty. |
facing | north, south, east or west… |
x, y, z, world | Its position. |
upgrades | Number of upgrades installed. |
upgrade_<namespace>_<value> | Number of one upgrade installed, e.g. upgrade_mekanized_upgrade_speed. |
escrow | Amount held back in transfers between regions (Folia); normally 0. |
Storages
<id> is a storage of the machine (energy, input…). Storage ids may contain
_.
| Key | Value |
|---|---|
storage_<id>_amount | Amount held (all slots). |
storage_<id>_capacity | Capacity. |
storage_<id>_free | Capacity left. |
storage_<id>_percent | Fill, 0 to 100. |
storage_<id>_bar | A 10-character bar of █ and ░. |
storage_<id>_resource | What it holds (first filled slot), or empty. |
storage_<id>_name | Its name, translated for the player. |
storage_<id>_color | Its color, #RRGGBB (for tinted bars). |
storage_<id>_cell_<k> | Level of cell k (0 to 2) of a 3-slot textured fill bar. |
Each slot on its own, n starting at 1: storage_<id>_slot_<n>_amount,
_capacity, _resource, _name, _color, _cell_<k>.
The process
| Key | Value |
|---|---|
process_active | true while a process runs. |
process_recipe | The recipe key, or empty. |
process_status | idle, running, waiting_for_cost, output_blocked, completed or returning. |
process_progress | Ticks done. |
process_duration | Ticks in total. |
process_remaining | Ticks left. |
process_remaining_seconds | Seconds left, rounded up. |
process_percent | Progress, 0 to 100. |
process_bar | A 10-character bar. |
process_cell_<k> | Level of cell k of a textured progress bar. |
Lists, data and sides
| Key | Value |
|---|---|
list_<id>_size | Rows in one of the machine type's lists, e.g. list_upgrades_size. |
list_<id>_<index>_<field> | A field of a row, index from 0, e.g. list_upgrades_0_count. Empty past the end. |
data_<id> | A value the machine type exposes (a mode, a setting). |
data_<id>_cell | That value as the level (0 to 16) of a one-slot bar. |
side_<group>_<side> | The configuration of a side (front, back, left, right, top, bottom) for a port group. |
side_<group>_<side>_mode | The same as none, input, output or both. |
The upgrades list, on every machine with upgrade slots, has the fields id,
namespace, value, count, max, installed and item.
The player
player_<namespace>_<id> shows a value an addon keeps for the player viewing
the menu, or one of their settings — e.g.
%zmenu_machineengine_player_mekanized_radiation_hud%. A / in the id becomes
_. These work in any zMenu menu, not only machine menus.