The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Shadowyugi on March 01, 2013, 11:29:09 PM

Title: [RPG Maker VX] - Something on Modern Algebra's Quest Journal
Post by: Shadowyugi on March 01, 2013, 11:29:09 PM
So like I basically was thinking...

You know the Quest Journal Script, while I was using it, I thought of an idea that I might want to incorporate in but wasn't sure if it was actually possible. So, if you don't mind me asking, in a general sense...

Is there anyway to reset the Quest Journal? (For example, after a certain amount of levelling up, the Player Character gets a chance to enter a new world and in the process, his Quest Journal is wiped clean, so as to seem like he/she is starting back from the beginning)
Title: Re: [RPG Maker VX] - Something on Modern Algebra's Quest Journal
Post by: &&&&&&&&&&&&& on March 02, 2013, 02:40:51 PM
reset_quest (quest_id)

quest_id : the integer ID of the quest you want to access.
This will re-initialize the quest, meaning all quest progress to
date will be lost

or

remove_quest (quest_id)

Deactivates the quest and resets it

Title: Re: [RPG Maker VX] - Something on Modern Algebra's Quest Journal
Post by: Shadowyugi on March 02, 2013, 03:53:11 PM
Looks simple enough... did you test it out? (sorry to second guess you, just want to be sure...)
Title: Re: [RPG Maker VX] - Something on Modern Algebra's Quest Journal
Post by: modern algebra on March 02, 2013, 04:07:21 PM
You would have to do that for every quest, but why are you asking him to test it? Can't you do it yourself?

Anyway,

$game_party.quests.clear

will do it for every quest. However, it doesn't look like that method is entirely as it should be, look for the following line (around line 262 if you separate configuration from the rest of the script):


  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Clear
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def clear
    @data.clear
  end


Change it to:


  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Clear
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def clear
    @data.clear
    [@revealed_sort, @alphabet_sort, @id_sort, @level_sort].each { |ary| ary.clear }
  end