Events stop moving, not even doors are opening when I leave the inn and enter the main town area.

Hello all,
while playtesting I encountered a weird glitch, bug or whatever.

What the title says, so I have a town where everything is working fine. When I exit it, then all NPCS pause movements and the door to the inn isn't opening and the game freezes. Other doors are working fine though. Until I disctance myself to a certain point from the entrance of the inn, everything is frozen, afterwards they resume walking like nothing happened.

Any idea what this could be? I never had this in all my playtests, this randomly happened and no parallel process event seems to be causing this.

Any ideas? Has anyone encountered this before? Thanks in advance!

EDIT: Just noticed the NPCs inside the Inn aren't moving, so this has to do with that map right? They start moving when my character moves a bit around.

EDIT2: I just found out they resume their movement when opening the menu, so what is causing this?

EDIT3: I found the issue, it has to do with Victor's Anti Lag Script, when removing the script the events played out normally. But I don't understand why that paerticular map causes this? Running around a bit in town, it happens to other areas as well, is there any way to fix this? Or do I need to delete the script? I have maps with more than 100 events though, I need that script...

This is the script by the way:
Ruby:
#==============================================================================
# ** Victor Engine - Anti Lag
#------------------------------------------------------------------------------
# Author : Victor Sant
#
# Version History:
#  v 1.00 - 2012.08.03 > First release
#  v 1.01 - 2012.08.04 > Fixed issue when teleport to the same map
#------------------------------------------------------------------------------
#  This script was designed to reduce the lag cause by many events on map.
# Most anti lag script just skip the update of events that outside the screen
# while still loops though all of them. This one, instead, dinamically manage
# the list of events for update, and keeps events that aren't going to be
# updated outside of the list.
#------------------------------------------------------------------------------
# Compatibility
#   Requires the script 'Victor Engine - Basic Module' v 1.00 or higher
#
# * Overwrite methods
#   class Game_Map
#     def update_events
#     def event_list
#
#   class Spriteset_Map
#     def update_characters
#
# * Alias methods
#   class Game_Map
#     def setup(map_id)
#     def refresh
#
#   class Game_Event < Game_Character
#     def setup_page_settings
#
#   class Spriteset_Map
#     def create_characters
#
#------------------------------------------------------------------------------
# Instructions:
#  To instal the script, open you script editor and paste this script on
#  a new section bellow the Materials section. This script must also
#  be bellow the script 'Victor Engine - Basic'
#
#------------------------------------------------------------------------------
# Comment boxes note tags:
#   Tags to be used on events Comment boxes. They're different from the
#   comment call, they're called always the even refresh.
#
#  <always update>
#   Events with this comment on the active page will be always updated
#
#  <never update>
#   Events with this comment on the active page will be never updated
#   Useful for decoration only events.
#
#------------------------------------------------------------------------------
# Additional instructions:
#
#  Parallel process events and auto start events will be always updated no
#  matter their positions.
#
#  Remember that your hardware specification still have influence on the
#  performance
#==============================================================================

#==============================================================================
# ** Victor Engine
#------------------------------------------------------------------------------
#   Setting module for the Victor Engine
#==============================================================================

module Victor_Engine
  #--------------------------------------------------------------------------
  # * Setup the update buffer
  #   Setting values higher than 0, you increase the tile area of update
  #   By default, only events on the screen area or 1 tile near the visible
  #   área updates. Increasing the buff increase the update área, but also
  #   increase the potential lag.
  #--------------------------------------------------------------------------
  VE_UPDATE_BUFFER = 2
  #--------------------------------------------------------------------------
  # * required
  #   This method checks for the existance of the basic module and other
  #   VE scripts required for this script to work, don't edit this
  #--------------------------------------------------------------------------
  def self.required(name, req, version, type = nil)
    if !$imported[:ve_basic_module]
      msg = "The script '%s' requires the script\n"
      msg += "'VE - Basic Module' v%s or higher above it to work properly\n"
      msg += "Go to http://victorenginescripts.wordpress.com/ to download this script."
      msgbox(sprintf(msg, self.script_name(name), version))
      exit
    else
      self.required_script(name, req, version, type)
    end
  end
  #--------------------------------------------------------------------------
  # * script_name
  #   Get the script name base on the imported value
  #--------------------------------------------------------------------------
  def self.script_name(name, ext = "VE")
    name = name.to_s.gsub("_", " ").upcase.split
    name.collect! {|char| char == ext ? "#{char} -" : char.capitalize }
    name.join(" ")
  end
end

$imported ||= {}
$imported[:ve_anti_lag] = 1.01
Victor_Engine.required(:ve_anti_lag, :ve_basic_module, 1.00, :above)

#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles maps. It includes scrolling and passage determination
# functions. The instance of this class is referenced by $game_map.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Overwrite method: update_events
  #--------------------------------------------------------------------------
  def update_events
    @update_list.each   {|event| event.update }
    @common_events.each {|event| event.update }
  end
  #--------------------------------------------------------------------------
  # * Overwrite method: event_list
  #--------------------------------------------------------------------------
  def event_list
    @event_list
  end
  #--------------------------------------------------------------------------
  # * Alias method: setup
  #--------------------------------------------------------------------------
  alias :setup_ve_anti_lag :setup
  def setup(map_id)
    @event_list  = []
    @update_list = []
    setup_ve_anti_lag(map_id)
  end
  #--------------------------------------------------------------------------
  # * Alias method: refresh
  #--------------------------------------------------------------------------
  alias :refresh_ve_anti_lag :refresh
  def refresh
    refresh_ve_anti_lag
    refresh_event_list
  end
  #--------------------------------------------------------------------------
  # * New method: screen_moved?
  #--------------------------------------------------------------------------
  def screen_moved?
    @last_screen_x != @display_x.to_i || @last_screen_y != @display_y.to_i
  end
  #--------------------------------------------------------------------------
  # * New method: refresh_screen_position
  #--------------------------------------------------------------------------
  def refresh_screen_position
    @last_screen_x = @display_x.to_i
    @last_screen_y = @display_y.to_i
  end
  #--------------------------------------------------------------------------
  # * New method: refresh_event_list
  #--------------------------------------------------------------------------
  def refresh_event_list
    @event_list  = events.values.select {|event| event.on_screen? }
    @update_list = events.values.select {|event| event.update? }
  end
end

#==============================================================================
# ** Game_CharacterBase
#------------------------------------------------------------------------------
#  This class deals with characters. Common to all characters, stores basic
# data, such as coordinates and graphics. It's used as a superclass of the
# Game_Character class.
#==============================================================================

class Game_CharacterBase
  #--------------------------------------------------------------------------
  # * New method: update?
  #--------------------------------------------------------------------------
  def update?(*args)
    return true
  end
  #--------------------------------------------------------------------------
  # * New method: near_the_screen?
  #--------------------------------------------------------------------------
  def near_the_screen?(*args)
    return true
  end
  #--------------------------------------------------------------------------
  # * New method: on_buffer_area?
  #--------------------------------------------------------------------------
  def on_screen?(*args)
    return true
  end
end

#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================

class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Alias method: setup_page_settings
  #--------------------------------------------------------------------------
  alias :setup_page_settings_ve_anti_lag :setup_page_settings
  def setup_page_settings
    setup_page_settings_ve_anti_lag
    @mode = nil
    @mode = :always if note =~ /<ALWAYS UPDATE>/i
    @mode = :never  if note =~ /<NEVER UPDATE>/i
  end
  #--------------------------------------------------------------------------
  # * New method: update?
  #--------------------------------------------------------------------------
  def update?
    return false if @mode == :never
    on_screen?(12, 8)
  end
  #--------------------------------------------------------------------------
  # * New method: auto_event?
  #--------------------------------------------------------------------------
  def auto_event?
    @mode == :always || @trigger == 3 || @trigger == 4
  end
  #--------------------------------------------------------------------------
  # * New method: on_screen?
  #--------------------------------------------------------------------------
  def on_screen?(x = 14, y = 10)
    z = [VE_UPDATE_BUFFER, 0].max
    near_the_screen?(x + z, y + z) || auto_event?
  end
end

#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc. It's used
# within the Scene_Map class.
#==============================================================================

class Spriteset_Map
  #--------------------------------------------------------------------------
  # * Overwrite method: update_characters
  #--------------------------------------------------------------------------
  def update_characters
    refresh_characters if @map_id != $game_map.map_id
    refresh_sprites    if $game_map.screen_moved?
    @screen_sprites.each {|sprite| sprite.update }
  end
  #--------------------------------------------------------------------------
  # * Alias method: create_characters
  #--------------------------------------------------------------------------
  alias :create_characters_ve_anti_lag :create_characters
  def create_characters
    create_characters_ve_anti_lag
    refresh_characters_sprites
  end
  #--------------------------------------------------------------------------
  # * New method: refresh_characters_sprites
  #--------------------------------------------------------------------------
  def refresh_characters_sprites
    @screen_sprites = []
    @character_sprites.each do |sprite|
      sprite.update
      @screen_sprites.push(sprite) if sprite.character.on_screen?
    end
  end
  #--------------------------------------------------------------------------
  # * New method: refresh_sprites
  #--------------------------------------------------------------------------
  def refresh_sprites
    refresh_characters_sprites
    $game_map.refresh_event_list
    $game_map.refresh_screen_position
  end
end
show the map event you have.

as it can cause multiple ways what the issue is.
show the map event you have.

as it can cause multiple ways what the issue is.
All the events on the map? Or the parallel process ones?
the parallel one that causes the issue. or the event at the door that freeze
the game.
the parallel one that causes the issue. or the event at the door that freeze
the game.
I just found out it has to do with Victor's Anti Lag script, when I deleted it and started playtesting, the freeze didn't occur, should I post the script in the top comment?
as said above we need more info to help, but based on your descriptions there can be a different cause:

How many different maps are you talking about with the town and the buildings?
Because only one map can be in memory, as soon as you transfer to a different map the old map and its events get deleted and on next entering the map is reset to default.

EDIT:
then you configured the script wrong.
Anti-lag-scripts reduce lag by stopping events above a certain range from the player, and you simply selected a range that is too low, it should only effect events outside your screen.
make sure to co9nfigure the script correctly f you need to use it
as said above we need more info to help, but based on your descriptions there can be a different cause:

How many different maps are you talking about with the town and the buildings?
Because only one map can be in memory, as soon as you transfer to a different map the old map and its events get deleted and on next entering the map is reset to default.

EDIT:
then you configured the script wrong.
Anti-lag-scripts reduce lag by stopping events above a certain range from the player, and you simply selected a range that is too low, it should only effect events outside your screen.
make sure to co9nfigure the script correctly f you need to use it
The events shouldn't stop updating though, because it's a small map (W:20, H:13) it fits all in 1 screen. And I even included a comment <always update> for the events regardless of map size, yet it is still happening (it was happening without the comment as well).
you can set the buffer to 10, and make sure its a comment,
not comment call or notetag (if vxa uses that as well).

if 10 works, try higher or lower. and see what works.
you can set the buffer to 10, and make sure its a comment,
not comment call or notetag (if vxa uses that as well).

if 10 works, try higher or lower. and see what works.
I set it to 10 in the script and tried the map again, unfortunately NPCs weren't moving. I am not sure I understand how the buffer will be a comment, the only 2 comments I ever use for the script are <never update> and <always update>.

So I just set it to 10 and tried it out, with no results unfortunately.
than I don't know as the buffer 2 = 1 tile in all directions, so 10 would make
it 9 up, left, right, down so far I understand.

I don't made it or understand the ruby language.
than I don't know as the buffer 2 = 1 tile in all directions, so 10 would make
it 9 up, left, right, down so far I understand.

I don't made it or understand the ruby language.
I see it's fine thank you regardless, if anyone is able to help me out I'll be waiting, for now I have to remove the script as it's not working for me, I hope the lag won't be terrible in those maps with more than 100+ events.

Or I'll try to find another script, I just hope I don't have to remove all the comments <never update> in these maps, this will be the worst 😅
comments that doesn't function are read as "comments", so they
won't run anyways, so no worries 🙂

good luck with your project and hope someone is able to help you
on this script.
comments that doesn't function are read as "comments", so they
won't run anyways, so no worries 🙂

good luck with your project and hope someone is able to help you
on this script.
Ah I see, this is great!

Thank you very much! 😀
Or do I need to delete the script? I have maps with more than 100 events though
How many events do you have the tags on?
<always update>
<never update>
You only need to use the tags to always update when an event is changing often and you don't want it to lose the change when it is not visible on the screen.
You only need to use the never update tag for events that will not do anything, but I honestly don't understand why this tag is needed as I have never seen a situation where it would be useful. If you have an event that doesn't need to be updated then don't use any tag and have it with no event commands and no walking animation and fixed direction, then it won't change. So I don't see the purpose of the <never update> tag.

If I was you I would remove the <never update> tag from everything. and only have the always update tag on the events you really need it for.
I use large maps and have never needed to have more than 5 events that always update.

Also there are other anti lag scripts. try one of them.
1737155735335.png
How many events do you have the tags on?
<always update>
<never update>
You only need to use the tags to always update when an event is changing often and you don't want it to lose the change when it is not visible on the screen.
You only need to use the never update tag for events that will not do anything, but I honestly don't understand why this tag is needed as I have never seen a situation where it would be useful. If you have an event that doesn't need to be updated then don't use any tag and have it with no event commands and no walking animation and fixed direction, then it won't change. So I don't see the purpose of the <never update> tag.

If I was you I would remove the <never update> tag from everything. and only have the always update tag on the events you really need it for.
I use large maps and have never needed to have more than 5 events that always update.

Also there are other anti lag scripts. try one of them.
View attachment 329222
Hi @Roninator2 thanks for the suggestions.

I use the never update tag on all decorative events (parts of trees etc) and the always update tag on events further away from the player, but outside the screen border, which will turn into a character for a cutscene to play out. I read somewhere that the engine is updating all events on the map to check if there is any action to be done, even if I remove the walking animation, but you say I can click the fixed direction instead? I'll try that out.

As for your suggestions, I couldn't find them all (MOG and Dekita) and I tried Raizen's and TheoAllen's but they don't work for me, the game crashes immediately upon beginning of a new save file.

I found another one called Yami- Simple Lag but I don't understand the instructions though I should probably make a new thread about that one as to not confuse things.

Thank you for your help!
the game crashes immediately upon beginning of a new save file.
Normally when changing scripts you have to start a new game.
I couldn't find them all (MOG and Dekita)

mog scripts are a part of his demo
Normally when changing scripts you have to start a new game.


mog scripts are a part of his demo
Thank you I decided to use MOG's script and for now everything seems to be working fine (the rooms that froze the NPCs are fine with this one). I just have one question if you could tell me, the script says to use this command to turn on or off: $game_system.anti_lag = true

When starting a new save file, I have this script line in the first event as true, where the story begins. Do I need to reuse it for every map? Or is once in the beginning of the game sufficient for the rest of the game?
Do I need to reuse it for every map? Or is once in the beginning of the game sufficient for the rest of the game?
You would only need to use it again if you start a new game.
You would only need to use it again if you start a new game.
Alright got it, thank you very much!

Original thread: https://forums.rpgmakerweb.com/threads/events-stop-moving-not-even-doors-are-opening-when-i-leave-the-inn-and-enter-the-main-town-area.174785/