Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V  < 1 2  
Closed TopicStart new topic
> Submission: FF8 Battle Report, by Prexus
Sepharius
post Jul 28 2009, 10:20 AM
Post #21


Level 2
Group Icon

Group: Member
Posts: 29
Type: Writer
RM Skill: Beginner




QUOTE (Night5h4d3 @ Jul 28 2009, 03:17 PM) *
you need to find/remove all the question marks that dont belong:

CODE
? super(0, 0, 640, 64)
becomes
CODE
   super(0, 0, 640, 64)


Thanks, worked like a charm but when I enter a battle I now get this o.o (thumbnail)

QUOTE (sithious @ Jul 11 2006, 10:00 AM) *
ok everywhere it says $fontsize and $fontname you need to reeplace it with "Tahoma"(for fontname) and 12 (or whicever font size you preefer for fontsize)

Ohh so from
self.contents.font.name = $fontface
self.contents.font.size = $fontsize

to

self.contents.font.name = $Tahoma
self.contents.font.size = $12

or


self.contents.font.name = Tahoma
self.contents.font.size = 12

?

This post has been edited by Sepharius: Jul 28 2009, 10:26 AM
Attached File(s)
Attached File  Error.jpg ( 148.49K ) Number of downloads: 12
 
Go to the top of the page
 
+Quote Post
   
zzcloudzz
post Apr 3 2010, 12:07 PM
Post #22


Level 11
Group Icon

Group: Revolutionary
Posts: 182
Type: Mapper
RM Skill: Intermediate




why are there question marks anyway? What a waste of my time.
QUOTE (Night5h4d3 @ Jul 28 2009, 07:17 AM) *
you need to find/remove all the question marks that dont belong:

CODE
? super(0, 0, 640, 64)
becomes
CODE
   super(0, 0, 640, 64)




I got the same thing to.
QUOTE (Sepharius @ Jul 28 2009, 11:20 AM) *
QUOTE (Night5h4d3 @ Jul 28 2009, 03:17 PM) *
you need to find/remove all the question marks that dont belong:

CODE
? super(0, 0, 640, 64)
becomes
CODE
   super(0, 0, 640, 64)


Thanks, worked like a charm but when I enter a battle I now get this o.o (thumbnail)

QUOTE (sithious @ Jul 11 2006, 10:00 AM) *
ok everywhere it says $fontsize and $fontname you need to reeplace it with "Tahoma"(for fontname) and 12 (or whicever font size you preefer for fontsize)

Ohh so from
self.contents.font.name = $fontface
self.contents.font.size = $fontsize

to

self.contents.font.name = $Tahoma
self.contents.font.size = $12

or


self.contents.font.name = Tahoma
self.contents.font.size = 12

?


Please just edit your old posts ~ Night_Runner

This post has been edited by Night_Runner: Apr 4 2010, 06:15 AM


__________________________
Current Project:
Name: Twined Fates
Time released: Nov/Dec/?/10
Genre: RPG/Adventure
Complete %: 2%

Website(s):
Phoenix's Nest
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Apr 4 2010, 06:38 AM
Post #23


Level 50
Group Icon

Group: +Gold Member
Posts: 1,528
Type: Scripter
RM Skill: Undisclosed




Edited the original post to address the issues of $fontface, $fontsize, and the random ?'s
In answer to the previous question, it's
$fontface = "Tahoma"
and
$fontsize = 12
and the question marks are there due to formatting issues, nothing sinister.

This post has been edited by Night_Runner: Apr 4 2010, 06:39 AM


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
yamina-chan
post Apr 3 2011, 06:56 AM
Post #24


Level 8
Group Icon

Group: Revolutionary
Posts: 128
Type: None
RM Skill: Skilled




It has been a while since the last post in this topic was made, but there is something I have to say.
One thing I noticed while testing this for a while is that it does not infrom you if you gain a Level or learn something new. Is someone able to change that? Say for example, an aditional window pop's up if the Player earned a new Level, a second one if a new ability was lerned.
Sceenshots to show what I am talking about.
Default:


What I mean:


__________________________
There is a game out there for everyone. All you have to do is to find it.
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Apr 4 2011, 05:55 AM
Post #25


Level 50
Group Icon

Group: +Gold Member
Posts: 1,528
Type: Scripter
RM Skill: Undisclosed




@> yamina-chan:
How's this?

[Show/Hide] Night_Runner's Edit
CODE
#==============================================================================
# ** Prexus' FF Battle Report
#------------------------------------------------------------------------------
# History:
#  Edited by: Night_Runner
#  Date Edited: 04/Apr/11
#  Created for: yamina-chan
#   @> http://www.rpgrevolution.com/forums/index.php?showtopic=196
#
# Description:
#  This script is designed to show a report after the completion of
#  a battle, and shows actor's exp, exp gained, items gained, etc.
#  This edit showsa pop-up message telling the player of any skills
#  learnt / level changes.
#
# How to Install:
#  Copy this entire script. In your game, select Tools >> Script Editor.
#  Along the left, scroll all the way to the bottom, right click on 'Main',
#   and select 'Insert'
#  Paste the code in the blank window on the right.
#
# Customization:
#  See directly below.
#  To chagne where the pop-up windows are placed, please refer to
#  lines 181 - 202.
#==============================================================================



#==============================================================================
# ** Customization
#==============================================================================

module Prexus_FFBattleReport_Customization
  ReportTitleText = "Battle Report"
  ReportTitleAlignment = 1 # 0 for left, 1 for middle, 2 for right
  LevelUpText = "LV Up!"
  SkillLearntText = "New Skill!"
  BackgroundBitmap = "Blackout.png" # Displays black if not found
  EXPGained = "EXP:"
  EXPCurrent = "Current:"
  EXPUntilLvlUp = "Next:"
end

#==============================================================================
# ** End of Customization
#==============================================================================



#==============================================================================
# ** Define Postality Knights variables.
#==============================================================================
$fontface = Font.default_name if $fontface.nil?
$fontsize = Font.default_size if $fontsize.nil?
#==============================================================================
# ** End defining Postality Knights variables.
#==============================================================================



#==============================================================================
# ** Window_BattleReportActor
#------------------------------------------------------------------------------
#  This window shows an actors starts during the battle report
#==============================================================================

class Window_BattleReportActor < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(actor_index, gained_exp)
    @actor = $game_party.actors[actor_index]
    @gained_exp = gained_exp
    super(32, 64 + 128 * actor_index, 288, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    self.z += 10
    self.visible = false
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Clear the bitmap
    self.contents.clear
    # Draw nothing if there is no actor
    return if @actor.nil?
    draw_actor_name(@actor, 4, 0)
    draw_actor_level(@actor, 4, 32)
    draw_actor_rcvexp(@actor, 100, 0, @gained_exp)
    draw_actor_curexp(@actor, 100, 32)
    draw_actor_nxtexp(@actor, 100, 64)
  end
end



#==============================================================================
# ** Window_BattleReportItems
#------------------------------------------------------------------------------
#  This window is part of the battle report, it shows the items & gold gained.
#==============================================================================

class Window_BattleReportItems < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(gold, treasures)
    @gold = gold
    @treasures = treasures
    super(320, 64, 288, 384)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    self.z += 10
    self.visible = false
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Clear the bitmap
    self.contents.clear
    # Draw the gold gained in normal_color
    x = 4
    self.contents.font.color = normal_color
    cx = contents.text_size(@gold.to_s).width
    self.contents.draw_text(x, 0, width - 32, 32, @gold.to_s)
    # Draw the gold symbol (G) in blue
    x += cx + 4
    self.contents.font.color = system_color
    self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
    # Draw each of the treasures
    y = 32
    for item in @treasures
      draw_item_name(item, 4, y)
      y += 32
    end
  end
end



#==============================================================================
# ** Window_BattleReportItems
#------------------------------------------------------------------------------
#  This window is part of the battle report, it shows the items & gold gained.
#==============================================================================

class Window_BattleReportPopUp < Window_Base
  #--------------------------------------------------------------------------
  # * Module
  #--------------------------------------------------------------------------
  include Prexus_FFBattleReport_Customization
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(actor_index, type)
    @type = type
    x = get_x(actor_index, type)
    y = get_y(actor_index, type)
    width = get_width(actor_index, type)
    super(x, y, width, 48)
    self.z += 100
    self.contents = Bitmap.new(width - 32, height - 32)
    self.visible = false
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    case @type
    when 0 # Level Up
      self.contents.draw_text(0, -8, width - 32, 32, LevelUpText)
    when 1 # New Skill
      self.contents.draw_text(0, -8, width - 32, 32, SkillLearntText)
    end
  end
  #--------------------------------------------------------------------------
  # * Get x coordinate of window
  #--------------------------------------------------------------------------
  def get_x(index, type)
    case type
    when 0 # Level Up
      return 191
    when 1 # New Skill
      return 32
    end
  end
  #--------------------------------------------------------------------------
  # * Get y coordinate of window
  #--------------------------------------------------------------------------
  def get_y(index, type)
    case type
    when 0 # Level Up
      return 57 + 128 * index
    when 1 # Skill
      return 144 + 128 * index
    end
  end
  #--------------------------------------------------------------------------
  # * Get width of window
  #--------------------------------------------------------------------------
  def get_width(index, type)
    case type
    when 0 # Level Up
      return 74
    when 1 # Skill
      return 110
    end
  end
end



#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  Edited to show the battlereport
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias prexus_battleReport_main  main unless $@
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main(*args)
    # Run the original code
    prexus_battleReport_main(*args)
    # Dispose of the windows
    if @titleresult_window != nil
      @titleresult_window.dispose
      @actorresult_windows.each { |window| window.dispose }
      @battlereport_sprite.bitmap.dispose
      @battlereport_sprite.dispose
      @battlereport_popup_windows.each { |window| window.dispose }
    end
  end
  #--------------------------------------------------------------------------
  # * Start Phase 5
  #--------------------------------------------------------------------------
  def start_phase5
    custom = Prexus_FFBattleReport_Customization
    @phase = 5
    $game_system.me_play($game_system.battle_end_me)
    $game_system.bgm_play($game_temp.map_bgm)
    exp = 0
    gold = 0
    treasures = []
    for enemy in $game_troop.enemies
      unless enemy.hidden
        exp += enemy.exp
        gold += enemy.gold
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    treasures = treasures[0..5]
    # Keep record of changes in level & skills
    level_changed = [false] * 3
    skills_learnt = [false] * 3
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        last_level = actor.level
        last_skillList = actor.skills.clone
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
          level_changed[i] = true
        end
        skills_learnt[i] = last_skillList != actor.skills
      end
    end
    $game_party.gain_gold(gold)
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    # Make the blackout background
    @battlereport_sprite = Sprite.new
    # Draw the bitmap (if it exists)
    begin
      @battlereport_sprite.bitmap = RPG::Cache.picture(custom::BackgroundBitmap)
    rescue
      @battlereport_sprite.bitmap = Bitmap.new(640, 480)
      rect = Rect.new(0, 0, 640, 480)
      color = Color.new(0, 0, 0)
      @battlereport_sprite.bitmap.fill_rect(rect, color)
    end
    @battlereport_sprite.z = 100
    @battlereport_sprite.visible = false
    # Make the items window
    @result_window = Window_BattleReportItems.new(gold, treasures)
    # Make the title window
    @titleresult_window = Window_Help.new
    text, align = [custom::ReportTitleText, custom::ReportTitleAlignment]
    @titleresult_window.set_text(text, align)
    @titleresult_window.visible = false
    # Make the actors windows
    @actorresult_windows = []
    (0..2).each {|i| @actorresult_windows<<Window_BattleReportActor.new(i, exp)}
    # Make the LV Up and New Skill windows
    @battlereport_popup_windows = []
    for i in 0..2
      if level_changed[i]
        @battlereport_popup_windows << Window_BattleReportPopUp.new(i, 0)
      end
      if skills_learnt[i]
        @battlereport_popup_windows << Window_BattleReportPopUp.new(i, 1)
      end
    end
    # Have the pause for effect
    @phase5_wait_count = 60
  end
  #--------------------------------------------------------------------------
  # * Update Phase 5
  #--------------------------------------------------------------------------
  def update_phase5
    if @phase5_wait_count > 0
      @phase5_wait_count -= 1
      if @phase5_wait_count == 0
        @titleresult_window.visible = true
        @actorresult_windows.each { |window| window.visible = true }
        @result_window.visible = true
        @battlereport_sprite.visible = true
        @battlereport_popup_windows.each { |window| window.visible = true }
        $game_temp.battle_main_phase = false
        @status_window.refresh
      end
      return
    end
    if Input.trigger?(Input::C)
      $game_switches[1] = true
      battle_end(0)
    end
  end
end



#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  Edited to show the battlereport
#==============================================================================

class Window_Base
  #--------------------------------------------------------------------------
  # * Draw Actor Recieved EXP
  #--------------------------------------------------------------------------
  def draw_actor_rcvexp(actor,x,y,exp)
    self.contents.font.color = Color.new(255,255,128,255)
    text = Prexus_FFBattleReport_Customization::EXPGained
    self.contents.draw_text(x,y,288,32,text)
    self.contents.font.color = normal_color
    self.contents.draw_text(x+60,y,80,32,exp.to_s,2)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor EXP
  #--------------------------------------------------------------------------
  def draw_actor_curexp(actor,x,y)
    self.contents.font.color = Color.new(255,255,128,255)
    text = Prexus_FFBattleReport_Customization::EXPCurrent
    self.contents.draw_text(x,y,288,32,text)
    self.contents.font.color = normal_color
    self.contents.draw_text(x+60,y,80,32,actor.exp_s,2)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor EXP until level up
  #--------------------------------------------------------------------------
  def draw_actor_nxtexp(actor,x,y)
    self.contents.font.color = Color.new(255,255,128,255)
    text = Prexus_FFBattleReport_Customization::EXPUntilLvlUp
    self.contents.draw_text(x,y,288,32,text)
    self.contents.font.color = normal_color
    self.contents.draw_text(x+60,y,80,32,actor.next_exp_s,2)
  end
end




#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
#  Edited to lower the z
#==============================================================================

class Window_BattleStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias prexus_battleReport_initialize  initialize  unless $@
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(*args)
    # Run the original initialize
    prexus_battleReport_initialize(*args)
    # Set the Z
    self.z = 8
  end
end



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  Edited the z layers...
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias prexus_battleReport_initialize  initialize  unless $@
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(*args)
    # Run the original initialize
    prexus_battleReport_initialize(*args)
    # Set the Z of the viewport2
    @viewport2.z = 8
  end
end



#==============================================================================
# ** End of Script.
#==============================================================================


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
yamina-chan
post Apr 4 2011, 08:45 AM
Post #26


Level 8
Group Icon

Group: Revolutionary
Posts: 128
Type: None
RM Skill: Skilled




It's great, thank you =D
This is exactly what seemed to be missing ^^


__________________________
There is a game out there for everyone. All you have to do is to find it.
Go to the top of the page
 
+Quote Post
   
evil joesph
post Aug 3 2011, 07:04 AM
Post #27


Level 1
Group Icon

Group: Member
Posts: 13
Type: Artist
RM Skill: Advanced




I apologize for necrobumping, but I was looking at your modifications Night_Runner, and I wish I could have it with 4 people and the pop ups for leveling up etc. I realize there is already a four person battle report script, but I'm have no knowledge in scripting so that could just take it and throw in the pop ups as well. Your help would be much appreciated, but it's definitely nothing urgent.
Go to the top of the page
 
+Quote Post
   

2 Pages V  < 1 2
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 05:19 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker