RPGVX.net

  RPG-Maker VX => VX Skripte [Fertiger Code] => Thema gestartet von: woratana am August 05, 2008, 17:16:03

Titel: + [ Battle Result Window ] +
Beitrag von: woratana am August 05, 2008, 17:16:03
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~  :lol:


Screenshots
(http://www.uppic.net/ib/battle_result_window.png)


Script
Place it above main
(http://i28.tinypic.com/25thhqt.jpg)
#===============================================================
# ? [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, 516, 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, ty, contents.width, WLH, text)
      contents.font.color = normal_color
      contents.draw_text(292 + tw + 16, ty, contents.width, WLH, 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


Instruction
Just place script above main :D


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


Bug Report?
Please give me these informations:
Zitat
- 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?
Titel: Re: + [ Battle Result Window ] +
Beitrag von: eugene222 am August 05, 2008, 17:34:58
This is very good! Great Job! I will use It in my Game Thx Woratana... Top Top..
Titel: Re: + [ Battle Result Window ] +
Beitrag von: Dainreth am August 05, 2008, 18:22:30
That's nice wora, I tried it and it work's perfectly. Good work, man!
Titel: Re: + [ Battle Result Window ] +
Beitrag von: Eplayer am August 05, 2008, 18:47:22
I already have the same Script,and using it in my Game , and >"ding"< its from you! But from rpgrevolution.com :D
Titel: Re: + [ Battle Result Window ] +
Beitrag von: woratana am August 06, 2008, 13:51:28
I'm glad you guys like it *O*/

There is the bug that window will not disappear in Takenkai Battle System though, so I'm downloading Takenkai demo to see how this can be fixed. :D
Titel: Re: + [ Battle Result Window ] +
Beitrag von: Keyru am August 06, 2008, 20:06:22
This is damn hot :D:D

I hope u'll find a way to make a version which is compatible to Takenkai Battle System, cause i'm using that :d
Titel: Re: + [ Battle Result Window ] +
Beitrag von: woratana am August 07, 2008, 15:00:31
@Keyru
I tested in Takenkai 2.7 demo yesterday (version 1.4 translation by Mr.bubble) and the script works fine.
So try in your game and see if it works too. :D
Titel: Re: + [ Battle Result Window ] +
Beitrag von: Kasaar am August 08, 2008, 15:01:46
Wow oO this is a great script!
really nice... I think I would need it in my game but,
does it show when you get an item?
Titel: Re: + [ Battle Result Window ] +
Beitrag von: woratana am August 29, 2008, 20:25:43
@Antares
It will show in message box. :D
Titel: Re: + [ Battle Result Window ] +
Beitrag von: Sk!p am September 02, 2008, 04:41:41
Wow. That's a great one.

I think I will use it, too.
Simple Scripts like This are very useful. Thx ;)

Sk!p
Titel: Re: + [ Battle Result Window ] +
Beitrag von: Ceta am September 02, 2008, 08:33:48
Jihaa Big Thanks woratana!!

I'll use this script in my project^^

Haha, now you're in my credits xD
Titel: Re: + [ Battle Result Window ] +
Beitrag von: Sk!p am September 02, 2008, 14:34:20
If have a Bad Problem.

I finished a Fight with the first 4 Characters from RPG XV
to test the Script...

After the first Battle, the Script showed 'Ralph Next Level 30' ...
After the second Battle... the Script Showed 'Ralph Next Level 30' again...

Why is it doing that? If the message Box says that Ralph needs 30 More XP I
wanna belive that it is so.. But it isn't. (The standart Batx2 was the mob I testet the Script with - Usualy I got 10 XP for One Fight)

Did I something wrong by importing the 'Script?
Pls help me ^^

Sk!p (Sry for some bad english =P)
SimplePortal 2.3.3 © 2008-2010, SimplePortal