• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Mobius's Quest Journal, for Essentials

1,224
Posts
10
Years
I always wanted to use Mobius' Quest Journal for my game, but there are some important differences in Essentials that prevent it from working as is. I did just a bit of tweaking, and it seems to work fine.

See the link above for more info about using the script and writing the .txt document (it goes in your /Data folder), as well as a sample project file and a simple program for writing/editing the text document.

Basically, just copy this in above the main.
Spoiler:

and then we need to add a couple things so that your updates to your journal are saved and loaded.

this
Code:
$game_quests        = Marshal.load(f)
needs to be added in PokemonLoad a bit under
Code:
if cmdContinue>=0 && command==cmdContinue

Same section but under
Code:
elsif cmdNewGame>=0 && command==cmdNewGame
add
Code:
$game_quests         = Game_Quests.new

In PokemonSave under
Code:
 Marshal.dump($PokemonStorage,f)
add
Code:
 Marshal.dump($game_quests,f)


Should work fine, let me know if any bugs found.
Only thing I can't figure out how to do is change the windowskin used, it keeps sticking with the default, so let me know if you know how to fix that :)

Important thing to note, once you install these scripts you must start a new game for it to work properly.


No credit to me required, but please give credit to MobiusXVI.
 
Last edited:
129
Posts
14
Years
  • Age 24
  • Seen Sep 4, 2023
That's pretty nice!. I have no problem starting a new game, as long as I don't try to load a saved game. (It's not an old save, I just started a new game).
EDIT: I made a little mistake when I edited PokemonLoad. Sorry for that.
Code:
Exception: NameError
Message: undefined local variable or method `f' for #<PokemonLoad:0x9db52b8>
PokemonLoad:322:in `pbStartLoadScreen'
PokemonLoad:319:in `loop'
PokemonLoad:454:in `pbStartLoadScreen'
DebugIntro:6:in `main'
Main:37:in `mainFunctionDebug'
Main:15:in `mainFunction'
Main:15:in `pbCriticalCode'
Main:15:in `mainFunction'
Main:47
Main:46:in `loop'
Other than that, I think it would be nice to provide an exemple of QuestData.txt to unexperienced users who may just be lost by not knowing where to put it/find it.
 
Last edited:
1,224
Posts
10
Years
It sounds awesome!. It is working so far, as long as I don't try to load a saved game. (It's not an old save, I just started a new game).
Code:
Exception: NameError
Message: undefined local variable or method `f' for #<PokemonLoad:0x9db52b8>
PokemonLoad:322:in `pbStartLoadScreen'
PokemonLoad:319:in `loop'
PokemonLoad:454:in `pbStartLoadScreen'
DebugIntro:6:in `main'
Main:37:in `mainFunctionDebug'
Main:15:in `mainFunction'
Main:15:in `pbCriticalCode'
Main:15:in `mainFunction'
Main:47
Main:46:in `loop'
Other than that, I think it would be nice to provide an exemple of QuestData.txt to unexperienced users who may just be lost by not knowing where to put it/find it.


I'm not getting that error, are you sure you put it in the right place? should look something like this
Code:
  if cmdContinue>=0 && command==cmdContinue
        unless safeExists?(savefile)
          pbPlayBuzzerSE()
          next
        end
        @scene.pbEndScene
        metadata=nil
        File.open(savefile){|f|
           pbTryLoadFile(savefile)           
           
           $Trainer             = Marshal.load(f)
           Graphics.frame_count = Marshal.load(f)
           $game_system         = Marshal.load(f)
           Marshal.load(f) # PokemonSystem already loaded
           Marshal.load(f) # Current map id no longer needed
           $game_switches       = Marshal.load(f)
           $game_variables      = Marshal.load(f)
           $game_self_switches  = Marshal.load(f)
           $game_screen         = Marshal.load(f)
           $MapFactory          = Marshal.load(f)
           $game_map            = $MapFactory.map
           $game_player         = Marshal.load(f)
           $PokemonGlobal       = Marshal.load(f)
           metadata             = Marshal.load(f)
           $ItemData            = readItemList("Data/items.dat")
           $PokemonBag          = Marshal.load(f)
           $PokemonStorage      = Marshal.load(f)
           [B]$game_quests        = Marshal.load(f)[/B]
           magicNumberMatches=false

There's an example and more information on the page I linked to in the initial post, as well as a small program for writing and editing the text documents.

Edit: Also note that I designed the additions to the save/load sections for v13, it may be slightly different for older versions or modified version.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
You're missing additional changes that are required to make this work.

Why not just use $PokemonGlobal.quests instead of $game_quests? There'd be no need to faff around with the loading/saving scripts at all.
 
129
Posts
14
Years
  • Age 24
  • Seen Sep 4, 2023
Oh there was a slight mistake on my part. Sorry for that.
It's loading fine now. Thank you very much!
I'll make a few more tests now. In case I find anything I'll tell you.
 
1,224
Posts
10
Years
Why not just use $PokemonGlobal.quests instead of $game_quests? There'd be no need to faff around with the loading/saving scripts at all.

Because all it took were three lines to add in, I didn't think anything beyond that was really needed.

What additional changes is this missing?
 
129
Posts
14
Years
  • Age 24
  • Seen Sep 4, 2023
I'm probably missing something tirival, but I simply cannot make it work.
Is it working fine on yours?
How are you calling the the journal scene, exactly? Nothing happens when I do.
Thank you!
 
1,224
Posts
10
Years
I'm probably missing something tirival, but I simply cannot make it work.
Is it working fine on yours?
How are you calling the the journal scene, exactly? Nothing happens when I do.
Thank you!

Code:
$scene = Scene_Quest.new
to call the journal scene
 
129
Posts
14
Years
  • Age 24
  • Seen Sep 4, 2023
Yep. That's precisely what I'm doing, but still nothing happens.
Actually, nothing happens when I start a new quest, open the journal scene or advance the quest to a next stage.
I'm pretty sure I added the script correctly.
Don't know what's going on.

Well, nevermind. Weirdly enough I managed to make it work by removing everything that followed the Journal scene in the event. Still weird though.
 
Last edited:
1,224
Posts
10
Years
I just added it in a fresh copy of v13 and it works fine. Make sure your
Code:
$game_quests         = Game_Quests.new
is in the right place. If it wasn't, then it might not have activated when you started a new game.
 

Boonzeet

Pokémon Secrets of the Ages Developer
188
Posts
14
Years
The quests don't show up in the quest log even when enabled, and when saving, after the quest log has been enabled and called for the first time, it simply states "Save failed".

I'm not sure why, and I've followed the steps exactly - the rest of the game works perfectly.

EDIT: it does also appear that the quests show up but the text doesn't draw, a problem I have with the original quest maker (RPGMaker on Mac) Is it using a different method to draw text then the rest of essentials? I understand needing this to work on Mac is a bit niche so I'm willing to donate something towards fixing this as I've always wanted a quest system for my game!
 
Last edited:
1,224
Posts
10
Years
The quests don't show up in the quest log even when enabled, and when saving, after the quest log has been enabled and called for the first time, it simply states "Save failed".

I'm not sure why, and I've followed the steps exactly - the rest of the game works perfectly.

EDIT: it does also appear that the quests show up but the text doesn't draw, a problem I have with the original quest maker (RPGMaker on Mac) Is it using a different method to draw text then the rest of essentials? I understand needing this to work on Mac is a bit niche so I'm willing to donate something towards fixing this as I've always wanted a quest system for my game!

I tried and could not get the same error, so unless I messed something up in the steps (which I don't think I did but it's possible), it might be a Mac exclusive problem. Did you format your QuestData.txt properly? Beyond that, I have no idea what caused it. The text is drawn using a method used many other places in Essentials, though the window it's drawn in is different from essentials. The classes for the edits to the windows are included in the script, but I see no reason they would not work on a Mac.
 

Boonzeet

Pokémon Secrets of the Ages Developer
188
Posts
14
Years
I tried and could not get the same error, so unless I messed something up in the steps (which I don't think I did but it's possible), it might be a Mac exclusive problem. Did you format your QuestData.txt properly? Beyond that, I have no idea what caused it. The text is drawn using a method used many other places in Essentials, though the window it's drawn in is different from essentials. The classes for the edits to the windows are included in the script, but I see no reason they would not work on a Mac.

The saving bug I couldn't reproduce in a clean copy of Essentials, so I will look into that. Does the quest panel use the fonts used in Essentials or a windows-specific font?

Here is a screenshot, demonstrating the multiple quests but no text:
wontwork.png


And my text file for config can be viewed here, but I'm 100% sure it's formatted correctly. Thank you for the help!
 
1,224
Posts
10
Years
The saving bug I couldn't reproduce in a clean copy of Essentials, so I will look into that. Does the quest panel use the fonts used in Essentials or a windows-specific font?

Here is a screenshot, demonstrating the multiple quests but no text:
wontwork.png


And my text file for config can be viewed here, but I'm 100% sure it's formatted correctly. Thank you for the help!

Hmm. The boxes are drawn correctly at least, and your text format is correct. For the selectable cursor, can you go down any further or is that it? If it is, that means that it at least knows that the quests are active, and it also means that it probably read/formatted the text properly.

To double check that it has, go to this def in class Window_QuestInfo

Code:
def refresh(text_array)
    self.contents.clear
    self.contents.font.color = text_color(2)
    for i in 0...text_array.size
      line = text_array[i]
      self.contents.draw_text(0, i * 22, 408, 22, line)
    end
  end
and change it to this
Code:
def refresh(text_array)
    self.contents.clear
    self.contents.font.color = text_color(2)
    for i in 0...text_array.size
      line = text_array[i]
      Kernel.pbMessage(_INTL("{1}",line))
      self.contents.draw_text(0, i * 22, 408, 22, line)
    end
  end
and it should read each line of the quest info available to you. You can do similar in class Window_QuestList.

If all of that checks out, then it is indeed just not drawing the text for some reason. If that is the case, maybe try changing what text color is used and see if it does anything, or change the wallpaper by changing this def in class Window_Base

Code:
  def initialize(x, y, width, height)
    super()
    @windowskin_name = $game_system.windowskin_name
    self.windowskin = RPG::Cache.windowskin(@windowskin_name)
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
  end

to
Code:
  def initialize(x, y, width, height)
    super()
    $game_system.windowskin_name=("001-Blue01") #you can use any filename, but the skins included in essentials look weird for this class 
    @windowskin_name = $game_system.windowskin_name
    self.windowskin = RPG::Cache.windowskin(@windowskin_name)
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
  end
 

Boonzeet

Pokémon Secrets of the Ages Developer
188
Posts
14
Years
Hmm. The boxes are drawn correctly at least, and your text format is correct. For the selectable cursor, can you go down any further or is that it? If it is, that means that it at least knows that the quests are active, and it also means that it probably read/formatted the text properly.

To double check that it has, go to this def in class Window_QuestInfo and it should read each line of the quest info available to you. You can do similar in class Window_QuestList.

If all of that checks out, then it is indeed just not drawing the text for some reason. If that is the case, maybe try changing what text color is used and see if it does anything, or change the wallpaper by changing this def in class Window_Base

Thank you for the help so far, it is reading out the text correctly. Is it supposed to read the title of the Quest or its first item? As it reads the first item from the 'Storyline' quest.

I had already tried to change all the font colours to no avail and the Windowskin change similarly doesn't display the text.

wontwork2.png


Thanks so much in advance!
 
1,224
Posts
10
Years
Thank you for the help so far, it is reading out the text correctly. Is it supposed to read the title of the Quest or its first item? As it reads the first item from the 'Storyline' quest.

I had already tried to change all the font colours to no avail and the Windowskin change similarly doesn't display the text.

wontwork2.png


Thanks so much in advance!

The one I told you to change is supposed to read the quest info, not the name. So it is working correctly in that aspect. So, I have no idea what is wrong lol.
 
129
Posts
14
Years
  • Age 24
  • Seen Sep 4, 2023
Apparently, text is not fitting the screen propperly, at least in current standard resolution.
 
1,224
Posts
10
Years
Apparently, text is not fitting the screen propperly, at least in current standard resolution.

As in the thing Bonzeet is talking about? Or the text-wrapping thing? If it's the latter, I've noticed that it does that for some entrys, I'll look into it.
 
129
Posts
14
Years
  • Age 24
  • Seen Sep 4, 2023
As in the thing Bonzeet is talking about? Or the text-wrapping thing? If it's the latter, I've noticed that it does that for some entrys, I'll look into it.

Well I mean the text wrapping box, as you say. Sometimes, the text go beyond the boarders and part of it don't appear on the screen.
 
56
Posts
10
Years
  • Age 29
  • Seen Jun 12, 2018
I'm getting this error when trying to start a new game

efc60f51fb.png


Any idea of how can I fix it? I even try using a vanilla version of essentials and still the same error appears...

Edit:

Have to create at least one quest to make the script work, its working fine now
 
Last edited:
Back
Top