Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> ASCIIgod EXP gain controller, see inside for more de-tails.... errrr i mean details
ASCIIgod
post Jul 31 2011, 07:49 AM
Post #1


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




what it does is emluate the effect of private server MMO games... what i mean is the EXP and money multipliers.... now you can make your game feel like a private server...

easy to use and compatibility issue free.... plus plu n'play... credit is not needed but appreciated since i only did this in just 30 minutes....

here is the code

now on Version 2.3

VARIABLEMODE
what it does is allow you to wether turn the values MULTYPLIER into a variable id or just plain number

Updated...

New Thing

SHARED

this boolean value determines if the exp gained is shared to everyone or not

Codebox
CODE
################################################################################
#                                                                              #
#         ASCIIgod private server MMORPG styled EXP modifyers                  #
#                           Ver.3.2.a                                          #
#                                                                              #
#                                                                              #
#                                                                              #
#                                                                              #
################################################################################
#
#
# What it does is emulate the private server MMORPGs EXP modifyer which make use
# of terms like x10 EXP x10 Gold something like that... this snippet is pretty
# simple that it can be used to almost any script with no harmful effect and
# noob friendly...
#
################################################################################
#
# To use this you just need to know 2 configurations...
#
# MULTIPLYER = n
# > this would be the value that will modify the total EXP you can get.
#
# MODE = 0
# > there is only 2 in the mean time. that is per enemy(0) or
# > total gained(1)
# >> per enemy(0) means the exp you set in the database will be multiplyed.
#  > that means different enemies with different EXP will yield you different
#  > total exp gains
#
# >> total gained(1) means all EXP of killed enemy will be added THEN multiplyed...
#  > this method is used only for a grinding dependent games...
#
#
# VARIABLEMODE
# > what it does is, if it set to 1 then the value in MULTIPLYER will become
# > variable number. that way you are allowed to change EXP/Gold multiplyer during
# > game...
#
# *new* SHARED
# > A boolean condition whether the EXP is divided depending on how many member
# > is in battle...
################################################################################
#
# Future addons to this snipper
#
# new mode. enemy killed multiplyer(2)
# > it means for each enemy you kill, the total EXP gain is multiplyed by that
#   amount. MULTIPLYER is nullifyed
#
################################################################################
module ASCIIGOD
  module EXP_MULTIPLYER
    
    VARIABLEMODE = 0
    
    MULTIPLYER = 100
    GOLD_MULTIPLYER = 100
    MODE = 0
    
    SHARED = true
  end
end
################################################################################

"Touch in here and you will die o.0"
class Game_Troop < Game_Unit
  case ASCIIGOD::EXP_MULTIPLYER::MODE
  when 0
    def exp_total
      divider = 0
      for actor in $game_party.existing_members
        divider += 1
      end
      exp = 0
      for enemy in dead_members
        exp += enemy.exp unless enemy.hidden
      end
      if ASCIIGOD::EXP_MULTIPLYER::VARIABLEMODE == 0
        exp *= ASCIIGOD::EXP_MULTIPLYER::MULTIPLYER unless enemy.hidden
      else
        exp *= $game_variables[ASCIIGOD::EXP_MULTIPLYER::MULTIPLYER] unless enemy.hidden
      end
      if ASCIIGOD::EXP_MULTIPLYER::SHARED == true
        exp /= divider
      end
      return exp
    end
  when 1
    def exp_total
      divider = 0
      for actor in $game_party.existing_members
        divider += 1
      end
      exp = 0
      for enemy in dead_members
        exp += enemy.exp unless enemy.hidden
        if ASCIIGOD::EXP_MULTIPLYER::VARIABLEMODE == 0
          exp *= ASCIIGOD::EXP_MULTIPLYER::MULTIPLYER unless enemy.hidden
        else
          exp *= $game_variables[ASCIIGOD::EXP_MULTIPLYER::MULTIPLYER] unless enemy.hidden
        end
      end
      if ASCIIGOD::EXP_MULTIPLYER::SHARED == true
        exp /= divider
      end
      return exp
    end
  else
    def exp_total
      divider = 0
      for actor in $game_party.existing_members
        divider += 1
      end
      exp = 0
      for enemy in dead_members
        exp += enemy.exp unless enemy.hidden
      end
      if ASCIIGOD::EXP_MULTIPLYER::SHARED == true
        exp /= divider
      end
      return exp
    end
  end
  
  def gold_total
    gold = 0
    for enemy in dead_members
      gold += enemy.gold unless enemy.hidden
    end
    if ASCIIGOD::EXP_MULTIPLYER::VARIABLEMODE == 0
      gold *= ASCIIGOD::EXP_MULTIPLYER::GOLD_MULTIPLYER
    else
      exp *= $game_variables[ASCIIGOD::EXP_MULTIPLYER::MULTIPLYER] unless enemy.hidden
    end
    return gold
  end
end


This post has been edited by ASCIIgod: Aug 27 2011, 11:13 PM


__________________________

Go to the top of the page
 
+Quote Post
   
titogod
post Jul 31 2011, 10:25 AM
Post #2


Level 5
Group Icon

Group: Member
Posts: 66
Type: None
RM Skill: Undisclosed




screenshots?


__________________________
Go to the top of the page
 
+Quote Post
   
ASCIIgod
post Aug 1 2011, 03:44 AM
Post #3


Demonic God of Snippets of Doom +10
Group Icon

Group: Revolutionary
Posts: 271
Type: Scripter
RM Skill: Intermediate




QUOTE (titogod @ Aug 1 2011, 02:25 AM) *
screenshots?


no screens are needed. you have to test battle it yourself...


__________________________

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 01:18 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker