Script Bundle: One-Player Menu + Mobius's Quest Journal

Discussion in 'RGSS Scripts (RMXP)' started by mjshi, Jul 9, 2015.

  1. mjshi

    mjshi Jack of Most Trades Veteran

    Messages:
    837
    Likes Received:
    657
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    Mobius's Quest Journal 2.0 and Tigerus Fay's One-Player Menusystem

    compatibilityized by mjshi

    (Mobius's Quest Journal (hereafter referred to quest journal) is CC Attribution Sharealike Tigerus Fay's One-Player Menusystem (hereafter referred to as 1P menu and/or one player menu) is CC Attribution Noncommercial Sharealike. This means you can't use the one player menu script in commercial projects, however, you can integrate the Quest Journal into any menu. I will be posting a way to integrate stuffs below this post.)

    Introduction

    Mobius's Quest Journal is one of the most easy-to-use quest logs out there, but not many menu systems reserve a space for it. I wanted to integrate the quest journal into the one player menu for my own purposes, and decided to post it so other people wouldn't have to stare at a combined 1400 lines of code trying to figure out how to mash these two scripts together.

    Features

    These are the noncompatible versions, put here for credit reasons. Keep scrolling for the actual scripts.

    Mobius's Quest Journal and Tigerus Fay's One-Player Menu(system).

    Tweaks the 1P menu to list the quest journal and tweaks the quest journal to return to either its tab in the 1P menu or to the map.

    Screens

    [​IMG]

    How to Use

    Installation: Paste the script above Main and below everything else.

    How to use Mobius's Quest Journal (original script thread)

    [​IMG]

    Demo

    [​IMG]

    Scripts

    Mobius's Quest Journal: http://pastebin.com/swCQCXEd

    Tigerus Fay's One-Player Menusystem: http://pastebin.com/5fvH6ky7

    Recommended (prechecked for compatibility):

    Tigerus Fay's One-Player Battlesystem (site down, original thread, rpgmaker.org backup, if those sites ever go down, pastebin backup)

    Crafting script by kellessdee

    FAQ

    Q: I don't know how to install the script >.<

    A: I shouldn't be getting this question.

    Q: I have a question about how to use the script?

    A: Check the original script threads. I was not genius enough to create these scripts, and therefore know nothing about how bug reports and stuff operate.

    Q: I want to integrate this quest log/a crafting script/something else into this menu script I have!

    A: Check the tutorial on screens below this topic.

    Credit and Thanks

    mjshi

    Tigerus Fay & Mobius for original scripts

    Author's Notes

    I did not make the original scripts, in case you haven't caught onto that yet.
     
    Last edited by a moderator: Jul 9, 2015
    #1
  2. mjshi

    mjshi Jack of Most Trades Veteran

    Messages:
    837
    Likes Received:
    657
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    Adding Scenes (such as quest logs) to Menus for Dummies
    An RGSS1 Tutorial in Three Easy Steps
    Disclaimer: 'for dummies' is a trademark of Wiley Corporation and is currently being used in a humorous way that is not intended to offend anyone.


    Things to familiarize yourself with in the Menu

    1. The tabs. Tabs are the rectangles that a player can interact with in a menu to open their inventory, save, quit the game, put on equipment, etc. These tabs open a variety of scenes, and can be set to certain things such as an Equip screen or a Quest Log screen.

    def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = "End Game"
    #Add additional tabs by defining:
    #s7 = "Quest Log"
    #and adding s7 to the Window_Command.new(160, [etc]) index.
    #However, this will look ugly because the Quest Log will not fit into the window. You will have to redraw or remove a few windows. With the default menu as an example: You would need to remove either the playtime window or the steps window to fit in a Quests button You could also resize the windows by messing with
    #@windowname_window.y = [value]
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index2. #The scene processing bit. Instructions at the bottom of the code:

    if Input.trigger?(Input::C) #checks if the player has pressed confirm #skip a few... when 0 # item # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to item screen $scene = Scene_Item.new when 1 # skill # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 # Etc. Add a scene by putting: # when (index number) # $scene = Scene_Quests.new

    Things to familiarize yourself with in the Scene


    1. The if statement. Usually, there's an elif as well, but for our purposes we don't need it.

    if variable == Scene_Menu #itemselse #itemsend2. The input check. This checks if the player has pressed a certain button while the screen is up if this bit of code is in an update block (update blocks refresh screens, checks for input, etc). Most commonly used in screen scripts: Input::B is the cancel button (default ESC, X), Input::C is the confirm (default SPACE, ENTER).

    Input.trigger?(Input:: #put this instead of a variables in the if statement to check if B was pressed3. Scenes, and the scene change. A defined scene looks like this, and a scene change is listed below it. $scene can be set to any scene that you have defined, including default scenes/screens such as Scene_Save and Scene_Menu and alllll the Scene_etcs that you can see in your script editor.

    class Scene_Quest #etc scene stuff $scene = Scene_Map.new #returns to the map.4. Remembering which scene the player came from. Pasting this bit at the top, right after the class Scene_etc will ensure that you know exactly what scene the player got to here from. Combine this with an if statement later and you will be able to direct your player to different places depending on where they were originally.

    def initialize(return_scene = $scene.type) #sets variable return_scene to $scene.type so the game can recall which scene the player was on previously @return_scene = return_scene #makes @return_scene a callable scene. at the end of the scene, call $scene = @return_scene.new to return to map/menu/etcend

    Putting it all Together


    On the menu script, you will need to

    • Edit the tabs in the menu scene to let the player "enter" the Quest Log/Crafting/etc (hereafter referred to as the custom scene). Instructions for how to add are in #2 of the first part of this tutorial.
    • Insert a "when [integer]" statement that calls the custom scene.
    On the custom scene script, you will need to

    • Find the place where the actual scene begins, and scroll down until you can find where the custom scene ends. The end usually looks like this:
      end end end
    • Within the scene, try to find code that looks like #2 of the second section of this tutorial {the Input.trigger?(Input:: B) one}. This code is usually towards the end. Take note of which line this starts on, and write it down or something.
    • If there isn't already a def initialize, just copy and paste the bit to the line after "class Scene_scenename". If there is, under the def initialize put "return_scene = $scene.type" and on the next line put "@return_scene = return_scene".
    • Return to the line in #2 and remove whatever "$scene = etc" that exists.
    • Put an if... else to check if @return_scene (your previously defined variable) is == to Scene_Map, and if not, that means @return_scene is equal to Scene_Menu.
    • Under the "if @return_scene == Scene_Map", do a scene call to the map (i.e., put "$scene = @return_scene.new" or "$scene = Scene_Map.new"
    • Under the "else", do a scene call to the menu like so: "$scene = @return_scene.new(integer)" Replace integer with
    So, how do we do that in code?
    (to be continued...)[/hide]
     
    Last edited: Feb 5, 2017
    #2
  3. Diretooth

    Diretooth Lv. 23 Werewolf Veteran

    Messages:
    1,174
    Likes Received:
    401
    Location:
    Earth
    First Language:
    English
    Primarily Uses:
    RMMV
    Do you know if these scripts are for commercial use, or only non-commercial?
     
    #3
  4. mjshi

    mjshi Jack of Most Trades Veteran

    Messages:
    837
    Likes Received:
    657
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    The single player menu script is, unfortunately, noncommercial. However, the quest log is not. Therefore, if your game is a commercial game, you can use the quest log with the default menu/your menu, but you can't use the single player menu.
     
    Last edited by a moderator: Jul 9, 2015
    #4
  5. Diretooth

    Diretooth Lv. 23 Werewolf Veteran

    Messages:
    1,174
    Likes Received:
    401
    Location:
    Earth
    First Language:
    English
    Primarily Uses:
    RMMV
    Ah, thank you. I'll have to find another menu script for my game.
     
    #5
  6. mjshi

    mjshi Jack of Most Trades Veteran

    Messages:
    837
    Likes Received:
    657
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    Good luck. Let me know if I can help if you still plan on using the quest log script.
     
    #6
  7. Emanzi

    Emanzi Ekamu Veteran

    Messages:
    128
    Likes Received:
    50
    First Language:
    English
    Primarily Uses:
    RM2k3
    I'm getting an error.

    Script 'Mobius Quests' line 309 NoMethodError occurred.
    undefined method 'data_check' for nil:Nilclass

    I am using switches 01 to 10 currently for normal stuff. I tried changing the FIRST_SWITCH_ID and FIRST_VARIABLE_ID to 23

    Not sure what's wrong.
     
    #7
  8. mjshi

    mjshi Jack of Most Trades Veteran

    Messages:
    837
    Likes Received:
    657
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    @Emanzi Wow, this is super old xD
    I'm not entirely sure what's wrong off the top of my head but here's some general troubleshooting things to try, in order from specificity.
    1. Does it work with first switch ID and first variable ID set to their original values? If so, check that you actually have 23 switches. Sometimes that "nil" error pops up if the switch doesn't exist. If you don't, be sure to set your maximum switch and variable count to like 100 or something.
    2. Do you encounter the error in a new project? If not, it might be one of your other scripts causing an issue.
    3. Double check your script order, and try switching them around.
    4. I know this sounds stupid but... check your RPG Maker version too. Sometimes people install XP scripts into VX or something and they occasionally work but rarely so.
    All I can think of at the moment. Let me know how that works out for you!
     
    #8
  9. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    347
    Likes Received:
    83
    First Language:
    English
    @Emanzi Thanks for checking out my script.

    When does the error occur? I'm guessing this happens when you either open the journal or try to change a switch/variable using events. If so, are you starting a new game each time or loading a save game? If you make any changes to the script, you MUST start a new game. Loading an old save won't work.

    Also, if you haven't, I recommend you check the original thread for my script (link in my signature) as it has some tutorials and other advice.
     
    #9

Share This Page