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.
Reserve Members' EXP Rate 1.0 [VXA]

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 82
Reserve Members' EXP Rate MiniScript
Version: 1.0
Author: Logan Forrests
Date: 10 December 2012

Version History


  • <Version 1.0> 2012.12.10 - Original Release

Description


A script to allow the customisation of the EXP gained by reserve party members, and to provide a means of excluding certain actors from the benefit of EXP gained as a reserve party member.

Features

  • Easy to customise
  • Two ways to set the proportion of exp shared: As a real number between 0 and 1 (ex. 0.5 = 50%), or as a real number greater than or equal to 0 (ex. 50 = 50%, 150 = 150%)
  • Exclude certain actors from being able to gain any share of exp during game play. Useful for those actors you wish to temporarily remove from the reserve party. It is possible to remove them from this list at any time.

Instructions

Simply copy and paste the script into an open slot in the script editor. See here for further instructions on adding scripts to your project.

Script


Code: [Select]
#==============================================================================
#   Reserve Member EXP Rate MiniScript (ver 1.0)
#
#   ~ Part of the OvertureAce MiniScript compilation by Logan Forrests ~
#
#==============================================================================
#   About
#------------------------------------------------------------------------------
#   Title: Reserve Member EXP Rate
#
#   A script to allow the customisation of the EXP gained by reserve party
#    members, and to provide a means of excluding certain actors from the
#    benefit of EXP gained as a reserve party member.
#
#   Version: 1.0
#   Date: 10 December 2012
#   Author: Logan Forrests
#   Hosted on: RMRK.net only.
#
#   Permissions for use of this script can be found here:
#       - http://rmrk.net/index.php/topic,45481.0.html
#
#   Redistribution of this script is stricly prohibited.
#==============================================================================
#   Directions
#------------------------------------------------------------------------------
#   You can change the proportion of the exp awarded at the end of battle
#    the reserve party members gain.
#
#   RATE : The proportion of exp awarded. Can be written in one of two ways:
#         Way 1: A real number between 0 and 1. This is the decimal percentage
#                Ex: 0.5 is 50%, 0.85 is 85%.
#         Way 2: A real number between 0 and 100. This will be converted into
#                the above. Ex: 50 is 50%, 80 is 80%.
#         Note: In the event '1' is used, it was will be considered under Way 1
#                and will be treated to mean 100%.
#
#   EXCLUSION : This array contains the IDs of actors who will not benefit from
#       shared exp. An excluded actor will still gain exp from battles if they
#       take part in the battle.
#       By default, this is empty. IDs added directly to this script
#       will be considered excluded from this benefit from the beginning of the
#       game. IDs can be added and removed from this list during the game via
#       Script calls in events.
#
#
#   The following Script commands can be used:
#
#      rmer_exclude(actor_id):
#          Adds the actor_id to the Exclusion list. This actor will not gain
#          any exp from battles when outside of the active party.
#
#      rmer_remove(actor_id):
#          Removes the actor_id from the Exclusion list. The actor will continue
#          to receive a share of the exp from battles.
#
#    Script commands can be used by selecting the "Script..." command within
#     the Event Command list. It can be found under "Advanced" on page 3.
#==============================================================================
# Important Notes
#------------------------------------------------------------------------------
#  It is incredibly important to note that using this script will render
#    the option to enable and disable the "Reserve Members EXP" option in
#    the database redundant. This script assumes that you want to share
#    EXP to all actors unless they are on the Exclusion list, and does NOT
#    check that the option is enabled, as it does in the default, original code.
#==============================================================================


module OvertureAce
  module MiniScripts
 
    module Reserve_Member_EXP_Rate
#==============================================================================
#          !!!!!!!          START OF CUSTOMISATION       !!!!!!!
#==============================================================================
    #How much of the awarded exp that will be also awarded to reserve party
    #members. Can be a real number between 0 and 1 (inclusive), or a real number
    # between greater than 0 (inclusive). The value given will be converted into a
    # percentage. Note: the value '1' will be treated as 100%. Please use 0.01 to represent
    # 1%
    RATE = 1
   
    #Which party members should be excluded from the Reserve Party Member EXP
    #award? Insert the IDs of the Party Members (their Actor ID) who should
    #not be given reserve exp, seperated by a comma ',' as in the example below
    # Ex: EXCLUSION = [ 1, 3, 6]
    EXCLUSION = [ ]
#===============================================================================
#          !!!!!!!          END OF CUSTOMISATION       !!!!!!!
#===============================================================================
#      DO NOT EDIT BEYOND THIS LINE         DO NOT EDIT BEYOND THIS LINE
#===============================================================================
    end
  end
end
#===============================================================================
# Game_Actor
#    Overwritten methods:
#            reserve_members_exp_rate
#               - Reflects Exclusion list
#               - Removes check for option being enabled (implied enabling)
#               - Converts rate to decimal percentage if necessary
#===============================================================================
class Game_Actor
 
  #--------------------------------------------------------------------------
  # * Get EXP Rate for Reserve Members
  #--------------------------------------------------------------------------
  def reserve_members_exp_rate
    #shorten module name
    mod_ref = OvertureAce::MiniScripts::Reserve_Member_EXP_Rate
    unless mod_ref::EXCLUSION.include?(self.id)
      #get rate as floating point number
      rate = (mod_ref::RATE).to_f
      #convert to number between 0 and 1 if necessary
      rate /= 100.0 if rate > 1
      return rate
    end
    return 0 #If excluded, no exp is awarded
  end
 
end

#===============================================================================
# Game_Interpreter
#     Added methods:
#               rmer_exclude(actor_id)
#                 - Adds given actor_id to exclusion array
#               rmer_remove(actor_id)
#                 - Removes given actor_id from exclusion array
#===============================================================================
class Game_Interpreter
 
  def rmer_exclude(actor_id)
    mod_ref = OvertureAce::MiniScripts::Reserve_Member_EXP_Rate
    mod_ref::EXCLUSION.push(actor_id) unless mod_ref::EXCLUSION.include?(actor_id)
  end
 
  def rmer_remove(actor_id)
    mod_ref = OvertureAce::MiniScripts::Reserve_Member_EXP_Rate
    mod_ref::EXCLUSION.delete(actor_id) if mod_ref::EXCLUSION.include?(actor_id)
  end
 
#~   #Testing methods
#~   #Check for correct exp share
#~   def rmer_test_exp(actor_id, exp)
#~     actor = $game_actors[actor_id]
#~     rate = actor.reserve_members_exp_rate
#~     gain = exp * rate
#~     p "EXP gained by actor #{actor_ud}: #{gain}"
#~   end
#~   
#~   #Test the adding of excluded actors
#~   def rmer_test_exclude(actor_id)
#~     rmer_exclude(actor_id)
#~     p OvertureAce::MiniScripts::Reserve_Member_EXP_Rate::EXCLUSION
#~   end
#~   
#~   #Test the removal of excluded actors
#~   def rmer_test_remove(actor_id)
#~     rmer_remove(actor_id)
#~     p OvertureAce::MiniScripts::Reserve_Member_EXP_Rate::EXCLUSION
#~   end
 
end

Credit


  • Logan Forrests

Thanks

  • To be updated as necessary

Support


Support for this script can be received by posting in this thread. I will attempt to provide support as soon as possible. Whilst all has been done to test this script for bugs and errors, it is possible that some may still exist. Please report any bugs or issues that you uncover.

Please note that, by making any changes to the underlying code in this script (that outside of the highlighted customisation area) may render you unable to receive accurate support. As such, please do not make changes to the underlying code without prior consultation.

Known Compatibility Issues

None currently known.

Because MiniScript scripts are focussed around changing the default code (often involving overwrites of methods), it is possible that there will be compatibility issues with other scripts. Due to their small size, I am willing to attempt to make compatibility fixes should you encounter any. Please provide details of the scripts which are causing conflict, and a copy of that script where possible.

Author's Notes


Finally, a released script for VX Ace by me. Nothing exactly exciting, but that's not the point of my MiniScript scripts. Sometimes, there's some very limiting things in the default engine that doesn't always make too much sense. In this case, enabling the "Reserve Members' EXP" option, granted 100% of the exp gained by the active party to the reserve party. Maybe you want that, but maybe you didn't. So this little script lets you change that. It also adds a little more to that option (excluded certain actors from the gain) which might just be desired from some people. 

Terms of Use


This script adopts the Terms of Use as described here.
« Last Edit: March 04, 2013, 05:05:21 PM by LoganF »
(Why do I always feel like it's the end of the world and I'm the last man standing?)

*
*crack*
Rep:
Level 64
2012 Most Unsung Member2012 Best NewbieFor frequently finding and reporting spam and spam bots
A good first RGSS3 script as any I would say ;8
Useful to some people too :)
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

*
RMRK's dad-in-training
Rep:
Level 72
Busy Husband, Dad, and Youth Minister
GIAW 14: 2nd Place (Easy Mode)2014 Best WriterBronze - GIAW 11 (Normal)Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.2012 Best NewbieContestant - GIAW 9
What a neat idea Logan! Good job!

*
Rep:
Level 82
Thanks for the support. There'll probably a lot more of these MiniScripts than major scripts (though I am working on one of those too at the moment). So many silly limits in the core code, it's crazy that more options were never added. I guess that's a good thing as it gives us scripters something to do.
(Why do I always feel like it's the end of the world and I'm the last man standing?)

*
The Hero of Rhyme
Rep:
Level 83
( ͡° ͜ʖ ͡°)
2014 Queen of RMRKProject of the Year 20142014 Best RPG Maker User - Story2011 Best Newbie2014 Kindest Member2014 Best RPG Maker User - Creativity2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best RPG Maker User (Creativity)2012 Best Yuyubabe Smiley;o
Woot! Congrats on your first Ace script~
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]