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.

Adding Content

Reliez

Member

Hey there, this might seem like a very odd request, and I'm not sure if it could be done or not, but here it is:
Is there a way where once a certain task is completed (i.e. events, npc, obatining a Key Item) it can "activate" a script in RMVX?
For example, I am using Dargor's Beastiary Script, but I want to be able to activate this script, and add a menu option going to the beastiary after receiving an item.
So is there any script I can put in events where after "talking" to an NPC, these scripts will be active, and their corresponding Menu/ battle menu options will be added and the menus updated?

I only have a tiny understanding of RGSS2, but I assume this could be done with some sort of conditional statement inside the actual script, and then turned "true" in the event, but of course I have no idea , I'm just taking a wild guess , and even then I wouldn't know how to script it . . . :down:

I know it sounds confusing, but if anyone could help me out, it'd be great! :thumb:
 
Yup, someone could probably script a way to check if a switch is on before activating the script, and all you have to do is turn on the switch after talking to an NPC.

But could you post the script (or a link to it) first?
 

Reliez

Member

Regi":2avibih2 said:
Yup, someone could probably script a way to check if a switch is on before activating the script, and all you have to do is turn on the switch after talking to an NPC.

But could you post the script (or a link to it) first?

Yeah, the actual beastiary Script is here: Dargor's Beastiary
So basically, I just want it to be active, after talking to an NPC.
Maybe like After talking to an NPC, it'll contain the event Beastiaryactive=true or something like that, and an actual section of the Script that checks if it is active, and if so, to star processing.
For my Menu, which the option for the beastiary would preferably show up if active as well, is here:
#==============================================================================
# ** Vocab
#------------------------------------------------------------------------------
#  This module defines terms and messages. It defines some data as constant
# variables. Terms in the database are obtained from $data_system.
#==============================================================================
module Vocab
  # Party
  def self.party
    return "Party"
  end
end
module Vocab
  # Party
  def self.beastiary
    return "Beastiary"
  end
end
#==============================================================================
# ** End Vocab
#------------------------------------------------------------------------------
###############################################################################
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This class performs the save and load screen processing.
#==============================================================================
class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(5)
    end
  end
end
#==============================================================================
# ** End Scene_File
#------------------------------------------------------------------------------
###############################################################################
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
#  This class performs game end screen processing.
#==============================================================================
class Scene_End < Scene_Base
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Menu.new(6)
  end
end
#==============================================================================
# ** End Scene_End
#------------------------------------------------------------------------------
###############################################################################

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::beastiary
    s6 = Vocab::party
    s7 = Vocab::save
    s8 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
    @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
      @command_window.draw_item(4, false)    # Disable party
      @command_window.draw_item(5, false)    # Disable Beastiary
    end
    if $game_system.save_disabled            # If save is forbidden
      @command_window.draw_item(6, false)    # Disable save
    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 < 6
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 6
        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 #Beastiary
        $scene = Scene_Bestiary.new
      when 5      # Party
        $scene = Scene_PartyForm.new
      when 6      # Save
        $scene = Scene_File.new(true, false, false)
      when 7      # End Game
        $scene = Scene_End.new
      end
    end
  end
end
#==============================================================================
# ** End Scene_Menu
#------------------------------------------------------------------------------
 

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