- Joined
- Jul 22, 2014
- Messages
- 5,624
- Reaction score
- 5,104
- First Language
- English
- Primarily Uses
- RMVXA
This is a relatively difficult question and I've done a lot of custom scripting, so while I'd be incredibly grateful for a solution, even just a brainstorm of ideas or a point in the right direction would be appreciated.
For a while, I have noticed that when I do a Battle Test, and choose "Item", no items show up. You can visit the Item Select screen in battle but nothing will show up and pressing the C button on the one blank space that's selectable will give you the buzzer SE. Adding an item during battle via event seems to do nothing - visiting the Item Select screen in battle after doing so will still yield the same result.
This wasn't a big problem until recently - I would just create any battle I needed to test with items inside a test area map, and mark it as the Start Point. Here, items would show up just fine.
However, today I was creating a new game mode ("Boss Rush") that simply warps you to a map from the Title Screen (after doing what I think is the necessary setup) where an Autorun event starts a battle, and in this new Game Mode I get the same problem where items don't show up. I found some interesting extra things while playing around with this - when I make the event on this map simply give the player items (and then let them go to the menu screen before any battles), you still cannot see any items, and a special script that I have run to tell the player they gained items doesn't trigger. Meanwhile, if I jump to this "battle map" from the test area map, instead of directly from the Title Screen, everything works fine. I can see the items on the menu AND in battle just fine.
So my instinct is that either the Party, the Inventory, or some other Inventory-related mechanism is not being created correctly except via the New/Load game commands. I searched around and changed different things for hours, with no effect. I'll paste some of the relevant things I've changed in Scene_Title, DataManager, etc. below. If you know the constructs and methods that are normally used to create the player's inventory, or if you have any ideas about other things I might try to get this to work properly, please share! Thanks so much
The huge amount of custom scripting that's all tied together makes it impractical to try disabling scripts one by one. However, I can say that in a completely clean project, Battle Tests work fine - you can see the player's inventory.
Here are what I think are the most relevant snippets from my custom scripting. If you have specific classes or methods you want to see, let me know and I'll add them here.
Snippets from modifications to DataManager
Snippets from modifications to Scene_Title
For a while, I have noticed that when I do a Battle Test, and choose "Item", no items show up. You can visit the Item Select screen in battle but nothing will show up and pressing the C button on the one blank space that's selectable will give you the buzzer SE. Adding an item during battle via event seems to do nothing - visiting the Item Select screen in battle after doing so will still yield the same result.
This wasn't a big problem until recently - I would just create any battle I needed to test with items inside a test area map, and mark it as the Start Point. Here, items would show up just fine.
However, today I was creating a new game mode ("Boss Rush") that simply warps you to a map from the Title Screen (after doing what I think is the necessary setup) where an Autorun event starts a battle, and in this new Game Mode I get the same problem where items don't show up. I found some interesting extra things while playing around with this - when I make the event on this map simply give the player items (and then let them go to the menu screen before any battles), you still cannot see any items, and a special script that I have run to tell the player they gained items doesn't trigger. Meanwhile, if I jump to this "battle map" from the test area map, instead of directly from the Title Screen, everything works fine. I can see the items on the menu AND in battle just fine.
So my instinct is that either the Party, the Inventory, or some other Inventory-related mechanism is not being created correctly except via the New/Load game commands. I searched around and changed different things for hours, with no effect. I'll paste some of the relevant things I've changed in Scene_Title, DataManager, etc. below. If you know the constructs and methods that are normally used to create the player's inventory, or if you have any ideas about other things I might try to get this to work properly, please share! Thanks so much
The huge amount of custom scripting that's all tied together makes it impractical to try disabling scripts one by one. However, I can say that in a completely clean project, Battle Tests work fine - you can see the player's inventory.
Here are what I think are the most relevant snippets from my custom scripting. If you have specific classes or methods you want to see, let me know and I'll add them here.
Snippets from modifications to DataManager
module DataManager #-------------------------------------------------------------------------- # * Set Up New Boss Rush #-------------------------------------------------------------------------- def self.setup_new_bossrush create_game_objects $game_party.setup_starting_members $game_map.setup(33) $game_player.moveto(0, 0) $game_player.refresh Graphics.frame_count = 0 end endmodule DataManager class << self #-------------------------------------------------------------------------- # * Set Up Battle Test #-------------------------------------------------------------------------- alias :setup_btest_with_globals :setup_battle_test def setup_battle_test load_global_data setup_btest_with_globals end end# Note: load_global_data is a sensitive method, but shouldn't be# relevant to this problem. The Title screen uses it too# and that's where you launch a New Game from.end
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
alias :start_with_globals :start
def start
DataManager.load_global_data
start_with_globals
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
alias :create_alternate_title_window :create_command_window
def create_command_window
create_alternate_title_window
@command_window.set_handler
arcade, method
command_arcade))
@command_window.set_handler
bossrush, method
command_bossrush))
@command_window.set_handler
options, method
command_options))
end
#--------------------------------------------------------------------------
# * Select Boss Rush Mode
#--------------------------------------------------------------------------
def command_bossrush
reconcile_game_scores # This is irrelevant so ignore it. I already tried removing it. Didn't work.
$mode = "Boss Rush"
DataManager.setup_new_bossrush
# NOTE: The following is disabled but was once used instead of calling the setup_new_bossrush
# method. In both cases, I get the same problem: Items don't show up.
#~ $game_map.setup(33)
#~ $game_player.moveto(0, 0)
#~ $game_player.refresh
#~ Graphics.frame_count = 0
#~
#~ fadeout_all
#~ Audio.bgm_stop
#~ $game_map.autoplay
#~ tone = Tone.new(0,0,0,0)
#~ $game_map.screen.start_tone_change(tone, 1)
SceneManager.goto(Scene_Map) # This is ENABLED.
end
#--------------------------------------------------------------------------
# * [New Game] Command - also sets the Mode to Adventure
#--------------------------------------------------------------------------
alias :command_new_game_with_mode :command_new_game
def command_new_game
$mode = "Adventure"
command_new_game_with_mode
end
#--------------------------------------------------------------------------
# * [Continue] Command - also sets the Mode to Adventure
#--------------------------------------------------------------------------
alias :command_continue_with_mode :command_continue
def command_continue
$mode = "Adventure"
command_continue_with_mode
end
end
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
alias :start_with_globals :start
def start
DataManager.load_global_data
start_with_globals
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
alias :create_alternate_title_window :create_command_window
def create_command_window
create_alternate_title_window
@command_window.set_handler
@command_window.set_handler
@command_window.set_handler
end
#--------------------------------------------------------------------------
# * Select Boss Rush Mode
#--------------------------------------------------------------------------
def command_bossrush
reconcile_game_scores # This is irrelevant so ignore it. I already tried removing it. Didn't work.
$mode = "Boss Rush"
DataManager.setup_new_bossrush
# NOTE: The following is disabled but was once used instead of calling the setup_new_bossrush
# method. In both cases, I get the same problem: Items don't show up.
#~ $game_map.setup(33)
#~ $game_player.moveto(0, 0)
#~ $game_player.refresh
#~ Graphics.frame_count = 0
#~
#~ fadeout_all
#~ Audio.bgm_stop
#~ $game_map.autoplay
#~ tone = Tone.new(0,0,0,0)
#~ $game_map.screen.start_tone_change(tone, 1)
SceneManager.goto(Scene_Map) # This is ENABLED.
end
#--------------------------------------------------------------------------
# * [New Game] Command - also sets the Mode to Adventure
#--------------------------------------------------------------------------
alias :command_new_game_with_mode :command_new_game
def command_new_game
$mode = "Adventure"
command_new_game_with_mode
end
#--------------------------------------------------------------------------
# * [Continue] Command - also sets the Mode to Adventure
#--------------------------------------------------------------------------
alias :command_continue_with_mode :command_continue
def command_continue
$mode = "Adventure"
command_continue_with_mode
end
end

