Show levels above 9 in GUI

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Toranks
Translator
Posts: 168
Joined: October 21st, 2022, 8:59 pm
Location: Sevilla
Contact:

Show levels above 9 in GUI

Post by Toranks »

If you use an addon, era or campaign with units with levels above 9, in the GUI they are seen in almost all languages with ellipsis points. And you have to hover your mouse over to know the number.
Sin título.png
I found two easy ways to do it. One of them is to modify in the file data/themes/default.cfg rect="+0 with -10. Or -20 or greater if you have units with levels above 100

Code: Select all

             [unit_level]
                 id=unit-level
                 font_size={DEFAULT_FONT_SMALL}
                 rect="-10,=+0,+50,+16"
                 prefix= _ "statuspanel^lvl"
                 prefix_literal=" "
                 xanchor=right
                 yanchor=fixed
             [/unit_level]
Sin título2.png
The other way is to reduce the number of characters in your translation (if you don't know how, ask, it's easy). For example, in spanish nv for n, which leaves space for one more character:

Code: Select all

#. [unit_level]: id=unit-level
#: data/themes/default.cfg:400
msgid "statuspanel^lvl"
msgstr "n"
imagen.png
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Show levels above 9 in GUI

Post by Lord-Knightmare »

Why not just make a new similar theme add-on with support for better sidebar info. theme add-ons are certainly designable.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
Toranks
Translator
Posts: 168
Joined: October 21st, 2022, 8:59 pm
Location: Sevilla
Contact:

Re: Show levels above 9 in GUI

Post by Toranks »

I don't even quite understand how rect= works. Redesigning the theme is already beyond my knowledge, and I had been looking for weeks for a way to see the levels, since it was one of the things that annoyed me the most
Last edited by Toranks on February 6th, 2023, 10:30 am, edited 1 time in total.
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Show levels above 9 in GUI

Post by Lord-Knightmare »

Toranks wrote: February 6th, 2023, 8:19 am I don't even quite understand how ref= works. Redesigning the theme is already beyond my knowledge, and I had been looking for weeks for a way to see the levels, since it was one of the things that annoyed me the most
There is/was a wiki page that covered ThemeWML. You can look up that. There's also the Altera by lea which has 3-4 custom themes you can look into. There's also the 1.12 classic theme being shipped as an addon and the Combat Info theme add-on.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Post Reply