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.
Editable Actor Options

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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
Editable Actor Options
Version: 1.0
Author: modern algebra
Date: December 27, 2008

Version History


  • <Version 1.0> 12/27/08 Original Release

Description


This script allows you to change the actor options of Two Swords Style, Fix Equipment, Auto Battle, Super Guard, Pharmacology, and Critical Bonus in game, so that actors can learn these special feats in-game instead of either having them at the start of the game or not at all

Features

  • Allows you to change actor options in game
  • Very simple command line to use script

Screenshots

Not useful

Instructions

    Paste this script above Main and below Materials in the Script Editor.
   To change the actor options in game, merely use a call script and write this code:

          change_actor_options (actor ID, option ID, value)

   where: actor ID - the ID of the actor whose options you want to change
          option ID - the ID of the option you want to change, as follows -
            0 => Two Swords Style
            1 => Fix Equipment
            2 => Auto Battle
            3 => Super Guard
            4 => Pharmacology
            5 => Critical Bonus
          value - true or false; whether you want the actor to have the  ability or not. So true means the actor will
                       have the ability and false will mean the actor will not have the ability. If you leave value empty, it will
                       toggle the ability - if it's on, it will turn off - if it's off it will turn on.

  Examples:

   change_actor_options (1, 2, true)  ## Actor 1 - Auto Battle Turned ON
   change_actor_options (6, 0, false) ## Actor 6 - Two Swords Style turned OFF
   change_actor_options (3, 4)        ## Actor 3 - Phamacology toggled

Script


Code: [Select]
#==============================================================================
#  Editable Actor Options
#  Version: 1.0
#  Author: modern algebra (rmrk.net)
#  Date: December 27, 2008
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This script allows you to change the actor options of Two Swords Style,
#   Fix Equipment, Auto Battle, Super Guard, Pharmacology, and Critical Bonus
#   in game, so that actors can learn these special feats in-game instead of
#   either having them at the start of the game or not at all
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Instructions:
#    Paste this script above Main and below Materials in the Script Editor.
#   To change the actor options in game, merely use a call script and write
#   this code:
#
#          change_actor_options (actor ID, option ID, value)
#
#   where: actor ID - the ID of the actor whose options you want to change
#          option ID - the ID of the option you want to change, as follows -
#            0 => Two Swords Style
#            1 => Fix Equipment
#            2 => Auto Battle
#            3 => Super Guard
#            4 => Pharmacology
#            5 => Critical Bonus
#          value - true or false; whether you want the actor to have the
#            ability or not. So true means the actor will have the ability and
#            false will mean the actor will not have the ability. If you leave
#            value empty, it will toggle the ability - if it's on, it will turn
#            off - if it's off it will turn on.
#
#  Examples:
#
#   change_actor_options (1, 2, true)  ## Actor 1 - Auto Battle Turned ON
#   change_actor_options (6, 0, false) ## Actor 6 - Two Swords Style turned OFF
#   change_actor_options (3, 4)        ## Actor 3 - Phamacology toggled
#==============================================================================

#==============================================================================
# ** Game_Actor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    methods overwritten - two_swords_style, fix_equipment, auto_battle,
#                       super_guard, pharmacology
#    methods aliased - setup, cri
#    new instance variables - two_swords_style, fix_equipment, auto_battle,
#                       super_guard, pharmacology, critical_bonus
#==============================================================================

class Game_Actor
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :two_swords_style
  attr_accessor :fix_equipment
  attr_accessor :auto_battle
  attr_accessor :super_guard
  attr_accessor :pharmacology
  attr_accessor :critical_bonus
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Setup
  #    actor_id : the ID of the actor being set up
  #``````````````````````````````````````````````````````````````````````````
  #  Initialize instance variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_strfyre_stup_actr_edt_options_93n5 setup
  def setup (actor_id)
    # Run Original Method
    modalg_strfyre_stup_actr_edt_options_93n5 (actor_id)
    # Initialize new instance variables
    @two_swords_style = actor.two_swords_style
    @fix_equipment = actor.fix_equipment
    @auto_battle = actor.auto_battle
    @super_guard = actor.super_guard
    @pharmacology = actor.pharmacology
    @critical_bonus = actor.critical_bonus
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Critical Ratio
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_strfyr_edt_actr_opt_crit_84nbd cri
  def cri
    # Run Original Method
    n = modalg_strfyr_edt_actr_opt_crit_84nbd
    n -= 4 if actor.critical_bonus
    n += 4 if @critical_bonus
    return n
  end
end

#==============================================================================
# ** Game_Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - change_actor_options
#==============================================================================

class Game_Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Change Actor Options
  #    actor_id  : the ID of the actor to perform the operation on
  #    option_id : the ID of option to change
  #    value     : value to set that option to
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def change_actor_options (actor_id, option_id, value = -1)
    # Get Actor
    actor = $game_actors[actor_id]
    # Set option by ID. If no value specified, toggle option
    case option_id
    when 0 # Two Swords Style
      actor.change_equip (1, nil) if value != actor.two_swords_style
      actor.two_swords_style = value == -1 ? !actor.two_swords_style : value
    when 1 # Fix Equipment
      actor.fix_equipment = value == -1 ? !actor.fix_equipment : value
    when 2 # Auto Battle
      actor.auto_battle = value == -1 ? !actor.auto_battle : value
    when 3 # Super Guard
      actor.super_guard = value == -1 ? !actor.super_guard : value
    when 4 # Pharmacology
      actor.pharmacology = value == -1 ? !actor.pharmacology : value
    when 5 # Critical Bonus
      actor.critical_bonus = value == -1 ? !actor.critical_bonus : value
    end
  end
end

Credit


  • modern algebra

Thanks

  • Starfyre - for the request

Support


Please post in this topic for the swiftest response. I will provide any bug support, and if you have any suggestions to improve this script, I will certainly listen to them even if I do not act upon them.

Known Compatibility Issues

No known compatibility issues, though a script that changes how critical bonuses are calculated will interfere with this script.

Demo


No Demo necessary


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: April 16, 2010, 02:29:23 PM by modern algebra »

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
rofl

Quote
Description

<Describe the script. Say what it does and what purpose it serves>

I like this. I saw Star's request, you really pounded this out really fast. Nice work :D

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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
 :mad: Fixed.

Yeah, it was a very easy script to write.

****
Doneski
Rep:
Level 86
This is awesome. Thanks and great work. :)

**
Rep:
Level 84
I'm am God of Light
Whats script for how you choose your name?
If you don't mind me asking,  ;)
Thanks,
-Raiden

Click here to feed me a Rare Candy!
Get your own at Pokeplushies!

Raiden.
I am the God Of Light.

Proud owner of,
http://www.majorrpg.com
Check my website out!
Thank you!

Current Game Project:
Name: Silent Hill - Time Lapse
Percent done: 2%
Genre: Horror

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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
What are you talking about? What has that to do with this topic?

It sounds like you're asking how to get a player choose their own name, in which case you don't need a script, you just need to look at your event command list and see that there is a command on the third page that does exactly that.

**
Rep:
Level 84
I'm am God of Light
What are you talking about? What has that to do with this topic?

It sounds like you're asking how to get a player choose their own name, in which case you don't need a script, you just need to look at your event command list and see that there is a command on the third page that does exactly that.
Sorry for being in the wrong place, just this Topic made me think about it :p
Thank you.

Click here to feed me a Rare Candy!
Get your own at Pokeplushies!

Raiden.
I am the God Of Light.

Proud owner of,
http://www.majorrpg.com
Check my website out!
Thank you!

Current Game Project:
Name: Silent Hill - Time Lapse
Percent done: 2%
Genre: Horror