[XP] Level Difference Based Exp... Misc Add-on

Started by Satoh, October 23, 2008, 09:10:37 pm

Previous topic - Next topic

KK20

It's getting it twice? Weird, it's not doing that for me. You're not using other scripts, right?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Apathy Man

November 02, 2012, 12:40:39 pm #41 Last Edit: November 02, 2012, 01:01:04 pm by Apathy Man
None at all. Testing it on a test project which is completely vanilla with the exception of this script. I could simply work around it by modifying the variables for each level difference by half in the script, but felt it best to point it out at least.

I guess without having to correct the experience message after battle, would you or anyone else happen to know a bit of code to stop the message from being shown altogether? Or is there an easier means to fix it?

KK20

Did a new project with just my code snippet. It's giving the correct amount--it's not doing the process twice. If I kill two ghosts, which give 2 exp each (thus, they are Level 2), a level 1 character gets 140 EXP, level 2 gets 120 EXP, and so on. What are the exact steps you are doing?

For the results window, if you want just a Victory message displayed:
Spoiler: ShowHide
class Window_BattleResult < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     exp       : EXP
  #     gold      : amount of gold
  #     treasures : treasures
  #--------------------------------------------------------------------------
  def initialize(exp, gold, treasures)
    @exp = exp
    @gold = gold
    @treasures = treasures
    super(160, 0, 320, @treasures.size * 32 + 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.y = 160 - height / 2
    self.back_opacity = 160
    self.visible = false
    self.contents.draw_text(0, 0, self.contents.width, 32, "VICTORY!", 1)
  end
end

Or if you want to remove it entirely:
Spoiler: ShowHide
class Window_BattleResult < Window_Base
  def visible=(bool)
    super(false)
  end
end
Place either one in my edit all the way at the bottom of the script itself.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Apathy Man

Sorry for the misunderstanding KK. Performed by tests in the same manner, and your results are the same as mine. However, from looking at the code, my assumption was that anything of equal level was to be 60 exp, one level above, 70, etc. My eyes may be deceiving me though. You're obviously far better with coding than I am.

KK20

Well your assumption is correct: according to the code, if you are the same level as the monster, you earn 60 EXP.
So if I'm level 2, and fight two ghosts which are level 2, then that's 120 EXP (60 EXP for each ghost).

This was more of a mathematical problem than programming, but glad to see it's working  ;)

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Apathy Man

 :shy: My fail. Completely overlooked the fact there were two mobs factoring into it. Ugh, embarassing. Thanks so much!