Does anybody know if it is possible to make a percentage symbol (%) appear next to the values of stats in the status menu? Example: Let's say an actor has a DEF stat of 46. When I go to the status menu of that actor and then look next to their DEF stat, I want it to say "46%" instead of just "46". Is this possible?
Putting a "%" symbol next to stats in the status menu?
RGSSx Script Supportexcept the 46 is not a % - by default it goes up to 174 for level 99
Assuming the default damage formula is being used, that is true, but in my project the value for DEF will represent a percentage.
Does this apply to ALL the parameters, or only DEF?
Moving to RGSSx Script Support
Moving to RGSSx Script Support
There are 4 parameters I would like it to apply to. DEF, MDF, AGI and LUK.
Try this in a new slot in Materials:
class Window_Base < Window alias draw_actor_param_2 draw_actor_param def draw_actor_param(actor, x, y, param_id) draw_actor_param_2(actor, x, y, param_id) draw_text(x + 125, y, 10, line_height, '%') if [3,5,6,7].include?(param_id) endendMuck around a bit with the 125 - lower it if the % is too far away, increase it if it's too close.
And if it's not showing against the correct parameters, change the 3, 5, 6 and 7 as necessary. If it looks too squashed up, change the 10 to something a bit bigger.
I haven't tested this.
class Window_Base < Window alias draw_actor_param_2 draw_actor_param def draw_actor_param(actor, x, y, param_id) draw_actor_param_2(actor, x, y, param_id) draw_text(x + 125, y, 10, line_height, '%') if [3,5,6,7].include?(param_id) endendMuck around a bit with the 125 - lower it if the % is too far away, increase it if it's too close.
And if it's not showing against the correct parameters, change the 3, 5, 6 and 7 as necessary. If it looks too squashed up, change the 10 to something a bit bigger.
I haven't tested this.
Crashed after attempting to access the status screen with the following error:
Script 'Window_Base' line 196: ArgumentError occurred.
wrong number of arguments (5 for 4)
Works for me. Did you copy/paste, or did you retype it?
The lining up is not correct. I've adjusted those numbers a bit. Use this instead - copy and paste it, don't retype it, as you may not have done it exactly:
class Window_Base < Window alias draw_actor_param_2 draw_actor_param def draw_actor_param(actor, x, y, param_id) draw_actor_param_2(actor, x, y, param_id) draw_text(x + 160, y, 15, line_height, '%') if [3,5,6,7].include?(param_id) endendIf it's still giving you an error, it sounds like you may have other scripts that you didn't mention, and there might be a conflict.
Make sure you put it into the Materials section.
The lining up is not correct. I've adjusted those numbers a bit. Use this instead - copy and paste it, don't retype it, as you may not have done it exactly:
class Window_Base < Window alias draw_actor_param_2 draw_actor_param def draw_actor_param(actor, x, y, param_id) draw_actor_param_2(actor, x, y, param_id) draw_text(x + 160, y, 15, line_height, '%') if [3,5,6,7].include?(param_id) endendIf it's still giving you an error, it sounds like you may have other scripts that you didn't mention, and there might be a conflict.
Make sure you put it into the Materials section.
It's working now. I probably just didn't drag the mouse down far enough while copying it like a dunce. Thank you for your help.
Original thread: https://forums.rpgmakerweb.com/threads/putting-a-symbol-next-to-stats-in-the-status-menu.45360/