hi so new to this community and i was wondering if someone made a script for XP where instead of 2 stats (attack/Defense) both are combined to determine how stong a character is (most dragon ball (Super)Famicom aka (S)NES rpg's use this notable titles are DBZ1 Attack of the Sayians for famicom and Legend of the Super saiyan for super famicom respectivly (the game i'm making is based off a fanfic i wrote in the past which am only releasing it among friends to avoid take downs)
Battle Power/Power level script instead of attack/defense stat?
RGSS Script RequestsTechnically you don't need a Script. It depends on where you want to show the information. For example: in Scene Status stats get called. Just change for example the Attack to "Power Level" and for the Output you calc Attackb + Defense.
I can check closer when I am at my Workstation again. For now that's dry theory - maybe this will Help!
I can check closer when I am at my Workstation again. For now that's dry theory - maybe this will Help!
Here is a solution:
In Window_Base locate the following:
add something in the line of:
This will add Attack, P-Defense and M-Defense together for one value
Now in Window_Status you just draw:
Where ever. as of now it draws it at the very bottom, cut off - but it works. You can also ditch values 0 through 2 if you don't need the Attack, P-Defense and M-Defense to show. This in total would look like this:
and finally like this:
would declare this as solved because this way people can combine parameters how ever they want to.
EDIT: if you want smaller or comically large numbers (Power Levels Dragon Ball Style) you can also add a multiplyer:
In Window_Base locate the following:
Ruby:
[more code]
Window_Base
#--------------------------------------------------------------------------
# * Draw Parameter
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# type : parameter type (0-6)
#--------------------------------------------------------------------------
def draw_actor_parameter(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = $data_system.words.mdef
parameter_value = actor.mdef
[more code]
add something in the line of:
Ruby:
when 7
parameter_name = "MIGHT"
# Change Name of combined parameter in the Quotation-Marks
parameter_value = actor.atk + actor.pdef + actor.mdef
This will add Attack, P-Defense and M-Defense together for one value
Now in Window_Status you just draw:
Code:
draw_actor_parameter(@actor, 96, 432, 7)
Where ever. as of now it draws it at the very bottom, cut off - but it works. You can also ditch values 0 through 2 if you don't need the Attack, P-Defense and M-Defense to show. This in total would look like this:
Ruby:
def refresh
self.contents.clear
draw_actor_graphic(@actor, 40, 112)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
draw_actor_parameter(@actor, 96, 192, 7)
#draw_actor_parameter(@actor, 96, 192, 0)
#draw_actor_parameter(@actor, 96, 224, 1)
#draw_actor_parameter(@actor, 96, 256, 2)
draw_actor_parameter(@actor, 96, 304, 3)
draw_actor_parameter(@actor, 96, 336, 4)
draw_actor_parameter(@actor, 96, 368, 5)
draw_actor_parameter(@actor, 96, 400, 6)
and finally like this:
would declare this as solved because this way people can combine parameters how ever they want to.
EDIT: if you want smaller or comically large numbers (Power Levels Dragon Ball Style) you can also add a multiplyer:
Ruby:
parameter_value = ((actor.atk + actor.pdef + actor.mdef) * 10)
Original thread: https://forums.rpgmakerweb.com/threads/battle-power-power-level-script-instead-of-attack-defense-stat.167860/