Is it possible to have the stat screen do percentage charts of numbers whose max is not 100?

I want to measure areas on a mech with varying maximal values of armor (i.e. head 8, torso 50, etc etc).

Is it possible to show damage this way (where 50 would equate to 100%, damage to 25 would equate to 50%, etc etc.)

I couldn’t find this addressed anywhere, point me in the right direction if I’m mistaken. Thank you!

1 Like

Lan
August 22, 2019, 2:49pm
#3
Yep, it’s possible; you just use the calculated percent as the numerical variable in your stat chart.

Example:

```
*create hp_current 5
*create hp_max 28
*stat_chart
percent ((hp_current/hp_max)*100) Hit Points
```

If don’t want decimals, you can use the `*round()`

command:

```
*stat_chart
percent round((hp_current/hp_max)*100) Hit Points
```

3 Likes

You have made my day. THANK YOU.

I was having trouble with math operations using one variable +/-/* another, but the extra spaces in between must have been what was throwing error messages?

Szaal
August 23, 2019, 3:20am
#5
The spaces on mathematical operations should be irrelevant. What kind of message did you get?

I think it said it was an operator error, expecting parenthesis but instead got “equality”? I think? I deleted the whole line and did things another way, so I can’t remember the exact wording.

system
closed
August 24, 2019, 11:56am
#7
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.