SIMPLE VX SCRIPT REQUEST
Posts
Pages:
1
I have a leveling skill system in my VX game. Experience is gained through a common event each time the skill is used and, if it has sufficient experience, the skill levels up. However, because I'm doing a common event call to run the skill experience calculations, I need a different common event for each player for each skill. Extremely tedious, especially if I end up having to go back and modify the common events for each character.
What would make my life much simpler: a script that stores a value in a variable each time a skill is used by a hero, with different numbers for each hero. For example, if Hero A uses skill Epic Beat Down (Lv 1), the script automatically sets variable Who_Cast_That to 1. Then a single common event can run a check for all heroes: if Who_Cast_That = 1, give Hero A some skill exp. If Who_Cast_That = 2, give Hero B some skill exp. Etc.
Let me know if anyone is available to take this one, I'd be incredibly grateful.
What would make my life much simpler: a script that stores a value in a variable each time a skill is used by a hero, with different numbers for each hero. For example, if Hero A uses skill Epic Beat Down (Lv 1), the script automatically sets variable Who_Cast_That to 1. Then a single common event can run a check for all heroes: if Who_Cast_That = 1, give Hero A some skill exp. If Who_Cast_That = 2, give Hero B some skill exp. Etc.
Let me know if anyone is available to take this one, I'd be incredibly grateful.
Just some questions for clarification.
1.Are you using the default battle system?
2.Do you want each skill to set to a different variable or all skills to set the ID of the actor into a single variable?
3.Do you want to run the common even from the script itself?
I made a simple version of what I understood from the request.
It checks SKILL_VARIABLES to see if the ID of the skill is included and then sees what variable to set the actors ID value to.
Once I get more details I can edit it more to your liking.
1.Are you using the default battle system?
2.Do you want each skill to set to a different variable or all skills to set the ID of the actor into a single variable?
3.Do you want to run the common even from the script itself?
I made a simple version of what I understood from the request.
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
SKILL_VARIABLES = {
# Thunder - Variable 1
67 => 1,
# Thunder II - Variable 2
68 => 2,
}
#--------------------------------------------------------------------------
# * Execute Battle Action: Skill
#--------------------------------------------------------------------------
alias tds_skill_variable_exp_scene_battle_execute_action_skill execute_action_skill
def execute_action_skill
# Set Skill
skill = @active_battler.action.skill
# If Skill Variable ID is not nil
if SKILL_VARIABLES[skill.id] != nil and @active_battler.is_a?(Game_Actor)
# Set Game Variable to Actor Index
$game_variables[SKILL_VARIABLES[skill.id]] = @active_battler.id
end
# Run Original Method
tds_skill_variable_exp_scene_battle_execute_action_skill
end
end
It checks SKILL_VARIABLES to see if the ID of the skill is included and then sees what variable to set the actors ID value to.
Once I get more details I can edit it more to your liking.
Pages:
1













