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.
Variation of experience and money after battle

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 74
RMRK Junior
Variation of experience and money
Version: 1.5
Author: Lecode(or Thecode)

Version History


  • <Version 1.5> - Possibility to exclude those monsters who have the experience and money variable


Description


This script allows you to vary the experience and the money obtained from the monsters at the end of combat. This prevents the fixed gains

Features

  • Allows to vary the experience
  • Allows to vary the gold
  • Possibility to exclude those monsters who have the experience variable
  • Possibility to exclude those monsters who have the money variable

Instructions

-At line 21 we have:
Code: [Select]
Variance_exp = [1, 2, 3]
This value will be added or removed from the exp enemies who are their experience varies.
For exemple,if i put: Variance_exp = [-2,1, 5, 8],
This means that the experience will vary between -2,1,5 and 8 in addition to the exp in Database.
So if a monster gives 3 exp, it will now gives 1,4,8 or 11 exp.

-Same thing for the money

-Line 24 to 25.Place the ID of monsters that will not be affected by this script.For exp,at line 24
and for gold,at line 25

Script


Code: [Select]
#####################################################################
#Variation of experience and money after battle
#By Lecode(or Lecode234,Thecode,Thecode234)
#19 Decembre 2010
#English version
#==================================
#This script allows you to vary the experience
#and the money obtained from the monsters at the end of combat.
#This prevents the fixed gains
#====Version 1.5===========
#Possibility to exclude those monsters who have the experience and money variable
#####################################################################

module Lecode
  module Modif_ExpArgEnnVar
###################################
#MODIFICATIONS
###################################

#==================================================
#Place the numbers to extend the variance.
#For exemple,if i put: Variance_exp = [-2,1, 5, 8],
#This means that the experience will vary between -2,1,5 and 8 in
#addition to the exp in Database.
#So if a monster gives 3 exp, it will now gives 1,4,8 or 11 exp.
#==================================================
 Variance_exp = [1, 2, 3]
 Variance_gold = [1, 2, 3, 4, 5]
 
 Enemy_Exclu_exp = [2,5]
 Enemy_Exclu_gold = [3,5,10]
   
###################################
#END OF MODIFICATIONS
###################################
end#Fin du module Modif_ExpArgEnnVar
 end#Fin du module Lecode

 
###################################
#MODIFICATION IN GAME_ENEMY
#==================================
#Manage the variance of the exp and money
#for each enemy.
#==================================
###################################
class Game_Enemy < Game_Battler
#======================================
#Exp for each enemy in DATABASE
#======================================
  def exp
    if enemy.id. == Lecode::Modif_ExpArgEnnVar::Enemy_Exclu_exp.size
      return enemy.exp
      else
    return enemy.exp += rand(Lecode::Modif_ExpArgEnnVar::Variance_exp.size)
    end
  end
#======================================
#Gold for each enemy in DATABASE
#======================================
 def gold
      if enemy.id == Lecode::Modif_ExpArgEnnVar::Enemy_Exclu_gold.size
      return enemy.gold
      else
    return enemy.gold += rand(Lecode::Modif_ExpArgEnnVar::Variance_gold.size)
    end
  end
 
  end#Fin de la class Game_Enemy


Credit


  • Lecode

Support


If you want to make for exemple,JP variation,Mp me :)

Known Compatibility Issues

IDk,sorry =/

Author's Notes


I hope that this script will be of great help =)
And,sorry for my bad english ^^'
« Last Edit: March 10, 2011, 11:37:15 AM by Lecode »