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

Add threat level indicators for monsters in offline tiles #1120

Closed
wants to merge 5 commits into from

Conversation

GnarledBeach
Copy link
Contributor

Webtiles and console both have a monster list at the bottom-right of
the screen which lists all monsters in view color-coded by rough
threat level. Many players have expressed a desire for something
similar in offline tiles, to provide always-visible indicators of the
threat levels of all enemies in view. This commit adds translucent
colored backgrounds -- dark grey, light grey, yellow, and red --
to indicate trivial, easy, tough, and nasty monsters respectively.

Additionally, these indicators are configurable with a new option in
the options file, "tile_show_threat_levels". Each type of indicator
can be independently enabled or disabled by including or omitting it
in the option file line. For example, the following...

"tile_show_threat_levels = tough nasty"

...will show only yellow (tough) and red (nasty) threat indicators.

I have experimented with various styles of indicators, as shown in the
following thread:

https://crawl.develz.org/tavern/viewtopic.php?f=8&t=26439

I am open to changing back to a different style, or even making
multiple styles available and letting the player choose which style to
use, if any. This style is the best in my opinion, as it is very
noticeable while being subtle enough not to interfere with any other
monster or monster-associated graphics. I have playtested this feature
through a 6-rune run with no problems, technical nor cosmetic.

Webtiles and console both have a monster list at the bottom-right of
the screen which lists all monsters in view color-coded by rough
threat level. Many players have expressed a desire for something
similar in offline tiles, to provide always-visible indicators of the
threat levels of all enemies in view. This commit adds translucent
colored backgrounds -- dark grey, light grey, yellow, and red --
to indicate trivial, easy, tough, and nasty monsters respectively.

Additionally, these indicators are configurable with a new option in
the options file, "tile_show_threat_levels". Each type of indicator
can be independently enabled or disabled by including or omitting it
in the option file line. For example, the following...

"tile_show_threat_levels = tough nasty"

...will show only yellow (tough) and red (nasty) threat indicators.

I have experimented with various styles of indicators, as shown in the
following thread:

https://crawl.develz.org/tavern/viewtopic.php?f=8&t=26439

I am open to changing back to a different style, or even making
multiple styles available and letting the player choose which style to
use, if any. This style is the best in my opinion, as it is very
noticeable while being subtle enough not to interfere with any other
monster or monster-associated graphics. I have playtested this feature
through a 6-rune run with no problems, technical nor cosmetic.
@aidanholm
Copy link
Member

Thanks for the PR! Played a few games now with this, works pretty well.

Code looks good; could you please add webtiles support? You'll need to add the same logic in tiledgnbuf.cc to cell_renderer.js; the two are analagous. You'll also need to update enums.js with another call to fg_flags.exclusive_flags.push (I think); then you can just access cell.fg.TRIVIAL etc from cell_renderer.js.

Separately, please squash the five commits into one commit as well, since most of the commits are fixes, not functionality changes.

@ebering ebering added the ui Issues related to any aspect of the UI label Nov 10, 2019
@ebering ebering added this to the 0.25 milestone Nov 11, 2019
ByrelMitchell added a commit to ByrelMitchell/crawl that referenced this pull request Nov 25, 2019
Webtiles and console both have a monster list at the bottom-right of
the screen which lists all monsters in view color-coded by rough
threat level. Many players have expressed a desire for something
similar in offline tiles, to provide always-visible indicators of the
threat levels of all enemies in view. This commit adds translucent
colored backgrounds -- dark grey, light grey, yellow, and red --
to indicate trivial, easy, tough, and nasty monsters respectively.

Additionally, these indicators are configurable with a new option in
the options file, "tile_show_threat_levels" with valid values being any set of 'trivial', 'easy', 'tough' and 'nasty'. Each type of indicator
can be independently enabled or disabled by including or omitting it
in the option file line. For example, the following...

"tile_show_threat_levels = tough nasty"

...will show only yellow (tough) and red (nasty) threat indicators.

This patch was mostly written by GnarledBeach in PR crawl#1120. I picked it up and added webtiles support, plus squashed some trivial commits.
@aidanholm
Copy link
Member

Thanks for the PR; I've moved work on this to the threat-levels branch.

@aidanholm aidanholm closed this Nov 26, 2019
@GnarledBeach
Copy link
Contributor Author

GnarledBeach commented Nov 26, 2019 via email

@aidanholm
Copy link
Member

Hey Caleb,

No worries, that happens to all of us sooner or later. Thanks for all of the hard work you've already put into this feature; it should be merged soon!

Cheers,
Aidan

@GnarledBeach
Copy link
Contributor Author

GnarledBeach commented Nov 27, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui Issues related to any aspect of the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants