Jump to content
CSellers

Play test crash related to removing pictures

Recommended Posts

Hey guys,

 

2nd post, having another issue, seems to be a problem with the engine. Any support will help.

The Problem: The playtest, (or running the game) crashes when unloading pictures. I am doing a data collection screen, with 17 buttons that record names with name input. After each field is completed, I replace the button with a picture of the button in a different color. All 17 images display just fine, however the crash occurs when trying to erase said pictures. I have cut it down to just 7 pictures being cleared and it works just fine, so I have determined that clearing the pictures is what is causing the problem.

 

The Fixes I Have Tried:

I have turned the pictures transparent, and cleared them slowly over several events. Causes Crashes

I have the images switch to smaller transparent images, and clear them later. Causes Crashes

I have substituted the files, to make sure none of the images are causing the problem, Still Crashes.

 

The only work around that works at this point is just making the images transparent and leaving them alone, but I am concerned it may cause issues later on in the game if I dont clear the images.

Sorry for the long post. To recreate the issue, one could just display 17 pictures one by one, and then clear them one by one, or all at once.  Also I am not sure if it helps at all, but the crash is not immediate. The game functions for a few seconds, freezes and crashes.  No error messages. Sorry for the long post, any help would be great! Thanks guys!

Share this post


Link to post
Share on other sites

Uh oh, sounds like one of those tricky crashes related to not disposing sprites correctly! I can create and erase 17 pictures fine though. Are you using any scripts? Or maybe you have an older version of VX Ace? I heard there was some bug related to erasing pictures in older versions. Not sure of the details though.

Share this post


Link to post
Share on other sites

Yeah, I think my version may be older. Its my original copy that was on a laptop given to my by a friend. I have a newer version too, but I already started the project and did a ton of work. From what I understand the engine is copied into the project so I cant do much about it now. I am currently turning the pictures transparent to remove them, but my concern is that I may need to use more pictures later, or it may cause issues later.

 

Share this post


Link to post
Share on other sites

Well there are bugfix scripts that may help... I found this one somewhere a while ago before I realized I didn't really need it

 

Spoiler

#==============================================================================
# ■ VXAce_SP1
#------------------------------------------------------------------------------
# This is an official bug fix for the default scripts.
# Place this above Materials.
#==============================================================================

#------------------------------------------------------------------------------
# 【Bug Fixes】
#------------------------------------------------------------------------------

# ● Event command "Change State" when you simultaneously add and remove the same
# state, thereafter add that state fails.
# ● Event Command "Show Animation" the animation and the map scroll are not 
# synched.
# ● Auto battle, action not chosen correctly.
# ● When an equipment is removed because you can't equip it anymore, and as a 
# result another equipment needs to be removed, that equipment grows ?
# ● Event comand Erase picture fix. The game slows down as a whole.
# ● Move route option "Jump if not possible", during the execution if you touch 
# an event with the trigger "Player touch" that event is queued.
# ● Magic reflection skill does not reflect the state validity.
# ● Font setting, when putting bold or italic as default, that setting changes
# on screen change
#------------------------------------------------------------------------------

class Game_Battler
  attr_accessor :magic_reflection  
  
  #--------------------------------------------------------------------------
  # ● 敵対関係の判定  
  #--------------------------------------------------------------------------
  alias vxace_sp1_opposite? opposite?  
  def opposite?(battler)
    vxace_sp1_opposite?(battler) || battler.magic_reflection  
  end
  
end

#------------------------------------------------------------------------------

class Game_Actor  

  #--------------------------------------------------------------------------
  # ● 装備できない装備品を外す
  #     item_gain : 外した装備品をパーティに戻す
  #--------------------------------------------------------------------------
  alias vxace_sp1_release_unequippable_items release_unequippable_items
  def release_unequippable_items(item_gain = true)
    loop do
      last_equips = equips.dup
      vxace_sp1_release_unequippable_items(item_gain)
      return if equips == last_equips
    end
  end
  
  #--------------------------------------------------------------------------
  # ● 自動戦闘時の戦闘行動を作成
  #--------------------------------------------------------------------------
  def make_auto_battle_actions
    @actions.size.times do |i|
      @actions[i] = make_action_list.max_by {|action| action.value }
    end
  end

end

#------------------------------------------------------------------------------

class Game_Player
  
  #--------------------------------------------------------------------------
  # ● マップイベントの起動
  #     triggers : トリガーの配列
  #     normal   : プライオリティ[通常キャラと同じ]かそれ以外か
  #--------------------------------------------------------------------------
  alias vxace_sp1_start_map_event start_map_event
  def start_map_event(x, y, triggers, normal)
    return if $game_map.interpreter.running?
    vxace_sp1_start_map_event(x, y, triggers, normal)
  end
end

#------------------------------------------------------------------------------

class Game_Picture
  
  #--------------------------------------------------------------------------
  # ● ピクチャの消去
  #--------------------------------------------------------------------------
  alias vxace_sp1_erase erase
  def erase
    vxace_sp1_erase
    @origin = 0
  end
end

#------------------------------------------------------------------------------

class Game_Interpreter
  #--------------------------------------------------------------------------
  # ● ステートの変更
  #--------------------------------------------------------------------------
  alias vxace_sp1_command_313 command_313
  def command_313
    vxace_sp1_command_313
    $game_party.clear_results
  end
end

#------------------------------------------------------------------------------

class Sprite_Character
  #--------------------------------------------------------------------------
  # ● 位置の更新
  #--------------------------------------------------------------------------
  alias vxace_sp1_update_position update_position
  def update_position
    move_animation(@character.screen_x - x, @character.screen_y - y)
    vxace_sp1_update_position
  end
  
  #--------------------------------------------------------------------------
  # ● アニメーションの移動
  #--------------------------------------------------------------------------
  def move_animation(dx, dy)
    if @animation && @animation.position != 3
      @ani_ox += dx
      @ani_oy += dy
      @ani_sprites.each do |sprite|
        sprite.x += dx
        sprite.y += dy
      end
    end
  end
  
end

#------------------------------------------------------------------------------

class Sprite_Picture
  #--------------------------------------------------------------------------
  # ● 転送元ビットマップの更新
  #--------------------------------------------------------------------------
  alias vxace_sp1_update_bitmap update_bitmap
  def update_bitmap
    if @picture.name.empty?
      self.bitmap = nil
    else
      vxace_sp1_update_bitmap
    end
  end
end

#------------------------------------------------------------------------------

class Window_Base
  
  #--------------------------------------------------------------------------
  # ● フォント設定のリセット
  #--------------------------------------------------------------------------
  alias vxace_sp1_reset_font_settings reset_font_settings
  def reset_font_settings
    vxace_sp1_reset_font_settings
    contents.font.bold = Font.default_bold
    contents.font.italic = Font.default_italic
  end
end

#------------------------------------------------------------------------------

class Scene_Battle
  
  #--------------------------------------------------------------------------
  # ● 魔法反射の発動
  #--------------------------------------------------------------------------
  alias vxace_sp1_invoke_magic_reflection invoke_magic_reflection
  def invoke_magic_reflection(target, item)
    @subject.magic_reflection = true
    vxace_sp1_invoke_magic_reflection(target, item)
    @subject.magic_reflection = false
  end
end

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×