RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Actor Options as Class Options

0 Members and 1 Guest are viewing this topic.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
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


Code: [Select]
#===============================================================================
#
# 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


  • cozziekuns

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

:ccby:
« Last Edit: May 28, 2010, 08:28:48 PM by cozziekuns »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
This is a good idea. Nice work cozzie :)

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Forgot about critical bonus -.-
Updated to Version 1.1.