Jump to content
Sign in to follow this  
Biverix

Help me reference a journal script inside a custom menu script

Recommended Posts

Namely, I am intending to use Mjshi's Basic Non-Combat Menu, and also McDohl's Retcon Journal.

 

The two are totally compatible with each other and I've tested calling the journal script with the menu script active and it's perfectly fine. However, I can only call on the journal script via triggering events that run SceneManager.call, as the default VX Ace menu is suspended and the journal script modifies that menu to be accessible from it.

Could somebody help me out and tell me how I can modify the Non-Combat Menu script so I can select the Journal scene from it? I know next to nothing about scripting, so I hope this doesn't sound too confusing. Thanks in advance!

 

 

EDIT: I found a temporary solution by way of having a Journal key item that calls a common event displaying the journal scene, like in Ahriman's Prophecy, for example; but I'd still much prefer to be able to access it from the menu.

Edited by Biverix

Share this post


Link to post
Share on other sites

Do you want to just add a new command?

 

You just need to edit the  Basic Non-Combat Menu script.

 

1) Line 194 (by default)

Add a new line:

 

 

def create_command_window 
@command_window = Window_GameEnd.new 
@command_window.set_handler(:status, method(:command_status)) 
# JOURNAL COMMAND BELOW:
@command_window.set_handler(:journal, method(:command_journal)) 

@command_window.set_handler(:save, method(:command_save)) 
# Add a load command 
@command_window.set_handler(:load, method(:command_load)) 
@command_window.set_handler(:item, method(:command_item)) 
@command_window.set_handler(:shutdown, method(:command_shutdown)) 
@command_window.set_handler(:cancel, method(:return_scene)) 
end 

 

 

 

then create a new method for it:

Line 204 (by default)

 

 

def command_status 
SceneManager.call(Scene_Status) 
end 

#JOURNAL COMMAND:
def command_journal
SceneManager.call(Scene_PUTTHESCENEHERE) 
end

def command_item 
SceneManager.call(Scene_Item) 
end 
def command_save 
SceneManager.call(Scene_Save) 
end 
# Defines the load command 
def command_load 
SceneManager.call(Scene_Load) 
end 

 

 

And add that to the command window:

Line 221 (by default)

 

 

def make_command_list 
# Checks each item, then shows or hides based on configuration 
NonCombatMenu::SHOW_ITEM ? add_command(Vocab::item, :item) : nil 

#JOURNAL COMMAND (can be put in other line - if you'll paste it here
#                 then it will be below item and above status commands.
#Also this line is shorter than the other ones near it, because there is no 
#  'SHOW' setting from the configuration at the beginning of the script hooked to it.
add_command("Journal", :journal)
                ^
#   Change the name of the command

NonCombatMenu::SHOW_STATUS_TAB ? add_command(Vocab::status, :status) : nil 
NonCombatMenu::SHOW_SAVE ? add_command(Vocab::save, :save) : nil 
NonCombatMenu::SHOW_LOAD ? add_command("Load", :load) : nil 
NonCombatMenu::SHOW_CANCEL ? add_command(Vocab::cancel, :cancel) : nil 
NonCombatMenu::SHOW_EXIT ? add_command(Vocab::shutdown, :shutdown) : nil 
end 

 

 

If there'll be any problems, then I can edit the script for you. (=

Share this post


Link to post
Share on other sites

Glad could help glad could help glad could help! :D

9RWO0dm.pngThis thread is closed, due to being solved. If for some reason you would like to re-open this thread, just send me a PM. (=

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted