Introduction
This script is a replacement for the RPGMaker XP's main menu for those who would like to access each menu function (Item, Skill, Equip) from defined hotkeys rather than accessing a main screen with the ESC key. These menu options are not separate menu entities like Scene_Item, but are part of the Scene_Map class and as such, the end user may let map events continue to run while up.
As stated, this is an RPGMaker XP script that requires a keyboard system. And it's not that plug-n-play as you will soon find out. BUT... a decent tool to learn from and base some custom works upon.
The SDK
I found the initial release HATED the SDK, so I made a 2nd version that had two autodetect systems that looked for the SDK and altered the system's behavior suitably.
Compatability
Fat chance. Without some work, scripts made to work the the main menu will not function with this system.
And this is not an SDK script. If it were, it might have been a bit smaller, though only a bit smaller.
A few patches I wrote so it can work with a few other scripts:
Event Spawner
Code:
#==============================================================================
# ** Menu-In-Map Patch: SephirothSpawn's Event Spawner
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 09-07-2011
# RGSS / RPGMaker XP
#------------------------------------------------------------------------------
# Place below both Menu-In-Map and SephirothSpawn's Event System to work.
# If used with other scripts that save to the save-file, you may need to
# reorder these patches.
#==============================================================================
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs map screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Write Save Data
# file : write file object (opened)
#--------------------------------------------------------------------------
alias seph_eventspawner_save_data write_save_data
def write_save_data(file)
# Perform the original call
seph_eventspawner_save_data(file)
# Saves Saved Event Data
Marshal.dump(Event_Spawner.saved_events, file)
end
end
Kylock's Time System
Code:
#==============================================================================
# ** Menu-In-Map Patch: Kylock's Time System
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 09-07-2011
# RGSS / RPGMaker XP
#------------------------------------------------------------------------------
# Place below both Menu-In-Map and Kylock's Time System to work.
# If used with other scripts that save to the save-file, you may need to
# reorder these patches.
#==============================================================================
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs map screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Write Save Data
# file : write file object (opened)
#--------------------------------------------------------------------------
alias kts_write_save_data write_save_data
def write_save_data(file)
kts_write_save_data(file)
Marshal.dump($kts, file)
end
end
Mellie-Mel's Calendar System
Code:
#==============================================================================
# ** Menu-In-Map Patch: Melly-Mel's Calendar System
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 09-07-2011
# RGSS / RPGMaker XP
#------------------------------------------------------------------------------
# Place below both Menu-In-Map and Melly-Mel's Calendar System to work.
# If used with other scripts that save to the save-file, you may need to
# reorder these patches.
#==============================================================================
#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
# This class performs save screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Write Save Data
# file : write file object (opened)
#--------------------------------------------------------------------------
alias dn_write_save_data write_save_data
def write_save_data(file)
# Perform the original call
dn_write_save_data(file)
# Write the $game_time object
Marshal.dump($game_time, file)
end
end
Multi-Slots!
Code:
#==============================================================================
# ** Menu-In-Map Patch: Multi-Slots!
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 09-07-2011
# RGSS / RPGMaker XP
#------------------------------------------------------------------------------
# Place below both Menu-In-Map and MultiSlots to work.
# If used with other scripts that change the equipment menu, you may need to
# reorder some scripts.
#==============================================================================
#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
# This class performs equipment screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Create Menu Windows
#--------------------------------------------------------------------------
alias multi_menu_in_map_windows menu_in_map_windows
def menu_in_map_windows
multi_menu_in_map_windows
multi_menu_in_map_windows_equip
end
#--------------------------------------------------------------------------
# * Dispose Menu Windows
#--------------------------------------------------------------------------
alias multi_menu_in_map_dispose menu_in_map_dispose
def menu_in_map_dispose
multi_menu_in_map_dispose
multi_menu_in_map_dispose_equip
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def multi_menu_in_map_windows_equip
# Create additional windows
if MSlots::ARMOR_SLOT_NAMES.size > 0
for i in 0...MSlots::ARMOR_SLOT_NAMES.size
eval("@equip_window#{i + 6} = Window_EquipItem.new(@actor, i + 5)")
eval("@equip_window#{i + 6}.visible = false")
end
end
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def multi_menu_in_map_dispose_equip
# Dispose of additional windows
if MSlots::ARMOR_SLOT_NAMES.size > 0
for i in 0...MSlots::ARMOR_SLOT_NAMES.size
eval("@equip_window#{i + 6}.dispose if @equip_window#{i + 6} != nil")
end
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
return unless @help_equip_window.visible == true
# Associate all Help Windows
for i in 0...RPG::slot_names.size
eval("@equip_window#{i + 1}.help_window = @help_equip_window")
end
# Set all item windows to visible
for i in 0...RPG::slot_names.size
eval("@equip_window#{i + 1}.visible = (@right_window.type == i )")
end
# Get currently equipped item
item1 = @right_window.item
# Set current item window to @equip_window
eval("@equip_window = @equip_window#{@right_window.type + 1}")
eval("@equip_window.opacity = Menu_in_Map::OPACITY_EQUIP[0]")
eval("@equip_window.back_opacity = Menu_in_Map::OPACITY_EQUIP[1]")
# Erase parameters if the right window is active
if @right_window.active
# Get currently highlighted item
item2 = @right_window.item
elem_text = make_elem_text(item2)
stat_text = make_stat_text(item2)
@left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil,
elem_text, stat_text)
# Check for left window mode
if @actor.two_weapons
case @right_window.index
when 0..1 ; newmode = 0 # Weapon(s)
when 2...@actor.equip_type.size ; newmode = 1 # Armor
end
else
case @right_window.index
when 0 ; newmode = 0 # Weapon
when 1...@actor.equip_type.size ; newmode = 1 # Armor
end
end
# Refresh if mode changed
if newmode != @left_window.mode
@left_window.mode = newmode
@left_window.refresh
end
end
# If item window is active
if @equip_window.active
# Get currently selected item
item2 = @equip_window.item
# Determine transparency for blocked items
if @actor.dual_wield?
if item2.is_a?(RPG::Weapon) && item2.two_handed
if @actor.monkeygrip == true
@right_window.translucent_text = [false, false]
else
# Can be a 2-h in either hand
if @right_window.index == 0 # Slot 1
@right_window.translucent_text = [false, true]
@right_window.refresh
else # Slot #2
@right_window.translucent_text = [true, false]
@right_window.refresh
end
end
end
else
# Weapon only in 1 hand, other is shield
if item2.is_a?(RPG::Weapon) && item2.two_handed
if @actor.monkeygrip == true
@right_window.translucent_text = [false, false]
else
@right_window.translucent_text = [false, true]
end
@right_window.refresh
end
end
# Change equipment
last_hp = @actor.hp
last_sp = @actor.sp
old_atk = @actor.atk
old_pdef = @actor.pdef
old_mdef = @actor.mdef
old_str = @actor.str
old_dex = @actor.dex
old_agi = @actor.agi
old_int = @actor.int
old_eva = @actor.eva
if @actor.two_weapons
case @right_window.index
when 0..1 # weapons
@actor.set_weapon(@right_window.index, item2 == nil ? 0 : item2.id)
# Remove autostate for 2nd weapon slot
if item1.is_a?(RPG::Weapon) && item2.is_a?(RPG::Weapon)
@actor.update_auto_state(nil, nil)
elsif item2.is_a?(RPG::Weapon)
@actor.update_auto_state(nil, nil)
else
@actor.update_auto_state(nil, item2)
end
when 2...@actor.equip_type.size # armor
@actor.armor_id[@right_window.index] = (item2 == nil ? 0 : item2.id)
for i in 2...@actor.equip_type.size
@actor.update_auto_state(item1, item2)
end
end
else
case @right_window.index
when 0 # weapon
@actor.weapon_id = (item2 == nil ? 0 : item2.id)
when 1...@actor.equip_type.size # armor
@actor.armor_id[@right_window.index] = (item2 == nil ? 0 : item2.id)
for i in 1...@actor.equip_type.size
# Remove autostate for 2nd weapon slot
if item2.is_a?(RPG::Weapon)
@actor.update_auto_state(item1, nil)
else
@actor.update_auto_state(item1, item2)
end
end
end
end
# Get parameters for after equipment change
new_atk = @actor.atk
new_pdef = @actor.pdef
new_mdef = @actor.mdef
new_str = @actor.str
new_dex = @actor.dex
new_agi = @actor.agi
new_int = @actor.int
new_eva = @actor.eva
# Check change direction
@left_window.changes = [0, 0, 0, 0, 0, 0, 0, 0]
@left_window.changes[0] = 1 if new_atk > old_atk
@left_window.changes[0] = -1 if new_atk < old_atk
@left_window.changes[1] = 1 if new_pdef > old_pdef
@left_window.changes[1] = -1 if new_pdef < old_pdef
@left_window.changes[2] = 1 if new_mdef > old_mdef
@left_window.changes[2] = -1 if new_mdef < old_mdef
@left_window.changes[3] = 1 if new_str > old_str
@left_window.changes[3] = -1 if new_str < old_str
@left_window.changes[4] = 1 if new_dex > old_dex
@left_window.changes[4] = -1 if new_dex < old_dex
@left_window.changes[5] = 1 if new_agi > old_agi
@left_window.changes[5] = -1 if new_agi < old_agi
@left_window.changes[6] = 1 if new_int > old_int
@left_window.changes[6] = -1 if new_int < old_int
@left_window.changes[7] = 1 if new_eva > old_eva
@left_window.changes[7] = -1 if new_eva < old_eva
elem_text = make_elem_text(item2)
stat_text = make_stat_text(item2)
# Return equipment
if @actor.two_weapons
case @right_window.index
when 0..1 # weapon
@actor.set_weapon(@right_window.index, item1 == nil ? 0 : item1.id)
# Remove autostate for 2nd weapon slot
if item1.is_a?(RPG::Weapon) && item2.is_a?(RPG::Weapon)
@actor.update_auto_state(nil, nil)
elsif item2.is_a?(RPG::Weapon)
@actor.update_auto_state(nil, nil)
else
@actor.update_auto_state(item2, nil)
end
when 2...@actor.equip_type.size # armor
@actor.armor_id[@right_window.index] = (item1 == nil ? 0 : item1.id)
for i in 2...@actor.equip_type.size
@actor.update_auto_state(item2, item1)
end
end
else
case @right_window.index
when 0 # weapon
@actor.weapon_id = (item1 == nil ? 0 : item1.id)
when 1...@actor.equip_type.size # armor
@actor.armor_id[@right_window.index] = (item1 == nil ? 0 : item1.id)
for i in 1...@actor.equip_type.size
if item2.is_a?(RPG::Weapon)
@actor.update_auto_state(nil, item1)
else
@actor.update_auto_state(item2, item1)
end
end
end
end
@actor.hp = last_hp
@actor.sp = last_sp
# Draw in left window
@left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str,
new_dex, new_agi, new_int, new_eva, elem_text, stat_text)
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias mSlots_update update
def update
# If item_window value is changed
if @right_window.index != @old_index
@right_window.translucent_text = [false, false]
@right_window.refresh
end
@old_index = @right_window.index
# Perform the original call
mSlots_update
end
#--------------------------------------------------------------------------
# * Frame Update Input: Equip
#--------------------------------------------------------------------------
alias ms_menu menu_in_map_update_input_equip
def menu_in_map_update_input_equip
if Input.trigger?(Menu_in_Map::HOTKEY_EQUIP)
@right_window.refresh
end
ms_menu
end
#--------------------------------------------------------------------------
# * Frame Update (when right window is active)
#--------------------------------------------------------------------------
alias mSlots_update_right update_right
def update_right
if Input.press?(Input::B)
if MSlots::ARMOR_SLOT_NAMES.size > 0
for i in 0...MSlots::ARMOR_SLOT_NAMES.size
eval("@equip_window#{i + 6}.visible = false")
end
end
end
if Input.press?(Input::C)
item = @right_window.item
unless item == nil
if item.cursed
$game_system.se_play($data_system.buzzer_se)
return
end
end
update_second_weapon
@right_window.refresh
end
# Refresh the 2nd weapon's item window
if Input.repeat?(Input::R) or Input.repeat?(Input::L) or
Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN) then
update_second_weapon
@equip_window.refresh
end
# Perform the original call
mSlots_update_right
end
#--------------------------------------------------------------------------
# * Frame Update (when item window is active)
#--------------------------------------------------------------------------
alias mSlots_update_item update_equip
def update_equip
# if C button was pressed
if Input.trigger?(Input::C)
# Get currently selected data on the item window
item = @equip_window.item
# Play equip SE
$game_system.se_play($data_system.equip_se)
if @right_window.index == 1
if @actor.dual_wield?
if item.is_a?(RPG::Weapon)
@actor.two_weapons = true
else
@actor.two_weapons = false
end
end
end
# Change equipment
@actor.equip(@right_window.index, item == nil ? 0 : item)
# Update auto state
for i in 1...@actor.equip_type.size
if i == 1 && @actor.two_weapons
@actor.update_auto_state(nil, nil)
else
@actor.update_auto_state(nil, $data_armors[@actor.armor_id[i]])
end
end
# Activate right window
@right_window.active = true
@equip_window.active = false
@equip_window.index = -1
# Erase parameters for after equipment change
@left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil,
"", "")
# Remake right window and item window contents
@right_window.refresh
for i in 1..(MSlots::ARMOR_SLOT_NAMES.size + 5)
eval("@equip_window#{i}.refresh")
end
return
end
# Perform the original call
mSlots_update_item
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update_second_weapon
@equip_window.second_weapon = false
@equip_window.second_weapon = true if @actor.dual_wield? && @right_window.index == 1
end
#--------------------------------------------------------------------------
# * Make Element Text
# item : item
#--------------------------------------------------------------------------
def make_elem_text(item)
text = ""
flag = false
if item.is_a?(RPG::Weapon)
for i in item.element_set - MSlots::ELEM_IGNORE
text += ", " if flag
text += $data_system.elements[i]
flag = true
end
end
if item.is_a?(RPG::Armor)
for i in item.guard_element_set - MSlots::ELEM_IGNORE
text += ", " if flag
text += $data_system.elements[i]
flag = true
end
end
return text
end
#--------------------------------------------------------------------------
# * Make Status Text
# item : item
#--------------------------------------------------------------------------
def make_stat_text(item)
text = ""
flag = false
if item.is_a?(RPG::Weapon)
for i in item.plus_state_set
if flag
text += ", "
end
text += $data_states[i].name
flag = true
end
end
if item.is_a?(RPG::Armor)
for i in item.guard_state_set
if flag
text += ", "
end
text += $data_states[i].name
flag = true
end
end
return text
end
end
MrMo's ABS Ultimate
Code:
#==============================================================================
# ** Menu-In-Map Patch: MrMo's ABS Ultimate Patch
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 09-07-2011
# RGSS / RPGMaker XP
#------------------------------------------------------------------------------
# Place below both Menu-In-Map and MrMo's ABS Ultimate to work.
# If used with other scripts that save to the save-file, you may need to
# reorder these patches.
#==============================================================================
#==============================================================================
# ** MAP IN MENU CONFIGURATION **
#==============================================================================
module Menu_in_Map
# Whether the hud system is hidden automatically if a menu is visible
# Default = true
#
HUD_SYSTEM = true
# Whether DerVVulfman's MiniMap is hidden automatically if a menu is visible
# Default = true
#
MINI_SYSTEM = true
end
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Determine if Item is Usable
# item_id : item ID
#--------------------------------------------------------------------------
alias mrmo_ult_mim_item_can_use? item_can_use?
def item_can_use?(item_id)
return false if MrMoABS::MENU_NOITEM == true
return mrmo_ult_mim_item_can_use?(item_id)
end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Determine if Skill can be Used
# skill_id : skill ID
#--------------------------------------------------------------------------
def skill_can_use?(skill_id)
return false if MrMoABS::MENU_NOSKILL
return super(skill_id)
end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs map screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
alias mrmo_moabs_scene_item_main main
def main
@ihk_window = Window_Command.new(250, [$ABS.HOTKEY_SAY.to_s])
@ihk_window.visible = false
@ihk_window.active = false
@ihk_window.x = 200
@ihk_window.y = 250
@ihk_window.z = 1500
@shk_window = Window_Command.new(250, [$ABS.HOTKEY_SAY.to_s])
@shk_window.visible = false
@shk_window.active = false
@shk_window.x = 200
@shk_window.y = 250
@shk_window.z = 1500
# The original call
mrmo_moabs_scene_item_main
# Dispose
@ihk_window.dispose unless $mim_sdk1_detect == true
@shk_window.dispose unless $mim_sdk1_detect == true
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias mrmo_moabs_scene_item_update update
def update
@ihk_window.update if @ihk_window.active
@shk_window.update if @shk_window.active
# Original Call
mrmo_moabs_scene_item_update
# Auto-hides the hud if a menu is up
if Menu_in_Map::HUD_SYSTEM
if $game_temp.menu_in_map_use == true
@mrmo_hud.visible = @mrmo_hud2.visible = false
else
@mrmo_hud.visible = @mrmo_hud2.visible = true
end
end
# Auto-hide the minimap if menu is up
if Menu_in_Map::MINI_SYSTEM == true
if $game_temp.menu_in_map_use == true
$game_switches[MM_SW_ID] = false
else
$game_switches[MM_SW_ID] = true
end
end
return update_ihk if @ihk_window.active
return update_shk if @shk_window.active
end
#--------------------------------------------------------------------------
# * Frame Update (if item window is active)
#--------------------------------------------------------------------------
alias mrmo_moabs_scene_item_update_item update_item
def update_item
mrmo_moabs_scene_item_update_item
#Get all the keys
for key in $ABS.item_keys.keys
next if !@item_window.item.is_a?(RPG::Item) or @item_window.item.occasion == 3
#Check is the the key is pressed
next if !Input.trigger?(key)
#Play decision
$game_system.se_play($data_system.decision_se)
#Record Item
$ABS.item_keys[key] = @item_window.item.id
@item_window.active = false
@ihk_window.active = @ihk_window.visible = true
end
end
#--------------------------------------------------------------------------
# * Frame Update (if item window is active)
#--------------------------------------------------------------------------
alias mrmo_moabs_scene_skill_update_skill update_skill
def update_skill
mrmo_moabs_scene_skill_update_skill
#Get all the keys
for key in $ABS.skill_keys.keys
#Check is the the key is pressed
next if !Input.trigger?(key)
#Play decision
$game_system.se_play($data_system.decision_se)
#Record Skill
$ABS.skill_keys[key] = @skill_window.skill.id
@skill_window.active = false
@shk_window.active = @shk_window.visible = true
end
end
#--------------------------------------------------------------------------
# * Frame Update Item Hot Key
#--------------------------------------------------------------------------
def update_ihk
#Return if Enter isn't pressed
return if !Input.trigger?(Input::C)
#Play decision
$game_system.se_play($data_system.decision_se)
@ihk_window.active = @ihk_window.visible = false
@item_window.active = true
end
#--------------------------------------------------------------------------
# * Frame Update Skill Hot Key
#--------------------------------------------------------------------------
def update_shk
#Return if Enter isn't pressed
return if !Input.trigger?(Input::C)
#Play decision
$game_system.se_play($data_system.decision_se)
@shk_window.active = @shk_window.visible = false
@skill_window.active = true
end
#--------------------------------------------------------------------------
# * Write Save Data
# file : write file object (opened)
#--------------------------------------------------------------------------
alias mrmo_abs_scene_save_write_data write_save_data
def write_save_data(file)
mrmo_abs_scene_save_write_data(file)
Marshal.dump($ABS, file)
Marshal.dump($game_companions,file)
end
end
Bump to version 1.1 as I found the script didn't function well with either SDK version 1.5 (yes, I have a copy) and later 2.0+ versions. Auto-detect functions now included and instructions on what a would-be user/scripter may want to look into.
----
Bump to version 1.2. If a player/actor increases level on the map rather than in a battlesystem, they would not show in the menu without being 'refreshed' first. Had to take care of that little detail.