Alternative resource display widgets (Energy/Metal/Supply)

Alternative resource display widgets (Energy/Metal/Supply)

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14650
Joined: 17 Nov 2005, 02:43

Alternative resource display widgets (Energy/Metal/Supply)

Post by Forboding Angel »

So these have just recently been "finalized". Code_Man created the initial versions and I have been constantly adding new features and things to them.

These widgets just display resources as text, which I prefer to bars.

Image

So this is what they look like in non-warning states (more on that in a moment).

Most of you will probably pick up on the legend pretty much immediately but in case it isn't clear:
Metal from left to right: ±net +income/-outgoing (available storage/max storage)
Energy from left to right: ±net +income/-outgoing (available storage/max storage)
Supply from left to right: supply used/supply available (±available supply/max supply)

Supply is only useful if you use GoogleFrog's supply gadget which you can find a copy of, here: https://github.com/EvolutionRTS/Evoluti ... rement.lua

Each widget is standalone and is moveable and can be repositioned in tweakmode. By default they dock to the top right of the screen like this:
Image

Each widget will flash according to predefined parameters.
The word "Metal:" will flash if your storage gets to 80% full
The word "Energy:" will flash if your energy reaches 20% of available storage (in other words, when you get low on energy it starts flashing)
The Word "Supply:" will flash if you get within 90% of your available supply. If maxSupply is the same as supplyMax (in other words, if you have attained the maximum possible supply available) then the word "Supply:" will stay green.

Way back when, I was rather surprised that something like this didn't already exist, but now it does, so you can always get latest versions here:
https://github.com/EvolutionRTS/Evoluti ... isplay.lua
https://github.com/EvolutionRTS/Evoluti ... isplay.lua
https://github.com/EvolutionRTS/Evoluti ... isplay.lua

But I will attach them to this post as well.
gui_supply_display.lua
(2.18 KiB) Downloaded 4 times
gui_metal_display.lua
(2.87 KiB) Downloaded 2 times
gui_energy_display.lua
(2.83 KiB) Downloaded 2 times
Post Reply

Return to “Lua Scripts”