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.

Brainstorm's Fantasy Sango Add-Ons

Brainstorm's RTAB Add-on

Introduction
This script modifies the Fantasy Sango Battle System into a Real Time Action Battle System.

Possible Pros and Cons
+  Creates a full, working RTAB

-  May experience some lag.
-  May experience some errors.
-  Text Based (No bars or graphical enhancement)
-  Requires my FSBS HUD
-  Bad Algorithims(sp)
-  Assumes that you are using the Text-Based Level Up Patch.

The Script
Code:
#==============================================================================
# ** Brainstorm's Fantasy Sango Heads Up Display
#------------------------------------------------------------------------------
#  These classes and edits will allow the uer to add a HUD to a Fantasy Sango
#  Battle System.
#==============================================================================
class Game_Battler
  attr_accessor :atb
  attr_accessor :max
  attr_accessor :actor_ready
  alias fsbs_rtab_initialize initialize
  def initialize
    @max = 1000
    @atb = set_atb
    @actor_ready = false
    fsbs_rtab_initialize
  end
  def set_atb
    if @atb == nil
      return 0
    else
      return @atb
    end
  end
  alias fsbs_rtab_inputable? inputable?
  def inputable?
    if @atb < @max
      return false
    end
    fsbs_rtab_inputable?
  end
end
class Window_ActorHud < Window_Base
  def refresh
    set_x
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.clear
    self.contents.font.size = 14
    size = self.contents.font.size
    if @background == true
      draw_actor_background(@actor, 0, 0)
      draw_actor_hp(@actor, 7 + @text_x, (1 * (size + 4)) + @text_y, 144)
      draw_actor_sp(@actor, 7 + @text_x, (2 * (size + 4)) + @text_y, 144)
      draw_actor_atb(@actor, 7 + @text_x, (4 * (size + 4)) + @text_y)
    else
      draw_actor_hp(@actor, 7 + @text_x, (1 * (size + 4)) + @text_y, self.width - 64)
      draw_actor_sp(@actor, 7 + @text_x, (2 * (size + 4)) + @text_y, self.width - 64)
      draw_actor_atb(@actor, 7 + @text_x, (4 * (size + 4)) + @text_y, self.width - 64)
    end
    draw_actor_name(@actor, 7 + @text_x, 0 + @text_y)
    if @level_flags
      self.contents.font.color = normal_color
      self.contents.draw_text(7 + @text_x, (3 * (size + 4)), self.width - 64, 32, "LEVEL UP!")
    else
      draw_actor_state(@actor, 7 + @text_x, (3 * (size + 4)), self.width - 64)
    end
  end
  def draw_actor_atb(actor,x,y,width)
    atb = actor.atb
    self.contents.draw_text(x, y, width, 32, atb.to_s + " / " + actor.max.to_s)
    #@actor.atb
  end
end
class Scene_Battle
  alias fsbs_rtab_update update
  def update
    for i in 0...$game_troop.enemies.size
      unless $game_troop.enemies[i].dead?
        add = $game_troop.enemies[i].agi / $game_troop.enemies[i].dex + 10
        if $game_troop.enemies[i].atb < $game_troop.enemies[i].max
          if @phase < 3
            $game_troop.enemies[i].current_action.kind = 0
            $game_troop.enemies[i].current_action.basic = -1
            $game_troop.enemies[i].atb += 10
          end
        else
          if @actor_command_window.visible == false and @phase < 3
            if $game_troop.enemies[i].atb >= $game_troop.enemies[i].max
              #start_phase3($game_party.actors[i].id)
              start_phase_attack($game_troop.enemies[i])
            end
          end
        end
      end
    end
    for i in 0...$game_party.actors.size
      unless $game_party.actors[i].dead?
        if @phase == 4 or @skill_window != nil or @item_window != nil or @item_window != nil or @actor_arrow != nil or @enemy_arrow != nil
          @actor_command_window.visible = false
          @actor_command_window.active = false
        end
        if $game_party.actors[i].atb < $game_party.actors[i].max
          if @phase < 3
            @actor_command_window.visible = false
            @actor_command_window.active = false
            $game_party.actors[i].current_action.kind = 0
            $game_party.actors[i].current_action.basic = -1
            add = $game_party.actors[i].agi / $game_party.actors[i].dex + 10
            $game_party.actors[i].atb += add
          end
        else
          #game.atb = 1000
          unless $game_party.actors[i].atb < $game_party.actors[i].max
            if @actor_command_window.visible == false and @phase != 4
              #if $game_party.actors[i].actor_ready == false
                start_phase3($game_party.actors[i].id)
              #end
            end
          end
        end
      end
    end
    @status_window.refresh
    fsbs_rtab_update
  end
  #alias fsbs_rtab_start_phase4 start_phase4
  def start_phase4(actorid = nil)
    @phase = 4
    #if actorid != nil
      for i in 0...$game_party.actors.size
        unless $game_party.actors[i].atb < $game_party.actors[i].max
          if $game_party.actors[i].actor_ready == true
            $game_party.actors[i].atb = 0
            $game_party.actors[i].actor_ready = false
          end
        end
      end
    #end
     # Shift to phase 4
    @phase = 4
    # Turn count
    $game_temp.battle_turn += 1
    # Search all battle event pages
    for index in 0...$data_troops[@troop_id].pages.size
      # Get event page
      page = $data_troops[@troop_id].pages[index]
      # If this page span is [turn]
      if page.span == 1
        # Clear action completed flags
        $game_temp.battle_event_flags[index] = false
      end
    end
    # Set actor as unselectable
    @actor_index = -1
    @active_battler = nil
    # Enable party command window
    @party_command_window.active = false
    @party_command_window.visible = false
    # Disable actor command window
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # Set main phase flag
    $game_temp.battle_main_phase = true
    # Make enemy action
    #for enemy in $game_troop.enemies
    #  enemy.make_action
    #end
    # Make action orders
    make_action_orders
    # Shift to step 1
    @phase4_step = 1
  end
  def start_phase_attack(enemy)
    enemy.atb = 0
    # Shift to phase 4
    @phase = 4
    # Turn count
    $game_temp.battle_turn += 1
    # Search all battle event pages
    for index in 0...$data_troops[@troop_id].pages.size
      # Get event page
      page = $data_troops[@troop_id].pages[index]
      # If this page span is [turn]
      if page.span == 1
        # Clear action completed flags
        $game_temp.battle_event_flags[index] = false
      end
    end
    # Set actor as unselectable
    @actor_index = -1
    @active_battler = nil
    # Enable party command window
    @party_command_window.active = false
    @party_command_window.visible = false
    # Disable actor command window
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # Set main phase flag
    $game_temp.battle_main_phase = true
    # Make enemy action
    enemy.make_action
    # Make action orders
    make_action_orders
    # Shift to step 1
    @phase4_step = 1
  end
  def start_phase2
    if @start == nil
      s1 = $data_system.words.attack
      s2 = $data_system.words.skill
      s3 = $data_system.words.guard
      s4 = $data_system.words.item
      s5 = "Escape"
      @actor_command_window = Window_Command.new(145, [s1, s2, s3, s4, s5])
      @actor_command_window.z = 9999 #å°
 
The original had a nasty virus because the Game.exe was corrupted.  Phoenix Flame removed the corrupted file, and there was no trouble since.  Both myself and Brainstorm downloaded said file after the .exe was removed.
 
Uhh though this is out of date, I recently found a bug, whenever a hero dies twice in the same battle, it doesnt show the death animation anymore. It stays in its standing (alive) frame/ animation. So what do I do to fix this?
 
Thanks for the re-up, man!

How exactly would I go about letting the third and fourth party members show on screen? It seems like it's just a quick coordinate change, but I'm not sure where that information is kept. Could you maybe point me in the right direction? Thanks again.
 

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