How do I send you?
Mobius's Quest Journal
RGSS Scripts (RMXP)I'm guessing, since you are using Heretic's animated title scene, you have an event that is changing a switch before you can even see the screen. The quest system has a configuration option for USE_SWITCHES_VARIABLES. If you're not going to be using that, just change it to false and you should be good to go.
Otherwise, in Other Changes, locate this line (should be 51)
and change it to
For good measure, do this change to the one further below (around line 79)
Otherwise, in Other Changes, locate this line (should be 51)
Code:
if Mobius::Quests::USE_SWITCHES_VARIABLES
Code:
if Mobius::Quests::USE_SWITCHES_VARIABLES && $game_quests
Wow! @KK20 is out here solving my problems before I even get a chance to respond lol. Thanks for that though. I don't think I ever considered that someone would be using switches and variables before the game had even loaded. I'll probably post that as small bugfix and credit you, so thanks again!
@gab100, while I'm pretty sure that the solution will fix your problem if it doesn't just let us know!
@gab100, while I'm pretty sure that the solution will fix your problem if it doesn't just let us know!
Hey it really worked, now I can open the game. But now the only problem is that when I run script commands in the game like "$ game_quests.dq (1)", "$ game_quests.discover_quest (name)" or "$ scene = Scene_Quest.new"; which have the following errors:
An error occurred in NoMethodError during script operation.
undefined method 'discover_quest' for nil: NilClass
-------------------------------------------------- ------------------------------------------------
An error occurred in NoMethodError during script operation.
undefined method 'dq' for nil: NilClass
-------------------------------------------------- -------------------------------------------------
Scene_Quest Script Error, 26 at line 'NoMethodError'
undefined method 'sort_quest' for nil: NilClass
@MobiusXVI I have a history of doing bug fixes and script requests. I felt this one was pretty easy to resolve so I took a crack at it 😛
The errors are saying that $game_quests has not been initialized. This occurs when you start a new game
So you're telling us that your game is somehow running without ever having starting a new game at the title screen. Again, if you're doing these calls on the map that Heretic's script is using, that is a bad idea.
Of course, I don't see any reason why the global variable can't just be initialized right at the end of the script rather than having to wait for "New Game" to be selected.
The errors are saying that $game_quests has not been initialized. This occurs when you start a new game
Code:
# Changes to Scene_Title
class Scene_Title
# Alias old method
alias mobius_command_new_game command_new_game
def command_new_game
# Call old method
mobius_command_new_game
# Initialize Game_Quests object
$game_quests = Game_Quests.new #<================== Right here
end
end
Of course, I don't see any reason why the global variable can't just be initialized right at the end of the script rather than having to wait for "New Game" to be selected.
@gab100 To continue KK20's point, you definitely need to either start a new game or load an existing one for my script to work. Trying to use it on a "fake" map like Heretic's will not work.
@KK20, it's mostly for performance reasons why I don't initialize the global until "New Game". See, initializing it actually creates the entire data structure and loads the backing data. Basically there's a lot of "expensive" operations like file I/O and line length calculations. So if I did that at script end, it would run every time the game starts and load the default (or new game) data. Then it would have to re-run when a player selects to "Load Game" (because there's different data stored off in the save file). So because a player would most frequently select "Load Game" that means that they would encounter the slow down twice. Now, granted I know most RPG Maker games aren't known for being the most performance intensive things but I still try to make an effort to code things well as I've definitely encountered games that had a ton of custom scripts and they did not play well together from a performance stand point.
@KK20, it's mostly for performance reasons why I don't initialize the global until "New Game". See, initializing it actually creates the entire data structure and loads the backing data. Basically there's a lot of "expensive" operations like file I/O and line length calculations. So if I did that at script end, it would run every time the game starts and load the default (or new game) data. Then it would have to re-run when a player selects to "Load Game" (because there's different data stored off in the save file). So because a player would most frequently select "Load Game" that means that they would encounter the slow down twice. Now, granted I know most RPG Maker games aren't known for being the most performance intensive things but I still try to make an effort to code things well as I've definitely encountered games that had a ton of custom scripts and they did not play well together from a performance stand point.
Understandable. I didn't actually look into how the back-end works, but I was aware the quest data is stored in some new files. Perhaps you could have done the actual initialization of the data as its own method and call it when New Game is selected. That way the $game_quests existence is there, but the operations would be performed on empty data--just like for random edge cases such as this.
This is the mistake that is haunting me.
@gab100 Can you explain the actions you took before that message was shown? That looks like my demo screen, but how did you get there? Did you just start a new game? Or something else?
OK!
1. I have my project (game), so I just copied your map and put it in my project to test your script.
NOTE: I also copied the file Quests.rxdata and QuestData.txt to the Data folder.
2. I copied your scripts from your game to mine.
3. Was giving that first issue I reported here (can't open the game for testing), but the KK20 helped me by adding that line to scprit.
4.Opening a new game
5. From then on I enter your map (putting my character to spawn the new game on your map) for me to test the functionality of the script.
6. From then on I realized that no script worked.
sorry my English is bad.
Again, it's probably Heretic's script. You don't have any other script below that rewrites command_new_game which means you're somehow still not selecting "New Game" in the title screen's window.
Are you even doing this?
Are you even doing this?
Code:
# To bring up the Title Menu (New Game / Continue / Shut Down), you need
# to run a Script: "display_title_menu". The Title Menu will NOT be displayed
# UNTIL you call "display_title_menu" (without the quotes) from an Event
# Script. The Event should be an Autorun or a Parallel Event. The Scripts
# window is on Page 3 in the bottom right.
Heyo,
First of all, thanks Mobius for the work on the script.
I'm having an issue with the script that I simply can't solve or understand.
Basically, I'm getting the "The quest name "The ghost of the inn" was not found. Check that the quest exist and that the spelling is correct." error.
Now, after multiple checks the quest really is in the questdata.txt (picture 1) and everything seems to be in order.
I do not start playtesting from a save point, since I do not save during playtest and only test things from out of a fresh game every time. So it couldn't be that unless I misunderstand what it implies.
(Picture 2) is the event that is supposed to add the quest to the log.
On the other hand I have another weird issue which is that the first quest of the list (the main one) always shows up in the quest log even if it wasn't discovered.
I decided to go with having an item in inventory which is supposed to open the quest menu and it works, the quest list opens and everything but it always has the first quest in the list already, which hasn't been discovered yet through any event. (Picture 3 shows the effect of simply calling the quest interface, at this point, the player has met no event that allows for discovery of the quest that appears.)
I'm adding that because the two might be linked.
Most likely there is something dumb that I'm missing/doing wrong but I simply can't see what it is.
Thanks in advance for the help.


First of all, thanks Mobius for the work on the script.
I'm having an issue with the script that I simply can't solve or understand.
Basically, I'm getting the "The quest name "The ghost of the inn" was not found. Check that the quest exist and that the spelling is correct." error.
Now, after multiple checks the quest really is in the questdata.txt (picture 1) and everything seems to be in order.
I do not start playtesting from a save point, since I do not save during playtest and only test things from out of a fresh game every time. So it couldn't be that unless I misunderstand what it implies.
(Picture 2) is the event that is supposed to add the quest to the log.
On the other hand I have another weird issue which is that the first quest of the list (the main one) always shows up in the quest log even if it wasn't discovered.
I decided to go with having an item in inventory which is supposed to open the quest menu and it works, the quest list opens and everything but it always has the first quest in the list already, which hasn't been discovered yet through any event. (Picture 3 shows the effect of simply calling the quest interface, at this point, the player has met no event that allows for discovery of the quest that appears.)
I'm adding that because the two might be linked.
Most likely there is something dumb that I'm missing/doing wrong but I simply can't see what it is.
Thanks in advance for the help.



Hi @Baucks! Thanks for checking out my script! To answer why the first quest always shows up: the journal needs at least one quest to function, so the first quest gets automatically discovered upon starting a new game. You can work around this limitation by adding a "starting" phase to it that doesn't give anything away like "You're on a new adventure!".
Now for your other problem. Thanks for posting useful information. It's really helpful in figuring out what's wrong. Can you post a screenshot of the error box itself? Everything else looks correct, so I think seeing the error box will help.
Now for your other problem. Thanks for posting useful information. It's really helpful in figuring out what's wrong. Can you post a screenshot of the error box itself? Everything else looks correct, so I think seeing the error box will help.
Where you place questdata.txt depends on the setup. By default it should be in the "Data" folder of your project. So my project is called "Mobius's Quest Journal" and it's in a folder with the same name. That folder has another folder called "Data" and that's where I put it based on what's listed in the "Customization" section of the script.
Based on the error message though it looks like there's a line break in the name for some reason which could cause it to not match. Basically, this:
The
ghost of the inn
is not the same as this:
The ghost of the inn
Now obviously it should be the same, so I'll try to make the script more accommodating of small errors like this but in the meantime you can update your script call to this:
and that should fix your problem.
Based on the error message though it looks like there's a line break in the name for some reason which could cause it to not match. Basically, this:
The
ghost of the inn
is not the same as this:
The ghost of the inn
Now obviously it should be the same, so I'll try to make the script more accommodating of small errors like this but in the meantime you can update your script call to this:
and that should fix your problem.
Changed the script call to what you instructed and now it works. Honestly I didn't think about the line break at all but with the alternative syntax you've given me it seems long quest titles shouldn't be a problem anymore.
Thanks a bunch for everything, and sorry to have bothered you with what was ultimately a pretty dumb issue.
Thanks a bunch for everything, and sorry to have bothered you with what was ultimately a pretty dumb issue.
No worries! It wasn't dumb really. It wasn't clear from the error message what was wrong, so that means I should do something to make it better, and I never would have made it better if you hadn't reached out. So thanks!
hey i came across this script & was wondering if there was any way to make it so that you could check if a quest was completed & have that work with the conditional branch processor already in-game.
i tried coding it in myself but i dont have any experience in the language and mostly just guessed (which didn't work)
thanks!
i tried coding it in myself but i dont have any experience in the language and mostly just guessed (which didn't work)
thanks!
Original thread: https://forums.rpgmakerweb.com/threads/mobiuss-quest-journal.19144/
