Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RTAB Battle Result Screens

I was looking for some scripts for battle results and can't seem to find any that work with RTAB.

Basically, I'm requesting that a battle screen is shown after battles that is compatiable with RTAB, a screen like the end results of FF games for example. Also if possible though not necessary allow it to flow with ccoa's distributive exp script.

(i.e http://www.rmxp.org/forums/showthread.php?t=10918)

Thanks in advance, I hope many RTAB users can benefit from this. :thumb:
 
Well, there's always Raziel's posting of illustrationism's Battle Report Version: 1.6.

Now it won't work by itself, and Raz pointed out that it wouldn't work with RTAB without some work.

Here's the work.
Paste this script below RTAB and 'above' the Battle result script. It preps RTAB for the Battle result script. Please read the instructions for any additional editing of the RTAB system.
Code:
#==============================================================================
# ** RTAB patch for Full-Screen Battle Result Scripts              (10-05-2006)
#------------------------------------------------------------------------------
#
#  In difference to the built-in battle result window,  this script performs a
#  minor rewrite to "def main" in RTAB's Scene_Battle class.  Instead of imme-
#  diately removing certain windows  from the screen after combat,  this patch
#  only removes them from the screen if combat is lost and the 'gameover' flag
#  is tripped.
#
#  Additional editing WILL be required on your part however.  You will have to
#  add the following commands into the Full-Screen Battle Result script that 
#  you are using:
#                   @actor_command_window.dispose
#                   @party_command_window.dispose
#                   @help_window.dispose
#                   @status_window.dispose
#                   @message_window.dispose
#
#  Under most circumstances, you will be pasting these five dispose statements
#  at the beginning of 'def battle_end(result)'. Conditions may dictate a lit-
#  tle work to get it right, and statements like 'help_window.visible = false'
#  will typically be invalid if called AFTER these statements.   Place 'AFTER'
#  such statements.
#
#============================================================================== 

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Initialize each kind of temporary battle data
    $game_temp.in_battle = true
    $game_temp.battle_turn = 0
    $game_temp.battle_event_flags.clear
    $game_temp.battle_abort = false
    $game_temp.battle_main_phase = false
    $game_temp.battleback_name = $game_map.battleback_name
    $game_temp.forcing_battler = nil
    # Initialize battle event interpreter
    $game_system.battle_interpreter.setup(nil, 0)
    # Prepare troop
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    atb_setup
    # Make actor command window
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4]) 
    @actor_command_window.y = 160
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # Make other windows
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    # Make sprite set
    @spriteset = Spriteset_Battle.new
    # Initialize wait count
    @wait_count = 0
    # Execute transition
    if $data_system.battle_transition == ""
      Graphics.transition(20)
    else
      Graphics.transition(40, "Graphics/Transitions/" +
        $data_system.battle_transition)
    end
    # Start pre-battle phase
    start_phase1
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Refresh map 
    $game_map.refresh
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    if $game_temp.gameover == true
      @actor_command_window.dispose
      @party_command_window.dispose
      @help_window.dispose
      @status_window.dispose
      @message_window.dispose
    end
    
    if @skill_window != nil
      @skill_window.dispose
    end
    if @item_window != nil
      @item_window.dispose
    end
    if @result_window != nil
      @result_window.dispose
    end
    # Dispose of spriteset
    @spriteset.dispose
    # If switching to title screen
    if $scene.is_a?(Scene_Title)
      # Fade out screen
      Graphics.transition
      Graphics.freeze
    end
    # If switching from battle test to any screen other than game over screen
    if $BTEST and not $scene.is_a?(Scene_Gameover)
      $scene = nil
    end
  end
end
I don't know how it will work with Ccoa's experience system but since she pointed out how it should work with 'any' battlesystem... I ... um, where did you get that avatar of Rukia laughing like that? *cough* ... I don't expect you to have any problems.
 
Alright it seems to work but the RTAB menu is still displayed after the battle and shows over the battle results screen. Even after placing the tags,

Code:
#          @actor_command_window.dispose
#                   @party_command_window.dispose
#                   @help_window.dispose
#                   @status_window.dispose
#                   @message_window.dispose

def battle end (results)

P.S I got the image from the 4chan /gif/.
 
Yea I took them out, it gave me a RGSS error on line 211 giving the caption disposed window.
So yeah x.x

Update I deleted the line 211 and it seems to work

Code:
   @status_window.visible = false

Now trying to merge with ccoa exp system.

Nope it doesn't work, after doing it I got an error on line 51 which are the end tags.

Maybe I should just comment this on the exp topic itself, since i got the main portion done.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top