Page 1 of 1

More option at Token Bar (MapTool)

Posted: Sun Jul 04, 2021 8:04 pm
by HUGO753
Hello everyone, i have a suggestion as follow:

When I was messin in MapTool, I saw token bar could have a configuration to choose between percentage and numbers, and those numbers can be like: Health 53 / 165 (53 is the current number "{0}" and the 165 is the total "{1}")
After set those numbers the bar would refresh every time when the current number is changed and compare with the total.
That would help to use the bars and easily set up other bar rather than only drag the percentage up.

Many thanks. :)

Re: More option at Token Bar (MapTool)

Posted: Sun Jul 04, 2021 9:37 pm
by aliasmask
Do you mean having setBar("name",percent) saving a max value and then using a current value instead of a percent to change the bar?

Code: Select all

<!-- normal method -->
[H: setBar("myBar",current/max)]

<!-- new method -->
[H: setBarMax("name",max)]
[H: setBar("name",current)]
???

Re: More option at Token Bar (MapTool)

Posted: Mon Jul 05, 2021 2:34 pm
by HUGO753
aliasmask wrote:
Sun Jul 04, 2021 9:37 pm
Do you mean having setBar("name",percent) saving a max value and then using a current value instead of a percent to change the bar?

Code: Select all

<!-- normal method -->
[H: setBar("myBar",current/max)]

<!-- new method -->
[H: setBarMax("name",max)]
[H: setBar("name",current)]
???
Yes, exactly aliasmask :D

Re: More option at Token Bar (MapTool)

Posted: Tue Jul 06, 2021 2:01 am
by aliasmask
You can put in a feature request here: https://github.com/RPTools/maptool/issues

But, to me it seems a bit superfluous and I don't really see the advantage of doing it a different way. If you really want to do it that way, you could create your own UDFs. This is something I've done in the past to handle simple math formulas that I didn't want to keep typing in.