Actor Options as Class Options
Version: 1.1
Author: cozziekuns
Date: May 28, 2010
Version History
- <Version 1.1> 05.28.2010 - Updated with Critical Bonus
- <Version 1.0> 05.28.2010 - Original Release
Planned Future Versions
- None! Please suggest some features.
Description
Each "Actor Option" is now avaliable through classes. For example, if you want your Paladin to dual wield swords, that can be done. If you want your bowman to auto-battle, that can be done. The only reason I find that this could be useful is if you have a class changer or something. So if Ralph was a Viking with the inherit ability of "Super Guard", he could now become a Ninja with the ability of "Two Swords Style".
Features
- Easily customizable.
- Traits are stackable (like always).
- More than one class can have one trait.
Instructions
See header.
Script
#===============================================================================
#
# Actor Options as Class Options
# Last Date Updated: 5/28/2010
#
# Each "Actor Option" is now avaliable through classes. For example, if you want
# your Paladin to dual wield swords, that can be done. The only reason I find
# that this could be useful is if you have a class changer or something. So if
# Ralph was a Viking with the inherit ability of "Super Guard", he could now
# become a Ninja with the ability of "Two Swords Style".
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 05/28/10 Started Script.
# o 05/28/10 Updated with Critical Bonus.
#===============================================================================
# What's to come?
# -----------------------------------------------------------------------------
# o Nothing! Suggest something.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#
# To change the modules, replace the numbers that are already in the array with
# the class ID's that you want to have that specific trait. You can have more
# than one class ID in each array.
#
# For example, if I wanted Ulrika (who is a warrior, and has the class ID of 2)
# to use two swords, we would replace the 1 in the TWO_SWORDS_STYLE array with
# 2.
#===============================================================================
$imported = {} if $imported == nil
$imported["CozActOptClaOpt"] = true
module COZZIEKUNS
module CCO
TWO_SWORDS_STYLE =[
1, # Actor with the class id of 1
]
FIX_EQUIPMENT =[
2, # Actor with the class id of 2
]
AUTO_BATTLE =[
3,
]
SUPER_GUARD =[
3,
]
PHARMACOLOGY =[
4,
]
CRITICAL_BONUS =[
1,
]
end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
alias coz_cco_setup setup
def setup(actor_id)
coz_cco_setup(actor_id)
@cb = COZZIEKUNS::CCO::CRITICAL_BONUS
@tss = COZZIEKUNS::CCO::TWO_SWORDS_STYLE
@fe = COZZIEKUNS::CCO::FIX_EQUIPMENT
@ab = COZZIEKUNS::CCO::AUTO_BATTLE
@sg = COZZIEKUNS::CCO::SUPER_GUARD
@pharm = COZZIEKUNS::CCO::PHARMACOLOGY
end
#--------------------------------------------------------------------------
# * Get [Critical Bonus] Option
#--------------------------------------------------------------------------
def critical_bonus
return true if @cb.include?(@class_id)
else
return false
end
#--------------------------------------------------------------------------
# * Get Critical Ratio
#--------------------------------------------------------------------------
def cri
n = 4
n += 4 if critical_bonus
for weapon in weapons.compact
n += 4 if weapon.critical_bonus
end
return n
end
#--------------------------------------------------------------------------
# * Get [Dual Wield] Option
#--------------------------------------------------------------------------
def two_swords_style
return true if @tss.include?(@class_id)
else
return false
end
#--------------------------------------------------------------------------
# * Get [Fixed Equipment] Option
#--------------------------------------------------------------------------
def fix_equipment
return true if @fe.include?(@class_id)
else
return false
end
#--------------------------------------------------------------------------
# * Get [Automatic Battle] Option
#--------------------------------------------------------------------------
def auto_battle
return true if @ab.include?(@class_id)
else
return false
end
#--------------------------------------------------------------------------
# * Get [Super Guard] Option
#--------------------------------------------------------------------------
def super_guard
return true if @sg.include?(@class_id)
else
return false
end
#--------------------------------------------------------------------------
# * Get [Pharmocology] Option
#--------------------------------------------------------------------------
def pharmacology
return true if @pharm.include?(@class_id)
else
return false
end
end
Credit
Support
Just post below.
Known Compatibility Issues
None as of yet.
Author's Notes
Why do people never use defend? I use it when my healer's charging for a skill and I only have 400 HP left and the big bad monster can dish out 500 damage points.
Restrictions