# Making a variable a percentage?

**URL:** <https://forum.choiceofgames.com/t/making-a-variable-a-percentage/180>\
**Category:** Game Development\
**Created:** [July 25, 2011, 4:45pm UTC](https://forum.choiceofgames.com/t/making-a-variable-a-percentage/180 "2011-07-25T16:45:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![initdoby5](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/initdoby5/32/33433_2.png) [@initdoby5](https://forum.choiceofgames.com/u/initdoby5)\
**Post date:** [July 25, 2011, 4:45pm UTC](https://forum.choiceofgames.com/t/making-a-variable-a-percentage/180/1 "2011-07-25T16:45:03Z")

</div>

How do you make a variable a percentage? Is there any way to besides making the variable a stat?

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [July 26, 2011, 12:33am UTC](https://forum.choiceofgames.com/t/making-a-variable-a-percentage/180/2 "2011-07-26T00:33:06Z")

</div>

I’m sorry, I’m having trouble understanding exactly what you are asking. Any stat can be displayed as a percentage (assuming it is a number). If you mean how to make it display the red/blue bar in the stat screen, like the stats are displayed in Choice of Broadsides, it’s:  
`*stat_chart percent (stat goes here)`  
Note that you need do delete the parentheses.  
Also note that for fairmath to work (if that is what you are having trouble with) the stat has to be \>1 and \< 100 (last time I checked at least).

Did that answer your question?

---

<div class="post-metadata">

**Author:** ![initdoby5](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/initdoby5/32/33433_2.png) [@initdoby5](https://forum.choiceofgames.com/u/initdoby5)\
**Post date:** [July 26, 2011, 4:09pm UTC](https://forum.choiceofgames.com/t/making-a-variable-a-percentage/180/3 "2011-07-26T16:09:41Z")

</div>

I know how to do that, I mean a variable that isn’t a stat. It’s working now, but it wasn’t when I first tried.
