Mobius's Quest Journal

gab100

Villager
Member
Joined
Oct 25, 2019
Messages
8
Reaction score
0
First Language
portuguese
Primarily Uses
RMXP
How do I send you?
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
197
Reaction score
68
First Language
English
Primarily Uses
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)
Code:
if Mobius::Quests::USE_SWITCHES_VARIABLES
and change it to
Code:
if Mobius::Quests::USE_SWITCHES_VARIABLES && $game_quests
For good measure, do this change to the one further below (around line 79)
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
374
Reaction score
89
First Language
English
Primarily Uses
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

Villager
Member
Joined
Oct 25, 2019
Messages
8
Reaction score
0
First Language
portuguese
Primarily Uses
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)
Code:
if Mobius::Quests::USE_SWITCHES_VARIABLES
and change it to
Code:
if Mobius::Quests::USE_SWITCHES_VARIABLES && $game_quests
For good measure, do this change to the one further below (around line 79)
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
 

gab100

Villager
Member
Joined
Oct 25, 2019
Messages
8
Reaction score
0
First Language
portuguese
Primarily Uses
RMXP
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
My script https://drive.google.com/open?id=1aZ9wqiEpZBD3ScdBBLKOcjwLlhOOcQNh
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
197
Reaction score
68
First Language
English
Primarily Uses
RMXP
@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 :p

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
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.
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
374
Reaction score
89
First Language
English
Primarily Uses
@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

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
197
Reaction score
68
First Language
English
Primarily Uses
RMXP
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.
 

gab100

Villager
Member
Joined
Oct 25, 2019
Messages
8
Reaction score
0
First Language
portuguese
Primarily Uses
RMXP
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.
 

Attachments

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
374
Reaction score
89
First Language
English
Primarily Uses
@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?
 

gab100

Villager
Member
Joined
Oct 25, 2019
Messages
8
Reaction score
0
First Language
portuguese
Primarily Uses
RMXP
@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.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
197
Reaction score
68
First Language
English
Primarily Uses
RMXP
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?
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.
 

Baucks

Warper
Member
Joined
May 28, 2020
Messages
3
Reaction score
0
First Language
French
Primarily Uses
RMXP
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.Untitled1.jpgUntitled2.jpgUntitled3.jpg
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
374
Reaction score
89
First Language
English
Primarily Uses
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.
 

Baucks

Warper
Member
Joined
May 28, 2020
Messages
3
Reaction score
0
First Language
French
Primarily Uses
RMXP
There you go, I should've definitely included it in the first place, my bad there. Also, I have to thank you all over again for the really quick response.Untitled4.jpg
(Now that I think of it, the questdata.txt is in the project data folder and not in the rmxp data folder, could that be an issue?)
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
374
Reaction score
89
First Language
English
Primarily Uses
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.
1590700594636.png

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:
1590700859374.png

and that should fix your problem.
 

Baucks

Warper
Member
Joined
May 28, 2020
Messages
3
Reaction score
0
First Language
French
Primarily Uses
RMXP
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.
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
374
Reaction score
89
First Language
English
Primarily Uses
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

by now, I think most people know that I hate misanthropic bad guys, but I realize one more reason I hate them so much is because the motive is easy and takes no thought to come up with. It's actually more challenging to create a villain that doesn't have that motive.
SOC
If the VisuStella videos are using the MZ RTP tilesets... I'm really disappointed. MV's look so much better. I hope it's easy to convert MV tiles to MZ.
If this thing end to be good enough, I'll be pleased to release it there for free (looong to be completed...).
And back. Trying to work online with no internet for 1.5 days was...interesting. I felt like a character in a old Sierra game trying to find internet due to all the hoops I had to jump through just to get online for work.
grief... if MV didn't have certain plugins already, I think I'd upgrade to MZ. seeing like 10 MV plugins in 1 MZ one is hilariously convenient lol.

Forum statistics

Threads
100,740
Messages
979,014
Members
132,365
Latest member
Nethernome
Top