Battle Result Plus
#1
Battle Result Window Plus
A kinda nicer-looking Window_BattleResult
by Ragnarok Rob
Sep 23 2006

Version: 1.01

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Info

This is a better looking version of the battle result window. Instead of that crappy one-lined message box, it is a larger window, divided by little rectangles. Theres a gold section, an experience section, and if you win treasures, a nice section for that too!

Instructions

Just put this anywhere above main!

Compatability Issues

None that i know of...

The Script!
Code:
#==============================================================================
# ** Battle Result Window Plus (WBR+)
#------------------------------------------------------------------------------
#   A cleaner, bigger, and better organized battle result window
#==============================================================================

class Window_BattleResult < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(exp, gold, treasures)
    #Make attributes
    @exp = exp
    @gold = gold
    @treasures = treasures
    #Draw new window
    super(160, 40, 320, @treasures.size * 32 + 200)
    #Make the window's bitmap
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 22
    self.y = 160 - height / 2
    #Make the bitmap invisible
    self.visible = false
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    #Initialize string-width variables
    wx = contents.text_size("Winnings: ").width
    gx = contents.text_size(@gold.to_s + "   ").width
    tx = contents.text_size("Total: ").width
    ex = contents.text_size(@exp.to_s + " ").width
    #If you win items in battle
    if @treasures.size != 0
      #Set font color
      self.contents.font.color = system_color
      #Draw victory text
      self.contents.draw_text(0, 0, 288, 32, "Victory!", 1)
      #Make division rectangle
      self.contents.fill_rect(0, 32, 288, 2, normal_color)
      #Gold Section
      self.contents.draw_text(0, 34, 288, 32, $data_system.words.gold)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 288, 32, "Winnings: ")
      self.contents.font.color = normal_color
      self.contents.draw_text(wx, 70, 288, 32, @gold.to_s)
      @gold += $game_party.gold
      self.contents.font.color = system_color
      self.contents.draw_text(wx + gx, 70, 288, 32, "Total: ")
      self.contents.font.color = normal_color
      self.contents.draw_text(wx + gx + tx, 70, 288, 32, @gold.to_s)
      self.contents.fill_rect(0, 102, 288, 2, normal_color)
      #Experience Section
      self.contents.font.color = system_color
      self.contents.draw_text(0, 104, 288, 32, "Experience")
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 136, 288, 32, @exp.to_s)
      self.contents.font.color = system_color
      self.contents.draw_text(ex, 136, 288, 32, "Ex Points")
      #Treasures Section
      self.contents.fill_rect(0, 168, 288, 2, normal_color)
      self.contents.draw_text(0, 170, 288, 32, "Treasure")
      x = 4
      y = 202
      for item in @treasures
        draw_item_name(item, x, y)
        y += 32
      end
    #If you don't win any items...ha ha! You lose!...ahem
    else
      #Set font color
      self.contents.font.color = system_color
      #Draw victory text
      self.contents.draw_text(0, 0, 288, 32, "Victory!", 1)
      #Make division rectangle
      self.contents.fill_rect(0, 32, 288, 2, normal_color)
      #Gold Section
      self.contents.draw_text(0, 34, 288, 32, $data_system.words.gold)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 288, 32, "Winnings: ")
      self.contents.font.color = normal_color
      self.contents.draw_text(wx, 70, 288, 32, @gold.to_s)
      @gold += $game_party.gold
      self.contents.font.color = system_color
      self.contents.draw_text(wx + gx, 70, 288, 32, "Total: ")
      self.contents.font.color = normal_color
      self.contents.draw_text(wx + gx + tx, 70, 288, 32, @gold.to_s)
      self.contents.fill_rect(0, 102, 288, 2, normal_color)
      #Experience Section
      self.contents.font.color = system_color
      self.contents.draw_text(0, 104, 288, 32, "Experience")
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 136, 288, 32, @exp.to_s)
      self.contents.font.color = system_color
      self.contents.draw_text(ex, 136, 288, 32, "Ex Points")
    end
  end
end


Next Version?

Hopefully in the next version i'll find a way to make a 2 by X table of items to save size!
}


Messages In This Thread
Battle Result Plus - by Ragnarok Rob - 09-23-2006, 01:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  A really really simple individual special battle commands stupidstormy36 0 2,597 04-22-2008, 01:00 PM
Last Post: stupidstormy36
  In-Battle HP/SP Regeneration legend in his own mind 0 2,517 08-26-2007, 01:00 PM
Last Post: legend in his own mind
  Random Battle Cancel El Conductor 0 2,611 08-14-2007, 01:00 PM
Last Post: El Conductor
  map music continues during battle Nakate 0 2,586 08-11-2007, 01:00 PM
Last Post: Nakate
  Ending Battle Music Fix Sephirothtds 0 2,525 05-11-2007, 01:00 PM
Last Post: Sephirothtds



Users browsing this thread: 1 Guest(s)