[Lua] Display Remaining Staff Charges#7827
[Lua] Display Remaining Staff Charges#7827kphoenix137 wants to merge 5 commits intodiasurgical:masterfrom
Conversation
Cut out max charges
Avoid confusing charges as a hotkey
|
Why a toggle? This should be the default IMHO. I'm not a fan of using blue though, it is inconsistent with other parts of the UI. Also, have you considered showing the value the same way that health and mana show, i.e. |
Same reason Life and Mana flask values are toggles.
See OP why blue is used.
Started with that. It ends up overlapping both the left and right borders a bit on certain numbers. I feel it's unnecessary extra information that occludes more of the spell icon graphic. |
StephenCWills
left a comment
There was a problem hiding this comment.
Looks like a good option to have. Also seems like it will be easy to convert it to Lua.
@StephenCWills Shouldn't most interface changes be (converted to) Lua mods and removed from the actual code? That would allow you guys to package these mods with DevilutionX, remove some optional stuff from the code (which are always a heated debate) and leave the base game as close to vanilla as possible. |
It remains to be seen if this would quell arguments against optional features, as moving them into Lua mods still presents the same identical end result to the player, but with the extra step of needing to toggle the mod off to remove the toggle option for that feature from the Settings sub-menu. But yes, it's the plan to move as many optional features to Lua as possible, within reason. Things that only exist as a boolean check based on a toggle aren't worth moving to Lua, as the only thing the Lua script would do is return a true or a false without any actual logic. Pointless when the toggle itself is a boolean. |
Not just UI changes. I intend to have APIs developed in Lua that enable us to implement the existing HUD in Lua. This would naturally enable mods that offer things like independent scaling of the UI and straight-up replacement HUDs. Currently, the target for this is 1.7.0, but if we're just talking about the changes in this PR, we can almost do it in Lua already. |
|
Drafting so I can convert this into a Lua PR. |
Adds a toggle that displays remaining charges over the spell select button when an item with charges is equipped, and the charges spell is selected. Displays gold text for current charges == max charges, otherwise blue text. Blue text is used to avoid confusion, as white is used to signal keybinds to the player.