Battle Report Script Window style
#1
Introduction

hi
this is a battle report system script that instead of opening a new page after a battle will just pop up a window in the battle ending, only if any actor level or learn a skill.

Screenshots


[Image: BR3.png]


Code:
#================================================
# ====Create a new script above main and put all that code in it. ======
#================================================
#
#
#
#
#
# Window_BattleStatus
#
#¥£¥ XRXS_BP10. LEVEL UP!”\—͏㏸•\Ž¦ƒEƒBƒ“ƒhƒE plus! ¥£¥
# by ÷‰ë Ý“y
#
# —vFXRXS.RGSS‰ü—ǃJƒXƒ^ƒ}ƒCƒY
#
#
#Script found at http://f26.aaa.livedoor.jp/~xxms/RPGXP_XRXS_BP10.htm
#Modified by Sutebe-san
#
#
#==============================================================================
#  ƒJƒXƒ^ƒ}ƒCƒYƒ|ƒCƒ“ƒg
#==============================================================================
class Scene_Battle
LEVEL_UP_SE = "Audio/SE/new (6) level_up" # ƒŒƒxƒ‹ƒAƒbƒvSEB""‚Å–³‚µB new (6) level_up
LEVEL_UP_ME = "" #"Audio/ME/007-Fanfare01" # ƒŒƒxƒ‹ƒAƒbƒvME
end
class Window_SkillLearning < Window_Base
SKILLLEARN_SE = "Audio/SE/new (12)enigme_resolue" # ƒXƒLƒ‹K“¾SEB
end
#==============================================================================
# ¡ Window_LevelUpWindow
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹I—¹ŽžAƒŒƒxƒ‹ƒAƒbƒv‚µ‚½ê‡‚ɃXƒe[ƒ^ƒX‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================
class Window_LevelUpWindow < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize(x, y, actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
# super(x, y, 160, 192)
super(x-x, y-64, 160, 192+64)

self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
self.back_opacity = 160
refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
self.contents.clear
self.contents.font.color = system_color
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 20, 0, 160, 24, "LEVEL UP!!")
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 28+64, 160, 24, $data_system.words.hp)
self.contents.draw_text( 0, 50+64, 160, 24, $data_system.words.sp)
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 0+64, 80, 24, "Level")
self.contents.draw_text( 0, 72+64, 80, 24, $data_system.words.str[0,3])
self.contents.draw_text( 0, 94+64, 80, 24, $data_system.words.dex[0,3])
self.contents.draw_text( 0, 116+64, 80, 24, $data_system.words.agi[0,3])
self.contents.draw_text( 0, 138+64, 80, 24, $data_system.words.int[0,3])
self.contents.draw_text(76, 0+64, 128, 24, "=")
self.contents.draw_text(76, 28+64, 128, 24, "=")
self.contents.draw_text(76, 50+64, 128, 24, "=")
self.contents.draw_text(76, 72+64, 128, 24, "=")
self.contents.draw_text(76, 94+64, 128, 24, "=")
self.contents.draw_text(76, 116+64, 128, 24, "=")
self.contents.draw_text(76, 138+64, 128, 24, "=")
self.contents.font.size = 20
self.contents.font.color = Color.new(128, 255, 128)
self.contents.draw_text( 0, 0+64, 72, 24, "+" + (actor.level-last_lv).to_s, 2)
self.contents.draw_text( 0, 28+64, 72, 24, "+" + up_hp.to_s, 2)
self.contents.draw_text( 0, 50+64, 72, 24, "+" + up_sp.to_s, 2)
self.contents.draw_text( 0, 72+64, 72, 24, "+" + up_str.to_s, 2)
self.contents.draw_text( 0, 94+64, 72, 24, "+" + up_dex.to_s, 2)
self.contents.draw_text( 0, 116+64, 72, 24, "+" + up_agi.to_s, 2)
self.contents.draw_text( 0, 138+64, 72, 24, "+" + up_int.to_s, 2)
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 0+64, 128, 24, actor.level.to_s, 2)
self.contents.draw_text( 0, 26+64, 128, 24, actor.maxhp.to_s, 2)
self.contents.draw_text( 0, 48+64, 128, 24, actor.maxsp.to_s, 2)
self.contents.draw_text( 0, 70+64, 128, 24, actor.str.to_s, 2)
self.contents.draw_text( 0, 92+64, 128, 24, actor.dex.to_s, 2)
self.contents.draw_text( 0, 114+64, 128, 24, actor.agi.to_s, 2)
self.contents.draw_text( 0, 136+64, 128, 24, actor.int.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text( -40, 26, 128, 24, actor.name, 2)
end
end
#==============================================================================
# ¡ Window_SkillLearning
#------------------------------------------------------------------------------
# @ƒŒƒxƒ‹ƒAƒbƒvŽž‚ȂǂɃXƒLƒ‹‚ðK“¾‚µ‚½ê‡‚É‚»‚ê‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================
class Window_SkillLearning < Window_Base
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_reader :learned # ƒXƒLƒ‹‚ðK“¾‚µ‚½‚©‚Ç‚¤‚©
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize(class_id, last_lv, now_lv)
super(160, 64-32, 320, 64)

self.contents = Bitmap.new(width - 32, height - 28) # ‚í‚´‚Ɓ¤‚ð•\Ž¦
self.visible = false
self.back_opacity = 160
@learned = false
refresh(class_id, last_lv, now_lv)
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh(class_id, last_lv, now_lv)
for i in 0...$data_classes[class_id].learnings.size
learn_lv = $data_classes[class_id].learnings[i].level
# ¡‰ñ‚̃Œƒxƒ‹ƒAƒbƒv”͈͂ŏK“¾‚·‚éƒXƒLƒ‹‚̏ꍇ
if learn_lv > last_lv and learn_lv <= now_lv
@learned = true
# SE‚̍ж
if SKILLLEARN_SE != ""
Audio.se_play(SKILLLEARN_SE)
end
# Še•`ŽÊ
skill_name = $data_skills[$data_classes[class_id].learnings[i].skill_id].name
self.contents.clear
self.contents.font.name = $fontface
self.contents.draw_text(0,0,448,32, skill_name + " appris !")
self.visible = true
# ƒƒCƒ“ƒ‹[ƒv
loop do
# ƒQ[ƒ€‰æ–Ê‚ðXV
Graphics.update
# “ü—͏î•ñ‚ðXV
Input.update
# ƒtƒŒ[ƒ€XV
update
# ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
if @learned == false
break
end
end
# ƒƒCƒ“ƒ‹[ƒv‚±‚±‚Ü‚Å
end
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
@learned = false
self.visible = false
end
end
end
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ ’ljÁEŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :level_up_flags # LEVEL UP!•\Ž¦
end
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# œ ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
xrxs_bp10_start_phase5
# Šl“¾ EXP‚ðŽæ“¾
@exp_gained = battle_exp
# EXP Šl“¾‚ðŽæ‚èÁ‚·
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp -= @exp_gained
if actor.level < last_level
@status_window.level_up_flags[i] = false
end
end
end
# Ý’è
@exp_gain_actor = -1
# ƒŠƒUƒ‹ƒgƒEƒBƒ“ƒhƒE‚ð•\Ž¦
@result_window.visible = true
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒY)
#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
@level_up_phase_done = false if @level_up_phase_done != true
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒEƒBƒ“ƒhƒE‚ð•Â‚¶‚ÄŽŸ‚̃AƒNƒ^[‚Ö
@levelup_window.visible = false if @levelup_window != nil
@status_window.level_up_flags[@exp_gain_actor] = false
@level_up_phase_done = phase5_next_levelup
end
if @level_up_phase_done
if @phase5_wait_count < 2
# ƒŠƒUƒ‹ƒgƒEƒBƒ“ƒhƒE‚ðvisible=true‚Å‚à •s‰ÂŽ‹‚É
@result_window.opacity = 0
@result_window.back_opacity = 0
@result_window.contents_opacity = 0
end
# ŒÄ‚Ñ–ß‚·
xrxs_bp10_update_phase5
# ƒŒƒxƒ‹ƒAƒbƒv‚µ‚Ä‚¢‚éê‡‚Í‹­§ƒoƒgƒ‹I—¹
battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
end
end
#--------------------------------------------------------------------------
# œ ŽŸ‚̃AƒNƒ^[‚̃Œƒxƒ‹ƒAƒbƒv•\Ž¦‚Ö
#--------------------------------------------------------------------------
def phase5_next_levelup
begin
# ŽŸ‚̃AƒNƒ^[‚Ö
@exp_gain_actor += 1
# ÅŒã‚̃AƒNƒ^[‚̏ꍇ
if @exp_gain_actor >= $game_party.actors.size
# ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
return true
end
actor = $game_party.actors[@exp_gain_actor]
if actor.cant_get_exp? == false
# Œ»Ý‚Ì”\—Í’l‚ð•ÛŽ
last_level = actor.level
last_maxhp = actor.maxhp
last_maxsp = actor.maxsp
last_str = actor.str
last_dex = actor.dex
last_agi = actor.agi
last_int = actor.int
# í“¬ŒoŒ±’l‚̍Ď擾
actor.exp += @exp_gained
# ”»’è
if actor.level > last_level
# ƒŒƒxƒ‹ƒAƒbƒv‚µ‚½ê‡
@status_window.level_up(@exp_gain_actor)
# ƒŠƒUƒ‹ƒgƒEƒBƒ“ƒhƒE‚ðÁ‚·
@result_window.visible = false
# SE‚̍ж
if LEVEL_UP_SE != ""
Audio.se_play(LEVEL_UP_SE)
end
# ME‚̍ж
if LEVEL_UP_ME != ""
Audio.me_stop
Audio.me_play(LEVEL_UP_ME)
end
# LEVEL-UPƒEƒBƒ“ƒhƒE‚̐ݒè
actors_size = [$game_party.actors.size, 4].max
x_shift = 160 + (640 - 160*actors_size)/(actors_size - 1)
x = x_shift * @exp_gain_actor
y = 128
@levelup_window = Window_LevelUpWindow.new(x, y, actor, last_level,
actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str - last_str,
actor.dex - last_dex, actor.agi - last_agi, actor.int - last_int)
@levelup_window.visible = true
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒŠƒtƒŒƒbƒVƒ…
@status_window.refresh
# ƒXƒLƒ‹K“¾ƒEƒBƒ“ƒhƒE‚̐ݒè
@skilllearning_window = Window_SkillLearning.new(actor.class_id, last_level, actor.level)
# ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ðÝ’è
@phase5_wait_count = 40
return false
end
end
end until false
end

def battle_exp
bexp = 0
# ƒ‹[ƒv
for enemy in $game_troop.enemies
# ƒGƒlƒ~[‚ª‰B‚êó‘Ô‚Å‚È‚¢ê‡
unless enemy.hidden
# Šl“¾‚ð’ljÁ
bexp += enemy.exp
end
end
return bexp
end

end


Instructions

just past the code in a new script above Main.



Compatibility

That is the best BR script too work with Tanketai. At least the game doesn't crash like the other BR script i ve tried with Tanketai.
But it is not working perfectly as if you're using the Tanketai the window keep on pop up after each battle and remind you of all the skills you have learnt before... :s

except with Tanketai, it s working fine !

Credits and Thanks

Script by XRXS
Script found at http://f26.aaa.livedoor.jp/~xxms/RPGXP_XRXS_BP10.htm
Modified by Sutebe-san


Terms and Conditions
enjoy !
Reply }
#2
[Image: 404notfound.gif]

[Image: icon.gif] ???????????????????????

URL????????????????????????
?????????????????????????????


Dead link. Giving it one day for repair. I hope you have the script itself rather than a dead link to some site. Sad
Reply }
#3
lmao, sorry...
i have forgot the codes... post edited and repaired

sorry for inconveniences ^^;;;
Reply }
#4
The original header with XRXS's name is there. Happy
Sutebe-san's name mentioned there too. Kewl.
Reply }
#5
good job, Botsy, i wouldnt have found this script otherwise.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Toggle Message Window XP kyonides 0 77 11-11-2024, 01:28 AM
Last Post: kyonides
   Battle Item Count kyonides 4 2,166 02-04-2024, 05:49 AM
Last Post: kyonides
   Dalissa's Battle Cry DerVVulfman 2 7,436 05-09-2023, 03:07 AM
Last Post: DerVVulfman
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 2,849 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Text Scroll Script - Enhanced DerVVulfman 23 34,313 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Actor Battle Items DerVVulfman 4 6,094 11-08-2020, 12:36 PM
Last Post: Mel
   Battle Report Raziel 1 6,986 05-29-2020, 02:27 AM
Last Post: Whisper
   ZLSL's Battle Portraits DerVVulfman 4 7,525 11-12-2019, 04:10 AM
Last Post: DerVVulfman
   Cursor Script Selwyn 7 15,357 09-28-2019, 02:13 PM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 4,774 08-09-2019, 03:42 PM
Last Post: aeliath



Users browsing this thread: 1 Guest(s)