Skip to content

Conversation

@modo-lv
Copy link
Contributor

@modo-lv modo-lv commented Mar 23, 2025

This PR adds a numeric army size estimates setting to fheroes2.cfg file. When changed to on, army estimates in game will display number ranges ("10-19") instead of the original verbal descriptions ("lots").

This has been requested in #1530, and I agree that it should be an option, however adding it to the UI turned out to be beyond my ability (at least for now). So this is not a prefect fix, useful for those who can manually edit their configuration files. But I believe this is better than nothing, and hopefully the UI parts can be added in the future.

image

image

Fix #1530

@oleg-derevenetz oleg-derevenetz added improvement New feature, request or improvement ui UI/GUI related stuff labels Mar 24, 2025
@oleg-derevenetz oleg-derevenetz added this to the Beyond OG scope milestone Mar 24, 2025
Copy link
Collaborator

@oleg-derevenetz oleg-derevenetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @modo-lv I left a few comments regarding this PR, could you please to take a look when possible?

As for the idea of PR in general, we usually avoid introducing new settings if they cannot be done through the GUI, because on some platforms (that are considered first-class - for instance, on modern Android versions), manually editing the config is very difficult for an average user.

@modo-lv modo-lv force-pushed the numeric-amounts branch 5 times, most recently from 17def48 to a57f858 Compare March 24, 2025 23:30
Copy link
Collaborator

@oleg-derevenetz oleg-derevenetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this PR looks OK, but I'd wait for @ihhub decision, because, as I already mentioned, there are certain requirements for new options.

@oleg-derevenetz oleg-derevenetz requested a review from ihhub March 27, 2025 11:50
@ihhub
Copy link
Owner

ihhub commented Mar 29, 2025

I will review this PR later.

Overall, I am not against this change as I've seen many players asking for this but I see that players won't like the idea of changing such a parameter inside a configuration file. It is not a user friendly approach. Therefore, this change must have a dedicated UI option. We don't need to implement it in this PR but at least have a brief idea how it should look like in the game and where to put it.

I am tagging @Branikolog for this matter.

@modo-lv
Copy link
Contributor Author

modo-lv commented Mar 29, 2025

My idea was to make the interface settings panel a 3x3 instead of 2x2, and use these artifact icons for the setting. They have similar purple background to normal setting icons and are also similar enough to each other too look like two states of the same thing.

image
image

@ihhub
Copy link
Owner

ihhub commented Mar 29, 2025

@modo-lv , icons for the option must be suitable, not some random images. We need to create new ones.

Having settled about the name of the option we should update the current source code as well. I think the option should be called something like "Army size view" and has 2 states: canonical and mumeric.

What do you think @zenseii , @oleg-derevenetz and @Branikolog ?

@oleg-derevenetz
Copy link
Collaborator

icons for the option must be suitable, not some random images. We need to create new ones.

Having settled about the name of the option we should update the current source code as well. I think the option should be called something like "Army size view" and has 2 states: canonical and numeric.

I agree.

@zenseii
Copy link
Collaborator

zenseii commented Mar 29, 2025

@ihhub. I agree. We shouldn't re-use these icons. Concepts for the new ones need to be come up with and then we can ask pixel artists for help.

I think "army size view" would be interpreted as the exact size . How about "Army Size Range"?

@Branikolog
Copy link
Collaborator

Hi!

I think the option should be called something like "Army size view" and has 2 states: canonical and numeric.

Maybe we can stick to just two words: army size or army view. I think it would be enough.

Also, if we are going to expand settings window to 3x2 we need to add one more option there. 😅

As for the icon itself, I personally think, that making a collage with several monsters sprites and toggling text (pack/"10-19") under them could work.

@modo-lv
Copy link
Contributor Author

modo-lv commented Mar 29, 2025

Why not "army estimates"? Since it's not an exact size.

@ihhub
Copy link
Owner

ihhub commented Apr 18, 2025

I can see that we are stuck here. Let me make the review and propose the needed changes for the future UI.

Copy link
Owner

@ihhub ihhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @modo-lv , I added few comments here. Would you mind to take a look at them?

@modo-lv modo-lv force-pushed the numeric-amounts branch from f63f8cf to fa4001a Compare May 2, 2025 06:43
@modo-lv modo-lv requested a review from ihhub May 2, 2025 06:46
@usidedown
Copy link
Contributor

How about this as a base for the icon in the options menu:
icon_blank
Maybe 2 different variations for each option, E.g. "A-Z" text for the classic way and some roman numerals for the new option.

@ihhub ihhub requested a review from zenseii May 24, 2025 07:42
@zenseii zenseii changed the title Add numeric army estimates (cfg file only) Add numeric army estimates option Oct 25, 2025
@zenseii zenseii changed the title Add numeric army estimates option Add numeric army estimation mode option Oct 25, 2025
@zenseii zenseii changed the title Add numeric army estimation mode option Add army estimation mode option Oct 25, 2025
@zenseii zenseii requested review from Districh-ru and ihhub October 25, 2025 14:43
@zenseii
Copy link
Collaborator

zenseii commented Oct 25, 2025

@ihhub and @Districh-ru, I'd appreciate your reviews on this. The placement of the option in the dialog is going to change because of #9971 so this is only temporary.

@zenseii zenseii removed their request for review October 25, 2025 14:46
Copy link
Collaborator

@zenseii zenseii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved now that the PR contains the changes I requested.

Copy link
Owner

@ihhub ihhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zenseii , the changes look good to me. The only bit of doubt I have is the location of the option. I think it should belong to Adventure Map options.

@zenseii
Copy link
Collaborator

zenseii commented Oct 26, 2025

@ihhub, I thought it might fit better there too. One problem is that we already have a lot of options there and can't add another line in the main page of the options:
image

I could add it to the interface settings?
image

@ihhub
Copy link
Owner

ihhub commented Oct 26, 2025

@zenseii , interface is a better place than the current one.

@Districh-ru , what do you think?

@LeHerosInconnu
Copy link

Hello everyone,

Like @zenseii, I think "Army Range" would be more appropriate.

I don't have strong opinions on what creature should be used.

Personally, I would have chosen this brave Peasant. :D

@zenseii
Copy link
Collaborator

zenseii commented Oct 26, 2025

@LeHerosInconnu, while you're here, do you have any thoughts about the pixel-precision of the alignment of the creature and the army range? And yes I did prefer army range, but I'm willing to let it go to just get this PR wrapped up 😅

@LeHerosInconnu
Copy link

Hello @zenseii,

@LeHerosInconnu, while you're here, do you have any thoughts about the pixel-precision of the alignment of the creature and the army range? And yes I did prefer army range, but I'm willing to let it go to just get this PR wrapped up 😅

I would like to have a space of one pixel (or two) between the shadow of the chosen creature's sprite and the top of the numbers below, all centered horizontally and vertically within the frame area.

Position space army range 01

Copy link
Collaborator

@Districh-ru Districh-ru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zenseii , interface is a better place than the current one.

@Districh-ru , what do you think?

I agree that the Interface settings is a better place for the setting of UI indication of creatures' count.

Hi @zenseii, I left one comment with suggestion and question about the need of making ICN::EMPTY_OPTION_ICON_BACKGROUND and moving the image processing to agg_image.cpp. Could you please take a look when you have time?

@PusshPop
Copy link

PusshPop commented Oct 26, 2025

I swapped the phoenix with the centaur to avoid having cycling colors on the phoenix sprite because that made for too busy visuals.>
@zenseii @Districh-ru

Would this still be the case if the new color palette that Districh made in #10309 is applied?

Edit: maybe a Hydra is a better alternative? I chose a phoenix because it pops out against the purple background, but a yellow Hydra would do well too I think

had to make it language dependent icn
@zenseii
Copy link
Collaborator

zenseii commented Oct 26, 2025

@Districh-ru

I agree that the Interface settings is a better place for the setting of UI indication of creatures' count.

I will move the option and icon to the interface settings. Unless there are disagreements this means it will not be in the system options.

@PusshPop

Would this still be the case if the new color palette that Districh made in #10309 is applied?

I'm not familiar with the changes done, but my guess would be no.

Edit: maybe a Hydra is a better alternative? I chose a phoenix because it pops out against the purple background, but a yellow Hydra would do well too I think

I changed to the hydra. It looks good imo.

image

@LeHerosInconnu, I put 2 pixels distance between the creature sprite and the text to allow for accents in other languages.

@zenseii zenseii requested a review from Districh-ru October 26, 2025 22:34
Copy link
Collaborator

@Districh-ru Districh-ru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zenseii, all works fine, I just did some minor change:

  • optimize the full image copy (to copy the whole image by one memset and set the singleLayer flag from the input image);
  • update "few" -> "army|Few" to use the same text as in game with the already existent translations;
  • remove the _() from "1-4" because it don't need a translation :)

@ihhub ihhub merged commit f617569 into ihhub:master Oct 28, 2025
23 checks passed
@ihhub
Copy link
Owner

ihhub commented Oct 28, 2025

@modo-lv , @zenseii and @Districh-ru , thank you very much for making this feature happen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement New feature, request or improvement ui UI/GUI related stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expressions for the quantity of creatures directly replaced by equivalent numbers

9 participants