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.

TBS/CMS script compatibility (pleas help!)

Ive been using a TBS off of this site and I'm very well plesed with it. Anyways, i found a cool menu system i wanted to use and when i put it in with the TBS and tried to start a tactical battle, i get an error, saying:

Script "ZTBS Battle AI" line 568: ArgumentError Occured
wrong number of arguments(3 for 2)

so i go to line 568 and heres what it says:
@character_sprites.push(Sprite_Cursor.new(@viewport1, $game_player.x, $game_player.y))

is there an obvious fix to this problem?
If there isnt, could someone download the file below and try to fix this issue?
http://www.megaupload.com/?d=WUY6PRWO

Thx for all your help!
 
@character_sprites.push(Sprite_Cursor.new(@viewport1, $game_player.x, $game_player.y))
The error says that you are inputing 3 objects(@viewport1, $game_player.x, $game_player.y) to the class Sprite_Cursor. I can't download from megaupload, but maybe if you post class Sprite_Cursor, I will can help you.
 
Here is Cursor_Script
See if you can do something ><

PHP:
#==============================================================================
# â–  Cursor Script
#------------------------------------------------------------------------------
#  Script to display a cursor instead of a highlight box
# by squall
# [email=squall@rmxp.ch]squall@rmxp.ch[/email]
#==============================================================================
 
#==============================================================================
# â–  Cursor_Sprite
#==============================================================================
 
class Sprite_Cursor < Sprite
#--------------------------------------------------------------------------
# ● instances
#--------------------------------------------------------------------------
attr_accessor :true_x
attr_accessor :true_y
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize(x = 0, y = 0)
super()
self.x = @true_x = x
self.y = @true_y = y
self.z += 1000
self.bitmap = RPG::Cache.picture(CT_Pictures::Cursor) rescue Bitmap.new(32, 32)
end
#--------------------------------------------------------------------------
# ● update
#--------------------------------------------------------------------------
def update
super
 
if self.y < @true_y
n = (@true_y - self.y) / 3
n = 1 if n == 0
self.y += n
elsif self.y > @true_y
n = (self.y - @true_y) / 3
n = 1 if n == 0
self.y -= n
end
 
if self.x < @true_x
n = (@true_x - self.x) / 3
n = 1 if n == 0
self.x += n
elsif self.x > @true_x
n = (self.x - @true_x) / 3
n = 1 if n == 0
self.x -= n
end
end
end
 
#==============================================================================
# â–  Window_Selectable
#==============================================================================
 
class Window_Selectable < Window_Base
#--------------------------------------------------------------------------
# ● instances
#--------------------------------------------------------------------------
attr_reader :index
attr_reader :help_window
attr_accessor :cursor
alias update_cursor_moves update
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = 0
@cursor = Sprite_Cursor.new(x, y)
unless $scene.is_a?(Scene_Menu)
@cursor.opacity = 0
end
update_cursor
end
#--------------------------------------------------------------------------
# ● x=
#--------------------------------------------------------------------------
def x=(x)
super
@cursor.x = x if !@cursor.nil?
end
#--------------------------------------------------------------------------
# ● y=
#--------------------------------------------------------------------------
def y=(y)
super
@cursor.y = y if !@cursor.nil?
end
#--------------------------------------------------------------------------
# ● visible=
#--------------------------------------------------------------------------
def visible=(visible)
super
if !@cursor.nil? and visible == false
@cursor.visible = false
end
end
#--------------------------------------------------------------------------
# ● dispose
#--------------------------------------------------------------------------
def dispose
@cursor.dispose
super
end
#--------------------------------------------------------------------------
# ● update_cursor_rect
#--------------------------------------------------------------------------
def update_cursor_rect
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
cursor_width = self.width / @column_max - 32
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 32 - self.oy
if $scene.is_a?(Scene_Menu)
self.cursor_rect.set(x, y, 0, 0)
else
self.cursor_rect.set(x, y, cursor_width, 32)
end
end
#--------------------------------------------------------------------------
# ● update_cursor
#--------------------------------------------------------------------------
def update_cursor
@cursor.true_x = self.cursor_rect.x + self.x - 8
@cursor.true_y = self.cursor_rect.y + self.y + 16
@cursor.update
@cursor.visible = self.visible
end
#--------------------------------------------------------------------------
# ● update
#--------------------------------------------------------------------------
def update
update_cursor_moves
update_cursor
end
end
 
Well i fixed that and im still getting the error:

Script "ZTBS Battle AI" line 568: ArgumentError Occured
wrong number of arguments(3 for 2)


Do you think there could be a problem with the ZTBS Battle AI script?

Heres the ZTBS Battle AI script just in case:
Code:
#==============================================================================
# Zenith Tactical Battle System 
# Battle AI
#------------------------------------------------------------------------------
# Battle set up and AI
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # ● Game System defines tactics
  #--------------------------------------------------------------------------
  attr_accessor :in_tactics            # Tactics Battle
  attr_accessor :tactics_turn          # Turns
  attr_accessor :tactics_phase         # Phases
  attr_accessor :tactics_step          # Step Movement
  attr_accessor :tactics_setup         # Battle Setup
  attr_accessor :tactics_actors        # Actor Setup
  attr_accessor :tactics_dead_actors   # Dead Actors
  attr_accessor :tactics_enemies       # Enemy Set Up
  #--------------------------------------------------------------------------
  # ● Tactical Battle Initialize
  #--------------------------------------------------------------------------
  alias ztbs_initialize initialize
  def initialize
    # Initialise tactic battle not activated
    ztbs_initialize
    @in_tactics = false
    @tactics_turn = 0
    @tactics_phase = 0
    @tactics_step = 0
    @tactics_setup = false
    @tactics_actors = {}
    @tactics_dead_actors = {}
    @tactics_enemies = {}
  end
end

class Game_Party
  #--------------------------------------------------------------------------
  # ● Game Party
  #--------------------------------------------------------------------------
  alias ztbs_item_can_use? item_can_use?
  def item_can_use?(item_id)
    if $game_system.in_tactics
      # If items number is equal to 0
      if item_number(item_id) == 0
        # Then return as unuseable
        return false
      end
      # If no actors are dead, revival items shall not be useable
      if [5, 6].include?($data_items[item_id].scope) and
         $game_system.tactics_dead_actors.size == 0
        return false
      end      
      return true
    else
      # But if actor is dead item becomes useable
      ztbs_item_can_use?(item_id)
    end
  end
end

class Game_Battler
  #--------------------------------------------------------------------------
  # ● Movability in battle defined by agility
  #--------------------------------------------------------------------------
  def movable
    n = agi / ZTBS::C_MOVABLE
    n = [[Integer(n), 1].max, ZTBS::MOVABLE_MAX].min
    return n
  end
  #--------------------------------------------------------------------------
  # ● Skill usage
  #--------------------------------------------------------------------------
  alias ztbs_skill_can_use? skill_can_use?
  def skill_can_use?(skill_id)
    if $game_system.in_tactics
      # If skills haven't been marked for tactics
      if !$data_skills[skill_id].tactical?
        return false
      end
      # If skills cost more than own SP
      if $data_skills[skill_id].sp_cost > self.sp
        return false
      end
      # If the skill isn't for the right scope
      if [5, 6].include?($data_skills[skill_id].scope)
        if self.is_a?(Game_Actor)
          return false if $game_system.tactics_dead_actors.size == 0
        else
          return false
        end
      end
      # If character dead
      if dead?
        return false
      end
      # If the skills attack is equal to 0 and restricted
      if $data_skills[skill_id].atk_f == 0 and self.restriction == 1
        return false
      end
      return true
    else
      # If not then the skill is useable
      ztbs_skill_can_use?(skill_id)
    end
  end
  #--------------------------------------------------------------------------
  # ● Skills effects
  #--------------------------------------------------------------------------
  alias ztbs_skill_effect skill_effect
  def skill_effect(user, skill)
    if $game_system.in_tactics
      # Skill available in tactic battle
      $game_temp.in_battle = true
      # Effectiveness based upon actor and skill
      effective = ztbs_skill_effect(user, skill)
      # In normal battle the same does not apply
      $game_temp.in_battle = false
    else
      effective = ztbs_skill_effect(user, skill)
    end
    # Return to effective
    return effective
  end
  #--------------------------------------------------------------------------
  # ● Item effect
  #--------------------------------------------------------------------------
  alias ztbs_item_effect item_effect
  def item_effect(item)
    if $game_system.in_tactics
      # Item available in tactic battle
      $game_temp.in_battle = true
      # Defined by tactics effect
      effective = ztbs_item_effect(item)
      # In normal battle the same does not apply
      $game_temp.in_battle = false
    else
      effective = ztbs_item_effect(item)
    end
    # Return to effective
    return effective
  end
end

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # ● Game Enemy 
  #--------------------------------------------------------------------------
  alias ztbs_initialize initialize
  def initialize(troop_id, member_index)
    if troop_id == 0
      super()
      @enemy_id = member_index
      enemy = $data_enemies[@enemy_id]
      @hp = maxhp
      @sp = maxsp
    else
      ztbs_initialize(troop_id, member_index)
    end
  end
  #--------------------------------------------------------------------------
  # ● Tactical Action
  #--------------------------------------------------------------------------
  def make_tactical_action
    # Define tactical action with current action
    self.current_action.clear
    # Available actions for use (set in database, the rating affects how much 
    # they use that skill)
    available_actions = []
    rating_max = 0
    for action in self.actions
      # Upon turn appropiate action is chosen
      n = $game_system.tactics_turn
      a = action.condition_turn_a
      b = action.condition_turn_b
      if (b == 0 and n != a) or
         (b > 0 and (n < 1 or n < a or n % b != a % b))
        next
      end
      # If hp is bigger than action condition hp move on
      if self.hp * 100.0 / self.maxhp > action.condition_hp
        next
      end
      # If level is smaller then action condition level move on
      if $game_party.max_level < action.condition_level
        next
      end
      # If the switch id is that of the action condition id move on
      switch_id = action.condition_switch_id
      if switch_id > 0 and $game_switches[switch_id] == false
        next
      end
      # If action kind is equal to 1 and skill cant be used move on
      if action.kind == 1
        skill = $data_skills[action.skill_id]
        if !self.skill_can_use?(skill.id)
          next
        end
      end
      # If action rating gets bigger then action max then redefine action rating
      # to become action max
      available_actions.push(action)
      if action.rating > rating_max
        rating_max = action.rating
      end
    end
    # Restores that action rating
    ratings_total = 0
    for action in available_actions
      if action.rating > rating_max - 3
        ratings_total += action.rating - (rating_max - 3)
      end
    end
    # When the ratings total gets bigger then 0
    if ratings_total > 0
      # Randomise ratings total
      value = rand(ratings_total)
      # For actions available
      for action in available_actions
        if action.rating > rating_max - 3
          if value < action.rating - (rating_max - 3)
            self.current_action.kind = action.kind
            self.current_action.basic = action.basic
            self.current_action.skill_id = action.skill_id
            return
          else
            value -= action.rating - (rating_max - 3)
          end
        end
      end
    end
  end
end

class Game_Map
  #--------------------------------------------------------------------------
  # ● Game Map
  #--------------------------------------------------------------------------
  attr_reader :tactics_end_map           # End Of Tactics Map
  #--------------------------------------------------------------------------
  # ● TBS Setup
  #--------------------------------------------------------------------------
  alias ztbs_setup setup
  def setup(map_id)
    # Set Up Map ID
    ztbs_setup(map_id)
    # Load map info data from Data Folder
    $data_mapinfos = load_data("Data/MapInfos.rxdata") if $data_mapinfos.nil?
    map_name = $data_mapinfos[@map_id].name
    # Get tactic map end ID
    @tactics_end_map = get_tactics_end_map(@map_id)
    # If tactical battle map must include [T]
    $game_system.in_tactics = map_name.include?("[T]")
  end
end

class Game_Character
  #--------------------------------------------------------------------------
  # ● Battle Animation
  #--------------------------------------------------------------------------
  attr_accessor :appear                   # 出現
  attr_accessor :damage_pop               # ダメージ表示フラグ
  attr_accessor :damage                   # ダメージ値
  attr_accessor :critical                 # クリティカルフラグ
  attr_accessor :animation_id             # アニメーション ID
  attr_accessor :animation_hit            # アニメーション ヒットフラグ
  attr_accessor :white_flash              # 白フラッシュフラグ
  attr_accessor :blink                    # 明滅フラグ
  attr_accessor :collapse                 # コラプス
  attr_accessor :acted                    # 行動済み
  attr_accessor :effect                   # エフェクト中
  attr_accessor :invisible                # 不可視状態
  attr_accessor :not_update               # 更新禁止
  #--------------------------------------------------------------------------
  # ● TBS Anitialize
  #--------------------------------------------------------------------------
  alias ztbs_initialize initialize
  def initialize
    # When initialized the following statements are true
    ztbs_initialize
    @damage_pop = false
    @damage = nil
    @critical = false
    @animation_id = 0
    @animation_hit = false
    @white_flash = false
    @blink = false
    @collapse = 0
    @acted = false
    @effect = false
    @invisible = false
    @not_update = false
  end
  #--------------------------------------------------------------------------
  # ● State Animation refer to Database ID
  #--------------------------------------------------------------------------
  def state_animation_id
    if self.is_a?(Game_Player) or !$game_system.in_tactics or
       (!$game_system.tactics_actors.keys.include?(self.id) and
       !$game_system.tactics_enemies.keys.include?(self.id))
      return 0
    end
    # Actor uses applied animation as there battler would
    if $game_system.tactics_actors.keys.include?(self.id)
      battler = $game_system.tactics_actors[self.id]
    else
      battler = $game_system.tactics_enemies[self.id]
    end
    # If battler size is 0 then return with 0
    if battler.states.size == 0
      return 0
    end
    # Applies animation state id to battler
    return $data_states[battler.states[0]].animation_id
  end
  #--------------------------------------------------------------------------
  # ● TBS Update
  #--------------------------------------------------------------------------
  alias ztbs_update update
  def update
    return if @not_update
    ztbs_update
    # If battle define on screen and in tactics battle
    if defined? $onscreen and $game_system.in_tactics
      # Make the on id true
      $onscreen[@id] = true
    end
  end
end

class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # ● Game Event < Game Character --- NameId referencing
  #--------------------------------------------------------------------------
  attr_reader     :name                  # 名前
  attr_reader     :move_frequency        # 移動頻度
  attr_reader     :erased                # 消去済み
  #--------------------------------------------------------------------------
  # ● This refers the event and mp id to the scripts which then refers to the
  # the database in which all events and maps shall be defined
  #--------------------------------------------------------------------------
  alias ztbs_e_initialize initialize
  def initialize(map_id, event)
    ztbs_e_initialize(map_id, event)
    @name = event.name
  end
  #--------------------------------------------------------------------------
  # ● Cancel Erase
  #--------------------------------------------------------------------------
  def cancel_erase
    @erased = false
    @appear = true
    @effect = true
  end
end

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ● Game Player < Game Character --- Defines the events animation action
  #--------------------------------------------------------------------------
  attr_accessor :through                  # Phasing Change
  attr_accessor :move_speed               # Movement Speed
  attr_accessor :through_original         # Phasing Original
  attr_accessor :speed_original           # Speed Defined
  #--------------------------------------------------------------------------
  # ● Initialises phasing and movement speed
  #--------------------------------------------------------------------------
  def initialize()
    super()
    @through_original = @through
    @speed_original = @move_speed
  end
  #--------------------------------------------------------------------------
  # ● Define increase in steps
  #--------------------------------------------------------------------------
  alias ztbs_increase_steps increase_steps
  def increase_steps
    super
    return if $game_system.in_tactics
    # Increase steps
    ztbs_increase_steps
  end
end

class Sprite_Character < RPG::Sprite
  #--------------------------------------------------------------------------
  # ● Update character sprite
  #--------------------------------------------------------------------------
  alias ztbs_update update
  def update
    if $game_system.in_tactics
      super
      # Changes old tile id, characer name or character hue to new
      if @tile_id != @character.tile_id or
         @character_name != @character.character_name or
         @character_hue != @character.character_hue
        # Changes old tile id, characer name and character hue to new
        @tile_id = @character.tile_id
        @character_name = @character.character_name
        @character_hue = @character.character_hue
     # If tile id is bigger than orequal to 384 create tile ID and Character Hue
        if @tile_id >= 384
          self.bitmap = RPG::Cache.tile($game_map.tileset_name,
            @tile_id, @character.character_hue)
          self.src_rect.set(0, 0, 32, 32)
          self.ox = 16
          self.oy = 32
        # Or in else cases create character
        else
          self.bitmap = RPG::Cache.character(@character.character_name,
            @character.character_hue)
          @cw = bitmap.width / 4
          @ch = bitmap.height / 4
          self.ox = @cw / 2
          self.oy = @ch
        end
      end
      # Visible when character in not transparent
      self.visible = (not @character.transparent)
      # Is tile ID is equal to 0
      if @tile_id == 0
        sx = @character.pattern * @cw
        sy = (@character.direction - 2) / 2 * @ch
        self.src_rect.set(sx, sy, @cw, @ch)
      end
      # Define x, y and z character screen
      self.x = @character.screen_x
      self.y = @character.screen_y
      self.z = @character.screen_z(@ch)
      # If set opacity is equal to 0 the character is defined as invisible
      if self.opacity == 0
        @character.invisible = true
      end
      unless @character.effect
        if @character.acted
          self.opacity = @character.opacity - 100
        elsif @character.invisible
          self.opacity = 0
        else
          self.opacity = @character.opacity
        end
        self.blend_type = @character.blend_type
        self.bush_depth = @character.bush_depth
      end
      @character.effect = effect?
      if @character.is_a?(Game_Player)
        return
      end
      # Loops state animation for character inflicited
      if @character.damage == nil and
         @character.state_animation_id != @state_animation_id and
         ($game_system.tactics_step < 6 or $game_system.tactics_step > 9) and
         ZTBS::STATE_ANIMATION
        @state_animation_id = @character.state_animation_id
        loop_animation($data_animations[@state_animation_id])
      end
      # When character animation ID is 0 use default hit animation
      if @character.animation_id != 0
        animation = $data_animations[@character.animation_id]
        animation(animation, @character.animation_hit)
        @character.animation_id = 0
      end
      # When characters turn the characters opacity returns to normal
      if @character.appear and
         ($game_system.tactics_step < 6 or $game_system.tactics_step > 8)
        @character.refresh
        @character.invisible = false
        self.opacity = @character.opacity
        appear
        @character.appear = false
      end
      # If character blink is on defined to character if not blink is off
      if @character.blink
        blink_on
      else
        blink_off
      end
      # Character white flash cannot happen if already whitened
      if @character.white_flash
        whiten
        @character.white_flash = false
      end
      # Display character damage as normal if not critcial
      if @character.damage_pop
        damage(@character.damage, @character.critical)
        @character.damage = nil
        @character.critical = false
        @character.damage_pop = false
      end
      # If character dies play actor die sound effect
      # If enemy dies play enemy die sound effect
      if @character.damage == nil and @character.collapse > 0
        case @character.collapse
        when 1
          $game_system.se_play($data_system.actor_collapse_se)
        when 2
          $game_system.se_play($data_system.enemy_collapse_se)
        end
        collapse
        @character.collapse = 0
        @character.effect = true
      end
    else
      # TBS Update
      ztbs_update
    end
  end
end

class Spriteset_Map
  #--------------------------------------------------------------------------
  # Map definition
  #--------------------------------------------------------------------------
  attr_reader     :viewport1              # Set map viewed (x, y, width, height)
  attr_accessor   :area_sprites           # Area sprites can move
  attr_accessor   :range_sprites          # Sprite range area
  attr_reader     :character_sprites      # Reads characters ID placement etc
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias ztbs_initialize initialize
  def initialize
    if $game_system.in_tactics
      # ビューポートを作成
      @viewport1 = Viewport.new(0, 0, 640, 480)
      @viewport2 = Viewport.new(0, 0, 640, 480)
      @viewport3 = Viewport.new(0, 0, 640, 480)
      @viewport2.z = 200
      @viewport3.z = 5000
      # タイルマップを作成
      @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
      # パノラマプレーンを作成
      @panorama = Plane.new(@viewport1)
      @panorama.z = -1000
      # フォグプレーンを作成
      @fog = Plane.new(@viewport1)
      @fog.z = 3000
      # エリアスプライトを作成
      @area_sprites = []
      # レンジスプライトを作成
      @range_sprites = []
      # 「簡易版マップ処理軽量化」でのエラー防止
      if defined? $onscreen
        # キャラクタースプライトを作成
        @character_sprites = []
        @party_sprites = []
        for i in $game_map.events.keys.sort
          sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
          @character_sprites[i] = sprite
         $onscreen[i] = true
        end
        @party_sprites.push(Sprite_Cursor.new(@viewport1, $game_player.x, $game_player.y))
      else
        # キャラクタースプライトを作成
        @character_sprites = []
        for i in $game_map.events.keys.sort
          sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
          @character_sprites.push(sprite)
        end
        @character_sprites.push(Sprite_Cursor.new(@viewport1, $game_player.x, $game_player.y)) 
      end
      # 天候を作成
      @weather = RPG::Weather.new(@viewport1)
      # ピクチャを作成
      @picture_sprites = []
      for i in 1..50
        @picture_sprites.push(Sprite_Picture.new(@viewport2,
          $game_screen.pictures[i]))
      end
      # Create new sprite timer
      @timer_sprite = Sprite_Timer.new
      # Update Sprite Timer
      update
    else
      ztbs_initialize
    end
  end
  #--------------------------------------------------------------------------
  # ● Define Effect
  #--------------------------------------------------------------------------
  def effect?
    # Checks for effects on character sprites
    for sprite in @character_sprites
      if sprite != nil and sprite.effect?
        return true
      end
    end
    return false
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  alias ztbs_dispose dispose
  def dispose
    ztbs_dispose
    return if !defined? @area_sprites
    # Disposes old memory of last sprites range in the area
    for sprite in @area_sprites + @range_sprites
      sprite.dispose
    end
  end
  #--------------------------------------------------------------------------
  # ● Updates The TBS
  #--------------------------------------------------------------------------
  alias ztbs_update update
  def update
    ztbs_update
    return if !defined? @area_sprites
    # Updates sprites range in the area
    for sprite in @area_sprites + @range_sprites
      sprite.update
    end
  end
end

class Window_Help2 < Window_Base
  #--------------------------------------------------------------------------
  # ● Window Help displays enemy and actor data in battle
  #--------------------------------------------------------------------------
  #==========================================================================
  #--------------------------------------------------------------------------
  # ● Refreshes the enemies data for the help window
  #--------------------------------------------------------------------------
  def refresh_actor(actor)
    @actor = nil
    set_actor(actor)
  end
  #--------------------------------------------------------------------------
  # ● Refreshes the enemies data for the help window
  #--------------------------------------------------------------------------
  def refresh_enemy(enemy)
    @actor = nil
    set_enemy(enemy)
  end
  #--------------------------------------------------------------------------
  # ● Setup enemy and actor data to be read correctly by help
  #--------------------------------------------------------------------------
  alias ztbs_set_enemy set_enemy
  def set_enemy(enemy)
    if $game_system.in_tactics and ZTBS::ENEMY_HPSP
      set_actor(enemy)
    else
      # 呼び戻す
      ztbs_set_enemy(enemy)
    end
  end
end

#==============================================================================
# â–  Scene_Load
#------------------------------------------------------------------------------
# Loads up the new tactical data aswell, so that if saved in battle previously
# then all shall resume as it was
#==============================================================================
class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # ● Scene Load Tactics
  #--------------------------------------------------------------------------
  alias ztbs_read_save_data read_save_data
  def read_save_data(file)
    # Read old Tactics Save Data
    ztbs_read_save_data(file)
    # Load up previous tactics placement, turn, enemies etc.
    if $game_system.tactics_turn == nil
      $game_system.in_tactics = false
      $game_system.tactics_turn = 0
      $game_system.tactics_phase = 0
      $game_system.tactics_step = 0
      $game_system.tactics_setup = false
      $game_system.tactics_actors = {}
      $game_system.tactics_dead_actors = {}
      $game_system.tactics_enemies = {}
    end
  end
end
 
Thx vgvgf and christophercain3, btu i found another CMS that works fine with the TBS so i guess i dont really need help on this anymore. Thanks again for helping though! =)

Um, sorry about the double post, please delete it ><
 

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