Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wapcaplet's Widget Wishlist Woadmap #53957

Open
wapcaplet opened this issue Jan 2, 2022 · 7 comments
Open

Wapcaplet's Widget Wishlist Woadmap #53957

wapcaplet opened this issue Jan 2, 2022 · 7 comments
Labels
<Enhancement / Feature> New features, or enhancements on existing Info / User Interface Game - player communication, menus, etc. (P5 - Long-term) Long-term WIP, may stay on the list for a while.

Comments

@wapcaplet
Copy link
Contributor

wapcaplet commented Jan 2, 2022

Is your feature request related to a problem? Please describe.

Back when I started working on sidebar widgets in #44683, I hoped to eventually make the entire HP/stats/log sidebar "moddable", that is, defined and laid out entirely with JSON declarations, rather than hard-coded, fixed-width display functions.

After many other PRs, my dreams are finally coming to fruition in #51438.

But the journey isn't over, and there are still things to do before this rather game-changing feature can be considered complete.

I am opening this issue to share my planned future direction for widgets, and invite others to collaborate on testing and improving the system before 0.G.

Solution you would like.

Immediate:

  • Error handling - with wrong or unexpected fields in widget JSONs, what happens? I mostly tested only with valid JSON definitions, but this is expected to be strongly user-facing, so it's essential to have helpful messages when you forget the "var" field or try to use "number" style with a text variable, etc.
  • Moddability - is it possible for mods to add sidebars? why would they want to?
    • Confirmed, mods can define their own widgets and sidebars
  • Could e.g. Magiclysm add a "Mana" widget to the main sidebar(s)?
  • Playability - does a pure widget sidebar provide enough info to play the game?

Near-term (before 0.G):

Nice to have:

  • Multi-bodypart widgets in a table, to help condense per-bodypart attributes (HP, encumbrance, warmth, wetness)
  • Implement a layout arrangement to define multiple rows of multiple widgets with a nested list:
    • Syntactic sugar, as an alternative to defining separate "columns" and "rows" widgets
    • Ex. "widgets": [ [ "row1a", "row1b" ], [ "row2a", "row2b", "row2c" ], [ "row3a" ] ]
    • Needs a good name ("grid" is poor, since each row can have a different number of children)
  • Modify or show/hide widgets using "effect on condition"

Long-term (after 0.G):

  • Widgets for:
    • status effects (only found in @ now)
    • speed and penalties (only found in @ now)
    • armor coverage, layers, total protection
    • skill levels, bionics, proficiencies, traits
    • character height, weight, age, hair color
    • friendly NPC stuff (name, location, wielded weapon, activity/assignment)
  • Dynamic layouts or sidebars that can change in response to in-game effects, mutations, etc.
    • New bodypart widget when growing a tail
    • New faction camp ally widget when befriending an NPC
  • Using widgets for more than just the sidebar
    • Is there a need/desire to do that?
  • JSONize more of the display namespace
    • Mapping attribute values (largely numerical) to string descriptions
    • Mapping the same to appropriate colors for highlighting

Out of scope:

  • Graphical or tile-based widgets - my current sidebar widget system been designed from the ground up as plain-text-based, and I've never had (and still don't have) any plans to make it graphical
  • Interactive widgets - every part of the current design is oriented toward informational, display-only UI elements, and I have no plans to change that by allowing keyboard or mouse input to widgets

Describe alternatives you have considered.

Trying to do it all myself

Additional context

References:

@wapcaplet wapcaplet added <Enhancement / Feature> New features, or enhancements on existing Info / User Interface Game - player communication, menus, etc. labels Jan 2, 2022
@PatrikLundell
Copy link
Contributor

I can imagine that a mod might want to display remaining duration for a number of things where the player is expected to know the duration, such as e.g. spells. For things where the player is expected to know the approximate duration it might also be useful to have widgets with suitable vague terms to indicate the duration (it's probably a bad idea to have a "flight" spell expire while high up in the air, for instance).
Another use might be the display of remaining resources, such as bionic power, mana, etc.
I don't think widgets for static info such as height and hair color (yes, it can be changed, but it's generally done infrequently) is useful. If someone has a triple monitor setup they might want to allocate unused space for "extra" info, especially if widgets can be placed in spaces that would otherwise remain unused.
Weight is slightly more useful (but you'll already know you're too heavy to ride a pony when geared up), but it's available only when you have a scale...

  • I can see proficiencies and skills being of interest while practicing them, to see the progress.
  • Armor coverage, etc. might be used temporarily while trying out various gear combinations.
  • An indicator widget that tells you your armor has been damaged could be useful to remind you that you need to repair your gear, but that would either require some memory, or indicate damage whenever something is damaged, even if it was damaged before you put it on. However, even an indicator that just shows whether anything is damaged would be useful.

Some of these indicated widget thingies might be better done elsewhere, rather than squeezed into the widget framework. Just because it can be widgetisized doesn't mean it's a good idea to do so, or that it's the best way to provide that info...

@wapcaplet
Copy link
Contributor Author

Remaining duration for spells is a great idea - this is a case where a more dynamic section will be important, so it can adapt to showing whichever spell(s) you have recently cast.

Good point about the relatively static character attributes; I thought of those because they'd be pretty easy to do, but you're right that they probably aren't very useful. For weight, there is already the weight_desc one for "Normal", "Overweight", etc. which is probably good enough.

Thanks for the feedback, I will keep your suggestions in mind.

@wapcaplet
Copy link
Contributor Author

The original intention was for widgets to make the sidebar moddable, but I never tried it with a true mod until now. It was pretty easy.

Commit adding the mod: wapcaplet@e0d4ab2

As a simple demo, this "SelfAwareSidebar" mod adds two layouts showing numbers for HP, stats, health, and pain, as an homage to our dearly departed Self-Aware trait (#53802). A slim 16-character-wide version:

image

And an extra-wide 60-character version:

image

This is just a proof of concept - showing that mods can easily define their own widgets, layouts, and sidebars.

@Inglonias
Copy link
Contributor

I did a little bit of messing around with a custom sidebar mod this morning, and while I didn't get too far, one thing I wish I had was a list of all of the already existing stock widgets somewhere. The last thing I want to do is spend time designing and debugging my own widgets when the game already comes with a perfectly good implementation of what I want. I guess the thing I want here is a piece of documentation that has a list of all stock variable widgets, layout widgets, and "screenshots" of said layout widgets, even if those screenshots are just pre-formatted text blocks representing what they'd look like.

@wapcaplet
Copy link
Contributor Author

I guess the thing I want here is a piece of documentation that has a list of all stock variable widgets, layout widgets, and "screenshots" of said layout widgets, even if those screenshots are just pre-formatted text blocks representing what they'd look like.

Good idea, I opened #54186 to work on adding some of these to the docs.

@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Mar 2, 2022
@ZhilkinSerg ZhilkinSerg added (P5 - Long-term) Long-term WIP, may stay on the list for a while. and removed stale Closed for lack of activity, but still valid. labels Mar 11, 2022
@Inglonias
Copy link
Contributor

Wanted to update this issue - #58113 supersedes #54191.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Enhancement / Feature> New features, or enhancements on existing Info / User Interface Game - player communication, menus, etc. (P5 - Long-term) Long-term WIP, may stay on the list for a while.
Projects
None yet
Development

No branches or pull requests

4 participants