Help - Search - Members - Calendar
Full Version: + < XP Battle Result Window > +
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS-Submissions
woratana
Battle Result Window
Version 1.0
by Woratana
Release Date: 05/08/2008


Introduction
I discussed about battle result window for VX with my friend for a while.
The problem is that there is no built-in battle result window in VX.
(The result will show in message box instead)

So I try to script this to see if it's possible to make one.
I put the same information as the battle result window in XP.

Enjoy~ laugh.gif


Screenshots



Script
Place it above main
Click to view attachment



Instruction
Just place script above main biggrin.gif


Author's Notes
Free for use in your work if credit is included.


Bug Report?
Please give me these informations:
QUOTE
- What is it says in error window?
- When is it get error? (Right after run game, when you choose something, etc.)
- Do you have any other scripts running in your game that may crash with this script?
shiriko1989
This is even more interesting than the default! Can It show like some character learned new skill it will pop up like " xxx has learn xxx!" like that?
VileoSufora
I agree with Shiriko, I think it would be awesome if it did this, but if you did it should probably have an option to turn the where it says "Fire was learned!" off.
lahandi

I like this Wora. happy.gif

I havent try it yet, but from the screenshot I think it would be better if you could made the upper window wider, so it would have the same wide like the bottom window.

cheahjc
This looks great but like lahandi said, you should make the window on the top go all the way to the other side, so it looks more normal ph34r.gif
Supergodjesus
Hey Wora, just a quick question...
Is it possible to make it display the amount of xp needed to level instead of the total amount needed? Basically I want it to be consistent with what the status menu displays for the next level exp. Thanks!
lahandi

Wora, let me guess...

You are using Dargor Bonus Battle script too XD

Somehow it fit so well in my game...

woratana
I have no time to be on Windows yet. (I'm using Mac)
so I can't improve this script for a while.

@Lahandi
I'm glad the script works together perfectly *O*/
Leventhan
Looks mighty useful.
Psiclone
If Wora doesn't mind, I've gone ahead and fixed the script to fill the couple requests.

This little 'fix/edit' has both requests, the wider window AND the experience to next level, instead of total experience.

CODE
#===============================================================
# ● [VX] ◦ Battle Result Window ◦ □
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 03/08/2008
# ◦ Version: 1.0
#--------------------------------------------------------------

class Window_Battle_Result < Window_Base
  def initialize(result_data)
    super(0, 0, 544, 32 + (WLH * ($game_party.members.size + 2)) )
    self.z = 10001
    contents.font.color = normal_color
    contents.draw_text(0, 0, contents.width, WLH, result_data[0])
    contents.draw_text(0, WLH, contents.width, WLH, result_data[1])
    $game_party.members.each_index do |i|
      actor = $game_party.members[i]
      ty = WLH * (i + 2)
      draw_actor_name(actor, 0, ty)
      draw_actor_hp(actor, 140, ty)
      contents.font.color = system_color
      text = sprintf(Vocab::ExpNext, Vocab::level)
      tw = contents.text_size(text).width
      contents.draw_text(292 + 40, ty, contents.width, WLH, text)
      contents.font.color = normal_color
      contents.draw_text(292 + tw + 50, ty, contents.width, WLH, actor.next_rest_exp_s)#actor.next_exp_s)
    end
  end
end

class Scene_Battle < Scene_Base
  alias wora_batreswin_scebat_batend battle_end
  alias wora_batreswin_scebat_disexpgold display_exp_and_gold
  
  def battle_end(result)
    @result_window.dispose if result == 0
    wora_batreswin_scebat_batend(result)
  end
  
  def display_exp_and_gold
    result_data = [sprintf(Vocab::ObtainExp, $game_troop.exp_total),
  sprintf(Vocab::ObtainGold, $game_troop.gold_total, Vocab::gold)]
    @result_window = Window_Battle_Result.new(result_data)
    wora_batreswin_scebat_disexpgold
  end
end


If Wora requests it, I'll remove the code, but I just wanted to help the others with those two easy fixes.
Sanctuary12
It won't disappear after battle.
abitsicamica
I'm getting an error at line 37 which says:

Script 'Battle Results' line 37: NoMethodError occurred.

undefined method 'dispose' for nil:NilClass


Can someone help me? Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.