Placeholders & menus
Mekanized's menus are zMenu files in
plugins/MachineEngine/menus/mekanized_*.yml, using MachineEngine's
placeholders β %zmenu_machineengine_<key>%, listed on
MachineEngine's placeholders page.
Mekanized adds values of its own through them:
| Placeholder key | Value |
|---|---|
data_redstone | A machine's redstone mode (the redstone icon follows it). |
data_eject | Auto-eject on or off. |
data_frequency | The frequency of a teleporter, QIO block or entangloporter. |
data_entangloporter_mode | Whether a Quantum Entangloporter sends or receives. |
data_status | A machine's status line (why the modification station waitsβ¦). |
data_running | Whether a digital miner or a reactor runs (its button starts and stops it). |
data_radius, data_min_y | A digital miner's area; data_radius is also a dimensional stabilizer's. |
data_burn_rate, data_injection_rate, data_heater_rate | Reactor settings (fission burn rate, fusion injection rate, heater rate). |
data_mode | A machine's mode, where it has one. |
list_upgrades_<n>_<field> | The upgrades menu's rows. |
list_modules_<n>_<field> | The modification station's module rows. |
player_mekanized_radiation_dose | The viewer's radiation dose. |
player_mekanized_radiation_hud | Whether the viewer shows the radiation display. |
/machineengine placeholders while looking at a machine shows its values.
Textured menusβ
The menus look like Mekanism's windows, in two parts:
-
The title draws what does not move β the panel (player inventory included), slot frames and bar frames β as CraftEngine images placed with
<shift:n>:name: '<white><shift:-8><image:mekanized:gui/panel_5><shift:-152><image:mekanized:gui/slot_input_r2>β¦<shift:-162></white><lang:block.mekanized.crusher>'The title starts at x 8 of the window;
<shift:-8>brings it to 0. An image moves the next one by its width + 1 (a slot frame 18 + 1, the panel 176 + 1). Chest slot (row, column), counted from 0, has its frame at x7 + 18 Γ column: to move an image by one slot, change the shifts around it by 18. -
Slots draw what moves: fill bars, empty slots and icons are CraftEngine items in zMenu buttons.
Imagesβ
In plugins/CraftEngine/resources/mekanized/configuration/gui.yml:
| Image | What |
|---|---|
mekanized:gui/panel_<rows> | The window for a chest of 3 to 6 rows. |
mekanized:gui/slot_<kind>_r<row> | A slot frame on chest row row: normal, input (red), input_2, output (blue), output_2, extra (yellow), power (green). |
mekanized:gui/overlay_<icon>_r<row> | An icon over a slot frame: power, input, output, upgrade. |
mekanized:gui/frame_<bar>_r<row> | A bar's frame starting on row row: tall_gauge and power_vertical (3 rows tall), power_horizontal and progress (3 columns wide), lane (one slot). |
Itemsβ
Used as craftengine:<id> in a button's material:
| Item | What |
|---|---|
mekanized:gui/empty | Nothing: an empty slot shows its frame; the button's name is the tooltip. |
mekanized:gui/ghost_module, gui/ghost_upgrade | A faded module or upgrade: an empty row of the station or upgrades menu. |
mekanized:gui/bar/<shape>/<cell>/<level> | One slot of a fill bar: chemical, fluid, energy, energy_horizontal, heat, progress, lane. |
mekanized:gui/icon/<name> | Mekanism's icons: upgrade, configuration, redstone_ignored, redstone_high, redstone_low, items, energy, chemicals, fluids, heat, auto_eject, back, clear_sides, transporter_config. |
mekanized:gui/side/<mode> | A side configuration square: none, input, output, both. |
A fill barβ
Three slots (bottom to top, or left to right), one button per slot, cell 0 first:
water-0:
slot: 27
item:
material: 'craftengine:mekanized:gui/bar/fluid/0/%zmenu_machineengine_storage_water_cell_0%'
components:
dyed-color: '%zmenu_machineengine_storage_water_color%'
flags: [HIDE_DYE, HIDE_ATTRIBUTES]
name: '<!i><aqua>Water'
lore:
- '<!i><gray>%zmenu_machineengine_storage_water_amount% /
%zmenu_machineengine_storage_water_capacity% mB'
storage_<id>_cell_<k>is cell k's level (0 to 18; 16 for cell 2);process_cell_<k>for the progress arrow;data_<id>_cell(0 to 16) for a one-slot bar.storage_<id>_coloris the color of what the storage holds (Mekanism's, or thecolorssetting). Only thechemical,fluidandheatshapes are tinted.- Do not add
update: trueto these buttons: MachineEngine redraws them all together.
Icons that follow a setting name their item the same way:
craftengine:mekanized:gui/icon/redstone_%zmenu_machineengine_data_redstone%,
craftengine:mekanized:gui/side/%zmenu_machineengine_side_items_front_mode%.