Main Menu
  • Welcome to The RPG Maker Resource Kit.

Quest Journal v. 2.1

Started by modern algebra, March 25, 2008, 08:05:14 PM

0 Members and 2 Guests are viewing this topic.

modern algebra

Not built in. I will add that in the next version though :)

You could do it by editing the script directly, but it's a little complicated and so I intend just to fix it with the next version.

Adrien

I have a complicated question

Ok so I have found and am using a script from a nother site that i post in.
this script (see below) allows you to alter the menu so you have more then what you originally see. because of the way the menu is designed scripters have issues inserting more then what is allowed into the menu...so study this script and get ready cause the question is below the script

#-------------------------------------------------------------------------------
# This is the new $game_menu array that holds the text and commands for menu
# items.
#-------------------------------------------------------------------------------
class Scene_Title < Scene_Base
  alias oldCreateGameObjectsSMPATCH create_game_objects
  def create_game_objects
    oldCreateGameObjectsSMPATCH
    $game_menu =[
            #menu item 0
            [Vocab::item, "$scene = Scene_Item.new",
            true, nil],
               
            #menu item 1
            [Vocab::skill, "start_actor_selection",
            true,"$scene = Scene_Skill.new(@status_window.index)"],
               
            #menu item 2
            [Vocab::equip, "start_actor_selection",
            true, "$scene = Scene_Equip.new(@status_window.index)"],
           
            #menu item 3
            [Vocab::status, "start_actor_selection",
            true,"$scene = Scene_Status.new(@status_window.index)"],
           
            #Menu Item 5
            [Vocab::crafting, "$scene = Scene_Crafting.new", true, nil],
           
            #Menu Item 6
            [Vocab::classes, "start_actor_selection", true,
            "$scene = Scene_Class_Switch.new(@status_window.index)"],
           
            #menu item 4
            [Vocab::save, "$scene = Scene_File.new(true, false, false)",
            false, nil],
           
            #menu item 5
            [Vocab::game_end, "$scene = Scene_End.new",
            false, nil]
            ]
  end
end
#==============================================================================
# ** Scene_Menu (patched by cmpsr2000 June 18, 2008)
#
#    This patch allows scripters to add to the menu using normal array
#    commands. Each menu item is an array of the following elements:
#
#     menuText:   The text to be displayed in the menu. needs to be a string.
#     command:    The code to execute when the menu item is selected. IT MUST
#                 BE A STRING! (the script uses eval to run it)
#     hideBool:   Whether or not to disable this menu item when the party is
#                 empty. Boolean (true, false).
#     actSelCode: If you used "start_actor_selection" to specify an actor, put
#                 the subsequent code here. IT MUST BE A STRING! (the script
#                 uses eval to run it).
#
#    Check the existing $game_menu above for examples.
#   
#    TO ADD TO THE END OF THE MENU:
#       menuItem = [menuText, command, hideBool, actSelCode]
#       $game_menu.push(menuItem)
#
#    TO INSERT AT A SPECIFIC POSITION IN THE MENU:
#       INDEX = #position where you want to insert (don't forget its 0-based!)
#       menuItem = [menuText, command, hideBool, actSelCode]
#       $game_menu.insert(INDEX, menuItem)
#         
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    menuItems = []
    requiresPartyMembers = []
    for menuItem in $game_menu
      menuItems.push(menuItem[0])
      requiresPartyMembers.push(menuItem[2])
    end
    @command_window = Window_Command.new(160, menuItems)
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # If number of party members is 0
      for i in 0..requiresPartyMembers.length - 1
        if requiresPartyMembers[i]
          @command_window.draw_item(i, false) # Disable item
        end
      end
    end
    if $game_system.save_disabled             # If save is forbidden
      # Disable save
      saveIndex = menuItems.index(Vocab::save)
      @command_window.draw_item(saveIndex, false) unless saveIndex == nil
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      action = @command_window.index
      eval($game_menu[action][1])
    end
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      action = @command_window.index
      eval($game_menu[action][3])
    end
  end
end


Using this script and your script I have come up with this:

#Menu Item
            [Vocab::quest, "$scene = Scene_Quest.new", false, nil]

But I get the follwoing error with each of the following:

"Quest, Quests, quest, quests."

The  $scene = Scene_Quest.new is correct because if I replace say Quest with "crafting" i can access the quest menu in the menu its self.
I need to know what to put after Vocab.
the error I get is:


"Undefined Method 'quest' for Vocab module'

Your help in solving this vast issue would be the best thing ever....

modern algebra

#127
Errm, don't put Vocab anything, just put a string like:

"Quests"

so that it looks like:

["Quests", "$scene = Scene_Quest.new", false, nil]

If you encounter other problems, I'll look into the other script. Though I should mention:

If another problem crops up, then put the Quest Script below this other script in the menu and don't put the line above in at all and see if that works.

Adrien

Thank you so much that worked


Grafikal

Quote from: modern algebra on November 22, 2008, 03:50:42 PM
Not built in. I will add that in the next version though :)

You could do it by editing the script directly, but it's a little complicated and so I intend just to fix it with the next version.

Well then, I can't wait for your next update!  :D

Keep up the great work.

P.S.
That Tutorial Script you built for me is absolutely amazing.

modern algebra

I'm glad to hear the Tutorial script is working. And yeah, I was originally only planning to release the next version of this script with a Journal feature, but I may release a 1.2 before that.

kccarmea

Hi I downloaded the demo with winzip and extracted it but i cannot open it.

kccarmea

anyways i have the script but I dont know how to call it.

stainedofmind

An excellent script if I don't say so myself.  It saves me from having to write my own :P  I was able to implement it with only one small hitch along the way, one which I managed to solve, but I figured I'd mention it.  I discovered that by default, if there are no quests created where the "prime" is used to select specific objectives to allow completion of the quest, the script throws the following error:

Script 'Quest Journal' line 176: NameError occured.

undefined local variable or method 'prime' for ModAlg_QuestData:module

Now it's probably unlikely that in a full game utilizing your script that you would never make use of the 'prime' variable, but as I said, I thought I'd bring it to attention.  The quest I discovered this issue with was as follows:

when 1 # Main Quest - Introduction
      name = 'Prologue: Unknown Lands'
      description = 'You have arrived in a strange new land, unarmed and alone.  You must seek out the reason for your being here.'
      objectives[0] = 'Find a weapon and some armor.'
      icon_index = 97

With this being the only script, the error was thrown.  I've since implemented a hidden dummy quest that will never be called in order to prevent this error from showing, though I doubt I'll need it in the end.  Not a large error, but hopefully bringing it to your attention will be of some use.  Thanks again for the excellent script!

miceylulu



This is the error that comes up.  I looked in the Quest Journal script, and it's set up the way any other quest was set up and they didn't have problems.  See any problems?:

when 13 # Steal the Corn
  name = "Steal the Corn"
  description = "Frieda needs you to steal some corn for her granny.  Can you do it?"
  objectives[0] = "Steal the corn and return it to Frieda."

pookyblueXD

I'm using a MOG menu for my RPG, and when I use this script, I get like a part of the original RM VX menu screen.
Can you help me out?

Grafikal

Hey MA, I have an interesting question. Is there a way to turn off all the windows in your quest menu and instead draw a bitmap over a picture? My idea here was to get rid of all the windows and replace what is being written on by an aged parchment picture. Just wondering, maybe something for another update later.  :)

modern algebra

#137
@grafikal - no - but it's easy. I'll throw in that capability into the next version.


@miceylulu - that is a strange error. My guess is that when you are calling a quest you do something like:

$game_party.quests[quest_id]

What that quest_id is is an integer, you shouldn't actually write it anywhere. So:

$game_party.quests[1] or $game_party.quests[5] or whatever - don't use the word "quest_id"


@stained

Hrrm... for that, all you need to do is add a line:


    prime = []

right below

icon_index = 0

at line 114.

Thanks for informing me of the error.

kitaangel

Hello there!
I am at the point where I am adding a bunch of side quests into my game now, but when I go to test it, I keep getting this here error:


Anyways, I thought it was weird and went to check if I accidentally typed in my call script wrong, but it looks fine.
Anyways, this is what I typed in:
$game_party.quests[10].complete_objective (0)
$game_party.quests[10].reveal_objective (1)


Now, usually this should work right? But I keep getting an error. So I said fine I'll check my other quests. They all seemed fine. It appears that only my quests with the ID 10 and up get this error.
I go an check again just to be sure I copied the script in right, but it seems to keep adding a line break between the space after complete_objective and the (0). I thought it was just because the (0) didn't fit in the line so it was bumped down, but when I click okay RPG maker literally adds a line break. I was just wondering if there was a way to fix this error?
Let me know whenever you have time. :3
Thanks again for your hard work! Scripts and codes aren't easy lol

modern algebra

You are right - it is probably because it goes down the extra line. Try writing it like this:

q = $game_party.quests
q[10].complete_objective (0)


and get back to me.

kitaangel

*taps forehead*
Why didn't I think of re-defining the variable!
Thanks a bunch! Works perfectly fine now!
:D

Darico

#141
I want to implement this in my game however I have come across a small problem. I'm using a custom menu and the option to go to the quest log does not appear!  :'(    I've included a picture of the current menu and the script I am using for the menu. Any help is much appreciated!!



[spoiler]
############################################################################
  #                          Enix_FFGlass Window  v1.0                       #
  #    by Speed@                                                             #
  # A BIG Thanks to: Woratana  and his [RMVX] Custom Menu Background         #
  #                                       Effects & Opacity  Script          #
  # Only for RPG Revolution                                                  #
  # Posting on other forum without my permission is forbidden.               #
  ###########################################################################
#
  class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @gold_window.opacity = 0
    @gold_window.x = -70
    @gold_window.y = 300
    @status_window = Window_MenuStatus.new(160, 0)
    @status_window.opacity = 0
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.opacity = 0
    @command_window.y = 110
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
      when 5      # End Game
        $scene = Scene_End.new
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end

module WorBG
#----------------------------------------
# SETUP MENU BACKGROUND & OPACITY HERE!
#---------------------------------------
BG_MODE = 0, 2 # Mode of BG
BG_BLUR = true # Turn on (true)/ off (false) to make background blur
WINDOW_OPACITY = 200 # Opacity for Menu Screens
THICK_WINDOW_OPACITY = 200 # Opacity for Windows in Title/Battle/End Screens
BG_MOVE_X = 0 # Move Background in X-coordinate
BG_MOVE_Y = 0 # Move Background in Y-coordinate
BG_PICTURE =  "Back" # Picture file name when you use custom BG (mode 2)
end

class Scene_Base

def create_menu_background
@menuback_sprite = Plane.new
case WorBG::BG_MODE
when 0 # Default BG
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)

when 1 # Brighter Default BG
@menuback_sprite.bitmap = $game_temp.background_bitmap

when 2 # Custom BG
@menuback_sprite.bitmap = Cache.picture(WorBG::BG_PICTURE)

else
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
end
@menuback_sprite.bitmap.blur if WorBG::BG_BLUR == true
update_menu_background
end

alias wor_scebase_upd update
def update
@menuback_sprite.ox += WorBG::BG_MOVE_X if @menuback_sprite != nil and WorBG::BG_MOVE_X != 0
@menuback_sprite.oy += WorBG::BG_MOVE_Y if @menuback_sprite != nil and WorBG::BG_MOVE_Y != 0
end

def snapshot_for_background
$game_temp.background_bitmap.dispose
$game_temp.background_bitmap = Graphics.snap_to_bitmap
end
end # Class End

class Window_Base

alias wor_winbase_ini initialize
def initialize(x, y, width, height)
wor_winbase_ini(x, y, width, height)
if $scene.is_a?(Scene_Title) or $scene.is_a?(Scene_Battle) or $scene.is_a?(Scene_End)
self.back_opacity = WorBG::THICK_WINDOW_OPACITY
else
self.back_opacity = WorBG::WINDOW_OPACITY
end
end

end

[/spoiler]

So you are aware, I have put the custom menu under the quest journal script, as when placed above it the menu changes back into the visible frames. (Making the custom menu rather redundant)

r_y_u_u

amazing script, love the features, just a shame that all the objectives are only set once, i had to copy some of my objectives later into the code, so that they could show the value of a variable, and then skip the objective numbers i used in my other quests, as they would be replaced by those objectives, still, love the script, and it complement's my project nicely, although i would like to see the objectives being able to have variables in them, as then people could like have how far the player has completed the objective, e.g. find the gnomes - 3 of 5 gnomes found. still amazing script

tSwitch

Quote from: Darico on December 06, 2008, 08:38:07 PM
I want to implement this in my game however I have come across a small problem. I'm using a custom menu and the option to go to the quest log does not appear!  :'(    I've included a picture of the current menu and the script I am using for the menu. Any help is much appreciated!!



[spoiler]
############################################################################
  #                          Enix_FFGlass Window  v1.0                       #
  #    by Speed@                                                             #
  # A BIG Thanks to: Woratana  and his [RMVX] Custom Menu Background         #
  #                                       Effects & Opacity  Script          #
  # Only for RPG Revolution                                                  #
  # Posting on other forum without my permission is forbidden.               #
  ###########################################################################
#
  class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @gold_window.opacity = 0
    @gold_window.x = -70
    @gold_window.y = 300
    @status_window = Window_MenuStatus.new(160, 0)
    @status_window.opacity = 0
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.opacity = 0
    @command_window.y = 110
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
      when 5      # End Game
        $scene = Scene_End.new
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end

module WorBG
#----------------------------------------
# SETUP MENU BACKGROUND & OPACITY HERE!
#---------------------------------------
BG_MODE = 0, 2 # Mode of BG
BG_BLUR = true # Turn on (true)/ off (false) to make background blur
WINDOW_OPACITY = 200 # Opacity for Menu Screens
THICK_WINDOW_OPACITY = 200 # Opacity for Windows in Title/Battle/End Screens
BG_MOVE_X = 0 # Move Background in X-coordinate
BG_MOVE_Y = 0 # Move Background in Y-coordinate
BG_PICTURE =  "Back" # Picture file name when you use custom BG (mode 2)
end

class Scene_Base

def create_menu_background
@menuback_sprite = Plane.new
case WorBG::BG_MODE
when 0 # Default BG
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)

when 1 # Brighter Default BG
@menuback_sprite.bitmap = $game_temp.background_bitmap

when 2 # Custom BG
@menuback_sprite.bitmap = Cache.picture(WorBG::BG_PICTURE)

else
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
end
@menuback_sprite.bitmap.blur if WorBG::BG_BLUR == true
update_menu_background
end

alias wor_scebase_upd update
def update
@menuback_sprite.ox += WorBG::BG_MOVE_X if @menuback_sprite != nil and WorBG::BG_MOVE_X != 0
@menuback_sprite.oy += WorBG::BG_MOVE_Y if @menuback_sprite != nil and WorBG::BG_MOVE_Y != 0
end

def snapshot_for_background
$game_temp.background_bitmap.dispose
$game_temp.background_bitmap = Graphics.snap_to_bitmap
end
end # Class End

class Window_Base

alias wor_winbase_ini initialize
def initialize(x, y, width, height)
wor_winbase_ini(x, y, width, height)
if $scene.is_a?(Scene_Title) or $scene.is_a?(Scene_Battle) or $scene.is_a?(Scene_End)
self.back_opacity = WorBG::THICK_WINDOW_OPACITY
else
self.back_opacity = WorBG::WINDOW_OPACITY
end
end

end

[/spoiler]

So you are aware, I have put the custom menu under the quest journal script, as when placed above it the menu changes back into the visible frames. (Making the custom menu rather redundant)

that's because you need to add an option to the commands in the menu, manually, to open the scene.


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

modern algebra

Quote from: r_y_u_u on December 15, 2008, 03:46:55 PM
amazing script, love the features, just a shame that all the objectives are only set once, i had to copy some of my objectives later into the code, so that they could show the value of a variable, and then skip the objective numbers i used in my other quests, as they would be replaced by those objectives, still, love the script, and it complement's my project nicely, although i would like to see the objectives being able to have variables in them, as then people could like have how far the player has completed the objective, e.g. find the gnomes - 3 of 5 gnomes found. still amazing script

That's actually a pretty good idea. I will implement it in the next version.

r_y_u_u

glad you liked my idea, i managed to add something similar to mine, but as i said, i had to avoid using the objective numbers that used variables... still, LOVE the script

Craze

#146
Food for thought:

-Perhaps you could make it so that completing an objective when a quest isn't offered yet doesn't make the quest available? If you use .complete_objective(n), the corresponding quest can be prematurely activated.

-I'd love it if you could make variables work inside \nq[n]. I made common events for quest addition/expansion/completion using \nq[\v[4]] but it just shows \nq[variable contents].

MODIFY:
I am currently bypassing the second issue with this edit of the script:
class Window_Message
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Convert Special Characters
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_spec_char_convert convert_special_characters
  def convert_special_characters
    @text.gsub! (/\\NQ\[\]/i) { $game_party.quests.list[$game_variables[4]-1].name }# $1.to_i] } # Name Quest
    # Run Original Method
    modalg_quest_jrnl_spec_char_convert
  end
end


When I type \nq[], it shows the quest name that I want. It seems to work so far, but since it calls an index and not an actual id, I don't know how long this edit will hold up.

MODIFY2:

@text.gsub! (/\\NQ\[\]/i) { ModAlg_QuestData::quest_data($game_variables[4])[0]}
...and it's just plain easier to get the data from the module.

TheCro

Is there a way to create an objective that requires doing a task multiple times (I.E Kill 20 demons.), and if so, is there a way to show your progress of a task like that within the objective list of the quest journal?

Craze

Use something like this:

objectives[0] = "Kill 20 demons. Progress: " + $game_variables[56].to_s + " demons killed."

I haven't tried it, but there's no reason why it shouldn't work; just change the '56' to the id of whatever variable you want to show. Be sure to keep the .to_s! Otherwise, it will try to add an interger to a string of text and that just doesn't work out very well at all.

TheCro

Hmmm. It just shows up as  " + $game_variables[1].to_s + ".