Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Jaberwocky's Quest Log

Status
Not open for further replies.
Hello Jaberwocky, nice to hear from you. Many people have heard of your script now.

I was wondering what is causing this error
Script 'Quest Log (Optional)' line 26:Syntax error occured.
This is line 26:
Code:
    s4 = "Status"
Can you please help me.

Code:
#-------------------------------------------------------------------------------
# This rewrite of Scene_Main just adds the Quests option into the menu, and it
# makes the number of menu features longer.
#
# I did not edit any other window in the system, so you will see the QUIT option
# print overtop of the Game Time window in the screen.  I merely wanted to show
# how to call the Quest Window from a menu or script.
#-------------------------------------------------------------------------------


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill"
    s3 = $data_system.words.equip
    s4 = "Status"
    # Changed the s5 from Save to Quests, added an s7 to make the list longer
    s5 = "Quests"
    s6 = "Save"
    s7 = "End Game"
    # Added the s7 to the command window
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      # Changed #4 to the Quest menu (instead of save)    
      when 4  # quest
        # This is for quests now:
        $scene = Scene_Quests.new
      # Changed 5 on down to keep save and quit in the menu...
      when 5  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 6  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
end
[/SPOILER]
 
Does this work with SDK?
Because i use it, and when i put this in (Correctly i might add)
The menu is still the same as before i put everything in.
Here's Scene_Menu:
Code:
#-------------------------------------------------------------------------------
# This rewrite of Scene_Main just adds the Quests option into the menu, and it
# makes the number of menu features longer.
#
# I did not edit any other window in the system, so you will see the QUIT option
# print overtop of the Game Time window in the screen.  I merely wanted to show
# how to call the Quest Window from a menu or script.
#-------------------------------------------------------------------------------


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    # Changed the s5 from Save to Quests, added an s7 to make the list longer
    s5 = "Quests"
    s6 = "Save"
    s7 = "End Game"
    # Added the s7 to the command window
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      # Changed #4 to the Quest menu (instead of save)    
      when 4  # quest
        # This is for quests now:
        $scene = Scene_Quests.new
      # Changed 5 on down to keep save and quit in the menu...
      when 5  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 6  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
end

:s
 
Well, the SDK rewrties the menu script, so you'd have to copy and paste the editted menu below it for it to work, I think. Other than that, yeah, this should work just fine with the SDK, it's all new classes, so it shouldn't be touching anything in the SDK o_ob
 
im having a very annoying problem that makes it so i cannot even use this script... when i use a conditional branch in an event to check to see if a qupdate switch is true or false, it's all mixed up. what i mean by this is, since the for loop in the game_temp script sets all the qupdate switches to false, a conditional branch for qupdate[21] that has not been changed at all (as in untouched, which should be a default of false) SHOULD be false, but in fact it is true. i have sort of found a way around this, and that is to treat false as true and vice versa. however, this makes it so that when an objective is completed, or even a quest is started, the quest log does not read it as true, because i have it set to false (since the boolean is all mixed around). ive tried several different methods, none have worked... ive tried changing the true/false values of every single variable relating to the qupdate switches in all the scripts, ive tried changing the for loop to make the qupdate values to true instead of false (since they were switched around, i figured maybe this would switch them back around correctly), ive tried re-ordering EVERYTHING in all my events, nothing works... hopefully you can help me, because i am unable to finish my game without a quest script, ive tried The Ultimate Quest Scene script and it had the exact same problem only worse so ive switched to this script, and i like it much better. but without your help, im going to have to scrap my entire game project that ive spent weeks making... so please, help me :( if you have MSN instant messenger, please send me a PM with your email for it and i can send you my game so you can see exactly what is wrong with it. but please, PLEASE, help me.
 
Hi. i really want this script in my game. Now i'm a bit of a newbie when it comes to scripts so I need some help. I've copied all of the script above main like it says, but I don't understand where to put in which switches activate the different quests. Also i don't understand where to put in the info for each. Also, The quest word does not appear in the menu. Please help me i'm lost!
 
swift: I have no idea why setting it to false would make it true o_O Can you make a demo of the problem? s: Or, in the conditional branch... are you using
$bladhfask.qupdate[21] = true
or
$dadjfsdjsd.qupdate[21] == true
?
Cuz the first one will set it to true >.>

aligi: I wrote... EXCRUCIATINGLY detailed instructions in the script @_@
They're not there just to increase the line count :/ If you're trying to use DVV's menu thing, it won't work if you have another script messing with the menu system s:
 
Ok, updated. Script is much better now.
If you need help, read the fucking instructions. If you still need help, read the fucking instructions.
 
Eh, in your New Quest Window...

Code:
class Scene_Load < Scene_File

  alias zxcvbnm read_save_data
  def read_save_data(file)
	zxcvbnm(file)
	# QSETUP Also need to add any new quest variable here, like this:
	$game_temp.qupdate = Marshal.load(file)
	$game_temp.qupdate2 = [B]Marxhal[/B].load(file)
  end

end

Great job, anyway. It's pretty awesome.
 
This sounds nice but it also sounds very comlicated. can you make a demo with an un depth walkthrough on it?

Edit:I keep having $scene quests::quest data2 errors.
 
If you know how to work the first quest log, just copy-paste it onto a new script, change the class to "Quest_Data2", the picture to "CompletedQuestScroll", and edit the text a bit (clear out objectives) for your completed quest one.
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top