Help - Search - Members - Calendar
Full Version: How do I fight on the map screen please?
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
neiljwd
Part of Chrono Trigger Script allowed me to fight on the map screen, without a battle back.
I think it was Blizz something, can anyone help me find it please?
Penguin
You need an ABS script, like this one. It's the Blizz script you were talking about.
neiljwd
QUOTE (thesanguinepenguin38 @ Jul 25 2011, 05:56 AM) *
You need an ABS script, like this one. It's the Blizz script you were talking about.


Hmm is it? Apologies my original (massively edited) psot is not very clever, but I still want a turn based battle system, just on the map as it were.

I've hunted down an active topic/download of the script you suggested, I will try it tomorrow I guess.
Here's the active link for anyone browsing this topic.
http://forum.chaos-project.com/index.php/topic,106.4440.html
Night_Runner
By turn based on the map, do you mean something like this

You can download the script for that here


Or by turn based on the map did you mean using the default battle system, but having the map shown in the background, instead of a picture... in which case you could use this script:
Night_Runner's Map Backdrop in Battle Script
CODE
#==============================================================================
# ** Night_Runner's Map Backdrop in Battle Script
#------------------------------------------------------------------------------
# History:
#  Date Created: 25/July/2011
#  Created for: neiljwd
#   @> http://www.rpgrevolution.com/forums/index.php?showtopic=51856
#
# Description:
#  This script is designed to how the normal walking map on the background of
#  the battle map, instead of a picture.
#
# How to Install:
#  Select and copy this entire peice of code.
#  In your game, select Tools >> Script Editor
#  Along the left hand side, 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
#==============================================================================

module NR_MapSpritesetBackdrop
    ShowEvents = true
    ShowPlayer = false
end



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  Edited to show the map in the backdrop.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Make viewports
    @viewport1 = Viewport.new(0, 0, 640, 320)
    @viewport2 = Viewport.new(0, 0, 640, 480)
    @viewport3 = Viewport.new(0, 0, 640, 480)
    @viewport4 = Viewport.new(0, 0, 640, 480)
    @viewport2.z = 101
    @viewport3.z = 200
    @viewport4.z = 5000
    # Make tilemap
    @tilemap = Tilemap.new(@viewport1)
    @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
    for i in 0..6
      autotile_name = $game_map.autotile_names[i]
      @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
    end
    @tilemap.map_data = $game_map.data
    @tilemap.priorities = $game_map.priorities
    # Make panorama plane
    @panorama = Plane.new(@viewport1)
    @panorama.z = -1000
    # Make fog plane
    @fog = Plane.new(@viewport1)
    @fog.z = 3000
    # Make character sprites
    @character_sprites = []
    if NR_MapSpritesetBackdrop::ShowEvents == true
      for i in $game_map.events.keys.sort
        sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
        @character_sprites.push(sprite)
      end
    end
    if NR_MapSpritesetBackdrop::ShowPlayer == true
      @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
    end
    # Make enemy sprites
    @enemy_sprites = []
    for enemy in $game_troop.enemies.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
    end
    # Make actor sprites
    @actor_sprites = []
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    # Make weather
    @weather = RPG::Weather.new(@viewport1)
    # Make picture sprites
    @picture_sprites = []
    for i in 51..100
      @picture_sprites.push(Sprite_Picture.new(@viewport3,
        $game_screen.pictures[i]))
    end
    # Make timer sprite
    @timer_sprite = Sprite_Timer.new
    # Frame update
    update
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    # Dispose of tilemap
    @tilemap.tileset.dispose
    for i in 0..6
      @tilemap.autotiles[i].dispose
    end
    @tilemap.dispose
    # Dispose of panorama plane
    @panorama.dispose
    # Dispose of fog plane
    @fog.dispose
    # Dispose of character sprites
    for sprite in @character_sprites
      sprite.dispose
    end
    # Dispose of enemy sprites and actor sprites
    for sprite in @enemy_sprites + @actor_sprites
      sprite.dispose
    end
    # Dispose of weather
    @weather.dispose
    # Dispose of picture sprites
    for sprite in @picture_sprites
      sprite.dispose
    end
    # Dispose of timer sprite
    @timer_sprite.dispose
    # Dispose of viewports
    @viewport1.dispose
    @viewport2.dispose
    @viewport3.dispose
    @viewport4.dispose
  end
  #--------------------------------------------------------------------------
  # * Determine if Effects are Displayed
  #--------------------------------------------------------------------------
  def effect?
    # Return true if even 1 effect is being displayed
    for sprite in @enemy_sprites + @actor_sprites
      return true if sprite.effect?
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # If panorama is different from current one
    if @panorama_name != $game_map.panorama_name or
       @panorama_hue != $game_map.panorama_hue
      @panorama_name = $game_map.panorama_name
      @panorama_hue = $game_map.panorama_hue
      if @panorama.bitmap != nil
        @panorama.bitmap.dispose
        @panorama.bitmap = nil
      end
      if @panorama_name != ""
        @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
      end
      Graphics.frame_reset
    end
    # If fog is different than current fog
    if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
      @fog_name = $game_map.fog_name
      @fog_hue = $game_map.fog_hue
      if @fog.bitmap != nil
        @fog.bitmap.dispose
        @fog.bitmap = nil
      end
      if @fog_name != ""
        @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
      end
      Graphics.frame_reset
    end
    # Update character sprites
    for sprite in @character_sprites
      sprite.update
    end
    # Update tilemap
    @tilemap.ox = $game_map.display_x / 4
    @tilemap.oy = $game_map.display_y / 4
    @tilemap.update
    # Update panorama plane
    @panorama.ox = $game_map.display_x / 8
    @panorama.oy = $game_map.display_y / 8
    # Update fog plane
    @fog.zoom_x = $game_map.fog_zoom / 100.0
    @fog.zoom_y = $game_map.fog_zoom / 100.0
    @fog.opacity = $game_map.fog_opacity
    @fog.blend_type = $game_map.fog_blend_type
    @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
    @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
    @fog.tone = $game_map.fog_tone
    # Update actor sprite contents (corresponds with actor switching)
    @actor_sprites[0].battler = $game_party.actors[0]
    @actor_sprites[1].battler = $game_party.actors[1]
    @actor_sprites[2].battler = $game_party.actors[2]
    @actor_sprites[3].battler = $game_party.actors[3]
    # Update battler sprites
    for sprite in @enemy_sprites + @actor_sprites
      sprite.update
    end
    # Update weather graphic
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.update
    # Update picture sprites
    for sprite in @picture_sprites
      sprite.update
    end
    # Update timer sprite
    @timer_sprite.update
    # Set screen color tone and shake position
    @viewport1.tone = $game_screen.tone
    @viewport1.ox = $game_screen.shake
    # Set screen flash color
    @viewport4.color = $game_screen.flash_color
    # Update viewports
    @viewport1.update
    @viewport2.update
    @viewport4.update
  end
end



#==============================================================================
# ** End of Script.
#==============================================================================
neiljwd
QUOTE (Night_Runner @ Jul 25 2011, 12:28 PM) *
By turn based on the map, do you mean something like this
you could use this script:
Night_Runner's Map Backdrop in Battle Script
CODE
#==============================================================================
# ** Night_Runner's Map Backdrop in Battle Script
#------------------------------------------------------------------------------
# History:
#  Date Created: 25/July/2011
#  Created for: neiljwd
#   @> http://www.rpgrevolution.com/forums/index.php?showtopic=51856
#
# Description:
#  This script is designed to how the normal walking map on the background of
#  the battle map, instead of a picture.
#
# How to Install:
#  Select and copy this entire peice of code.
#  In your game, select Tools >> Script Editor
#  Along the left hand side, 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
#==============================================================================

module NR_MapSpritesetBackdrop
    ShowEvents = true
    ShowPlayer = false
end



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  Edited to show the map in the backdrop.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Make viewports
    @viewport1 = Viewport.new(0, 0, 640, 320)
    @viewport2 = Viewport.new(0, 0, 640, 480)
    @viewport3 = Viewport.new(0, 0, 640, 480)
    @viewport4 = Viewport.new(0, 0, 640, 480)
    @viewport2.z = 101
    @viewport3.z = 200
    @viewport4.z = 5000
    # Make tilemap
    @tilemap = Tilemap.new(@viewport1)
    @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
    for i in 0..6
      autotile_name = $game_map.autotile_names[i]
      @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
    end
    @tilemap.map_data = $game_map.data
    @tilemap.priorities = $game_map.priorities
    # Make panorama plane
    @panorama = Plane.new(@viewport1)
    @panorama.z = -1000
    # Make fog plane
    @fog = Plane.new(@viewport1)
    @fog.z = 3000
    # Make character sprites
    @character_sprites = []
    if NR_MapSpritesetBackdrop::ShowEvents == true
      for i in $game_map.events.keys.sort
        sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
        @character_sprites.push(sprite)
      end
    end
    if NR_MapSpritesetBackdrop::ShowPlayer == true
      @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
    end
    # Make enemy sprites
    @enemy_sprites = []
    for enemy in $game_troop.enemies.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
    end
    # Make actor sprites
    @actor_sprites = []
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    # Make weather
    @weather = RPG::Weather.new(@viewport1)
    # Make picture sprites
    @picture_sprites = []
    for i in 51..100
      @picture_sprites.push(Sprite_Picture.new(@viewport3,
        $game_screen.pictures[i]))
    end
    # Make timer sprite
    @timer_sprite = Sprite_Timer.new
    # Frame update
    update
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    # Dispose of tilemap
    @tilemap.tileset.dispose
    for i in 0..6
      @tilemap.autotiles[i].dispose
    end
    @tilemap.dispose
    # Dispose of panorama plane
    @panorama.dispose
    # Dispose of fog plane
    @fog.dispose
    # Dispose of character sprites
    for sprite in @character_sprites
      sprite.dispose
    end
    # Dispose of enemy sprites and actor sprites
    for sprite in @enemy_sprites + @actor_sprites
      sprite.dispose
    end
    # Dispose of weather
    @weather.dispose
    # Dispose of picture sprites
    for sprite in @picture_sprites
      sprite.dispose
    end
    # Dispose of timer sprite
    @timer_sprite.dispose
    # Dispose of viewports
    @viewport1.dispose
    @viewport2.dispose
    @viewport3.dispose
    @viewport4.dispose
  end
  #--------------------------------------------------------------------------
  # * Determine if Effects are Displayed
  #--------------------------------------------------------------------------
  def effect?
    # Return true if even 1 effect is being displayed
    for sprite in @enemy_sprites + @actor_sprites
      return true if sprite.effect?
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # If panorama is different from current one
    if @panorama_name != $game_map.panorama_name or
       @panorama_hue != $game_map.panorama_hue
      @panorama_name = $game_map.panorama_name
      @panorama_hue = $game_map.panorama_hue
      if @panorama.bitmap != nil
        @panorama.bitmap.dispose
        @panorama.bitmap = nil
      end
      if @panorama_name != ""
        @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
      end
      Graphics.frame_reset
    end
    # If fog is different than current fog
    if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
      @fog_name = $game_map.fog_name
      @fog_hue = $game_map.fog_hue
      if @fog.bitmap != nil
        @fog.bitmap.dispose
        @fog.bitmap = nil
      end
      if @fog_name != ""
        @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
      end
      Graphics.frame_reset
    end
    # Update character sprites
    for sprite in @character_sprites
      sprite.update
    end
    # Update tilemap
    @tilemap.ox = $game_map.display_x / 4
    @tilemap.oy = $game_map.display_y / 4
    @tilemap.update
    # Update panorama plane
    @panorama.ox = $game_map.display_x / 8
    @panorama.oy = $game_map.display_y / 8
    # Update fog plane
    @fog.zoom_x = $game_map.fog_zoom / 100.0
    @fog.zoom_y = $game_map.fog_zoom / 100.0
    @fog.opacity = $game_map.fog_opacity
    @fog.blend_type = $game_map.fog_blend_type
    @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
    @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
    @fog.tone = $game_map.fog_tone
    # Update actor sprite contents (corresponds with actor switching)
    @actor_sprites[0].battler = $game_party.actors[0]
    @actor_sprites[1].battler = $game_party.actors[1]
    @actor_sprites[2].battler = $game_party.actors[2]
    @actor_sprites[3].battler = $game_party.actors[3]
    # Update battler sprites
    for sprite in @enemy_sprites + @actor_sprites
      sprite.update
    end
    # Update weather graphic
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.update
    # Update picture sprites
    for sprite in @picture_sprites
      sprite.update
    end
    # Update timer sprite
    @timer_sprite.update
    # Set screen color tone and shake position
    @viewport1.tone = $game_screen.tone
    @viewport1.ox = $game_screen.shake
    # Set screen flash color
    @viewport4.color = $game_screen.flash_color
    # Update viewports
    @viewport1.update
    @viewport2.update
    @viewport4.update
  end
end



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

Wow, thank you Night _Runner, that last script you specifically tailored for me, is EXACTLY what I meant/wanted! Thank you! Quality coder aren't you?
Fabulous!

Oh dear, on actually trying to fight, sadly there's a problem!



The code is this, line 46
#=========================================================================
=====
# ** Animated Battlers - Enhanced ver. 13.0 (01-15-2010)
#
#------------------------------------------------------------------------------
# * (3) Battle System: The Scene Battle class
#==============================================================================

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================

class Scene_Battle
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
alias mnkmain main
def main
# Initialize wait count
@delay_count = 0
# Perform the original call
mnkmain
end
#--------------------------------------------------------------------------
# * Frame Update (main phase)
#--------------------------------------------------------------------------
alias mnk_anim_sp3 start_phase3
def start_phase3
# Remove flag after set number of turns
if $game_temp.battle_turn >= MNK_ADV_OFF_TURN
# Turn sideview advantage mirror flag off
$game_temp.advantage_set = 0
end
# Perform the original call
mnk_anim_sp3
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 1 : action preparation)
#--------------------------------------------------------------------------
alias mkf_up4s1 update_phase4_step1
def update_phase4_step1(battler = @active_battler)
if $game_system.mnk_det_rtab_systm == true
mkf_up4s1(battler)
else
mkf_up4s1 **** __________THIS LINE HERE___________***
end
if battler != nil
if $game_system.mnk_det_sd_casting == true
if battler.sd_casting
battler.casted = true
end
end
end
end
#--------------------------------------------------------------------------
# * End Skill Selection
#--------------------------------------------------------------------------
alias mkf_endss end_skill_select
def end_skill_select
mkf_endss
if $game_system.mnk_det_rtab_systm
@active_actor.skill_casted = @skill.id
else
@active_battler.skill_casted = @skill.id
end
end
#--------------------------------------------------------------------------
# * Make Skill Action Results (alias used to determine skill used)
#--------------------------------------------------------------------------
alias make_skill_action_result_anim make_skill_action_result
def make_skill_action_result(battler = @active_battler, plus_id = 0)
@rtab = !@target_battlers
if $game_system.mnk_det_rtab_attck
make_skill_action_result_anim(battler, plus_id)
else
@rtab ? make_skill_action_result_anim(battler) : make_skill_action_result_anim
end
battler.skill_used = @skill.id
battler.strike_skill = @skill.id
if $game_system.mnk_det_para_spell == true
#if battler.spelling?
battler.casted = true
#end
end
for target in (@rtab ? battler.target : @target_battlers)
target.struck_skill = @skill.id
end
end
#--------------------------------------------------------------------------
# * Make Item Action Results (alias used to determine item used)
#--------------------------------------------------------------------------
alias make_item_action_result_anim make_item_action_result
def make_item_action_result(battler = @active_battler)
@rtab = !@target_battlers
@rtab ? make_item_action_result_anim(battler) : make_item_action_result_anim
battler.item_used = @item.id
@item_usage = @item.scope
battler.strike_item = @item.id
for target in (@rtab ? battler.target : @target_battlers)
target.struck_item = @item.id
end
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 1 : action preparation) (Casting Routine)
#--------------------------------------------------------------------------
alias update_phase4_step1_anim update_phase4_step1
def update_phase4_step1(battler = @active_battler)
@rtab = !@target_battlers
if $game_system.mnk_det_rtab_systm == true
update_phase4_step1_anim(battler)
if battler.current_action.kind == 1 and
(not battler.current_action.forcing or @force != 2)
if battler.rtp != 0
battler.casted = true
end
end
else
update_phase4_step1_anim
end
end
#--------------------------------------------------------------------------
# * Action Animation, Movement
#--------------------------------------------------------------------------
alias mnk_update_phase4_step3 update_phase4_step3
def update_phase4_step3(battler = @active_battler)
@rtab = !@target_battlers
target = (@rtab ? battler.target : @target_battlers)[0]
# Battle Delay System
minkoff_delay_on
# Flash system
minkoff_flash(battler)
# Reset the 'Do Nothing' flag
dn_flag = false
# Set values and poses based on Action
case battler.current_action.kind
when 0 # Attack
# if Do Nothing, just return
if battler.current_action.basic == 3
dn_flag = true
end
if dn_flag != true
unless JUMPING_WEAPONS == nil
battler.jump = JUMPING_WEAPONS[battler.weapon_id] if JUMPING_WEAPONS[battler.weapon_id] != nil
end
rush_type = MNK_STEP_ATTACK
full_moving = true ; if rush_type; full_moving = false; end
if MNK_MOVE2CENTER_ATK.include?(battler.weapon_id); center_move=true ; end
if MNK_STATIONARY_ENEMY_IDS.include?(battler.id) and battler.is_a?(Game_Enemy)
full_moving = false
center_move = false
rush_type = false
end
# Select Attack Pose
base_pose = motion_pose_attack(battler)
base_pose2 = motion_pose_attack_random(battler)
base_pose = base_pose2 unless base_pose2 == nil
if battler.current_action.basic == 2
# If escaping, disable all movement
full_moving = false
center_move = false
rush_type = false
# Select Escape Pose
base_pose = motion_pose_escape(battler)
end
end
when 1 # Skill
@spriteset.battler(battler).skill_used = battler.skill_used
unless JUMPING_SKILLS == nil
battler.jump = JUMPING_SKILLS[battler.skill_used] if JUMPING_SKILLS[battler.skill_used] != nil
end
rush_type = MNK_STEP_SKILL
if MNK_MOVING_SKILL.include?(battler.skill_used) ; full_moving = true ; end
# Charlie Fleed's CTB Detection
if $game_system.mnk_det_cfc_detect
# For Charlie Fleed's Select All System
if MNK_MOVING_SKILL.include?(battler.skill_used) and
($game_temp.selecting_all_enemies==true or $game_temp.selecting_all_allies==true); full_moving = false ; center_move = true ; end
end
if MNK_MOVE2CENTER_SKILL.include?(battler.skill_used) ; center_move = true ; end
# Select Skill Pose
base_pose = motion_pose_skill(battler)
when 2 # Item
@spriteset.battler(battler).item_used = battler.item_used
unless JUMPING_ITEMS == nil
battler.jump = JUMPING_ITEMS[battler.item_used] if JUMPING_ITEMS[battler.item_used] != nil
end
rush_type = MNK_STEP_ITEM
if MNK_MOVING_ITEM.include?(battler.item_used) or @item_scope == 1..2 ; full_moving = true ; end
if MNK_MOVE2CENTER_ITEM.include?(battler.item_used); center_move = true; end
# Select Item Pose
base_pose = motion_pose_item(battler)
end
# Only perform action if 'Do Nothing' flag is off, ie... doing something...
if dn_flag != true
# Control Movement and use current pose
@moved = {} unless @moved
return if @spriteset.battler(battler).moving
if not (@moved[battler] or battler.guarding?)
offset = offset_value(target, battler)
if rush_type # Steps forward
@spriteset.battler(battler).setmove(battler.screen_x - offset, battler.screen_y + 1, battler.screen_z)
end
if full_moving # Runs to target
@spriteset.battler(battler).setmove(target.screen_x + offset, target.screen_y - 1, target.screen_z + 10)
end
if center_move # Runs to center
@spriteset.battler(battler).setmove(320+(offset/4), battler.screen_y-1, battler.screen_z)
end
@moved[battler] = true
return
@spriteset.battler(battler).pose = base_pose
elsif not battler.guarding?
@spriteset.battler(battler).pose = base_pose
@spriteset.battler(battler).setmove(battler.screen_x, battler.screen_y, battler.screen_z)
end
# Finish Up Skill and Item Use
case battler.current_action.kind
when 1
# Flag system that skill was used
battler.casted = false
battler.casting = false
@spriteset.battler(battler).skill_used = 0
when 2
# Flag system that item was used
@spriteset.battler(battler).item_used = 0
end
# Battle_Charge value for BattleCry script
$battle_charge = true
end
# Battle Delay System (off)
minkoff_delay_off
# Prevent 'removed battler' moved state
unless @moved == nil
@moved[battler] = false
end
# Start attack, do not move from spot
battler.attacking = true
# Erase Battler Jumping value
battler.jump = nil
# Perform the original call
@rtab ? mnk_update_phase4_step3(battler) : mnk_update_phase4_step3
end
#--------------------------------------------------------------------------
# * Battle Delay System (turned on)
#--------------------------------------------------------------------------
def minkoff_delay_on
if MNK_AT_DELAY
# Fomar's Action Cost Detection
if $game_system.mnk_det_acb_detect
for actor in $game_party.actors
actor.vitality= 0
end
for enemy in $game_troop.enemies
enemy.vitality= 0
end
end
# Trickster's AT Detection
if $game_system.mnk_det_abs_detect
for actor in $game_party.actors
actor.at_bonus= [0,0]
end
for enemy in $game_troop.enemies
enemy.at_bonus= [0,0]
end
end
# Cogwheel RTAB Detection
if $game_system.mnk_det_rtab_systm
@rtab_wait_flag = true
end
end
end
#--------------------------------------------------------------------------
# * Battle Delay System (turned off)
#--------------------------------------------------------------------------
def minkoff_delay_off
if MNK_AT_DELAY
# Fomar's Action Cost Detection
if $game_system.mnk_det_acb_detect
for actor in $game_party.actors
actor.vitality = 1
end
for enemy in $game_troop.enemies
enemy.vitality = 1
end
end
# Trickster's AT Detection
if $game_system.mnk_det_abs_detect
for actor in $game_party.actors
actor.at_bonus = [1,0]
end
for enemy in $game_troop.enemies
enemy.at_bonus = [1,0]
end
end
# Cogwheel RTAB Detection
if $game_system.mnk_det_rtab_systm
@rtab_wait_flag = false
end
end
end
#--------------------------------------------------------------------------
# * Minkoff Flash system
#--------------------------------------------------------------------------
def minkoff_flash(battler)
# If enemy is a default battler
if battler.is_a?(Game_Enemy)
if DEFAULT_ENEMY
if @rtab then battler.white_flash = true end
if @rtab then battler.wait = 10 end
end
if DEFAULT_ENEMY_ID != nil
if DEFAULT_ENEMY_ID.include?(battler.id)
if @rtab then battler.white_flash = true end
if @rtab then battler.wait = 10 end
end
end
end
# If actor is a default battler
if battler.is_a?(Game_Actor)
if DEFAULT_ACTOR
if @rtab then battler.white_flash = true end
if @rtab then battler.wait = 10 end
end
if DEFAULT_ACTOR_ID != nil
if DEFAULT_ACTOR_ID.include?(battler.id)
if @rtab then battler.white_flash = true end
if @rtab then battler.wait = 10 end
end
end
end
end
#--------------------------------------------------------------------------
# * Select Attack Pose
#--------------------------------------------------------------------------
def motion_pose_attack(battler)
base_pose = pose_obtain(battler, MNK_POSE7, MNK_APOSE7, MNK_EPOSE7)
base_pose2 = pose_array_obtain(battler, MNK_POSES_WEAPONS, MNK_POSES_WEAPS_A, MNK_POSES_WEAPS_E, battler.weapon_id)
base_pose = base_pose2 if base_pose2 != nil
return base_pose
end
#--------------------------------------------------------------------------
# * Select Random Attack Pose
#--------------------------------------------------------------------------
def motion_pose_attack_random(battler)
base_pose = nil
# Create Random pose if a set exists.
unless MNK_RANDOM_ATTACKS == nil
base_pose2 = rand((MNK_RANDOM_ATTACKS.size)+1 )
base_pose = MNK_RANDOM_ATTACKS[base_pose2 - 1] unless base_pose2 == 0
end
# Determine if there's an existing actor/enemy specific random pose
pose_temp = nil
if battler.is_a?(Game_Actor)
unless MNK_RANDOM_ATTACKS_A == nil
pose_temp = MNK_RANDOM_ATTACKS_A[battler.id] if MNK_RANDOM_ATTACKS_A.include?(battler.id)
end
else
unless MNK_RANDOM_ATTACKS_E == nil
pose_temp = MNK_RANDOM_ATTACKS_E[battler.id] if MNK_RANDOM_ATTACKS_E.include?(battler.id)
end
end
# Replace Random Pose with new actor/enemy based random pose
unless pose_temp == nil
base_pose2 = rand((pose_temp.size)+1 )
base_pose = pose_temp[base_pose2 - 1] - 1 unless base_pose2 == 0
end
return base_pose
end
#--------------------------------------------------------------------------
# * Select Escape Pose
#--------------------------------------------------------------------------
def motion_pose_escape(battler)
temp_pose = pose_obtain(battler, MNK_POSES_ESCAPE, MNK_POSES_ESCAPE_A, MNK_POSES_ESCAPE_E)
base_pose = temp_pose if temp_pose != nil
return base_pose
end
#--------------------------------------------------------------------------
# * Select Skill Pose
#--------------------------------------------------------------------------
def motion_pose_skill(battler)
base_pose = pose_obtain(battler, MNK_POSE9, MNK_APOSE9, MNK_EPOSE9)
base_pose2 = pose_array_obtain(battler, MNK_POSES_SKILLS, MNK_POSES_SKILLS_A, MNK_POSES_SKILLS_E, battler.skill_used)
base_pose = base_pose2 if base_pose2 != nil
return base_pose
end
#--------------------------------------------------------------------------
# * Select Item Pose
#--------------------------------------------------------------------------
def motion_pose_item(battler)
base_pose = pose_obtain(battler, MNK_POSE8, MNK_APOSE8, MNK_EPOSE8)
base_pose2 = pose_array_obtain(battler, MNK_POSES_ITEMS, MNK_POSES_ITEMS_A, MNK_POSES_ITEMS_E, battler.item_used)
base_pose = base_pose2 if base_pose2 != nil
return base_pose
end
#--------------------------------------------------------------------------
# * Offset Calculation
#--------------------------------------------------------------------------
def offset_value(target, battler = @active_battler)
# Obtain attacking battler width
ww = @spriteset.battler(battler).width / 2
# Set current attack offset
offst = @spriteset.battler(battler).battler_offset
offst += MNK_OFFSET
# Oversized or special Battler offsets
if target.is_a?(Game_Enemy) && battler.is_a?(Game_Actor)
unless MNK_OFFSET_ATK_A == nil
offst -= MNK_OFFSET_ATK_A[battler.id] if MNK_OFFSET_ATK_A.include?(battler.id)
end
unless MNK_OFFSET_DEF_E == nil
offst += MNK_OFFSET_DEF_E[target.id] if MNK_OFFSET_DEF_E.include?(target.id)
end
end
if target.is_a?(Game_Actor) && battler.is_a?(Game_Enemy)
unless MNK_OFFSET_ATK_E == nil
offst -= MNK_OFFSET_ATK_E[battler.id] if MNK_OFFSET_ATK_E.include?(battler.id)
end
unless MNK_OFFSET_DEF_A == nil
offst += MNK_OFFSET_DEF_A[target.id] if MNK_OFFSET_DEF_A.include?(target.id)
end
end
# Offset calc dependant on sideview
if $game_system.sv_angle == 1
offset = (battler.is_a?(Game_Actor) ? -(offst-ww) : offst-ww)
else
offset = (battler.is_a?(Game_Actor) ? offst-ww : -(offst-ww))
end
return offset
end
#--------------------------------------------------------------------------
# * Hit Animation
#--------------------------------------------------------------------------
alias mnk_update_phase4_step4 update_phase4_step4
def update_phase4_step4(battler = @active_battler)
# Cycle through the targets
for target in (@rtab ? battler.target : @target_battlers)
damage = (@rtab ? target.damage[battler] : target.damage)
critical = (@rtab ? target.critical[battler] : target.critical)
if damage.is_a?(Numeric) and damage > 0
base_pose = pose_obtain(target, MNK_POSE2, MNK_APOSE2, MNK_EPOSE2)
weapon_used = battler.weapon_id
weapon_used = 0 if weapon_used == nil
base_pose2 = pose_array_obtain(target, MNK_STRUCK_WEAPS, MNK_STRUCK_WEAPS_A, MNK_STRUCK_WEAPS_E, weapon_used)
base_pose = base_pose2 if base_pose2 != nil
if battler.strike_skill != 0
if battler.strike_skill == target.struck_skill
base_pose2 = pose_array_obtain(target, MNK_STRUCK_SKILLS, MNK_STRUCK_SKILLS_A, MNK_STRUCK_SKILLS_E, target.struck_skill)
base_pose = base_pose2 if base_pose2 != nil
end
end
if battler.strike_item != 0
if battler.strike_item == target.struck_item
base_pose2 = pose_array_obtain(target, MNK_STRUCK_ITEMS, MNK_STRUCK_ITEMS_A, MNK_STRUCK_ITEMS_E, target.struck_item)
base_pose = base_pose2 if base_pose2 != nil
end
end
@spriteset.battler(target).pose = base_pose
if critical == true
temp_pose = pose_obtain(target, MNK_POSES_CRITICAL, MNK_POSES_CRIT_A, MNK_POSES_CRIT_E)
weapon_used = battler.weapon_id
weapon_used = 0 if weapon_used == nil
base_pose2 = pose_array_obtain(target, MNK_CRIT_WEAPS, MNK_CRIT_WEAPS_A, MNK_CRIT_WEAPS_E, weapon_used)
base_pose = base_pose2 if base_pose2 != nil
if battler.skill_used != 0
if battler.skill_used == target.struck_skill
base_pose2 = pose_array_obtain(target, MNK_CRIT_SKILLS, MNK_CRIT_SKILLS_A, MNK_CRIT_SKILLS_E, target.struck_skill)
base_pose = base_pose2 if base_pose2 != nil
end
end
if battler.item_used != 0
if battler.item_used == target.struck_item
base_pose2 = pose_array_obtain(target, MNK_CRIT_ITEMS, MNK_CRIT_ITEMS_A, MNK_CRIT_ITEMS_E, target.struck_item)
base_pose = base_pose2 if base_pose2 != nil
end
end
@spriteset.battler(target).pose = temp_pose if temp_pose != nil
end
end
end
# Reset/zero out the battler's skill & item
battler.strike_skill = 0
battler.strike_item = 0
# Perform the original call
@rtab ? mnk_update_phase4_step4(battler) : mnk_update_phase4_step4
# Finish attack n battle animation, free to move
battler.attacking = false
end
#--------------------------------------------------------------------------
# * Victory Animation
#--------------------------------------------------------------------------
alias mnk_start_phase5 start_phase5
def start_phase5
unless $game_system.mnk_det_trtab_syst == true
for actor in $game_party.actors
return if @spriteset.battler(actor).moving
end
end
# See if an actor remains alive
for actor in $game_party.actors
unless actor.dead?
$game_system.victory = true
end
end
# See if an enemy remains alive
for enemy in $game_troop.enemies.reverse
unless enemy.dead?
$game_system.defeat = true
end
end
# Perform the original call
mnk_start_phase5
end
#--------------------------------------------------------------------------
# * Change Arrow Viewport
#--------------------------------------------------------------------------
alias mnk_start_enemy_select start_enemy_select
def start_enemy_select
# Perform the original call
mnk_start_enemy_select
# Arrow manipulation
@enemy_arrow.dispose
@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport2)
@enemy_arrow.help_window = @help_window
end
#--------------------------------------------------------------------------
# * Obtain Pose (Scene Battle version)
# battler : battler performing attack
# pose_base : default pose to return
# pose_actor : list of poses for actors
# pose_enemy : list of poses for enemies
#--------------------------------------------------------------------------
def pose_obtain(battler, pose_base, pose_actor, pose_enemy)
# create Arrays
pos_a = {}
pos_e = {}
# fill created Arrays & Set pose
pos_a = pose_actor
pos_e = pose_enemy
pose_now = pose_base
# Obtain pose if not a standard pose
if battler.is_a?(Game_Actor)
pose_now = pos_a[battler.id] if pos_a[battler.id] != nil
else
pose_now = pos_e[battler.id] if pos_e[battler.id] != nil
end
# Return the final pose (minus 1 for niceties)
pose_now -= 1 if pose_now != nil
return pose_now
end
#--------------------------------------------------------------------------
# * Obtain Pose from hashes (Scene Battle version)
# battler : battler performing attack
# hash_base : hash with default poses
# hash_actor : advanced list of poses for actors
# hash_enemy : advanced list of poses for enemies
# condition : value determining where to get the final pose
#--------------------------------------------------------------------------
def pose_array_obtain(battler, hash_base, hash_actor, hash_enemy, condition)
# create Arrays
# create Arrays
hash_b = {}
hash_a = {}
hash_e = {}
pose_temp = {}
# fill created Arrays & Set pose
hash_b = hash_base
hash_a = hash_actor
hash_e = hash_enemy
# Setup the temp Array
if battler.is_a?(Game_Actor)
pose_temp = hash_a[battler.id] if hash_a.include?(battler.id)
else
pose_temp = hash_e[battler.id] if hash_e.include?(battler.id)
end
# Obtain the base pose based on condition (or nil)
pose_now = hash_b[condition] if hash_b.include?(condition)
# Obtain the optional actor/enemy pose based on condition (unless nil)
pose_now = pose_temp[condition] if pose_temp.include?(condition)
# Return the final pose (minus 1 for niceties)
pose_now -= 1 if pose_now != nil
return pose_now
end
end


Further EDIT: I've upped a stripped down demo so u can see the working code, as looking around
that appears to make things easier.
http://www.filefactory.com/file/cc9a5f8/n/...TORY_-_Copy.exe

This a bonus request, but I mostly REALLY care about a fix for the above.

I'm probably pushing my luck here, but is there a way to have specific battles HAVE a backdrop.
I'm assuming It'd be an event to call some script, but I haven't the 1st clue how to go about doing it.
So basically I want normal battles on map, then my boss fights to have backdrops?


No worries if not, thank you so much for the script Night_Runner!
neiljwd
95% Resolved:
Mimi's Battleback Changer
is not compatible Battle Report v 1.6 by Illustrationism



Wow I've had this problem for 3 days And couldn't figure it.
So i totally just de-constructed my game and it's scripts from the top down.
AND I FOUND MY PROBLEM!! Woohoo!!

verymad.gif mad.gif Battle Report v 1.6 by Illustrationism verymad.gif mad.gif

I'm a novice who spent AGES playing with M'sBB; and it was just that it and Battle Report v 1.6 isn't compatible. :sad:
If you have your fight on the map back, when the fight finishes the game crashes if you have Battle Report also.

BTW if you put Battle Report RIGHT at the bottom of your scripts, then the error message comes up as relating to Battle Report.
Just in case someone wants to 'solve' the problem rather just dumping Battle Report.

My original ramblings that aren't really relevant but here for I dunno, record purpose?
Ok so I'm REALLY REALLY trying to sort this and figure stuff out myself but I'm having no luck.

I'm Guessing Night Runners script is clashing with Mimi's Battleback Changer.
Apologies I didn't know I had it, as my game was built up on whatever was included with RTAB w/extras on this page: http://houseslasher.com/index.php?showtopic=173

So, I decided to try to figure out how to make fights happen without battle backs using Mimi's Battleback Changer.


That's what happens if I try to enter battle. I had no BBset, but M'sBB opening blurb says I should not get any errors, it will just recheck etc...

Anyhoo, I wasn't overly worried as I wanted my fights to NOT have battlebacks 95% of the time. So I made my fights start with script $bbg_event = 3 This is jsut like Night Runners scripr, i.e fights happen on the map itself.
So i fight on the map. The fight goes ok, but as it ends this error happens:


It IS a custom tileset I'm using,Which I THINK is what is causing the error? But I'm very inexperienced with
all this, and have tried messing with lots of stuff, but all my changes just lead to different
errors, as I've no idea what i'm doing.

If someone could help me out that would be great!

The Code Just in case

CODE
#==============================================================================
# ** Mimi's Battleback Changer
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 2.5-a ( ($)Global value version)
#    12-02-2007
#    Full SDK 2.3 Compatible (Does not need or require SDK 2.3)
#------------------------------------------------------------------------------
#
#  INTRODUCTION:
#
#  This system allows you to pre-set the battle background shown during battle.
#  You can set up the system  to display the background based on the terrain id
#  or by a separate variable that can describe what kind of event your party is
#  engaging.
#
#  This script was designed similarly to 'Mimi's Battle Music"  and is a simple
#  supplement for a feature ignored by RMXP's designers.
#
#  But,  unlike RM2K's and 2K3's design,  you can  also use "EVENT" variable to
#  change your backgrounds  and not  the terrains underfoot.   With that,  this
#  script can be used in conjunction  with RPG Advocate's  'RM2K Defined Areas'
#  or Sephiroth Spawn's 'Encounter Control' script.
#  IE:  If a player enters a rectangle set up by one of these scripts, the value
#       may change to:
#       $bbg_event = 2
#       Then if the player enters another rectangle, the value may be set to:
#       $bbg_event = 3
#
#  Also, the system has support for 'animated' battlebacks... discussed further
#  down in its own section.
#
#------------------------------------------------------------------------------
#
#  USAGE:
#
#  This version uses global values used throughout the system.  As such, it has
#  two bonuses:   An easier to find config system at the top of the script, and
#  a slightly easier method to change the 'cries' in-game:
#
#  This script uses two global values:  $bbg_type and $bbg_event
#
#  $bbg_type    This value determines whether the backgound shown during combat
#               will be based on the default systems, based on the terrain tags
#               of your tileset, or based on the current events of your story.
#
#  $bbg_event   This value merely determines  what background is used IF you're
#               scripting out your game to show the  battle background based on
#               the events your hero encounters.
#  
#  
#  How to run:
#
#  In an event... maybe an event like a monster (Action Button/Player Touch) or
#  an automated event... you change the value of $bmg_type (and/or $bmg_event).
#
#  By default $bbg_type is already set at 0, which tells it to play the default
#  background normal.   If you set $bbg_type = 1,  then when the battle starts,
#  the background will match the terrain (assuming you MADE it match).
#
#  If you've changed  $bbg_type = 2 AND changed  $bbg_event = 1, then the first
#  programmed event battle background will show instead of EITHER the terrain's
#  background or the default battle background.
#
#  And if you've set the $bbg_type to 3, then the battle background will be the
#  actual field map... really. However, the routine that disposes of the battle
#  background could not be easily aliased...
#
#------------------------------------------------------------------------------
#
#  SETTING THE BACKGROUNDS:
#
#  The configuration system is fairly simple.   There are two hash arrays, one
#  for the Event-Based BattleBackgrounds & the other  for Terrain Based Battle
#  Battlebacks.  Both follow the same setup principle:
#  
#    $bback_event = { index => filename, index=> filename, etc. ... }
#
#  The index value in the hash is the value of the  $bbg_event  value called in
#  the system.  Fairly simple.
#
#  The same configuration layout applies to the Terrain-Themed array as well
#  and uses the map's terrain tags as the index in its hash array.
#
#  You may notice that in this script, the filenames don't have any .png exten-
#  sion.  They aren't needed.  How nice...  :)
#
#  Just in case,  the hash arrays have been declared as ($)Global hash arrays,
#  so they can be re-entered  through script events  or whatnot.   They are no
#  longer static or constant lists and can be changed in-game.
#
#------------------------------------------------------------------------------
#
#  ANIMATED BATTLEBACKS:
#
#  This system has the ability to show an 'animated' background when in combat,
#  typically referred to as an  Animated Battleback.   The  Animated Battleback
#  system was originally designed by RPG way back in '05, so this isn't exactly
#  new.
#
#  Animated battleback files  should always end with two numbers,  first is the
#  total number of frames  (ranging from 0 to 9)  and the second is the current
#  frame for this battleback  (starting from 0 to the total number - 1),  so if
#  you had 5 frames for some desert battleback, you'd name the files:
#
#  *  desert50
#  *  desert51
#  *  desert52
#  *  desert53
#  *  desert54
#
#  That's all there is to it.  The script will check the second number from the
#  end of the filename (total frames).  If it's a digit in range from 0 to 9
#  (and there aren't any other digits :p), it'll update the battleback.
#  
#  If the the battleback sequence is missing a file,  it skips the load/display
#  of that file to prevent a crash.   While it may  'assume'  that a battleback
#  with two numbers at the end of the filename, it will not prevent the system
#  from showing regular battlebacks so named.  Nice, eh?
#
#------------------------------------------------------------------------------
#
#  CAMERA ZOOM SYSTEMS:
#
#  Whether it be the XRXS Camera Zoom  or  Cogwheel's Camera Drive system built
#  into RTAB or CTB, the Animated Battleback and Map-For-Battleback options are
#  non-functional and will cause errors.
#
#  If you plan to use the ZOOM feature by either Cogwheel or XRXS, it is recom-
#  mended to set the @camera_drive switch in the config section to false.    It
#  should mirror the @drive option in RTAB'S/CTB's ATB_Setup section (if used).
#
#  Setting this switch to 'true' disables  the battleback animation system and
#  prevents it from crashing  when regular battlebacks  are called.   However,
#  camera zoom systems  cannot be used  in tandem with the  Map-For-Battleback
#  option.  To use Field Map Battlebacks,  you just can't use Camera Zooms and
#  have to keep it set to 'false'.
#
#------------------------------------------------------------------------------
#
#  JUST IN CASE:
#
#  By default,  the system will show  the default battle background without any
#  problem.   Also, if no TERRAIN_ID or BMG_EVENT value matches what you've set
#  in the script, it will show the normally used image file.
#
#  Finally,  with a little assistance from Meâ„¢ and Mr.Mo,  I was able to create
#  an Error-Checking routine that  'ensures'  that no error in this system will
#  cause the system to crash.
#
#  For example, if you enter into the list of backgrounds used in the system, a
#  file that doesn't exist  (either in the project or the RTP file),  then this
#  script will use the default battle background instead. And if that's missing
#  too, the battle background will be set to [none] to prevent errors.
#
#------------------------------------------------------------------------------
#
#  COMPATABILITY:
#
#  This system is compatible with most ANY battlesystem and the SDK 2.2.  But,
#  as there was a rewrite of the Spriteset_Battle's  'dispose'  method,  there
#  may be issues with other systems that alias or alter the dispose method.
#
#  If that is the case,  you can remove the entire 'Spriteset_Battle' class in
#  this script and not use the 'Map-for-Battleback' routine, or post this sys-
#  tem above the conflicting script, and let the other take effect.
#
#==============================================================================


   #========================================================================
   #  **  C  O  N  F  I  G  U  R  A  T  I  O  N      S  Y  S  T  E  M  **  #
   #========================================================================
    $bback_event   = { 1 => "041-EvilCastle01" }

    $bback_terrain = { 1 => "001-Grassland01",
                       2 => "006-Desert01",
                       3 => "005-Beach01",
                       4 => "007-Swamp01" }

    $bbg_delay      = 20                
    
    # Switch required if using a Camera Zoom system
    $camera_drive     = false
                      

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of
#  this class.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :default_bg        
  attr_accessor :mbc_bbe                   # Savable BBack Event Array
  attr_accessor :mbc_bbt                   # Savable BBack Terrain Array
  attr_accessor :mbc_bbgt                  # Savable BBack Type Global
  attr_accessor :mbc_bbe                   # Savable BBack Event Global
  attr_accessor :mbc_bbgd                  # Savable BBack Delay Global
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias mmbbc_init initialize
  def initialize
    # Perform the original call
    mmbbc_init
    # Create the savable values
    @mbc_bbe  = {}
    @mbc_bbt  = {}
    @mbc_bbgt = 0
    @mbc_bbe  = 0
    @mbc_bbgd = 20
  end  
end  



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  This class brings together battle screen sprites. It's used within
#  the Scene_Battle class.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias bg_init initialize
  def initialize
    # Animation values
    @bbg_frame      = 0
    @bbg_frame_num  = 1
    @bbg_frame_count     = Graphics.frame_count      
    # The original call
    bg_init
    # If the battleback is a map
    if $bbg_type == 3
      # Make the battleback sprite
      @battleback_sprite = Tilemap.new(@viewport1)
      # Obtain the current tileset
      @battleback_sprite.tileset = RPG::Cache.tileset($game_map.tileset_name)
      # Obtain the current autotiles
      for i in 0..6
        autotile_name = $game_map.autotile_names[i]
        @battleback_sprite.autotiles[i] = RPG::Cache.autotile(autotile_name)
      end
      # Set the battleback based on the current map
      @battleback_sprite.map_data = $game_map.data
      @battleback_sprite.ox = $game_map.display_x / 4
      @battleback_sprite.oy = $game_map.display_y / 4
      # Frame update
      update
    end
  end
  #--------------------------------------------------------------------------
  # * Dispose (Cannot alias.  No SDK Spriteset_Battle dispose method)
  #--------------------------------------------------------------------------
  def dispose
    # If the battleback is a map...
    if $bbg_type == 3
      # If battleback tileset exists, dispose of it
      if @battleback_sprite.tileset != nil
        @battleback_sprite.tileset.dispose
      end
      # If battleback_autotiles exist, dispose of them
      for i in 0..6
        if @battleback_sprite.autotiles[i] != nil  
          @battleback_sprite.autotiles[i].dispose
        end
      end
    # Otherwise, if the battleback is a bitmap  
    else
      # NOTE:  Since it is not created when calling a
      #        map battleback, this would have caused
      #        an undefined.bitmap error.
      # If battleback bit map exists, dispose of it
      if @battleback_sprite.bitmap != nil
        @battleback_sprite.bitmap.dispose
      end
    end
    # Dispose of battleback sprite
    @battleback_sprite.dispose
    # Dispose of enemy sprites and actor sprites
    for sprite in @enemy_sprites + @actor_sprites
      sprite.dispose
    end
    # Dispose of weather
    @weather.dispose
    # Dispose of picture sprites
    for sprite in @picture_sprites
      sprite.dispose
    end
    # Dispose of timer sprite
    @timer_sprite.dispose
    # Dispose of viewports
    @viewport1.dispose
    @viewport2.dispose
    @viewport3.dispose
    @viewport4.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias bg_update update
  def update
    # Unless a camera_drive system is turned on
    unless $camera_drive
      # Unless using a Field Map background
      unless $bbg_type == 3    
        # If battleback file name is different from current one
        if @battleback_name != $game_temp.battleback_name
          @battleback_name = $game_temp.battleback_name
          # Obtain Battleback animation frames (if any)
          @bbg_frame_num = @battleback_name[@battleback_name.size-2].chr
          @bbg_frame_num = (0..9).include?(@bbg_frame_num.to_i) ? @bbg_frame_num.to_i : 1    
          if @battleback_sprite.bitmap != nil
            @battleback_sprite.bitmap.dispose
          end
          @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
          @battleback_sprite.src_rect.set(0, 0, 640, 320)
        end
      end
    end
    # Original call
    bg_update
    # Unless a camera_drive system is turned on
    unless $camera_drive    
    # Unless using a Field Map background
    unless $bbg_type == 3
      # Perform animation
      if @bbg_frame_num > @bbg_frame and Graphics.frame_count - @bbg_frame_count > $bbg_delay
        @bbg_frame += 1
        @bbg_frame %= @bbg_frame_num
        @battleback_name[@battleback_name.size-1] = @bbg_frame.to_s
        # Background skip switch
        b_skip = false    
        # Error checking.  Makes sure that the current background is available.
        # If it is missing, then the system will skip loading.
        begin
          @trd = RPG::Cache.battleback(@battleback_name)
        rescue Errno::ENOENT
          # Background file is invalid (don't use any)
          b_skip = true
        end  
        # Only load if the Background Skip switch is false
        @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name) unless b_skip
        @bbg_frame_count = Graphics.frame_count
      end    
    end
    end
  end
end



#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
#  This class performs save screen processing.
#==============================================================================

class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # * Write Save Data
  #     file : write file object (opened)
  #--------------------------------------------------------------------------
  alias mmbbc_wsd write_save_data
  def write_save_data(file)
    # Store the globals
    $game_system.mbc_bbe   = $bback_event
    $game_system.mbc_bbt   = $bback_terrain
    $game_system.mbc_bbgt  = $bbg_type
    $game_system.mbc_bbe   = $bbg_event
    $game_system.mbc_bbgd  = $bbg_delay
    $game_system.mbc_cam   = $camera_drive
    # Perform the original call
    mmbbc_wsd(file)
  end
end


#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # * Read Save Data
  #     file : file object for reading (opened)
  #--------------------------------------------------------------------------
  alias mmbbc_rsd read_save_data
  def read_save_data(file)
    #Perform the original call
    mmbbc_rsd(file)
    # ReStore the globals
    $music_event  = $game_system.mbc_bbe
    $music_actor  = $game_system.mbc_bba
    $bbg_type     = $game_system.mbc_bbgt
    $bbg_event    = $game_system.mbc_bbe
    $bbg_delay    = $game_system.mbc_bbgd
    $camera_drive = $game_system.mbc_cam
  end
end


#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias bg_main main
  def main
    # Store the background just in case
    @bbg = $game_map.battleback_name
    # Branch based on what type of battle background condition we're using.
    case $bbg_type
    when 0  # Default (normal default settings)
      $game_map.battleback_name = @bbg
    when 1  # Terrain Tag based
      ttag = $game_map.terrain_tag($game_player.x,$game_player.y)
      $game_map.battleback_name   = $bback_terrain[ttag] if $bback_terrain.include?(ttag)
    when 2  # Entered ID based
      $game_map.battleback_name   = $bback_event[$bbg_event] if $bback_event.include?($bbg_event)
    end
    # Error checking. Makes sure that what is chosen is a valid battleback file.
    # If not, then the system restores the default backgound file in it's place.
    begin
      @trd = RPG::Cache.battleback($game_map.battleback_name)
    rescue Errno::ENOENT
      # Background file is invalid (restore default)
      $game_map.battleback_name = @bbg
    end    
    # Error checking.  Makes sure that even the default background is available.
    # If it is missing, then the system will set the battleback to >none<.
    begin
      @trd = RPG::Cache.battleback($game_map.battleback_name)
    rescue Errno::ENOENT
      # Background file is invalid (don't use any)
      $game_map.battleback_name = ""
    end  
    # Now, perform the ORIGINAL battle call
    bg_main
    # And Return the original battleback to the default
    $game_map.battleback_name = @bbg
  end
end
Night_Runner
Hello again!

Sorry, I've just had a few problems with my computer, all sorted now though smile.gif

I've uploaded a demo (linik), I've got the default rtab with DerVVolfman's animated battlers and Guillaume777's multislots and the SDK and the MACL scripts, plus the scripts you've added plus a edited version of my code!
And it all works smile.gif

For anyone from the future who is interested, I've edited my code from before:
Night_Runner's Map Backdrop in Battle Script
CODE
#==============================================================================
# ** Night_Runner's Map Backdrop in Battle Script
#------------------------------------------------------------------------------
# History:
#  Date Created: 25/July/2011
#  Created for: neiljwd
#   @> http://www.rpgrevolution.com/forums/index.php?showtopic=51856
#
# Description:
#  This script is designed to how the normal walking map on the background of
#   the battle map, instead of a picture.
#  To disable this, select a battle-back that is NOT the option 'none'
#
# How to Install:
#  Select and copy this entire peice of code.
#  In your game, select Tools >> Script Editor
#  Along the left hand side, 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
#==============================================================================

module NR_MapSpritesetBackdrop
    ShowEvents = true
    ShowPlayer = false
end



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  Edited to show the map in the backdrop.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias nr_mapFight_initialize  initialize
  def initialize(*args)
    # Run the original initialize
    nr_mapFight_initialize(*args)
    # If the battleback if blank
    if $game_temp.battleback_name == ""
      # Set a flag to say the map is in the background
      @map_in_background = true
      # Make tilemap
      @tilemap = Tilemap.new(@viewport1)
      @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
      for i in 0..6
        autotile_name = $game_map.autotile_names[i]
        @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
      end
      @tilemap.map_data = $game_map.data
      @tilemap.priorities = $game_map.priorities
      # Make panorama plane
      @panorama = Plane.new(@viewport1)
      @panorama.z = -1000
      # Make fog plane
      @fog = Plane.new(@viewport1)
      @fog.z = 3000
      # Make character sprites
      @character_sprites = []
      if NR_MapSpritesetBackdrop::ShowEvents == true
        for i in $game_map.events.keys.sort
          sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
          @character_sprites.push(sprite)
        end
      end
      if NR_MapSpritesetBackdrop::ShowPlayer == true
        @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
      end
      # Frame update
      update
    else
      # If there isn't a map in the background
      @map_in_background = false
    end
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  alias nr_mapFight_dispose  dispose
  def dispose(*args)
    # If the map was in the background
    if @map_in_background
      # Dispose of tilemap
      @tilemap.tileset.dispose
      for i in 0..6
        @tilemap.autotiles[i].dispose
      end
      @tilemap.dispose
      # Dispose of panorama plane
      @panorama.dispose
      # Dispose of fog plane
      @fog.dispose
      # Dispose of character sprites
      for sprite in @character_sprites
        sprite.dispose
      end
    end
    # Run the original dispose
    return nr_mapFight_dispose(*args)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias nr_mapFight_update  update
  def update(*args)
    # If the map is in the background
    if @map_in_background
      # If panorama is different from current one
      if @panorama_name != $game_map.panorama_name or
         @panorama_hue != $game_map.panorama_hue
        @panorama_name = $game_map.panorama_name
        @panorama_hue = $game_map.panorama_hue
        if @panorama.bitmap != nil
          @panorama.bitmap.dispose
          @panorama.bitmap = nil
        end
        if @panorama_name != ""
          @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
        end
        Graphics.frame_reset
      end
      # If fog is different than current fog
      if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
        @fog_name = $game_map.fog_name
        @fog_hue = $game_map.fog_hue
        if @fog.bitmap != nil
          @fog.bitmap.dispose
          @fog.bitmap = nil
        end
        if @fog_name != ""
          @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
        end
        Graphics.frame_reset
      end
      # Update character sprites
      for sprite in @character_sprites
        sprite.update
      end
      # Update tilemap
      @tilemap.ox = $game_map.display_x / 4
      @tilemap.oy = $game_map.display_y / 4
      @tilemap.update
      # Update panorama plane
      @panorama.ox = $game_map.display_x / 8
      @panorama.oy = $game_map.display_y / 8
      # Update fog plane
      @fog.zoom_x = $game_map.fog_zoom / 100.0
      @fog.zoom_y = $game_map.fog_zoom / 100.0
      @fog.opacity = $game_map.fog_opacity
      @fog.blend_type = $game_map.fog_blend_type
      @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
      @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
      @fog.tone = $game_map.fog_tone
    end
    return nr_mapFight_update(*args)
  end
end



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

It has a bit better compatibility now, and lets you show the map picture if you want smile.gif (just change the picture to the one called 'None' and it'll show the map).

You'll probably have to copy the scripts back to your game, but it seems to work for me now at least!
neiljwd
You're excellent. Will I get told off for filling up the board with spam?
I dinna care.
You're excellent. Thanks.

EDIT: Hmm any idea what changing the formation makes no effect what so ever?
No matter what I change nothing changes the default \.
Night_Runner
How were you supposed to change the formation before?
neiljwd
EDIT: Turns out line 89 in the animated battlers formation script, has just left slot 2-8 BLANK and un-filled in. Meaning when my game tried to call them, there was nothing there, so it crashed. stupid.gif

So I've put any old numbers into 2-8 for now.
What I'd REALLY like though is the ability to have the formation decided at nuke.gif random.nuke.gif
So say I program 0-7 with various set formations. If my event calls on formation 8, that would randomly
choose a formation from 0-7.
Is anyone able to help me make that happen? icon_teacher.gif

Orignal, well, 3rd problem
Umm I think so, there's a guy in the demo (glasses) who you can speak to to set formations.
And line 122 of the animated battlers info talks about 0-8 formations.

I've been attempting a fix myself (futiley) and tried inserting this but it doesn't work, just 0/1 do. But 2-8 crash it.
Animated Battler Formations
CODE
#==============================================================================
# ** Minkoff's Animated Battlers Add-On:
#    Animated Battler Formations
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.0
#    05-20-2008
#    RGSS / RPGMaker XP
#==============================================================================
#
#  INTRODUCTION:
#
#  It has been a  long time coming  in that I  wanted to  replace the  built-in
#  formation system I hardwired into  "Minkoff's Animated Battlers - Enhanced",
#  and finally that time has arrived.  While the base system now has the origi-
#  ginal single formation,  it is by  this system  the end user  can design the
#  battle formations  for the actor battlers.   They will start out  and remain
#  lined up in the order the end user sets up.
#
#  The system recognizes the  'Mirror Effect'  system  in Animated Battlers XP,
#  and will adjust and reverse the battler positions accordingly.  You need not
#  worry about  creating duplicate  formation entries  for both left  and right
#  sided formations.
#
#------------------------------------------------------------------------------
#  
#  CREATING THE FORMATIONS:
#
#  This system allows you to create multiple formations.   This is accomplished
#  by the way you use the 'ABATXP_FORMATION' array.  The syntax is as follows:
#
#  ABATXP_FORMATION = { id => [ formation set ], id => [formation set],... }
#
#  So...  with that,  you can make  multiple sets  of formations  which you can
#  switch to while the game is running..
#
#  Now...  each formation set holds the x and y position for each actor battler
#  in combat.  Not by their 'Actor ID' mind you,  merely by party member order.
#  So the first member in your party,regardless of their position in your actor
#  database, will be first battler position defined in the formation set.  The
#  layout for each formation set is as follows:
#
#             [ [Battler 1's X & Y], [Battler 2's X & Y],... ]
#
#  Most people would set a formation set with allowances for 4 battlers. But if
#  you wanted to use a large party script  to increase the number of members in
#  your battle party, you can add more than 4 battler arrays like so:
#
#  ...ON = { 0 => [ [350,200], [395,235], [440,270], [485,305], [530,340] ],
#            1 => [ [530,200], [485,235], [440,275], [395,305], [350,340] ]  }
#  
#------------------------------------------------------------------------------
#
#  SCRIPT CALL:
#
#  There's only one script call you should be familiar with right now, and that
#  is the script call that changes the formation you want to use in battle.  By
#  default, the system uses the formation set by ID #0.  But you can change the
#  formation being used with the following call:
#
#
#  The call is simple:  $game_system.abatxp_form_id = number
#
#  Where the number is the ID number of your formation.  That's it.
#
#
#------------------------------------------------------------------------------
#
#  NOTE:
#
#  While designed and intended for use with Animated Battlers VX,  it can be
#  used with only the Actor Battler Graphics script to change the basic for-
#  mation of  the heroes.   With this,  you can make  a very simple sideview
#  system... just not animated.
#
#------------------------------------------------------------------------------
#
#  TERMS AND CONDITIONS:
#
#  Free to use, even in commercial projects.  Just note that I need some form
#  of due credit... even a mere mention in some end titles.
#
#==============================================================================

  # THE  FORMATION
  # SETTING  ARRAY
  # ==============
  #                   ID      Battler 1   Battler 2   Battler 3   Battler 4
  ABATXP_FORMATION = { 0 => [ [350, 200], [395, 235], [440, 270], [485, 305], [350,235] ],
                       1 => [ [485, 200], [440, 235], [395, 270], [350, 305], [350,235] ] }

  
  
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :abatxp_form_id           # Formation ID
  attr_accessor :abatxp_mirror            # Mirror Effect (used by AnimBatVX)
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias init_game_system initialize
  def initialize
    init_game_system
    @abatxp_form_id = 0                # Initial formation
  end
end



#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Actor X Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    if $game_system.sv_angle == 1
      return 640 - ABATXP_FORMATION[$game_system.abatxp_form_id][self.index][0]
    else
      return ABATXP_FORMATION[$game_system.abatxp_form_id][self.index][0]
    end
  end
  #--------------------------------------------------------------------------
  # * Actor Y Coordinate
  #--------------------------------------------------------------------------
  def screen_y
    return ABATXP_FORMATION[$game_system.abatxp_form_id][self.index][1]
  end
end



You can leave this topic alone if you want smile.gif I only mentioned it as you're so good. You've already done enough, thank you.
I just wanted the formation for cosmetic variety, not to actually effect the battle.
neiljwd
Still looking for help randomising my formation selection.

I have formations 0,1,2,3,4,5,6,7,8. I can dictate the formations setup for each in my config.
I then use an event to call up a script to choose a formation.
$game_system.abatxp_form_id = 7 Calls up formation 7 for instance.
I'm hoping someone can tell me how make it so that calling up formation 8, would randomly pick a formation from 0-7.
Be appreciated thank you.

(I could probably make it so the formation calls on a random 0-8 variable, then uses that tp pick a formation, I know that, with a bit of work |I could event that(i'm still new).
But I want to see how randomness is done via scripts, if at all possible, so I can get some understanding of them, thanks)

Can close, VVulfman sorted me out:
$game_system.abatxp_form_id = rand(8)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.