Job Stat Modifier
Authors: Griver03 alias BuddySievers
Version: 1.1
Type: Class System Add-on
Key Term: Actor Add-on
IntroductionWith this script you can have class specific actor stats.
Like in Final Fantasy XI - Online when you switch your
class the stats will get increased or decreased.
Version Log1.0 - Release version.
1.1 - Added the fix to the main script.
Features
- Modifie actor stats by class.
- Can use integer values and decimal values.
- Modifieable stats: MaxHP,MaxSP,STR,DEX,AGI,INT.
ScreenshotsNot required...
DemoDemo 1.0 (http://www.mediafire.com/?68c328hn3wln5oo)
Demo 1.1 (http://www.mediafire.com/?c7ivxq07gpwhaal)
Script
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Job Stat Modifier by Griver03 alias BuddySievers
# Version: 1.1
# Type: Job/Class System Addon
# Date: 11.06.2011
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Original Script: RO Job/Skill System by Blizzard.
# Version: 2.1b
# Date 2.1b: 22.1.2011
# Type: Ragnarok Online Job/Skill System Clone
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix -- to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Special Thanks for helping me fixing a bug goes to Irrlicht.
#
#
# -Compatibility:
#
# 100% compatible with SDK v2.4, not testet with older versions.
# 100% compatible with MACL v2.0, idk if this is important.
# Works 100% with LegacyBlades Legacy Class Change script.
# Don't use this script with Blizzard's R0 Skill/Job System.
# Can cause incompatibility issues with other exotic Class/Job Systems.
# Should work with any CMS or CBS.
#
#
# -Bugs:
#
# No bugs found since Irrlicht's fix.
#
#
# -Version Log:
#
# 1.0 - 11.06.2011 - Release Version.
# 1.1 - 12.06.2011 - Added the fix to the main script.
#
# -Explanantion:
#
# With this script you can have class specific actor stats.
# Like in Final Fantasy XI - Online when you switch your class the stats
# will get increased or decreased.
#
# -Example-
#
# ClassID[1] = Warrior ClassID[2] = Thief ClassID[3] = Blackmage
# MaxHP = 1000 MaxHP = 750 MaxHP = 450
# MaxSP = 250 MaxSP = 350 MaxSP = 500
# STR = 100 STR = 50 STR = 20
# DEX = 100 DEX = 100 DEX = 35
# AGI = 50 AGI = 100 AGI = 50
# INT = 25 INT = 25 INT = 150
#
#
# -Features:
#
# - Modifie actor stats by class.
# - Can use integer values and decimal values.
# - Modifieable stats: MaxHP,MaxSP,STR,DEX,AGI,INT.
#
#
# -Installation:
#
# Put this script below Scene_Debug and above Main.
# I think its better to put this below CMS,CBS and Class/Job Systems.
#
#
# -Configuration:
#
# See below at line 118 or search for START.
#
#
# -Credits:
#
# Blizzard for the original script.
# Irrlicht for fixing a bug with the hp/sp.
# Me for the idea, cutting, renameing and testing.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module JobStatModCFG
def self.job_stat_mod(id)
p_maxhp = p_maxsp = p_str = p_dex = p_agi = p_int = 0
m_maxhp = m_maxsp = m_str = m_dex = m_agi = m_int = 1.0
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Job Stat Modifier Database
#
# You are able to set up modifiers for actor stats that change depending on
# the current class/job. Use following template to set up your configuration:
#
# when ID
# p_maxhp = PLUS
# p_maxsp = PLUS
# p_str = PLUS
# p_dex = PLUS
# p_agi = PLUS
# p_int = PLUS
# m_maxhp = MULTI
# m_maxsp = MULTI
# m_str = MULTI
# m_dex = MULTI
# m_agi = MULTI
# m_int = MULTI
#
# ID - the current class ID
# PLUS - an integer value (default is 0)
# MULTI - a decimal value (default is 1.0)
#
# The values that have p_ before that name are static modifiers. For example,
# if you use 100, then the given stat will increase by 100 if the actor has
# the given class. If you use -200, then it will decrease by 200 from the
# actor's basis.
# The values that have m_ before that name are dynamic modifiers. For
# example, if you use 1.1, then the given stat will increase by 10% if the
# actor has the given class. If you use 0.8, then it will decrease by 20%
# from the actor's basis.
#
# Note:
#
# It might be a good idea to create a neutral class if you are using this
# feature. If you don't set up a class here, then the default values will be
# applied. Keep in mind that first all static modifiers will be applied and
# afterwards the dynamic modifiers.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 1 # ClassID[1]
p_maxhp = 0
p_maxsp = 0
p_str = 0
p_dex = 0
p_agi = 0
p_int = 0
m_maxhp = 1.0
m_maxsp = 0.5
m_str = 1.0
m_dex = 1.0
m_agi = 1.0
m_int = 0.5
when 2 # ClassID[2]
p_maxhp = 0
p_maxsp = 0
p_str = 0
p_dex = 0
p_agi = 0
p_int = 0
m_maxhp = 0.5
m_maxsp = 1.0
m_str = 0.5
m_dex = 0.5
m_agi = 0.5
m_int = 1.0
#when 3 # ClassID[3]
#p_maxhp = 0
#p_maxsp = 0
#p_str = 0
#p_dex = 0
#p_agi = 0
#p_int = 0
#m_maxhp = 1.0
#m_maxsp = 1.0
#m_str = 1.0
#m_dex = 1.0
#m_agi = 1.0
#m_int = 1.0
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Job Stat Modifier Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return [p_maxhp, m_maxhp, p_maxsp, m_maxsp, p_str, m_str, p_dex, m_dex,
p_agi, m_agi, p_int, m_int]
end
end
#==============================================================================
# Game_Actor
#------------------------------------------------------------------------------
# This is where the stats get modified.
#==============================================================================
class Game_Actor < Game_Battler
#----------------------------------------------------------------------------
# override base_maxhp
#----------------------------------------------------------------------------
alias base_maxhp_modifier_later base_maxhp
def base_maxhp
result, mods = base_maxhp_modifier_later, JobStatModCFG.job_stat_mod(@class_id)
return ((result + mods[0]) * mods[1]).to_i
end
#----------------------------------------------------------------------------
# override base_maxsp
#----------------------------------------------------------------------------
alias base_maxsp_modifier_later base_maxsp
def base_maxsp
result, mods = base_maxsp_modifier_later, JobStatModCFG.job_stat_mod(@class_id)
return ((result + mods[2]) * mods[3]).to_i
end
#----------------------------------------------------------------------------
# override base_str
#----------------------------------------------------------------------------
alias base_str_modifier_later base_str
def base_str
result, mods = base_str_modifier_later, JobStatModCFG.job_stat_mod(@class_id)
return ((result + mods[4]) * mods[5]).to_i
end
#----------------------------------------------------------------------------
# override base_dex
#----------------------------------------------------------------------------
alias base_dex_modifier_later base_dex
def base_dex
result, mods = base_dex_modifier_later, JobStatModCFG.job_stat_mod(@class_id)
return ((result + mods[6]) * mods[7]).to_i
end
#----------------------------------------------------------------------------
# override base_agi
#----------------------------------------------------------------------------
alias base_agi_modifier_later base_agi
def base_agi
result, mods = base_agi_modifier_later, JobStatModCFG.job_stat_mod(@class_id)
return ((result + mods[8]) * mods[9]).to_i
end
#----------------------------------------------------------------------------
# override base_int
#----------------------------------------------------------------------------
alias base_int_modifier_later base_int
def base_int
result, mods = base_int_modifier_later, JobStatModCFG.job_stat_mod(@class_id)
return ((result + mods[10]) * mods[11]).to_i
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Job Stat Modifier Fix by Irrlicht
# Date: 11.06.2011
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
alias_method(:class_id_JobStatMod, :class_id=) unless method_defined?(:class_id_JobStatMod)
def class_id=(class_id)
class_id_JobStatMod(class_id)
# set new hp/sp after class change.
self.hp = hp
self.sp = sp
end
end
InstructionsIn the script.
Compatibility100% compatible with SDK v2.4, not testet with older versions.
100% compatible with MACL v2.0, idk if this is important.
Works 100% with LegacyBlades Legacy Class Change script.
Don't use this script with Blizzard's R0 Skill/Job System.
Can cause incompatibility issues with other exotic Class/Job Systems.
Should work with any CMS or CBS.
Credits and Thanks
- Blizzard for the original script.
- Irrlicht for fixing a bug with the hp/sp.
- Me for the idea, cutting, renameing and testing.
Author's NotesI hope you like this :^_^':
Edit: Updatet to 1.1 - now the script is only one part.