The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Scripts Database => Topic started by: Zeriab on September 18, 2008, 07:11:14 PM

Title: Quest Book - version 1.2
Post by: Zeriab on September 18, 2008, 07:11:14 PM
Quest Book
Version: 1.2

Introduction

This is a fairly heavy quest book which provides an overview over a number of quests represented by pictures. Each of the quests can be selected and a window with quest specific details will be shown. (The pictures are 80x80)

Features

Quests can have any number of parts. (Only the text for the current part is shown)
The quest book can be applied to a game in progress since whether quests are solved or not depends on variables, switches or a combination of them.
Solved quests kept and can be shown.
The opacity of background of the quest book can be changed and a picture can be shown behind it accordingly to a variable.

Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg134.imageshack.us%2Fimg134%2F6531%2Fpic1nn0.th.png&hash=2d4635ca0831401523daa72275ec8fd3bbcc343c) (http://img134.imageshack.us/my.php?image=pic1nn0.png) (https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg230.imageshack.us%2Fimg230%2F6373%2Fpic2lo0.th.png&hash=c1ed9d78e4cb3b398df73cc70aac38d968c5913b) (http://img230.imageshack.us/my.php?image=pic2lo0.png)

Demo

QuestBook version 1.2 (rar) (http://rmrk.net/index.php?action=dlattach;topic=29669.0;attach=15520)

Script

I really suggest the demo rather than the script since it also contains example pictures.
I have included them for people who just want to take a look at the script.
Quest Book Script (http://pastebin.com/ZrMLFUh3)

Here is the example usage of the script (http://pastebin.com/hxs6gHZM) used in the demo: (I would suggest placing it in a different section)

Installation

Insert the script just above main. (Like so many other scripts)
Insert just below the script a new section. This section will be were you configure the script. Create quests and such.

Instructions

I will try an experiment here. Instead of written a big wall of text explaining everything I want to know where my explanation should be in-depth and where it should be more shallow. I.e. where should I focus.
Please look at the example usage (http://zeriab.plesk3.freepgs.com/root/scripts/Questbook/example-usage.txt) of the script.
What is for you the most confusing parts?
Will you be able to modify the quests?
Will you be able to add another quest?
Will you be able to add/remove a quest part?
Is it clear how the Quest_Criteria works?
Do you understand the top part where you configure the background?
How do you add/remove another background picture?
How do you change the opacity of the quest book? The path?
Can you figure out how to modify, add and remove the actual picture files? (You should probably download the demo for this)

This is a case of help me become better at helping you. I am sorry for the inconvenience.

Compatibility

Spoiler for If you are using exotic save systems:
At the bottom of the script (Binding to Scene_Load section in the demo) you find this code
Code: [Select]
#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  Aliases and uses the on_decision method to reset $game_quests on the proper
#  time.
#==============================================================================

class Scene_Load < Scene_File
  # Check if the alias already exists (To avoid F12 errors)
  unless self.method_defined?(:zeriab_questbook_scene_load_on_decision)
    alias zeriab_questbook_scene_load_on_decision :on_decision
  end
  def on_decision(*args)
    # Call the original method
    zeriab_questbook_scene_load_on_decision(*args)
    # Check if the scene has changed
    unless $scene == self
      # Reset quest data
      $game_quests.reset
    end
  end
end

The idea with that snippet is to call a method when you load a save. It is used to preserve consistency in the quest book
Code: [Select]
$game_quests.reset

Note only do this if there is a problem with the snippet. (You can try putting a " p 'test' " in the reset method in Game_Quests if you want to test that it is called when you load a game)

Credits and Thanks

Credits goes to Zeriab
Special thanks goes to Indinera who requested the script for the game Laxius Force

I would like to thank everyone using their time to try and use my system.
I would like to thank everyone reading this topic.
Thanks.

Terms and Conditions
Spoiler for License:
Copyright (C) 2007  Zeriab

This script is free to use under the condition of Zeriab being credited. (Commercial and non-commercial projects alike)
This script can be freely changed and distributed under the condition of the original author remains in the script.
Verbatim copies of this topic can be freely distributed

This script is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Author's Notes

This script were designed for a game so the visualization is very fixed.

I would be delighted if you report any bug, errors or issues you find.
In fact I would be delighted if you took the time and replied even if you have nothing to report.
Suggestions are more than welcome

And finally: ENJOY!

 - Zeriab
Title: Re: Quest Book - version 1.2
Post by: modern algebra on September 18, 2008, 07:37:50 PM
Very cool script Zeriab.

In terms of instructions, I suggest you point out the fact that each of the quest icons is a picture. I can see people coming to the screenshots and saying eww, I don't want all my quests to be a green square and then not try the script and find out that each is actually an Icon set by them.

Other than that, I think the sample setup is pretty self-explanatory - maybe you could describe what should be in the Quest Criteria area though.
Title: Re: Quest Book - version 1.2
Post by: Zeriab on September 18, 2008, 09:50:04 PM
Thanks a lot modern ^_^
You are a scripter though so what's self-explanatory for you might not be it for others.

On a side note: I wish I had the time to check your new scripts out -_-

*hugs*
 - Zeriab
Title: Re: Quest Book - version 1.2
Post by: modern algebra on September 18, 2008, 10:12:50 PM
I suppose :)

And that's alright about not looking at my scripts. The only big script I've released recently is V. 2 of the ATS, and that is just an old script repackaged. Aside from which, it still has some noticeable lag when adding 10-15+ messages together, and it has nothing sophisticated in it either, so it's not very good or interesting.

Also, this belongs in the database, but I'll let you move it when you're ready.
Title: Re: Quest Book - version 1.2
Post by: Zeriab on September 19, 2008, 09:08:07 AM
I don't think it belongs to the database atm since I have not finished the instructions yet.
When I have made them I will move it to the database ^^
Title: Re: Quest Book - version 1.2
Post by: Zeriab on October 04, 2008, 08:18:12 AM
This weird...
This script is already my second-most downloaded script yet there has been no questions.
Maybe I'll just add a few things to note and let it be with that. I am assuming the silence means people can figure out how to do it.
Title: Re: Quest Book - version 1.2
Post by: Deadly Alince on October 23, 2008, 04:35:04 PM
I got onle one question i should make the quest in events scripts or in script Editor?[because im makeing a quest and im not sure what script to use the one in events or in the editor scripts]
Great Quest book  ;D :chocobo:
Title: Re: Quest Book - version 1.2
Post by: Zeriab on October 26, 2008, 10:11:09 AM
You make all quests in the script editor.
You can control the quests either with Script Calls in events or in custom scripts. Whatever you like.

What would you prefer?
An enumeration of the features and an explanation of the features? (Like the instructions in my Caterpillar script (http://rmrk.net/index.php/topic,29225.0.html))
A tutorial walking through how to make a quest?
A combination or something else?

Thanks for the input ^_^
*hugs*
 - Zeriab
Title: Re: Quest Book - version 1.2
Post by: Deadly Alince on October 30, 2008, 09:40:00 PM
thx ^^
Title: Re: Quest Book - version 1.2
Post by: tabbie on January 06, 2009, 02:50:04 AM
I couldn't figure out how to call the script. Like for testing until the CMS I need is done, how can I get it so that when a certain button is pressed to bring up the quest book.
Title: Re: Quest Book - version 1.2
Post by: Zeriab on January 06, 2009, 02:56:15 PM
Code: [Select]
$scene = Scene_Questbook.new

You can put that in the call script of an event. You can also use it other places. A call script is simply the easiest way of calling it.
Title: Re: Quest Book - version 1.2
Post by: tabbie on January 07, 2009, 05:21:30 AM
Okay, thanks. I put that into a Common Event and then made an item that calls the even. :D
Title: Re: Quest Book - version 1.2
Post by: AnimeBlue on February 09, 2009, 05:56:48 AM
Oh fart! >_< The link isn't working! Where can I get a copy of this script now? Thanks in advance. :(
Title: Re: Quest Book - version 1.2
Post by: Arrow on February 12, 2009, 11:23:49 PM
I really want this too! O_O
Title: Re: Quest Book - version 1.2
Post by: Zeriab on February 13, 2009, 05:41:39 AM
I have attached the files to my post ^_^
It just happens to be so that my free hosting was closed. I got it due to an ad stunt.

*hugs*
 - Zeriab
Title: Re: Quest Book - version 1.2
Post by: Arrow on February 14, 2009, 04:12:08 PM
Thanks a ton, Zeriab. : )
Title: Re: Quest Book - version 1.2
Post by: Adrien on April 26, 2009, 01:12:56 AM
All links to the examples and to the RAR version are 404 links, there broken please fix ASAP (please) I would like to use this
Title: Re: Quest Book - version 1.2
Post by: modern algebra on April 26, 2009, 06:40:24 AM
No, they aren't? http://rmrk.net/index.php/topic,29669.msg394599.html#msg394599
Title: Re: Quest Book - version 1.2
Post by: Japur on May 01, 2009, 03:06:11 PM
Hey dude,

Sorry for the late reaction, but I had a question. Wich part of the script did you use to select the boxes, like in the screen? Hmm, how do I put this in good english.. You see a selection over the little green boxes, what means that you can select them. What code did you use for that?

Greets! ;)

PS: Lovely script!
Title: Re: Quest Book - version 1.2
Post by: Silviera on May 03, 2009, 05:31:33 AM
Suggestion: Allow for each quest to have multiple completion outcomes.  This would be useful in games that allow the player to deal with each quest in different ways, enabling them to look back and see how they've been handling themselves over the course of the game.

Example Quest: Rescue a little girl from bandits.
Completion 1: Little girl rescued, bandits defeated.
Completion 2: Bandits defeated, but the little girl was killed.
Completion 3: Little girl rescued, but the bandits escaped.
Completion 4: Joined the bandits and ransomed off the little girl for pocket change.

Lastly, thanks for the great script.  It has been very helpful in my current project.
Title: Re: Quest Book - version 1.2
Post by: Zeriab on May 21, 2009, 08:52:32 PM
I am glad you like my script ^_^

@Japur
It all happens in the Window_Questbook class. The trick is to inherit from Window_Selectable.
To get the different size selection size I overwrite the following 4 methods:
update_cursor_rect
top_row
top_row=(row)
page_row_max


@Silviera
That's a good idea, but I am afraid some fairly heavy modifications are needed since the completion of a quest is determined by whether the last quest part have been reached or not.
You can mimic it by have 4 different quests where only one will have the first part displayed (i.e. conditions fulfilled).

*hugs*
 - Zeriab