RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Common Events won't run

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 77
RMRK Junior
What the title says, I can't get common events to run in the field, they work in battle though. I might know what the problem is, I think it's a "Menu Call Common Event" script, but how do I fix this?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, I have no idea what that script is, so a link to that would be helpful.

***
Rep:
Level 77
RMRK Junior
Couldn't find a link so I got the header

Quote
#==============================================================================
# ** Menu Call Common Event (NS_CE)
# by Night5h4d3
# v 5.0
#==============================================================================

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I was unable to recreate the error. Both a Call Common Event event command and a parallel process common event worked in the field. If you can make a new project and recreate the error in there then maybe I can help you.

***
Rep:
Level 77
RMRK Junior
The script seems to be the problem. Here it is:

Quote
Code: [Select]
#==============================================================================
# ** Menu Call Common Event (NS_CE)
# by Night5h4d3
# v 5.0
#==============================================================================
module NS_CE 
  # An array of the text that will appear in the menu selection
  EVENT_NAME = ["Mail", "Comms"]
  # An array of the common events to run
  EVENT_NUM  = [15, 14]
  # These appear at game start, so if you dont want event options available at
  # the start of the game, then just remove the items.
 
#----------------------------------------------------------+
# DO NOT TOUCH BELOW UNLESS YOU REALLY KNOW WHAT YOUR DOING|
#----------------------------------------------------------+
  def self.delete_byname(name)
    EVENT_NAME.compact!
    EVENT_NUM.compact!
    for i in 0...EVENT_NAME.size
      if EVENT_NAME[i].downcase == name.downcase
        EVENT_NAME[i]  = nil
        EVENT_NUM[i]   = nil
        $scene.recreate_windows if $game_temp.from_menu == true and $game_temp.scene_now == "ME"
        break
      end
    end
  end
  def self.add_event(name, number, pos = -1)
    @name    = name
    @number  = number
    @pos     = pos
    EVENT_NAME.compact!
    EVENT_NUM.compact!
    if @name or @number != nil
      if @pos > 0
        EVENT_NAME[@pos - 1, 0] = @name
        EVENT_NUM[@pos - 1, 0]  = @number
      else
        EVENT_NAME.push(name.to_s)
        EVENT_NUM.push(number)
      end
      $scene.recreate_windows if $game_temp.from_menu == true and $game_temp.scene_now == "ME"
    end
  end
end
#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================
class Game_Temp
  attr_accessor :from_menu
  attr_accessor :scene_now
  alias :initialize_new2 :initialize
  def initialize
    initialize_new2
    @from_menu = false
    @scene_now = nil
  end
end
#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
#  An interpreter for executing event commands. This class is used within the
# Game_Map, Game_Troop, and Game_Event classes.
#==============================================================================
class Game_Interpreter
  attr_accessor :list
  alias :initialize_new :initialize
  def initialize(depth = 0, main = false)
    @list = nil
    initialize_new
  end
  #--------------------------------------------------------------------------
  # * Transfer Player
  #--------------------------------------------------------------------------
  def command_201
    return true if $game_temp.in_battle
    if $game_player.transfer? or            # Transferring Player
       $game_message.visible                # Displaying a message
      return false
    end
    if @params[0] == 0                      # Direct designation
      map_id = @params[1]
      x = @params[2]
      y = @params[3]
      direction = @params[4]
    else                                    # Designation with variables
      map_id = $game_variables[@params[1]]
      x = $game_variables[@params[2]]
      y = $game_variables[@params[3]]
      direction = @params[4]
    end
    $game_player.reserve_transfer(map_id, x, y, direction)
    @index += 1
    return false
    if $game_temp.from_menu == true
      $game_player.set_direction(direction)
      if $game_map.map_id != map_id
        $game_map.setup(map_id)
      end
      $game_player.moveto(x, y)
    end
  end
  #--------------------------------------------------------------------------
  # * Shop Processing
  #--------------------------------------------------------------------------
  alias :command_302_new :command_302
  def command_302
    command_302_new
    if $game_temp.from_menu == true
      $scene = Scene_Shop.new
    end
  end
  #--------------------------------------------------------------------------
  # * Shop Processing
  #--------------------------------------------------------------------------
  alias :command_303_new :command_303
  def command_303
    command_303_new
    if $game_temp.from_menu == true
      $scene = Scene_Name.new
    end
  end
  #--------------------------------------------------------------------------
  # * Game Over
  #--------------------------------------------------------------------------
  alias :command_353_new :command_353
  def command_353
    command_353_new
    if $game_temp.from_menu == true
      $game_temp.next_scene = nil
      $scene = Scene_Gameover.new
    end
  end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================
class Scene_Map < Scene_Base
  def initialize
    $game_temp.from_menu = false
    $game_temp.scene_now = "MA"
  end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
    NS_CE::EVENT_NAME.compact!
    NS_CE::EVENT_NUM.compact!
    $game_temp.from_menu = true
    $game_temp.scene_now = "ME"
    $pause_interpreter = !$game_temp.from_menu
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @command_window.active = false
    @message_window = Window_Message.new
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    @message_window.dispose
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @message_window.update
    @command_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    elsif !@command_window.active and $game_map.interpreter.list == nil
      recreate_windows
    elsif $game_map.interpreter.running?
      @command_window.active = false
    end
    $pause_interpreter = !$game_temp.from_menu
    unless $pause_interpreter
      $game_map.interpreter.update
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_array = [s1, s2, s3, s4, s5, s6]
    if NS_CE::EVENT_NAME.size > 0
      @command_window = Window_Command.new(160, @command_array + NS_CE::EVENT_NAME)
    else
      @command_window = Window_Command.new(160, @command_array)
    end
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end
  end
  #--------------------------------------------------------------------------
  # * Recreate Windows
  #--------------------------------------------------------------------------
  def recreate_windows
    @old_size = NS_CE::EVENT_NAME.size
    NS_CE::EVENT_NAME.compact! if NS_CE::EVENT_NAME.include?(nil)
    NS_CE::EVENT_NUM.compact! if NS_CE::EVENT_NUM.include?(nil)
    @gold_window.refresh
    @status_window.refresh
    @old_index = @command_window.index
    @command_window.dispose
    create_command_window
    unless @old_size == NS_CE::EVENT_NAME.size
      @command_window.index = @old_index - 1
    else
      @command_window.index = @old_index
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
      when 5      # End Game
        $scene = Scene_End.new
      else
        if @command_window.index >= 6
          @command_window.active = false
          $game_map.interpreter.setup($data_common_events[NS_CE::EVENT_NUM[@command_window.index - 6]].list, 0)
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end
#==============================================================================
# ** Scene_Shop
#------------------------------------------------------------------------------
#  This class performs shop screen processing.
#==============================================================================
class Scene_Shop < Scene_Base
  def initialize
    $game_temp.next_scene = nil
    $game_temp.scene_now = "SH"
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      if $game_temp.from_menu == true
        $scene = Scene_Menu.new
      else
        $scene = Scene_Map.new
      end
    elsif Input.trigger?(Input::C)
      case @command_window.index
      when 0  # buy
        Sound.play_decision
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # sell
        if $game_temp.shop_purchase_only
          Sound.play_buzzer
        else
          Sound.play_decision
          @command_window.active = false
          @dummy_window.visible = false
          @sell_window.active = true
          @sell_window.visible = true
          @sell_window.refresh
        end
      when 2  # Quit
        Sound.play_decision
        if $game_temp.from_menu == true
          $scene = Scene_Menu.new
        else
          $scene = Scene_Map.new
        end
      end
    end
  end
end
#==============================================================================
# ** Scene_Name
#------------------------------------------------------------------------------
#  This class performs name input screen processing.
#==============================================================================
class Scene_Name < Scene_Base
  def initialize
    $game_temp.next_scene = nil
    $game_temp.scene_now = "NM"
  end
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    if $game_temp.from_menu == true
      $scene = Scene_Menu.new
    else
      $scene = Scene_Map.new
    end
  end
  def update
    super
    update_menu_background
    @edit_window.update
    @input_window.update
    if Input.repeat?(Input::B)
      if @edit_window.index > 0             # Not at the left edge
        Sound.play_cancel
        @edit_window.back
      end
    elsif Input.trigger?(Input::C)
      if @input_window.is_decision          # If cursor is positioned on [OK]
        if @edit_window.name == ""          # If name is empty
          @edit_window.restore_default      # Return to default name
          if @edit_window.name == ""
            Sound.play_buzzer
          else
            Sound.play_decision
          end
        else
          @actor.name = @edit_window.name
          Sound.play_decision
          @actor.name = @edit_window.name unless @actor.name == @edit_window.name
          return_scene
        end
      elsif @input_window.character != ""   # If text characters are not empty
        if @edit_window.index == @edit_window.max_char    # at the right edge
          Sound.play_buzzer
        else
          Sound.play_decision
          @edit_window.add(@input_window.character)       # Add text character
        end
      end
    end
  end
end


Items and Skills don't work. Call Common Event will call the last common event the game failed to call, but is otherwise normal. Autorun/Parallel Process seems to work normally

***
Rep:
Level 77
RMRK Junior
I'm using Yanfly's System Options script and whenever I start a game the switches for Battle Animations, Autocursors and Auto Next Actor are turned on, but the options themselves are not when I go to the menu, which is very misleading. The change saves to the save file as normal. What could be wrong? (Also, no one's helping me anymore... :'()

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, I don't really have time to look through a bunch of other people's scripts, sorry. Try asking the creators of them for fixes.