The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: modern algebra on March 25, 2008, 08:05:14 PM

Title: Quest Journal v. 2.1
Post by: modern algebra on March 25, 2008, 08:05:14 PM
Quest Journal
Version: 2.1c
Author: modern algebra
Date: February 17, 2012

Version History



Description


This script provides a graphical interface for showing quest progress. It is objective based, meaning that you choose when to reveal objectives and you can set it so that they show up as complete or failed. That said, this script does not build quests for you; it is only a supplementary scene for showing them. As such, you need to event all of the quests yourself and update/monitor quest progress via script call. Therefore, pay close attention to the instructions both here and in the EDITABLE REGIONS.

For people already using 1.1 and wanting to convert their projects to the new Quest Journal 2.0, you don't have to TOTALLY restart making all of your quests. Just go to line 392 and replace the when branches there with the ones you made for 1.1. Then, if you wanted to make use of the new features like rewards, you can add those lines. Otherwise, the quests you setup will look and operate exactly like they did in 1.1. Similarly, all of the old commands, like $game_party.quests[id].reveal_objective (y) still work, so you won't need to go changing every event you ever used it for. But there are easier ways to do it now.

Features


Screenshots

(http://img535.imageshack.us/img535/2130/qj1.png)
A simple, completed quest which has a banner. As it has too much information to fit, you can select the quest and scroll down to see the rest. Moreover, notice that I have changed the labels (Missions, Summary, etc...), the fonts, the colors, and even the size of the text. All of this is customizable unlike in previous versions.
(http://img809.imageshack.us/img809/4820/qj4.png)
A pretty ugly screenshot to show that the order of everything can be changed. Want the description to show up first, then the name, then the banner, then the client, etc... you can do that!
(http://img695.imageshack.us/img695/4707/qj2.png)
This is the brand new Quest Purchasing scene! Here you can have the player pay gold to reveal a new quest.
(http://img839.imageshack.us/img839/8494/qj3h.png)
You can use a background image behind the quest menu if you so desire. That one does not mesh well at all; it's just a sample I found at http://1024x.net/65/-/Colorful_Pattern_Background/. You can also make the windows totally transparent if you want.

Instructions

Paste this script into the Script Editor (F11) in its own slot above Main and below Materials.

I would recommend separating the Configuration module from the Script itself in two different slots, as I think it makes it neater. That is totally optional though. If you do want to do it though, instructions on where to make the split are located in the Script Header at line 20.

Instructions for creating, updating and monitoring quests, as well as for changing the settings, are all in the Script header and in the two EDITABLE REGIONS. It is highly recommended that you take the time to familiarize yourself with them in detail.

In brief, however, the following codes are used to update quest progress:

Code: [Select]
reveal_objective (quest_id, objective_id_1, ..., objective_id_n)
  quest_id : the integer ID of the quest you want to access.
  objective_id_1, ..., objective_id_n : a list of the IDs of the
    objectives you want to operate on. It can be as few as one or as
    many as all of them.
conceal_objective (quest_id, objective_id_1, ..., objective_id_n)
complete_objective (quest_id, objective_id_1, ..., objective_id_n)
uncomplete_objective (quest_id, objective_id_1, ..., objective_id_n)
fail_objective (quest_id, objective_id_1, ..., objective_id_n)
unfail_objective (quest_id, objective_id_1, ..., objective_id_n)
change_reward_status (quest_id, value)

The following codes are used in a conditional progress to monitor quest progress (each of the objective_etc? will only return as true if the quest is also revealed):

Code: [Select]
quest_revealed? (quest_id)
  quest_id : the integer ID of the quest you want to access.
objective_revealed? (quest_id, objective_id_1, ... objective_id_n)
  objective_id_1, ..., objective_id_n : a list of the IDs of the
    objectives you want to operate on. It can be as few as one or as
    many as all of them.
quest_complete? (quest_id)
objective_complete? (quest_id, objective_id_1, ... objective_id_n)
quest_failed? (quest_id)
objective_failed? (quest_id, objective_id_1, ... objective_id_n)
quest_rewarded? (quest_id)

For details on what each of these does, see the script. As well, there are lots of other instructions in the script you should pay attention to. Read them carefully!

You can also change the attributes of quests in-game with any of the following codes:

Code: [Select]
quest (quest_id).method = new_value
  method : the attribute you want to change. This can be either:
    banner; name; description; objectives; prime_objectives; rewards;
    common_event_id; icon_index; or custom_categories.
  new_value : this is the value that you are changing it to. It must
    be of the same form as the original (ie. a string for name or
    description, an array of strings for objectives, an integer for
    icon_index, etc...)

Script


This script is too long to post, so please retrieve it from Pastebin (http://pastebin.com/XX3SMtJK).

You can also get it from the demo (http://rmrk.net/index.php?action=dlattach;topic=25533.0;attach=25804), but if you do, you need to take both the configuration module and the Implementation part. I recommend you take the clean configuration copy.

NB: This script REQUIRES the Paragraph Formatter (http://rmrk.net/index.php/topic,25129.0.html)! The Special Codes Formatter (http://rmrk.net/index.php/topic,25129.0.html) (found under the Addons in that same topic) is also recommended. If you want the Description box rounded, then you need the Bitmap Addons (http://rmrk.net/index.php/topic,32286.0.html) script.

Credit



Support


Please post in this thread at RMRK if you encounter any bugs or incompatibilities or errors, and I will do my best to resolve it. Feel free to post also if you have any suggestions or simply want to talk about the script.

Known Compatibility Issues

This script is designed to automatically insert itself in the default menu, if you turn that option on. It is also made to do the same with YEM Main Menu Melody, my own Full Status Custom Menu System, my own Phantasia-esque Custom Menu System, and Dargor's Custom Commands. It has to be pasted below them in the Script Editor, however. It may work if you place it below other Menus as well, but it was not designed for them and so there might be an incompatibility there. You can always turn MENU_ACCESS off and insert it manually into the other menu script if need be.

Other than menu systems, there probably aren't very many scripts with which it would be incompatible. If you encounter any, please post in this topic and I will try to help you out.

Demo


Please see attached (http://rmrk.net/index.php?action=dlattach;topic=25533.0;attach=25804) (need to be logged in)
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on March 26, 2008, 03:29:33 PM
Sorry everybody. There is a minor problem with the script.

I have uploaded a new version, but if you don't want to bother downloading anew, then the fix is:

Go to line 582 and find this line:

Code: [Select]
modalg_quest_jrnl_intlz (width, commands, column_max = 1, row_max = 0, spacing = 32)

Replace it with:

Code: [Select]
modalg_quest_jrnl_intlz (width, commands, column_max, row_max, spacing)
Title: Re: Quest Journal v. 1.0
Post by: gameo on March 27, 2008, 12:45:32 PM
Amazing modern! Just what i needed!

EDIT: Anyway that you can PM or post the script.....i'm using an older version of VX so i can't see yours, and i don't want to start my project over either. Enterbrain should have included compatibility support.
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on March 27, 2008, 06:59:23 PM
Umm, sure. You using Japanese translation?

Anyway, I'll put it in a text. Give me a moment.

EDIT::

THere, I added a text file. When I was saving it, it said it removed something though, so tell me if it has errors.
Title: Re: Quest Journal v. 1.0
Post by: gameo on March 28, 2008, 07:34:13 PM
Works fine, this script is amazing! The style and design is unique, and the functions itself reminds a lot of World of Warcraft's quest log.

Great app  ;)
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on March 28, 2008, 11:27:12 PM
I'm glad you liked it. I hope that no errors pop up anywhere, but be sure to tell me if they do and I will fix them as soon as possible
Title: Re: Quest Journal v. 1.0
Post by: Red Blood on March 29, 2008, 09:25:39 PM
Nice Script Rep+
Title: Re: Quest Journal v. 1.0
Post by: Leventhan on March 30, 2008, 01:38:59 PM
+rep
I see your scripts everywhere these days, you're really a hard worker.
Tried it and....of course it works!

<3 the layout of the quest screen.
EDIT:I still love it.
Title: Re: Quest Journal v. 1.0
Post by: Blade7NL on March 30, 2008, 04:13:57 PM
I absolutly love this script, but i am having a problem however.
I made a screenshot, would someone please take a look and tell me what to do to fix this?

 http://i223.photobucket.com/albums/dd78/bladenl/RPGVXScriptError.jpg  (http://i223.photobucket.com/albums/dd78/bladenl/RPGVXScriptError.jpg)

thnx
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on March 30, 2008, 04:16:32 PM
Hmm, I'm guessing that the description of the quest is nil, but it's a bit strange - I'll take a look. Can I see the quest that it is trying to draw (the way you set it up in the editor)?
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on March 30, 2008, 04:47:38 PM
How can I discheck the acctive obiective? (green to white)
Title: Re: Quest Journal v. 1.0
Post by: Blade7NL on March 30, 2008, 05:10:38 PM
Never mind, i found my fault, i just gave them the same quest ID. Stupid of me. :P
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on March 30, 2008, 05:16:44 PM
@Znik - I don't really understand the question. By default values, green denotes that the objective is complete, while white means that it's active. Once an objective is complete, you can't uncomplete it - that wouldn't make sense. If you wanted to, then you could conceal the objective, or you could reset the quest and not complete the objective this time. But, if you just want active objectives to be green and complete objectives to be white than you can changes these values at line 93:

Code: [Select]
  ACTIVE_COLOUR = 0              # The colour of a quest that is active
  COMPLETE_COLOUR = 11           # The colour of a quest that is complete
  FAILED_COLOUR = 18   

to
Code: [Select]
  ACTIVE_COLOUR = 11             # The colour of a quest that is active
  COMPLETE_COLOUR = 0           # The colour of a quest that is complete
  FAILED_COLOUR = 18   

@Blade - glad to hear that you solved your problem.
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on March 30, 2008, 05:41:41 PM
if i completed 1 tag i quest (green) how i can return to uncompleted (return to white).
example:
i make in common event [arallel proces where
i get 5 herbs but used it and i no have now but the completed tag was stay
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on March 30, 2008, 05:53:44 PM
Ah, I see.

I have no direct command, but you can do this:

Code: [Select]
q = $game_party.quests[quest_id]
q.complete_objectives.delete (objective_id)

I'll include a method to do that in the next version perhaps
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on March 31, 2008, 03:31:52 AM
works perfectly !
you are big man :D

thx
Title: Re: Quest Journal v. 1.0
Post by: Leventhan on March 31, 2008, 07:45:16 AM
works perfectly !
you are big man :D

thx
no he is modern XD
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on March 31, 2008, 11:51:24 AM
i paste in script and working
0o
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on March 31, 2008, 02:24:16 PM
you are big man :D

Thanks, though that compliment makes you sound a bit like a Korean prostitute :P. And I'm glad to hear that everything is working properly. I should be thanking you as you brought to my attention that the script should include an option to uncomplete an objective. So, thank you.
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on March 31, 2008, 04:33:57 PM
 wanna say: thx:>

i have another question :>
how i can conceal a whole quest?

this is for single obiective:
$game_party.quests[quest_id].conceal_objective (objective_id)
but i need conceal a quest :/

can you help?
thx :)
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on March 31, 2008, 09:39:07 PM
You can't really. Why do you want to?

You can delete them if you're done with the quest completely - Just $game_party.quests[id] = nil


But I really can't see any reason that you'd want to conceal a quest unless you have multiple parties and in that case you'd have a script that, if it was done intelligently in any way, would have multiple Game_Party objects and thus there would be no conflict.

But, it is a fairly easy thing to add, so if you can give a good reason, then I could add it.

Alright, I put up a new version. You can now use the codes:

Code: [Select]
$game_party.quests[quest_id].uncomplete_objective (objective_id)
$game_party.quests[quest_id].unfail_objective (objective_id)
$game_party.quests[quest_id].concealed = true/false

Note that uncomplete_objective is slightly too long for the call script window, and so I'd recommend inputting the code like so:

Code: [Select]
q = $game_party.quests
q[quest_id].uncomplete_objective (objective_id)
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on April 02, 2008, 11:14:47 AM
Code: [Select]
But I really can't see any reason that you'd want to conceal a quest

yea! now me too can't see :/
mayby i say for what i need

i wanna create the respowning quest
if i done it once i can repeat it any time

can you help once again?

sry for taking yours free time
Title: Re: Quest Journal v. 1.0
Post by: gameo on April 02, 2008, 01:46:19 PM
Aah, a repeative quest script. Shouldn't be too hard, i don't really know Ruby but i got "Code-Eyes" so i can see through almost any programming language and edit it. Thus, i can't write my own ruby so let's wait for modern. This sounds like a good feature.
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on April 02, 2008, 02:37:42 PM
You could remove a quest with this code:

Code: [Select]
$game_party.quests.remove (quest_id)

I actually have an error there, so before you do that, go into the script and at around line 562 yo should see:

Code: [Select]
@data.delete_at (quest_id)

That should be @data[quest_id] = nil


Anyway, I will release a new version soon - I am just going to change the array to a hash.
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on April 03, 2008, 08:54:49 AM
hmm...
its doesen working
if i talk to event with this script
doesent happend
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on April 03, 2008, 01:18:02 PM
Umm, can I see a test project with the error recreated for me?

Actually, here, I quickly modified the script to use a hash instead of an array to store quests - so try to see if the script in this demo works -
Title: Re: Quest Journal v. 1.0
Post by: Demonic Blade on April 03, 2008, 02:26:35 PM
Wow, that's a lot of errors and small fixes... anyways, I'm trying it out right now, it sounds (and looks) to cool to be true!
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on April 04, 2008, 03:35:33 AM
the down event without icon reveal a qest, and up exent without icon delete it. But if i want delete dosent happend :/
try:
http://www.megaupload.com/?d=UVMA097X
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on April 04, 2008, 05:12:45 AM
Well, the error is not in the script, but I have uploaded a version that stores the quests in a hash.

Anyway, your problem is that you have a common event turned on that consistently recreates the quest every time you remove it. Your problem will be fixed so long as you turn the Quest switch off before you remove the quest.

On a side note, your game looks pretty nice.

Wow, that's a lot of errors and small fixes... anyways, I'm trying it out right now, it sounds (and looks) to cool to be true!

No errors yet, thank God. So far, it's just been adding a few features.
Title: Re: Quest Journal v. 1.0
Post by: Leventhan on April 04, 2008, 06:32:48 AM
No errors yet, thank God. So far, it's just been adding a few features.

Yeah, so far the script seems to be stable.  :)
What features will you be adding, by the way?
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on April 04, 2008, 06:35:13 AM
The biggest planned feature is a Journal, where the user can actually use the keyboard and annotate his quests. Before that, I will probably throw in a journal which the game maker can annotate by command code.
Title: Re: Quest Journal v. 1.0
Post by: Znikomek on April 04, 2008, 11:18:27 AM
 
Anyway, your problem is that you have a common event turned on that consistently recreates the quest every time you remove it. Your problem will be fixed so long as you turn the Quest switch off before you remove the quest.

1 lost line and all cushed ;/
thx for help :D

On a side note, your game looks pretty nice.

you script too :D

so i waitnig for v2.0
good luck !
Title: Re: Quest Journal v. 1.0
Post by: modern algebra on April 10, 2008, 05:32:27 AM
Alright! Updated to Version 1.1. For you keeping track, this is actually fairly minor, since it is really just a name to encapsulate the new features that Znikomek asked me to add. But, it is characterized by a fix for a bug that kitaangel found involving quests with ID 4, so thanks to both of them.
Title: Re: Quest Journal v. 1.1
Post by: Znikomek on April 11, 2008, 09:07:45 PM
Thx for update :D
Title: Re: Quest Journal v. 1.1
Post by: Logiq121 on May 28, 2008, 04:07:22 AM
This is  my first time working with a script and it seems to be going pretty smoothly. I ran into one hiccup though. Is there anyway to check and see if only a perticular objective was completed?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on May 28, 2008, 01:16:24 PM
Well, not in a special command no. This was intended to be supplementary to the eventing required to make a quest normally, and so it is basically only a visual way of showing quests.

If you want to know when a particular objective has been completed, I would suggest just turning on an in-game switch when you complete the quest, and just checking the switch. That's the easiest way.

If you really don't want to use a switch for it, then you could use this code inside a Conditional Branch Script line:

Code: [Select]
$game_party.quests[quest_id].complete_objectives.include? (objective_id)
Title: Re: Quest Journal v. 1.1
Post by: Logiq121 on May 28, 2008, 05:33:39 PM
Sweet thanks. I've been using the switch. I just didn't know if I was missing something.
Title: Re: Quest Journal v. 1.1
Post by: ZOODOG on June 01, 2008, 01:11:57 PM
allright i downloaded the demo BuT it is a RAR fiel? i not sure how to open a RAR file in rpgmaker xp I love your quest menu i would really like to use it for my game can u send me a zipped rpg maker xp file of a project like simmular to  :blizj:  Chronicles of Sir Lag-A-Lot like a example game but alot shorter so i can just copy AND paste the script like i did for the Lag a lot ABS here   http://forums.rmrevolution.com/index.php/topic,1244.0.html      ??? ??? ??? ???
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 01, 2008, 01:16:54 PM
I would suggest you just download WinRAR (http://www.win-rar.com/download.html). It's free and easy to use. But anyway, here is a zip version
Title: Re: Quest Journal v. 1.1
Post by: ZOODOG on June 01, 2008, 01:21:02 PM
allright i saved it and tryed opening it but it didnt work game rgss2? ya i thought they opened with  just rgss? where do i get # 2 ???
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 01, 2008, 01:24:44 PM
This is a script for RMVX, not RMXP. To open it, you need to have the program RMVX. To download it, you can go to http://crankeye.com/?page=downloads and get RPG Maker VX English Trial
Title: Re: Quest Journal v. 1.1
Post by: ZOODOG on June 01, 2008, 01:27:54 PM
so  rpg maker vx is like a updated version of xp can i open all the stuff i have with xp on vx because i have worked hard on this game but i would like to also use your menu system
Title: Re: Quest Journal v. 1.1
Post by: HEast on June 01, 2008, 02:40:15 PM
so  rpg maker vx is like a updated version of xp can i open all the stuff i have with xp on vx because i have worked hard on this game but i would like to also use your menu system
no its not a update.
its rpg maker vx.
just a new rpg maker.
and no u cant open your xp game with a rpg maker vx.
Title: Re: Quest Journal v. 1.1
Post by: ZOODOG on June 01, 2008, 03:05:25 PM
ALLRIGHT ILL JUST MAKE A NEW GAME AND THANK YOU I GOT IT ....ITS REALLY HARD TO FIND SCRIPTS FOR RPVX OMG CAN SOMEONE HELP ME FIND A SITE WITH A BUNCH OF SCRIPS INCLUDEING ABS. Its extrimly hard to find scripts that acully work for this program rmxp scripts cant work with it correct? ??? :-* ^-^ ;8 :blizj: :blizj:
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 01, 2008, 04:59:24 PM
O...K...

Please don't type in all caps. That being said, you don't need to shift your project just for my quest system. There are a lot of quest systems out there for RMXP. Some good sites to look through are hbgames.org and rpgrevolution.com. If you do decide to switch to VX, then rmvx.net is also a possibility, and our own database has about 50 or so scripts for RMVX.
Title: Re: Quest Journal v. 1.1
Post by: keyonne on June 08, 2008, 08:25:09 PM
I have a problem. A scripter's least favorite words. :) Ok, I have another script (ACS) which is a crafting system to add tradeskills to my game. I put your script in, edited it, and ran my game as new yet the quest will not show anything. It's there, but it comes up as the default unknown name of ?'s and will not show the objectives or anything. I've used the show command script and it still doesn't show up. :/ I'm afraid my other script might be interfering but I hope to god that isn't the problem because both of them rock and I do not with to part wish either. I don't know what to do.

-edit: I just tried deleting my ACS script and running it that way. It is not the problem. :/ which leaves me even more clueless.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 09, 2008, 02:05:18 PM
I am guessing you did not fill in the quest, or rather, you are giving the wrong ID when you try to give the quest. So, if your setup is:

when 1
   name = '<quest_name>'
   description = '<quest_description>'
   objectives[0] = '<first_objective>'
     ...
   objectives[n] = '<nth objective>'
   prime = [<objective_id>, ..., <objective_id>]
   icon_index = <quest_icon_index>


then you need to do $game_party.quests[1] to call that quest. I'm guessing that maybe you are trying $game_party.quests[0] ?

If that doesn't work, you can send the project to me, and I will find and fix the problem then. If you feel uncomfortable sharing your project at this time, then just make a new project and try to reproduce the problem there.
Title: Re: Quest Journal v. 1.1
Post by: Da Bee on June 10, 2008, 09:46:20 AM
I have three questions about this.

How many quests can I have? I haven't tried it yet, but if you have more than the journal can fit in, does it scroll down the list?

My writing is really strange in the objectives and description. I am using Arial size 17 bold as my default font for the game. However, in the journal, the formatting is really weird. The last letter from each line gets cut off, and as the paragraphs go down, the spacing between each line gets smaller and smaller. The first paragraph has a space so big you could fit another line in between them. This isn't a major problem, but it makes the journal look untidy.

And I don't seem to be able to have more than four objectives for a quest. My main quest naturally has more than four objectives, but when they get to the bottom of the page, the page doesn't scroll down to see the rest. Perhaps this could be an update in general if it's a big thing; player presses enter on a quest, and the player can then scroll down and interact with the objective area.

If you could answer those, I would be really grateful. Oh, and by the way, this is an AWESOME script!
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 10, 2008, 01:29:54 PM
It is strange that the last letter from each line is getting cut off, and the spacing problem doesn't make much sense either. Would you mind taking a screenshot?

How many objectives will fit really depends on the length of the description and the length of the objectives. I would suggest cutting down on the length of the sentences. If you really need to have a lot of objectives in a quest, then I would suggest concealing objectives. Say, after you achieve three objectives, then just conceal the first objective, etc...

The reason I do not want to do it as you say, with pressing enter, is simply because I already have another plan for Enter in that script. Really though, there isn't much of a reason to have so many objective in a quest. If the number of objectives is greater than the size of the window, then I would suggest splitting the quest into parts.

As to a maximum number of quests, you can have as many as you want - it's only a question of memory. That list will scroll if you have more than fits the window. Once it gets high enough though, around 150 or so on my computer, then it will generate some minor lag when you first open the scene. I have a fix for that already, but I figure I will just release it with version 2.0 once I've finished the Journal half of the script.
Title: Re: Quest Journal v. 1.1
Post by: Da Bee on June 10, 2008, 04:17:22 PM
(http://i23.photobucket.com/albums/b382/DaWasp/Problem-1.png)

That's the problem. You can see the paragraph problem. The space gets smaller and smaller with each paragraph. And you can see those words with the ends cut off.

As for the objectives problem... I guess you're right. I'll find a way around it. I did contemplate splitting the main quest up, but I'm struggling to find a way that doesn't just seem... forced, if you know what I mean.
Title: Re: Quest Journal v. 1.1
Post by: keyonne on June 10, 2008, 09:58:02 PM
I have the script correct on both the description/setup of the quest and the call script. Both say 1, not 0. I really don't understand what's wrong. I'm going to try deleting the ACS again. Here is my game below for you to try to find the mistake. Anyone else on here is free to take a look at is as well. (There isn't much yet) However, if you steal my ideas, I will hunt you down!  :mad: lol

-edit: I deleted the ACS again... and still nothing. I'm clueless... It's probably a really stupid PEBKAC error. :/
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 11, 2008, 02:41:36 PM
Both shouldn't say 1. That number should be different for every quest. Try changing the second quest to "when 2".

EDIT:: I just downloaded to check if that is the problem. I also took it off your post so that nobody else could get to it to steal ideas :P I'll get back to you soon. I think I misunderstood your previous post.


@Da Bee: The Paragraph Formatter is messing up because of how small your text is. There's not a whole lot that I can do about that, unfortunately, as my formatter works by using an internal Bitmap method called text_size, and since that is inaccurate, my Quest Log will be as well. What I would suggest is to go into the script and press CTRL-F and look for all things that say this: <.size -= 4> without the arrows. Then play around with that value until it gets to a size at which text_size is determined accurately.

EDIT 2::

Okay, I found your problem keyonne, and it's in this screenshot:

(http://img137.imageshack.us/img137/5672/21398379zs1.png)

You have to change the 0 to 1, so Conditional Branch: Script: $game_party.quests[1].complete?

But, you also need to reveal an objective here too, as it's kind of weird to have a quest without objectives :P
Title: Re: Quest Journal v. 1.1
Post by: Da Bee on June 11, 2008, 04:11:23 PM
OK, I'll play around with the settings. Thanks for all your help.
Title: Re: Quest Journal v. 1.1
Post by: keyonne on June 14, 2008, 02:39:29 AM
You are just awesome. One thing though; the remove script won't remove the quest from teh list in the menu. :/
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 14, 2008, 05:07:03 AM
I am guessing that that is because you are re-initiating the quest simply by having it in a parallel process. The Quest Script reveals a quest every time it is called, so the very fact that you are checking if it is complete (constantly), it is re-revealing the quest. So, either turn off the Switch [0009: End of Opening] or introduce another way to stop that check once the quest has been completed and it should go away.
Title: Re: Quest Journal v. 1.1
Post by: keyonne on June 14, 2008, 02:57:16 PM
lol now I feel like an idiot. ^.^' I set the quest updated to a call event, but I think I'll just put it into the objective events next time to save the hassle.
Title: Re: Quest Journal v. 1.1
Post by: Scooby on June 15, 2008, 09:47:26 AM
Thanks so much.
If you wouldn't of added that demo, I would of gave up on trying to configure it.
It's really useful, and I'm using it for my RPG.
Thanks <3

Uh oh, problem.
I have 2 quests set up.
I got one quest working and it and it's objectives are in the journal.
But when I summon the next quest it shows up as "? ? ? ? ? ? ?" (without the spaces) in the journal.
And there's a extra "? ? ? ? ? ? ? ? ?" (without the spaces)

So 3 Quests.

Code: [Select]
   when 1 # Townsfolk
      name = 'Townsfolk'
      description = 'Talk to all of the townsfolk in Lathern'
      objectives[0] = 'Talk to the townsfolk'
      objectives[1] = 'Return to the Priest'
      icon_index = 79
    when 4 # Fathur
      name = 'Fathur'
      description = 'Head through Emerald Forest, Go to Eurean, Talk to Fathur.'
      objectives[0] = 'Talk to Fathur'
      objectives[1] = 'blah'
      objectives[2] = "blah"
      # Set prime objectives in an array based on index
      prime = [0, 2]
      icon_index = 137

The Townsfolk quest is the one that works, and the Fathur one shows up as a "? ? ? ? ? ? ? ?" (without the spaces)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 15, 2008, 08:38:34 PM
When those question marks pop up, it means that you are calling a quest that is either not created or does not have a name given. So: that tells me that you are calling two quests that you have not made.

So, go through the events which cause these question marks to pop up and, since your 'Fathur' (Father?) quest has ID 4, make sure that the only $game_party.quests lines have ID 4.

Remember, anytime you mention another quest, such as $game_party.quests[3] or $game_party.quests[2], you will initialize it in the menu, and since they don't exist, they show up with default values, including the default name of ? ? ? ? ? ? . So, make ssure all $game_party.quests lines have ID 4, or else change the ID of the 'Fathur' quest in the database.
Title: Re: Quest Journal v. 1.1
Post by: KryiTheRogue on June 15, 2008, 10:48:09 PM
I love the idea, but I'm having a small issue with looking at my quests.  I left the demo quests up just to I could see how it works.  I called the script in to the game with "$game_party.quests[quest_id]" (quest id being 1...fetch).  I go to menu and look at the quest and receive an error

????? 'Quest Journal' ? 800 ??? NameError ????????
uninitialized constant Window_QuestInfo::Paragrapher 

 :-\ How can this be fixed?  :'(
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 16, 2008, 08:45:49 PM
My guess is that you did not install the Paragraph Formatter. You can take it from the demo directly or it's topic here in the database.
Title: Re: Quest Journal v. 1.1
Post by: R P G on July 05, 2008, 05:42:06 AM
How do I call the script if I was to talk to someone? Also, how do I link it with a custom menu system? I added the script and it brought out it's own menu.

Thanks.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 05, 2008, 11:31:38 AM
I imagine that that would mean that your other script is not named Scene_Menu? I can't imagine how to include it with your CMS that I do not know anything about - I need to see the script to see what needs to be done.

To call it from talking to someone, all you need to do is:

  $scene = Scene_Quest.new

If you want to call it to a specific category and quest index, then add the arguments (category_index, quest_index) -

so $scene = Scene_Quest.new (1, 2) would bring you to 2nd active quest.

Title: Re: Quest Journal v. 1.1
Post by: R P G on July 05, 2008, 04:58:08 PM
Alright thanks I got the calling part.

Well I don't neccesarily need to link it with my custom menu system, but I just wanted to know. One thing though, when you call the quest screen and then exit, it goes to your menu screen. How do I disable that so that it exits the quest screen and doesn't go to your main menu screen?

Oh yeah, I would like it so that it doesn't show up as Quests on the main menu screen.

Thanks.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 05, 2008, 09:49:39 PM
See this section - it starts at around line 87

Code: [Select]

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Constants
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Editable Region
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  QUESTS_LABEL = 'Quests'        # What you want Quests to be called (eg. 'Missions')
  ACTIVE_QUEST_ICON = 149        # What icon signifies a quest is active
  COMPLETE_QUEST_ICON = 150      # What icon signifies a quest is complete
  FAILED_QUEST_ICON = 179        # What icon signifies a quest is failed
  BULLET_CHARACTER = '?'         # The character used for listing objectives
  ACTIVE_COLOUR = 0              # The colour of a quest that is active
  COMPLETE_COLOUR = 11           # The colour of a quest that is complete
  FAILED_COLOUR = 18             # The colour of a quest that is failed
  MENU_ACCESS = true             # Can the script be accessed through the menu?
  MENU_INDEX = 4                 # If above is true, where in the command window?
  KEY_ACCESS = false             # Can the quest log be accessed by a key         
  MAPKEY_BUTTON = Input::L       # If above is true, which button?

To make it so that it has a different label (not 'Quests') , change QUESTS_LABEL

To disable menu access, set MENU_ACCESS = false. That will also make it so that it returns to the Map once you exit the scene. I don't really have anything in place if you want to be able to access it from the menu but not go back to the menu. Sorry. There might be a way to get around it, but nothing built into the script and no way I can think of right now.
Title: Re: Quest Journal v. 1.1
Post by: R P G on July 06, 2008, 05:25:51 PM
Hey thanks a lot for your time Modern. It works perfectly. Thank you.

- Oh yeah one more thing, what would I have to delete in the script in order to just show 3 categories and not give an option to show "All" quests?

For example, when I open up the quest window, it first shows quests from a certain place, then when I use the horizontal keys to move right into a different category, it shows quests from that particular place and so on. Each icon will list quests from that specific place.

The quests in my game are just for fun to gain extra items and gold so you can never fail them. Is there a way to delete or modify that column?

Sorry if this will be too much work to look into. I don't know anything about scripts. Thanks again.
Title: Re: Quest Journal v. 1.1
Post by: Shadow Eye on July 12, 2008, 04:19:36 AM
The script works perfectly for me, but I gots a question now. Is there a way to set up the menu part so it only shows the first tab, the one that lists all quests. So the player can only use that tab, and the other two don't show up or anything? If not, its okay, I was just wondering since my game I would use this in would only have one quest listed.

Oh, and if I set more objectives than the window can hold for a quest, will it allow the player to scroll down, or will I have to conceal some?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 12, 2008, 11:00:43 AM
No, it won't scroll down.

No, there is no way built in to only show the one tab, sorry. It wouldn't be a very hard edit, but I don't have the time right now. Sorry.
Title: Re: Quest Journal v. 1.1
Post by: Shadow Eye on July 12, 2008, 05:40:32 PM
No problem, I was just wondering. Either way, great script!
Title: Re: Quest Journal v. 1.1
Post by: vailreth on July 16, 2008, 08:37:17 PM
I am attempting to use this Script with the KCG_CustomMenuCommand script from the demo that can be found at http://www.rpgmakervx.net/?showtopic=1044 (http://www.rpgmakervx.net/?showtopic=1044). i am experiencing a problem with  the Quest Script  disabling some of the commands  they added as well as the script causing some of the menu items to be renamed. if you have time Modern would you mind looking at these scripts and seeing if you can make them compatible. i would really like to use your script.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 16, 2008, 10:18:06 PM
Try putting the Quest Journal below all of the KGC scripts in the editor
Title: Re: Quest Journal v. 1.1
Post by: vailreth on July 17, 2008, 01:09:43 AM
I have them  bellow all of the KGC scripts and  i am still en countering  a bug where the status menu command gets renamed with the default dfficulty setting.
I would like to thank you for creating this script  it  really was what i was looking for.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 17, 2008, 01:37:03 AM
I just added my Quest Journal to the KGC Scripts Library, and there is no problem I can detect. Do you have any other scripts that might be interfering. Here's what my screen looks like:

(http://img516.imageshack.us/img516/6357/screenshotlt0.png)

And my script editor:

(http://img230.imageshack.us/img230/6665/scripteditoraf3.png)
Title: Re: Quest Journal v. 1.1
Post by: vailreth on July 17, 2008, 03:06:53 AM
Thank you for the time you are taking to help.  I do not have any other scripts save for the KCG scripts.  Going back and checking it i find  that the command name change only occurs when i change the difficulty. if there is any information i can give you to help i would be glad too.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 17, 2008, 04:31:40 AM
I see. Well go into KGC_BattleDifficulty in the Scripts Editor and go to line 524:

Code: [Select]
      @command_window.replace_command(@__command_set_difficulty_index,

Change it to:

Code: [Select]
      @command_window.replace_command(@__command_set_difficulty_index + 1,

See if that fixes the problem.
Title: Re: Quest Journal v. 1.1
Post by: vailreth on July 17, 2008, 06:16:07 PM
Thank you for your assistance it  works without error now.
Title: Re: Quest Journal v. 1.1
Post by: Wrong on July 31, 2008, 08:04:02 PM
Hi, sorry to trouble.

I would like to ask if i can use this script with Syvkal's ring menu. http://www.rpgrevolution.com/forums/?showtopic=15958 .

I thought i can just disable your menu and add "$scene =scene_Quest.new" on his menu ... but i encountered many errors as soon i hit menu. So i thought (i am sorry for this) and removed your game window part to test it out, i can open the ring out but i got the

ArgumentError Occured while running script

wrong number of arguments (3 for 2)


Do you know which script is causing the error?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 31, 2008, 11:38:16 PM
Hmm, well that's a weird error. I just tested the two scripts in a new project and they seemed to work fine. The only thing I changed was this, in the Syvkal script:

Code: [Select]
   
   ["Quests", Cache::picture ('Icon_Equip'), "$scene =  Scene_Quest.new"],

underneath:

Code: [Select]

   # Preferably Insert your custom Menu Options Here
   # Otherwise the existing Menu Options will return to wrong point on the Menu

at line 60. It worked fine. I used Icon_Equip just to test - I imagine you'd want to change that though.
Title: Re: Quest Journal v. 1.1
Post by: Wrong on August 01, 2008, 09:26:57 PM
Ok, sorry again.

I tried again this time by pasting the syvkal's menu bar (required by ring menu) and the ring menu into your Quest journal V1.1 demo.

as soon i open the menu

i get

Script 'Quest Journal" line 915: NoMethodError occurred.

Undefined method 'commands' for #<Window_RingMenu:0x1928a40> 

i am sorry for the trouble.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 02, 2008, 02:13:20 AM
Try attaching that project to your post and I will take a look. I did the exact same thing with the script and it worked perfectly fine.


P.S. I put it below the Quest Journal. I think that the error you reported may occur if you put it above. So put it below.
Title: Re: Quest Journal v. 1.1
Post by: Wrong on August 02, 2008, 02:42:03 AM
Actually i don't have a project yet, i am looking to find a compatible quest log before i start.
But all i did was pasting ... them in this order in your Quest journal Demo

Syvkal's menu bar   (the link for this is in the same webpage i posted)
Ring menu
------- (waves here)
Paragraph Formatter
Quest Journal
------- (waves here)

and i put all her icon under picture folder.

After i begin your demo from the start. ...after the autorun messages. I open the menu with ESC Then i get  the messages.

I can't find a way to post the stuff on your demo. The attach isn't taking my things.

sorry for the trouble. If it really doesn't work.. don't worry about it. I can always use the "input" keys to use the quest log. Thank you.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 02, 2008, 11:07:51 AM
Yeah, put the Ring Menu below the Quest Journal in the editor.
Title: Re: Quest Journal v. 1.1
Post by: Wrong on August 03, 2008, 02:52:34 AM
It works now, thank you.
Title: Re: Quest Journal v. 1.1
Post by: moejoeman on August 22, 2008, 02:31:04 AM
Thanx mate
Title: Re: Quest Journal v. 1.1
Post by: Yanfly on September 06, 2008, 11:00:48 PM
A bit of a nitpick. Quests don't appear in order of their Quest ID.

(http://www.pockethouse.com/misc/questmix.jpg)

At first, I wondered if I was going crazy while I was creating my game, but I fired up my test engine and put in these values to test it:

Code: [Select]
    when 1
      name = 'Number 1'
      description = 'Number 1'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
   
    when 2
      name = 'Number 2'
      description = 'Number 2'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
     
    when 3
      name = 'Number 3'
      description = 'Number 3'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
     
    when 4
      name = 'Number 4'
      description = 'Number 4'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
     
    when 5
      name = 'Number 5'
      description = 'Number 5'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
     
    when 6
      name = 'Number 6'
      description = 'Number 6'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
     
    when 7
      name = 'Number 7'
      description = 'Number 7'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
     
    when 8
      name = 'Number 8'
      description = 'Number 8'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
     
    when 9
      name = 'Number 9'
      description = 'Number 9'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1
     
    when 10
      name = 'Number 10'
      description = 'Number 10'
      objectives[0] = 'Objective 1'
      prime = [0]
      icon_index = 1

The results are as shown as in the screenshot I posted just above.
Now, is there any way to sort the array? Every attempt I've tried to do so far has lead me to revel in an undefined [] operation.
To make sure it wasn't just incompatibility issues, I copied and pasted the dummy quests 1 through 10 into the demo you delivered as well. Same problem and same order.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 07, 2008, 03:19:21 PM
Yeah, it is a little strange I know.

Anyway, go to this section of code (line 518 with demo settings):

Code: [Select]
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def list
    quest_list = @data.values
    quest_list.each { |i| quest_list.delete (i) if i.concealed }
    return quest_list
  end

and change it to:

Code: [Select]
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def list
    quest_list = @data.values.sort { |a, b| a.id <=> b.id }
    quest_list.each { |i| quest_list.delete (i) if i.concealed }
    return quest_list
  end

That should sort it out.
Title: Re: Quest Journal v. 1.1
Post by: Yanfly on September 08, 2008, 03:35:58 AM
Very rocking. Works nicely now~

This script is definitely one of your strongest due to its game-staple utility so I'm very glad to see it working at full capacity.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 08, 2008, 03:37:28 AM
Thanks. It was one of my first for VX so I'm happy that you like it. I still haven't gotten around to Version 2 yet though, with the actual Journal :(
Title: Re: Quest Journal v. 1.1
Post by: spartanman on September 22, 2008, 09:36:52 PM
This is a great script but I'm running into a problem.

My quest has 10 objectives, and  objective 9 and 10 are cut off by the window. Is it possible to have the window scrollable?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 22, 2008, 11:59:23 PM
No. It technically wouldn't be hard to add, but it would interfere with the secondary goal of this script, which is not yet implemented but is a user-editable Journal that would be called by selecting a quest. Since that feature is planned, I had not added scrolling functionality.

I would suggest one of two things:

(A) Split the quest in two
(B) Conceal some of the earlier objectives as they grow more distant
Title: Re: Quest Journal v. 1.1
Post by: spartanman on September 23, 2008, 12:48:32 AM
hmm okay, thanks for the reply.

I've looked and I cant find it but is there an area where I can reduce the spacing between the bullet objective items?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 23, 2008, 01:03:09 AM
Yeah, if you go down to Window_QuestInfo, you can change it. In the demo, this line is at 859, but with quests added it's probably much further down.

Code: [Select]

      y += WLH*([formatted_obj.lines.size, 2].min)

It is directly surrounded by these lines:

Code: [Select]
quest.revealed_objectives.each { |i|
      # Get the correct color
      contents.font.color = quest.complete_objectives.include? (i) ?
        text_color (ModAlg_QuestData::COMPLETE_COLOUR) : quest.failed_objectives.include? (i) ?
        text_color (ModAlg_QuestData::FAILED_COLOUR) : text_color (ModAlg_QuestData::ACTIVE_COLOUR)
      # Get objective
      objective = quest.objectives[i]
      # Draw Bullet
      tw = contents.text_size (ModAlg_QuestData::BULLET_CHARACTER).width
      x = 8
      contents.draw_text (x, y, tw, WLH, ModAlg_QuestData::BULLET_CHARACTER)
      x += tw + 4
      # Format the objective
      obj_bitmap = Bitmap.new (contents.width - x, 2*WLH)
      obj_bitmap.font = contents.font
      obj_bitmap.font.size -= 4
      formatted_obj = formatter.format (objective, obj_bitmap)
      # Draw Objective
      bmp = artist.draw (formatted_obj)
      contents.blt (x, y + 4, bmp, bmp.rect)
      # Modify the Y accordingly
      y += WLH*([formatted_obj.lines.size, 2].min)
    }
  end

Anyway, if you change what is added there, then that will change the spacing between each objective.
Title: Re: Quest Journal v. 1.1
Post by: spartanman on September 23, 2008, 01:08:09 AM
Perfect that works great!!! Thank you!!
Title: Re: Quest Journal v. 1.1
Post by: Selacius on September 27, 2008, 04:17:27 AM
Great script. I am curious of two things.
a) Could u separate the quest definitions into a separate file for ease of management?
b) How can you check to see if certain objectives are revealed. As in, I have some events which I want to appear only when the player is at a certain place in a quest line.

Thanks again
Title: Re: Quest Journal v. 1.1
Post by: Selacius on October 02, 2008, 01:30:24 AM
Anything on the two questions in the post above? More so how to check if certain objectives are revealed/completed?
Thanks.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 02, 2008, 03:32:31 AM
a) What do you mean by this? Separate file as in text document?

b) You can, but it doesn't have a nice command:

It can be done like this though:

$game_party.quests[quest_id].revealed_objectives.include? (index)

Just put that code in a Conditional Branch: Script command.
Title: Re: Quest Journal v. 1.1
Post by: Selacius on October 02, 2008, 01:12:23 PM
a) Create a second script module for us to create quests in. Just so they are separate from the main script and things aren't so long etc.

b) Yea thats what I am looking for. certain events depend on whether certain objectives are complete. Thanks.

Also, if I have your permission I would like to attempt to modify the script to include automatic quest started, object updated and quest completion messages. Also going to try to to put quest defined gold and experience and have it automatically given out upon quest completion.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 02, 2008, 03:22:19 PM
Well, knock yourself out.

And if you want to separate it into a separate script file, just cut out this part:

Code: [Select]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Constants
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Editable Region
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  QUESTS_LABEL = 'Quests'        # What you want Quests to be called (eg. 'Missions')
  ACTIVE_QUEST_ICON = 149        # What icon signifies a quest is active
  COMPLETE_QUEST_ICON = 150      # What icon signifies a quest is complete
  FAILED_QUEST_ICON = 179        # What icon signifies a quest is failed
  BULLET_CHARACTER = '?'         # The character used for listing objectives
  ACTIVE_COLOUR = 0              # The colour of a quest that is active
  COMPLETE_COLOUR = 11           # The colour of a quest that is complete
  FAILED_COLOUR = 18             # The colour of a quest that is failed
  MENU_ACCESS = true             # Can the script be accessed through the menu?
  MENU_INDEX = 4                 # If above is true, where in the command window?
  KEY_ACCESS = false             # Can the quest log be accessed by a key         
  MAPKEY_BUTTON = Input::L       # If above is true, which button?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Quest Data
  #----------------------------------------------------------------------------
  #  Returns skeleton data for the quesr
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def self.quest_data (id)
    # Set class variables to corresponding arguments
    objectives = []
    name = '??????'
    description = '??????????'
    icon_index = 0
    case id
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * EDITABLE REGION
    #------------------------------------------------------------------------
    #  To set up a quest, first identify it with an ID - this can be anything
    #  as long as it is not the same as another quest, but it is important to
    #  remember this ID as it is the only way to access your quest.
    #    In any case, the format for setting up a quest is:
    #
    #      when <quest_id> # Give the quest an ID number
    #        name = '<quest_name>'
    #        description = '<quest_description>'
    #        objectives[0] = '<first_objective>'
    #        ...
    #        objectives[n] = '<nth objective>'
    #        prime = [<objective_id>, ..., <objective_id>]
    #        icon_index = <quest_icon_index>
    #
    #    Each of these values have an importance.
    #      name is the name of the quest
    #      description is a small blurb explaining the overall goal of the quest
    #      objective[0..n] are short-term goals that lead to the overall goal
    #      primes are which objectives need to be complete before the quest is
    #        considered to be complete
    #      icon_index is the icon that represents the quest
    #
    #    Note that any of the above values can be omitted without throwing an
    #    error, but for the quest to work properly you should at least set the
    #    name, description, and objectives. If you do omit these, the default
    #    values are:
    #   
    #      name = '??????'
    #      description = '??????????'
    #      objectives = []
    #      prime = [all objectives]
    #      icon_index = 0
    #
    #   If you do want to require that all objectives must be satisfied before
    #   the quest is complete, then do not bother defining it. Otherwise, be
    #   sure to set it.
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    when 1 # Fetch
      name = 'Fetch'
      description = 'Martha needs someone to play with her dog'
      objectives[0] = 'Find a stick'
      objectives[1] = 'Throw the stick to the dog'
      objectives[2] = 'Retrieve the stick from the dog'
      icon_index = 79
    when 4 # Cat Retrieval
      name = 'Cat Retrieval'
      description = 'Mrs. Bunderby has lost her cat, and she has employed you to find it.'
      objectives[0] = 'Find the lost cat'
      objectives[1] = 'Climb the tree and retrieve the cat'
      objectives[2] = "Return a cat to Mrs. Bunderby"
      # Set prime objectives in an array based on index
      prime = [0, 2]
      icon_index = 137
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * END EDITABLE REGION
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    end
    return name, description, objectives, prime, icon_index
  end

Insert a new script Entry, and put this in:

Code: [Select]
module ModAlg_QuestData
  <paste the part you cut out here>
end
Title: Re: Quest Journal v. 1.1
Post by: Selacius on October 03, 2008, 04:09:29 AM
Hey having a minor problem with that code you gave me:
$game_party.quests[quest_id].revealed_objectives.include? (index)

If I go to a map which has a parallel event with that code as a conditional element before the quest has been started then the quest will be revealed but none of the objectives will be displayed. Once again I need this because I have a boat I want to appear as soon as a certain objective of a quest has been completed, and requires a parallel process. It works fine for action button and player touch systems.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 03, 2008, 04:22:27 AM
Well, then just put it within a con. branch checking if the quest has been revealed:

$game_party.quests.revealed? (quest_id)
Title: Re: Quest Journal v. 1.1
Post by: Selacius on October 13, 2008, 04:54:29 AM
Im getting an error with this when I use MOGs Scene Menu. It is in the Window_VaryHelpSize super() line. I don't know what the problem is though. Any ideas?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 13, 2008, 02:34:22 PM
I don't know what MOG's Scene_Menu is. Link?

I'm guessing he's overwritten Window_Help.
Title: Re: Quest Journal v. 1.1
Post by: Selacius on October 13, 2008, 04:10:02 PM
Fixed it. Seems that all I needed was a clean copy of the menu script. I must've fiddled with something.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 13, 2008, 04:10:34 PM
I'm glad to hear it.
Title: Re: Quest Journal v. 1.1
Post by: Selacius on October 13, 2008, 05:12:21 PM
I hope you don't mind that I adjusted a few things on the quest journal so it fits with the template for the MOG menus. Also I am curious how I could add a wait in the script, more so the part where the objectives get updated. As I said earlier I am modifying the script so it automatically gives out experience and gold rewards if they are defined. I am also getting it to work with Khai's Item Found script, in which you call everything individually, but in order for the script to display every reward there needs to be a delay between calling the command. Any idea how I could add one? I've tried wait() but it does not work.
Title: Re: Quest Journal v. 1.1
Post by: klonoa23 on October 16, 2008, 01:35:49 AM
This is a great script, I was just wandering is there anyway to not make a quest show up in the "Show all quests" tabs or can you gid rid of that tab all together? I want to do this also with the failed tabs list too.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 18, 2008, 01:06:01 AM
Well, you can conceal quests entirely, but I take it you want the other categories to still show the quest.

In any case, no, there is no way built in to the script. I'd have to do a couple minor mods first.
Title: Re: Quest Journal v. 1.1
Post by: klonoa23 on October 18, 2008, 07:31:19 AM
Ok no big deal, just wandering lol. Great script real easy to use, now that i got the hang of it I guess. ;)
Title: Re: Quest Journal v. 1.1
Post by: lomastul on October 18, 2008, 12:55:54 PM
hello, modern algebra.
i once used atoria's "Uber quest log" and it had some features i really liked like: a "!" picture floating above the head of an npc that got a quest for you, a name above the npc's and the main hero, and an icon with a "V" that is displayed inside the quest menu when a quest is done.
but then i started to use your quest system because it's user friendly and quite easy to use + it looks better on the menu :P and it's awesome.
so what i wanna ask is:
is it possible that you can add any of the features that atoria's "Uber quest log" had into you quest system?
here's the script made by atoria [in case that you'll need it]:

Spoiler for:
Code: [Select]
#=======================================
# ** Scene_Quests
# ** Created by coolmariners98 (Atoria)
#------------------------------------------------------------------------------
#  Please do not copy and distribute claiming to have created this.
#  I would like full credit, even though this script is kind of crappy.
#=======================================
class Scene_Quests
  # * Object Initialization
  def initialize(quest_index = 0)
    @quest_index = quest_index
  end
 
  def main
    @command_window = Window_Qmand.new(160, $quest.questname) # actually makes window
    @command_window.index = @quest_index
   
    # while loop determines what to show
    tmp = 1
    tmp2 = 10
    tmp3 = 0
    $quest.totalfound = 0
    $quest.moneyearned = 0
    $quest.expearned = 0
    $quest.rpearned = 0
    while (tmp3 < $quest.totalquests)
      if $quest.showdisabledquests == true and $quest.qupdate[tmp] == false
        @command_window.disable_item(tmp3)
      else
        $quest.totalfound += 1
      end
      if $quest.handin[tmp3] == true
        @command_window.finished(tmp3)
        $quest.moneyearned += $quest.goldreward[tmp3]
        $quest.expearned += $quest.expreward[tmp3]
        $quest.rpearned += $quest.rpreward[tmp3]
        $quest.totalcompleted += 1
      end
      tmp += 10
      tmp2 += 10
      tmp3 +=1
    end
     
    # Make quest status window
    @qs_window = Quest_Status.new
    @qs_window.x = 0
    @qs_window.y = 300

    # Make quest info window
    @qi_window = Quest_Info.new
    @qi_window.x = 160
    @qi_window.y = 0
     
    # Make quest window
    @status_window = Quest.new
    @status_window.x = 160
    @status_window.y = 180
    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
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @status_window.dispose
    @qs_window.dispose
    @qi_window.dispose
  end
  def update
    @command_window.update
    @status_window.update
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      Sound.play_cancel
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      index = @command_window.index
      #pattern on switch is index * 10 + 1
      if $quest.qupdate[index * 10 + 1] == false
        Sound.play_buzzer
        return
      else
        $quest.whichquest = index
        Sound.play_decision       
        @status_window.dispose
        @status_window = Quest.new
        @status_window.x = 160
        @status_window.y = 180
        @status_window.update
      end
      return
    end
  end
 
end

#=======================================
# ** Quest_Status
# ** Created by coolmariners98
#------------------------------------------------------------------------------
#  This displays what has been done so far in your quests (upper middle window)
#=======================================
class Quest_Status < Window_Base
  def initialize
    super(0, 0, 160, 117)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -10, 150, 32, "Total Quests: " + $quest.totalfound.to_s)
    self.contents.font.color = system_color
    self.contents.draw_text(0, 8, 150, 32, "Total Complete: " + $quest.totalcompleted.to_s)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 26, 150, 32, "Money: " + $quest.moneyearned.to_s)
    self.contents.font.color = system_color
    self.contents.draw_text(0, 44, 150, 32, "Exp: " + $quest.expearned.to_s)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 62, 150, 32, "RP: " + $quest.rpearned.to_s)
  end
end

#=======================================
# ** Quest_Info
# ** Created by coolmariners98
#------------------------------------------------------------------------------
#  This displays all the quest information in the upper right window
#=======================================
class Quest_Info < Window_Base
  def initialize
    super(0, 0, 385, 180)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = text_color(14)
    self.contents.draw_text(0, -10, 380, 32, "Quest Information")
    self.contents.font.color = normal_color
    if $quest.totalfound != 0
      self.contents.draw_wrap_text(0, 20, 350, 16, $quest.preinfo[$quest.whichquest])
    end
  end
end

#=======================================
# ** Quest
# ** Created by coolmariners98
#------------------------------------------------------------------------------
#  This displays all the quest information in the bottom right window
#=======================================
class Quest < Window_Selectable
  def initialize
    super(0, 0, 385, 237)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    if $quest.totalfound != 0
      bitmap = Cache.character($quest.charspriteN[$quest.whichquest])
      sign = $quest.charspriteN[$quest.whichquest][/^[\!\$]./]
      if sign != nil and sign.include?('$')
        cw = bitmap.width / 3
        ch = bitmap.height / 4
      else
        cw = bitmap.width / 12
        ch = bitmap.height / 8
      end
      n = $quest.charspriteI[$quest.whichquest]
      src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
      self.contents.blt(19 - cw / 2, 57 - ch, bitmap, src_rect) 
      if $quest.qupdate[(($quest.whichquest * 10) + 10)]
        bitmap2 = Cache.picture("complete.png")
        src_rect2 = Rect.new(0, 0, bitmap2.width, bitmap2.height)
        self.contents.blt(300, 10, bitmap2, src_rect2)
      end
      self.contents.font.color = system_color
      self.contents.draw_text(50, 0, 385, 45, "Name: " + $quest.charname[$quest.whichquest])
      self.contents.font.color = normal_color
      self.contents.draw_text(50, 0, 385, 80, "Location: " + $quest.location[$quest.whichquest])
      self.contents.font.color = system_color
      self.contents.draw_text(50, 0, 385, 115, "Reward: " + $quest.textreward[$quest.whichquest])
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 0, 435, 175, "Quest Objectives:")
      temp = $quest.whichquest
      script = (temp * 8)
      easy = 0
      switch = 2
      switch2 = (temp * 10) + 2
     while (switch < 10)
       if $quest.objs[script] == " "
         $quest.qupdate[switch2] = true
       end
       if $quest.qupdate[switch2]
         self.contents.font.color = text_color(7)
         self.contents.draw_text(0, 0, 435, 210 + (easy * 35), $quest.objs[script])
       else
         self.contents.font.color = normal_color
         self.contents.draw_text(0, 0, 435, 210 + (easy * 35), $quest.objs[script])
       end
       easy += 1
       script += 1
       switch += 1
       switch2 += 1
     end

    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end
#=======================================
# ** Window_Qmand
# ** Created by coolmariners98
#------------------------------------------------------------------------------
#  This displays all the quest information in the bottom right window
#=======================================
class Window_Qmand < Window_Selectable
  def initialize(width, commands)
    super(0, 0, width, 300)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    refresh
    self.index = 0
  end
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color, true)
    end
  end
  def draw_item(index, color, enabled = true)
    self.contents.font.color = color
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, @commands[index])
  end
  def disable_item(index)
    draw_item(index, text_color(7), true)
  end
  def delete_item(index)
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  end
  def finished(index)
    draw_item(index, text_color(3), true)
  end
end

#==============================================================================
#==============================================================================
#==============================================================================
# ** DON'T TOUCH BELOW HERE UNLESS YOU KNOW WHAT YOU'RE DOING
#==============================================================================
#==============================================================================
#==============================================================================
#==============================================================================
# ** Event Text Display
#==============================================================================
# Created By: Áص¹
# Modified By: SephirothSpawn
# Modified By: Me™
# Modified By: Atoria
# Version 2.1
# 2006-03-04
#==============================================================================
# * Instructions :
#
#  ~ Creating Event With Text Display
#   - Put a Comment on the Page With
#   [CD____]
#   - Place Text to Be Displayed in the Blank
#------------------------------------------------------------------------------
# * Customization :
#
#  ~ NPC Event Colors
#   - Event_Color = Color
#
#  ~ Player Event Color
#   - Player_Color = Color
#
#  ~ Player Text
#   - Player_Text = text_display *
#
#  ~ text_display
#   - 'Name', 'Class', 'Level', 'Hp', 'Sp'
#==============================================================================

#==============================================================================
# ** Game_Character
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * Dispaly Text Color (Event & Player)
  #--------------------------------------------------------------------------
  Event_Color = Color.new(0, 0, 200)
  Player_Color = Color.new(200, 0, 0)
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :text_display
  attr_accessor :isQuest
  attr_accessor :foundQuest
  attr_accessor :doneQuest
  attr_accessor :bounce
  attr_accessor :bounceFlip
 
end

#==============================================================================
# ** Game_Event
#==============================================================================

class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias seph_characterdisplay_gevent_refresh refresh
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Original Refresh Method
    seph_characterdisplay_gevent_refresh
    # Checks to see if display text
    # If the name contains CD, it takes the rest of the name as the text
    @bounce = 0
    @bounceFlip = false
    unless @list.nil?
      for i in 0...@list.size # for all the commands in event
        if @list.code == 108 # if it is a comment
          @list.parameters[0].dup.gsub!(/\[[Cc][Dd](.+?)\]/) do
            @text_display = [$1, Event_Color]
            @isQuest = false
          end
          @list.parameters[0].dup.gsub!(/\[[Qq][Dd](.+?)\]/) do
            @text_display = [$1, Event_Color]
            @isQuest = true
          end
        end
      end
    end
    @text_display = nil if @erased
  end
end

#==============================================================================
# ** Game_Player
#==============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias seph_characterdisplay_gplayer_refresh refresh
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Original Refresh Method
    seph_characterdisplay_gplayer_refresh
    # Creates Text Display
    @text_display = ["Hero", Player_Color]
  end
end

#==============================================================================
# ** Sprite_Character
#==============================================================================

class Sprite_Character < Sprite_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias seph_characterdisplay_scharacter_update update
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Original update Method
    seph_characterdisplay_scharacter_update
    # Character Display Update Method
    update_display_text
    unless @character.bounce.nil?
      if @character.bounce < -2
        @character.bounceFlip = true
      end
      if @character.bounce > 2
        @character.bounceFlip = false
      end
      if @character.bounceFlip
        @character.bounce = @character.bounce + 0.2
      else
        @character.bounce = @character.bounce - 0.2
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Create Display Sprite
  #--------------------------------------------------------------------------
  def create_display_sprite(args)
    Font.default_size = 12
    Font.default_name = "Verdana"
    # Creates Display Bitmap
    bitmap = Bitmap.new(160, 24)
    bitmap2 = Bitmap.new(160, 24)
    # Changes Font Color
    bitmap.font.color = args[1]
    # Draws Text
    if @character.isQuest
      bitmap2 = Cache.picture("quest.png")
      @_quest_display = Sprite.new(self.viewport)
      @_quest_display.bitmap = bitmap2
      @_quest_display.ox = 8
      @_quest_display.oy = 40
      @_quest_display.x = self.x
      @_quest_display.y = self.y - self.oy / 2 - 24
      @_quest_display.z = 30001
      @_quest_display.visible = self.visible #true
    end
    bitmap.draw_text(0, 0, 160, 24, args[0], 1)
    # Creates Display Text Sprite
    @_text_display = Sprite.new(self.viewport)
    @_text_display.bitmap = bitmap
    @_text_display.ox = 80
    @_text_display.oy = 12
    @_text_display.x = self.x
    @_text_display.y = self.y - self.oy / 2 - 24
    @_text_display.z = 30001
    @_text_display.visible = self.visible #true
  end
  #--------------------------------------------------------------------------
  # * Dispose Display Sprite
  #--------------------------------------------------------------------------
  def dispose_display_text
    unless @_text_display.nil?
      @_text_display.dispose
    end
    #reset font colors
    Font.default_size = 14
    Font.default_name = "Verdana"
  end
  #--------------------------------------------------------------------------
  # * Dispose Quest Sprite
  #--------------------------------------------------------------------------
  def dispose_quest_text
    unless @_quest_display.nil?
      @_quest_display.dispose
    end
    #reset font colors
    Font.default_size = 14
    Font.default_name = "Verdana"
  end
  #--------------------------------------------------------------------------
  # * Update Display Sprite
  #--------------------------------------------------------------------------
  def update_display_text
    unless @character.text_display.nil?
      if @_text_display.nil?
        create_display_sprite(@character.text_display)
      end
     
    switch = ($quest.whichquest * 10) + 2
    if $quest.qupdate[switch]
      if $quest.qupdate[switch + 1]
        if $quest.qupdate[switch + 2]
          if $quest.qupdate[switch + 3]
            if $quest.qupdate[switch + 4]
              if $quest.qupdate[switch + 5]
                if $quest.qupdate[switch + 6]
                  if $quest.qupdate[switch + 7]
                    $quest.qupdate[switch + 8] = true
                  end
                end
              end
            end
          end
        end
      end
    end
     
     
     
      @_text_display.x = self.x
      @_text_display.y = self.y - self.oy / 2 - 24
      if @character.isQuest       
        @_quest_display.x = self.x
        @_quest_display.y = self.y - self.oy / 2 - 24 + @character.bounce
      end
    else
      unless @_text_display.nil?
        dispose_display_text
      end
      unless @_quest_display.nil?
        dispose_quest_text
      end
    end
    #reset font colors
    Font.default_size = 14
    Font.default_name = "Verdana"
  end
end



     #C[RRBBGG] Changes the Color (RR,BB,GG)
      #C[N] Changes to color back to normal
      #I[] Changes the font to Italics
      #B[] Changes the font to Bold
      #T[] A Tab
      #N[] New Line
#==============================================================================
# ** Bitmap
#------------------------------------------------------------------------------
#  Additions add a draw wrap text method which draws word wrapped text
#  Text Automattically goes to the next line if the text can not fit on the line
#==============================================================================
class Bitmap
  def draw_wrap_text(x,y,width, height, text)
    array = text.split
    for i in array
      word = i + ' '
      word_width = text_size(word).width
      if x + word_width > width
        y += height
        x = 0
      end
      self.draw_text(x, y, 350, height, word)
      x += word_width
    end
  end
end
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 18, 2008, 04:12:57 PM
Can you give me just screenshots of it?

I won't do it soon, but I am planning to make a version 2.0 of this script. I can add those features onto the list. Or else just make another script that will operate separate from the quest journal.
Title: Re: Quest Journal v. 1.1
Post by: lomastul on October 18, 2008, 04:40:02 PM
ok here how it looks in the menu:

Spoiler for:
(http://i537.photobucket.com/albums/ff339/lomastulx/Untitled-1-3.png)

Spoiler for:
(http://i537.photobucket.com/albums/ff339/lomastulx/Untitled-12.png)

here's how it looks on-map:

Spoiler for:
(http://i537.photobucket.com/albums/ff339/lomastulx/Untitled-2-3.png)

here's how the event page looks like [QDname] shows on map "name":

Spoiler for:
(http://i537.photobucket.com/albums/ff339/lomastulx/640.png)

and here's the icons it uses:

(http://i537.photobucket.com/albums/ff339/lomastulx/quest2.png)
(http://i537.photobucket.com/albums/ff339/lomastulx/quest.png)
(http://i537.photobucket.com/albums/ff339/lomastulx/complete.png)

and for some reason i cant get the "quest2" icon to work when the quest is in my quest list :/
Title: Re: Quest Journal v. 1.1
Post by: klonoa23 on October 18, 2008, 11:02:10 PM
the uber quest og script is good but i don't really like how the quest a set up. (the numbering system). I find it rather confusing, but on the other and it menu itself and the way it functions and looks is great tho. I found modern's first and is sticking with this  :). Now a 2.0 ver seems likes it gonna get even better.
Title: Re: Quest Journal v. 1.1
Post by: Orthone on October 19, 2008, 05:38:54 AM
Can I ask one thing? Im trying to get more options on my window, but I don't know what to put here..
def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::            <------
    s6 = Vocab::crafting
    s7 = Vocab::save
    s8 = Vocab::game_end

I want that empty box to open the Quest Journal.. What do I put here?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 19, 2008, 05:43:48 AM
umm... you could just put:

s5 = "Quests"

Or whatever.
Title: Re: Quest Journal v. 1.1
Post by: Orthone on October 19, 2008, 05:51:30 AM
That gives me a error..

script 'Redefinitions' line 63: NameError occured.
uninitialized constant Vocab::Quests


No.. "Quests" give me this error..

Script 'Main' line 10: NoMethodError occured.
undefined method `main' for #<Game_Quests:0x1a3f3f0 @date={}>
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 19, 2008, 05:52:25 AM
don't put Vocab at all.

Just

s5 = "Quests"
Title: Re: Quest Journal v. 1.1
Post by: Orthone on October 19, 2008, 05:55:23 AM
No.. "Quests" give me this error..

Script 'Main' line 10: NoMethodError occured.
undefined method `main' for #<Game_Quests:0x1a3f3f0 @date={}>

Code I used
Spoiler for:
Code: [Select]
class Scene_Menu < Scene_Base
 
  def start
    #--------------------------------------------------------------------------
    # Set this to true if you want to disable the "crafting" entry in the menu
    #--------------------------------------------------------------------------
    @disableMenuChoice = false
   
    super
    create_menu_background
    if @disableMenuChoice
      oldCmdWindow
    else
      create_command_window
    end
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
  end
 
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      if @disableMenuChoice
        oldUpdCmdSel
      else
        update_command_selection
      end
    elsif @status_window.active
      update_actor_selection
    end
  end
 
  alias oldCmdWindow create_command_window
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = "Quests"
    s6 = Vocab::crafting
    s7 = Vocab::save
    s8 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
    @command_window.index = @menu_index
    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(8, false)     # Disable save
    end
  end
 
  alias oldUpdCmdSel 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
        $scene = Game_Quests.new
      when 5      # Crafting window
        $scene = Scene_Crafting.new
      when 6      #save
        $scene = Scene_File.new(true, false, false)
      when 7      # End Game
        $scene = Scene_End.new
      end
    end
  end
end
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 19, 2008, 06:37:11 AM
That's because you did this:


        $scene = Game_Quests.new


It should be:


        $scene = Scene_Quest.new
Title: Re: Quest Journal v. 1.1
Post by: Orthone on October 19, 2008, 06:42:02 AM
MA, you are the god at scripting!   ::)
Title: Re: Quest Journal v. 1.1
Post by: Black Olrac on October 30, 2008, 07:15:36 AM
is there an option where done quest are removed of the quest log?

would be awesome else if you can make it so that new quest in one screen and a log of done quest in another screen
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on October 30, 2008, 01:48:58 PM
you can conceal quests with the command:

$game_quests[quest_id].concealed = true

It would look weird though.

I don't really get the 2nd proposition, the quests can already split by categories. If you are looking at the active quests tab then you are only looking at current quests. If you're looking at the Finished quests tab then you are only looking at finished quests. I don't see why you would want a separate scene.
Title: Re: Quest Journal v. 1.1
Post by: Black Olrac on October 30, 2008, 10:13:47 PM
sorry about being unclear i mean automaticly, so not to put in after each quest that command.
script based more
also if possible can you make the view more tree looked like, now its

-----------
-----------
-----------

even subquest are lined under these, what would give a clearer overview when doing multiple quest at a time s tree look

-----------
   -----------
   -----------
      -----------
-----------
-----------
   -----------
-----------

and last part can you give the quest giver a sign above there head, a bit like WOW like grey sign not completed or item done yellow for completed item or task done but not  turned in and blue for as example new quest available???
Title: Re: Quest Journal v. 1.1
Post by: codemeister1990 on November 05, 2008, 01:00:14 AM
where do you make the quests in the script?
At what point I mean
Title: Re: Quest Journal v. 1.1
Post by: Black Olrac on November 05, 2008, 05:18:03 PM
after the examples quest,
Title: Re: Quest Journal v. 1.1
Post by: codemeister1990 on November 05, 2008, 06:48:33 PM
ahh, ok thanks
Title: Re: Quest Journal v. 1.1
Post by: Grafikal on November 22, 2008, 06:16:26 AM
Hey MA, this is an amazing script. :D It's much better than other quest log scripts I've seen. There's one thing I hope you can help me with. In my game, you can't fail a quest. So, is there a way just to conceal that option and only have the 'All Quests', 'Current Quests', and 'Completed Quests' menus available?
Title: Re: Quest Journal v. 1.1
Post by: 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.
Title: Re: Quest Journal v. 1.1
Post by: Adrien on November 22, 2008, 05:15:09 PM
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

Code: [Select]
#-------------------------------------------------------------------------------
# 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....
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on November 22, 2008, 05:56:47 PM
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.
Title: Re: Quest Journal v. 1.1
Post by: Adrien on November 22, 2008, 06:14:11 PM
Thank you so much that worked

Title: Re: Quest Journal v. 1.1
Post by: Grafikal on November 22, 2008, 06:22:30 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.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on November 22, 2008, 10:30:13 PM
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.
Title: Re: Quest Journal v. 1.1
Post by: kccarmea on November 26, 2008, 06:02:32 AM
Hi I downloaded the demo with winzip and extracted it but i cannot open it.
Title: Re: Quest Journal v. 1.1
Post by: kccarmea on November 26, 2008, 06:08:35 AM
anyways i have the script but I dont know how to call it.
Title: Re: Quest Journal v. 1.1
Post by: stainedofmind on December 01, 2008, 01:07:02 AM
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!
Title: Re: Quest Journal v. 1.1
Post by: miceylulu on December 01, 2008, 11:16:12 PM
(http://i34.tinypic.com/2vwfc04.png)

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?:

Code: [Select]
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."
Title: Re: Quest Journal v. 1.1
Post by: pookyblueXD on December 03, 2008, 02:27:55 AM
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?
Title: Re: Quest Journal v. 1.1
Post by: Grafikal on December 06, 2008, 03:42:15 AM
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.  :)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on December 06, 2008, 06:08:58 PM
@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:


Code: [Select]
    prime = []

right below

Code: [Select]
icon_index = 0

at line 114.

Thanks for informing me of the error.
Title: Re: Quest Journal v. 1.1
Post by: kitaangel on December 06, 2008, 07:29:41 PM
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:
(http://i106.photobucket.com/albums/m249/kitaangel/ERROR.jpg)

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:
Code: [Select]
$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
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on December 06, 2008, 08:12:43 PM
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.
Title: Re: Quest Journal v. 1.1
Post by: kitaangel on December 06, 2008, 08:17:16 PM
*taps forehead*
Why didn't I think of re-defining the variable!
Thanks a bunch! Works perfectly fine now!
 :D
Title: Re: Quest Journal v. 1.1
Post by: 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!!

(http://i74.photobucket.com/albums/i269/Daricogov/th_Menu.jpg) (http://s74.photobucket.com/albums/i269/Daricogov/?action=view&current=Menu.jpg)

Spoiler for:
Code: [Select]
############################################################################
  #                          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


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)
Title: Re: Quest Journal v. 1.1
Post by: 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
Title: Re: Quest Journal v. 1.1
Post by: tSwitch on December 15, 2008, 03:50:35 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!!

(http://i74.photobucket.com/albums/i269/Daricogov/th_Menu.jpg) (http://s74.photobucket.com/albums/i269/Daricogov/?action=view&current=Menu.jpg)

Spoiler for:
Code: [Select]
############################################################################
  #                          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


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.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on December 17, 2008, 03:37:54 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.
Title: Re: Quest Journal v. 1.1
Post by: r_y_u_u on December 21, 2008, 10:27:51 PM
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
Title: Re: Quest Journal v. 1.1
Post by: Craze on January 04, 2009, 12:32:03 AM
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:
Code: [Select]
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:

Code: [Select]
@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.
Title: Re: Quest Journal v. 1.1
Post by: TheCro on January 04, 2009, 11:22:13 PM
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?
Title: Re: Quest Journal v. 1.1
Post by: Craze on January 04, 2009, 11:36:41 PM
Use something like this:

Code: [Select]
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.
Title: Re: Quest Journal v. 1.1
Post by: TheCro on January 05, 2009, 12:01:29 AM
Hmmm. It just shows up as  " + $game_variables[1].to_s + ".
Title: Re: Quest Journal v. 1.1
Post by: Craze on January 05, 2009, 03:09:29 AM
Are you alternating single quotes and double quotes (' and ")? They are counted seperately in RGSS2... you'll want to stick to jusy double quotes, usually, since apostrophes and single quotes are the same keyboard character!

If changing all the quotation marks to double quotes (or if you've already done that) doesn't work, let me know and I'll fiddle around with this tomorrow.
Title: Re: Quest Journal v. 1.1
Post by: TheCro on January 05, 2009, 03:22:11 AM
Okay, I see. The rest of the script was using apostrophes, but I used the double quotes like you did. It works now that I use apostrophes. Thanks.
Title: Re: Quest Journal v. 1.1
Post by: nooby123 on January 11, 2009, 10:57:35 AM
can somebody please write a tutorial on how to use this? on how exactly step by step how to set up quests? because those instructions are def not noob friendly lol. but i really wanna use this script i have it installed and i can see it in my game but no idea on how to set them up. i can make quests in the game no problem like get a key open chest blah blah come to me get reward etc.

even the most basic tutorial will do because im completely lost. thx in advance and great great script btw


Code: [Select]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Instructions:
#      Basically, set up all of your quests in the module below. The Constants
#    section is annotated, so read the comments near them to determine what you
#    should set these constants to. As you can see, they are filled in with
#    default values currently, and so that should give you an idea of what to
#    do.
#
#      Setting up quests can be a little bit harder. You will have to set one
#    of these up for every quest that you want represented in the scene. Refer
#    to the editable region inside the class Quest for further instructions
#
#      Once they are setup, you can activate them at any time in the game by
#    this code:
#
#      $game_party.quests[quest_id]
#
#    There are several methods you can call that are of relevance. Namely:
#
#        $game_party.quests[quest_id].reveal_objective (objective_id)
#        $game_party.quests[quest_id].conceal_objective (objective_id)
#        $game_party.quests[quest_id].complete_objective (objective_id)
#        $game_party.quests[quest_id].uncomplete_objective (objective_id)
#        $game_party.quests[quest_id].fail_objective (objective_id)
#        $game_party.quests[quest_id].unfail_objective (objective_id)
#        $game_party.quests[quest_id].complete?
#        $game_party.quests[quest_id].failed?
#        $game_party.quests[quest_id].reward_given = true/false
#        $game_party.quests[quest_id].concealed = true/false
#        $game_party.quests.remove (quest_id)
#
#    There are other methods that you can access, but they are irrelevant for
#    the purposes of controlling quest progress. These are fairly self-
#    explanatory methods, but in case they aren't, reveal_objective naturally
#    allows the specified objective to appear in the Quest Journal for browsing
#    by the user. complete_objective notes when an objective is complete, and
#    fail_objective notes when the player has done something that fails this
#    objective. complete? returns true if all primary objectives have been
#    completed and failed? returns true if any primary objective has been
#    failed. reward_given serves the function of a switch. You should
#    essentially make the reward event look like this:
#
#      @> Conditional Branch: Script: $game_party.quests[quest_id].complete?
#        @> Conditional Branch: Script: $game_party.quests[quest_id].reward_given
#          @> ...Thank you or whatever you want the event to say once the reward has been given
#        @> Else
#          @> ...Give Reward
#          @> Script: $game_party.quests[quest_id].reward_given = true
#        @> Branch End
#      @> Branch End
#
#     Later versions of this script will have an auto-reward system and also a
#     Journal to which the player can write notes.
#
#     You can also disable access to the Quest Log at any time with the code:
#       $game_system.quest_disabled = true
#
#     And you can change how it is accessed with the codes:
#     
#       $game_system.quest_keyaccess = true / false  # ON MAP
#       $game_system.quest_menuaccess = true / false # IN MENU
#
#     Also, in a message, \nq[quest_id] will retrieve the name of a quest and
#     print it in a message
#================================================================================
# *** Quest Data
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This is the configuration class for the Quest Journal
#================================================================================

module ModAlg_QuestData
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Constants
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Editable Region
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  QUESTS_LABEL = 'Quests'        # What you want Quests to be called (eg. 'Missions')
  ACTIVE_QUEST_ICON = 149        # What icon signifies a quest is active
  COMPLETE_QUEST_ICON = 150      # What icon signifies a quest is complete
  FAILED_QUEST_ICON = 179        # What icon signifies a quest is failed
  BULLET_CHARACTER = '?'         # The character used for listing objectives
  ACTIVE_COLOUR = 0              # The colour of a quest that is active
  COMPLETE_COLOUR = 11           # The colour of a quest that is complete
  FAILED_COLOUR = 18             # The colour of a quest that is failed
  MENU_ACCESS = true             # Can the script be accessed through the menu?
  MENU_INDEX = 4                 # If above is true, where in the command window?
  KEY_ACCESS = false             # Can the quest log be accessed by a key         
  MAPKEY_BUTTON = Input::L       # If above is true, which button?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Quest Data
  #----------------------------------------------------------------------------
  #  Returns skeleton data for the quesr
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def self.quest_data (id)
    # Set class variables to corresponding arguments
    objectives = []
    name = '??????'
    description = '??????????'
    icon_index = 0
    case id
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * EDITABLE REGION
    #------------------------------------------------------------------------
    #  To set up a quest, first identify it with an ID - this can be anything
    #  as long as it is not the same as another quest, but it is important to
    #  remember this ID as it is the only way to access your quest.
    #    In any case, the format for setting up a quest is:
    #
    #      when <quest_id> # Give the quest an ID number
    #        name = '<quest_name>'
    #        description = '<quest_description>'
    #        objectives[0] = '<first_objective>'
    #        ...
    #        objectives[n] = '<nth objective>'
    #        prime = [<objective_id>, ..., <objective_id>]
    #        icon_index = <quest_icon_index>
    #
    #    Each of these values have an importance.
    #      name is the name of the quest
    #      description is a small blurb explaining the overall goal of the quest
    #      objective[0..n] are short-term goals that lead to the overall goal
    #      primes are which objectives need to be complete before the quest is
    #        considered to be complete
    #      icon_index is the icon that represents the quest
    #
    #    Note that any of the above values can be omitted without throwing an
    #    error, but for the quest to work properly you should at least set the
    #    name, description, and objectives. If you do omit these, the default
    #    values are:
    #   
    #      name = '??????'
    #      description = '??????????'
    #      objectives = []
    #      prime = [all objectives]
    #      icon_index = 0
    #
    #   If you do want to require that all objectives must be satisfied before
    #   the quest is complete, then do not bother defining it. Otherwise, be
    #   sure to set it.
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    when 1 # Fetch
      name = 'Fetch'
      description = 'Martha needs someone to play with her dog'
      objectives[0] = 'Find a stick'
      objectives[1] = 'Throw the stick to the dog'
      objectives[2] = 'Retrieve the stick from the dog'
      icon_index = 79
    when 4 # Cat Retrieval
      name = 'Cat Retrieval'
      description = 'Mrs. Bunderby has lost her cat, and she has employed you to find it.'
      objectives[0] = 'Find the lost cat'
      objectives[1] = 'Climb the tree and retrieve the cat'
      objectives[2] = "Return a cat to Mrs. Bunderby"
      # Set prime objectives in an array based on index
      prime = [0, 2]
      icon_index = 137
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * END EDITABLE REGION
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

no clue what that ^means lol
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 11, 2009, 03:00:05 PM
Well, play through the demo and look at the events to see what is happening is the best way to do it I think.
Title: Re: Quest Journal v. 1.1
Post by: nooby123 on January 11, 2009, 08:34:02 PM
this is what i'm having problems with

  Instructions:
#      Basically, set up all of your quests in the module below. The Constants
#    section is annotated, so read the comments near them to determine what you
#    should set these constants to. As you can see, they are filled in with
#    default values currently, and so that should give you an idea of what to
#    do.



where exactly do i do this in the module? and how would i go about doing it for every quest i make? i know how to do quests in vx . but im really lost in how i have to set them up with the  script??? sorry for the trouble
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 11, 2009, 09:39:02 PM
#  To set up a quest, first identify it with an ID - this can be anything
    #  as long as it is not the same as another quest, but it is important to
    #  remember this ID as it is the only way to access your quest.
    #    In any case, the format for setting up a quest is:
    #
    #      when <quest_id> # Give the quest an ID number
    #        name = '<quest_name>'
    #        description = '<quest_description>'
    #        objectives[0] = '<first_objective>'
    #        ...
    #        objectives[n] = '<nth objective>'
    #        prime = [<objective_id>, ..., <objective_id>]
    #        icon_index = <quest_icon_index>
    #
    #    Each of these values have an importance.
    #      name is the name of the quest
    #      description is a small blurb explaining the overall goal of the quest
    #      objective[0..n] are short-term goals that lead to the overall goal
    #      primes are which objectives need to be complete before the quest is
    #        considered to be complete
    #      icon_index is the icon that represents the quest




SO:

Code: [Select]
when 1 # Fetch
      name = 'Fetch'
      description = 'Martha needs someone to play with her dog'
      objectives[0] = 'Find a stick'
      objectives[1] = 'Throw the stick to the dog'
      objectives[2] = 'Retrieve the stick from the dog'
      icon_index = 79

sets up a quest with ID 1, that has the name Fetch, description "Martha needs someone to play with her dog", the objectives "find a stick", "throw the stick to the dog", and "retrieve the stick from the dog" and is represented by icon 79


I don't know what you don't understand :(
Title: Re: Quest Journal v. 1.1
Post by: nooby123 on January 11, 2009, 09:48:50 PM
i understand that part. but where exactly do i put it in script? do i just keep adding them after the ones that are already their?
   when 1 # Fetch
      name = 'Fetch'
      description = 'Martha needs someone to play with her dog'
      objectives[0] = 'Find a stick'
      objectives[1] = 'Throw the stick to the dog'
      objectives[2] = 'Retrieve the stick from the dog'
      icon_index = 79
    when 4 # Cat Retrieval
      name = 'Cat Retrieval'
      description = 'Mrs. Bunderby has lost her cat, and she has employed you to find it.'
      objectives[0] = 'Find the lost cat'
      objectives[1] = 'Climb the tree and retrieve the cat'
      objectives[2] = "Return a cat to Mrs. Bunderby"
      # Set prime objectives in an array based on index
      prime = [0, 2]
      icon_index = 137

Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 11, 2009, 10:59:46 PM
do i just keep adding them after the ones that are already there?



yes.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 14, 2009, 02:39:19 AM
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].


1. I will make it more easily possible in the next version, but for now you can just conceal all the quests by default, and then unconceal them only when you first want them revealed. All you would need to do is go down to line 222 and change:

Code: [Select]
      @concealed = false
to
Code: [Select]
      @concealed = true

2. Just switch it around, so that it looks like:

Code: [Select]
    # Run Original Method
    modalg_quest_jrnl_spec_char_convert
    @text.gsub! (/\\NQ\[(\d+)\]/i) { $game_party.quests[$1.to_i] } # Name Quest

instead of the gsub being above. That way, it will convert \v[id] before nq, and it would work.
Title: Re: Quest Journal v. 1.1
Post by: Noriku on January 17, 2009, 06:15:33 AM
Having a bit of a problem...
I placed the scripts into my Script editor, not putting any quests in yet; just wanted to make sure there wasn't a problem with it.
And when I try to open my menu I get this error:
Spoiler for:
(http://img.photobucket.com/albums/v436/warrior_dragon312/error.png)
Line 924:
Spoiler for:
i += 1 if i >= ModAlg_QuestData::MENU_INDEX

Is it another script messing with this one?
Or do I need to implement a quest first?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2009, 09:22:44 AM
If another script overwrites the initialize method of Window_Command, then that problem would occur. Try putting the Quest Journal below all of the other custom scripts you have and test it then. If that doesn't work, report back and tell me what scripts you have - I may want to see the scripts.rvdata too.
Title: Re: Quest Journal v. 1.1
Post by: Noriku on January 17, 2009, 05:46:15 PM
Below everything didn't work.
I took out each script that had a window_command in it, and the one that's affecting it is my Monster Book script (by Woratana).

Spoiler for:
#=============================================================
# * Window_Command Insert Tool
#=============================================================
class Window_Command < Window_Selectable
  unless method_defined? :wora_cominstool_wincom_ini
    alias wora_cominstool_wincom_ini initialize
    alias wora_cominstool_wincom_drawitem draw_item
  end
Or
Spoiler for:
@window_monlist = Window_Command.new(544, monlist, 2)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2009, 07:02:57 PM
Show me the entire script from Wora.
Title: Re: Quest Journal v. 1.1
Post by: Noriku on January 17, 2009, 07:14:41 PM
Here you go.
Edit: My bad. I should have put it in a code box first, fixed.

Spoiler for:
Code: [Select]
#===============================================================
# ? [VX] ? Monster Book II ? ?
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 02/01/2009
# ? Version: 2.0
# ? Special Thanks: Momomo~ for interface from Monster Book XP version
#--------------------------------------------------------------
# ** FEATURES
#--------------------------------------------------------------
# - Built-in snippet to add 'Monster Book' in the menu's command
# - Show enemies' data in Monster Book after player fight with them
# - All the texts are editable in setup part
# - Call script to clear/complete Monster Book's data
# - Call script to show/hide monster's data in Monster Book
# - Compare monster's status with the highest level actors in party
# - Turn ON switch to stop adding data into Monster Book temporarily
# - Choose the monsters you don't want to show their name and data
#--------------------------------------------------------------
# ** HOW TO USE
#--------------------------------------------------------------
# * Call Scene Monster Book by call script:
#  $scene = Scene_MonsterBook.new

# * Complete all enemies' information by call script:
#  $game_system.set_monbook_complete

# * Clear all enemies' information by call script:
#  $game_system.reset_monbook
#--------------------------------------------------------------
# * Show enemy's information by call script:
#  $game_system.monbook[enemy_id] = true

# * Hide enemy's information by call script:
#  $game_system.monbook[enemy_id] = false

# ^ Change 'enemy_id' to ID of enemy you want
# ** e.g. $game_system.monbook[10] = true
#===============================================================

module Wora_Monbook

#===============================================================
# ** [Setup Part] - Config script in this part
#-------------------------------------------------------------- 
  SHOW_IN_MENU = true # Show Monster Book in Menu Command? (true / false)
  MENU_COMMAND = 'MonsterBook' # Menu command name for Monster Book
  MENU_INDEX = 4 # Index of menu command you want to insert monster book 
 
  TEXT_TITLE = 'Monster Book'
  # Monster Book Title (Show at top left of the screen)
  TEXT_FOUND = 'Found: '
  # Text before number of how many monster are found
  TEXT_COMPLETED = 'Completed: '
  # Text before percentage of how many monster are found
 
  TEXT_DOT = '.'
  # Text show after enemy's ID (e.g. '.' will make '2.' and ')' will make '2)' )
 
  COMPARE_STATUS = true
  # Use Compare Status System? It will compare enemy's status with highest level
  # actor in party. Show GREEN number if enemy has lower status.
  # Show RED-GRAY number if enemy has higher status. (true / false)
 
  NO_RECORD_SWITCH = 10
  # If this switch ID turn ON, any monster the player fight with won't be added
  # into Monster Book.
 
  NO_DATA_MONSTER = []
  # List of IDs of monster you don't want to show name and data on Monster Book
  # e.g. [1, 3, 5] will make monster ID 1, 3, and 5 show no data in Monster Book
#===============================================================
end

#===============================================================
# ** [Alias] Game_System
#--------------------------------------------------------------
class Game_System
  attr_accessor :monbook
  alias :wora_monbook_gamsys_ini :initialize
  def initialize
    wora_monbook_gamsys_ini
    create_monbook
  end
 
  def create_monbook
    @monbook ||= Array.new($data_enemies.size) {false}
  end
 
  def set_monbook_complete
    @monbook = Array.new($data_enemies.size) {true}
    @monbook[0] = false
  end
 
  def reset_monbook
    @monbook = Array.new($data_enemies.size) {false}
  end
end

#===============================================================
# ** [Alias] Game_Troop
#--------------------------------------------------------------
class Game_Troop < Game_Unit
  alias :wora_monbook_gamtroop_setup :setup
  def setup(*args)
    wora_monbook_gamtroop_setup(*args)
    $game_system.create_monbook
    unless $game_switches[Wora_Monbook::NO_RECORD_SWITCH]
      @enemies.each {|e| $game_system.monbook[e.enemy_id] = true }
    end
  end
end

#===============================================================
# ** Window_MonsterBHelp
#--------------------------------------------------------------
class Window_MonsterBHelp < Window_Base
  include Wora_Monbook
 
  def initialize
    super(0, 0, 544, WLH + 32)
    # Write Monster Book Title
    contents.font.color = system_color
    contents.draw_text(0, 0, contents.width, WLH, TEXT_TITLE)
    # Calculate found monster & complete percentage
    found_count = 0
    $game_system.monbook.each {|e| found_count += 1 if e }
    percent_count = (found_count * 100) / ($data_enemies.size - 1)
    # Collect & Store Text in variables
    found_text = found_count.to_s + '/' + ($data_enemies.size - 1).to_s
    percent_text = percent_count.to_s + '%'
    mid_text = ' | '
    right_text = TEXT_FOUND + found_text + mid_text + TEXT_COMPLETED +
  percent_text
    # Calculate Text Width
    found_t_width = contents.text_size(TEXT_FOUND).width
    found_width = contents.text_size(found_text).width
    percent_t_width = contents.text_size(TEXT_COMPLETED).width
    mid_width = contents.text_size(mid_text).width
    right_width = contents.text_size(right_text).width
    # Write Monster Found & Complete Percentage
    contents.font.color = normal_color
    contents.draw_text(contents.width - right_width, 0, contents.width, WLH,
  TEXT_FOUND)
    contents.draw_text(contents.width - right_width + found_t_width +
  found_width, 0, contents.width, WLH, mid_text + TEXT_COMPLETED)
    contents.font.color = crisis_color
    contents.draw_text(contents.width - right_width + found_t_width, 0,
  contents.width, WLH, found_text)
    contents.draw_text(contents.width - right_width + found_t_width +
  found_width + mid_width + percent_t_width, 0, contents.width, WLH,
  percent_text)
  end
end

#===============================================================
# ** Window_MonsterBDetail
#--------------------------------------------------------------
class Window_MonsterBDetail < Window_Base
  def initialize(window_temp)
    super(window_temp.x, window_temp.y, window_temp.width, window_temp.height)
    self.opacity = 0
    @win_image = Window_Base.new(self.x, self.y, self.width, self.height)
    self.z = @win_image.z + 1
    @last_enemy = 0
  end
 
  def visible=(bool)
    super
    @win_image.visible = bool
  end
 
  def dispose
    @win_image.dispose
    super
  end
 
  def write_detail(enemy_id)
    return if @last_enemy == enemy_id
    contents.clear
    @win_image.contents.clear
    @last_enemy = enemy_id
    data = $data_enemies[enemy_id]
    # Draw Enemy Graphic
    bitmap = Cache.battler(data.battler_name, data.battler_hue)
    bw = bitmap.width < 160 ? (160 - bitmap.width) / 2 : 0
    bh = contents.height - bitmap.height
    @win_image.contents.blt(bw, bh, bitmap, bitmap.rect)
    bitmap.dispose
    # Write Name
    contents.font.color = normal_color
    contents.draw_text(0, 0, contents.width, WLH,
  data.id.to_s + Wora_Monbook::TEXT_DOT + ' ' + data.name)
    # Write Enemy Status
    hpx = 120
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, 0, hpx, 'hp')
    draw_enemy_stat(data, contents.width - hpx, 0, hpx, 'mp')
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 2, hpx, 'atk')
    draw_enemy_stat(data, contents.width - hpx, WLH * 2, hpx, 'def')
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 3, hpx, 'spi')
    draw_enemy_stat(data, contents.width - hpx, WLH * 3, hpx, 'agi')
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 4, hpx, 'hit')
    draw_enemy_stat(data, contents.width - hpx, WLH * 4, hpx, 'eva')
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 6, hpx, 'exp')
    draw_enemy_stat(data, contents.width - hpx, WLH * 6, hpx, 'gold')
    rect = Rect.new(contents.width - (hpx * 2) - 8, (WLH * 8) - 8, 216,
  (WLH * 4) + 16)
    contents.fill_rect(rect, Color.new(0,0,0,140))
    lsize = 2 # Line Size
    lcolor = Color.new(255,255,255,160) # Line Color
    contents.fill_rect(rect.x, rect.y, lsize, rect.height, lcolor)
    contents.fill_rect(rect.x, rect.y, rect.width, lsize, lcolor)
    contents.fill_rect(rect.x + rect.width - lsize, rect.y, lsize,
  rect.height, lcolor)
    contents.fill_rect(rect.x, rect.y + rect.height - lsize, rect.width,
  lsize, lcolor)
    contents.font.color = system_color
    contents.draw_text(contents.width - (hpx * 2), WLH * 8, 200, WLH,
  'Drop Item 1')
    draw_enemy_drop(data, 1, contents.width - (hpx * 2), WLH * 9)
    contents.font.color = system_color
    contents.draw_text(contents.width - (hpx * 2), WLH * 10, 200, WLH,
  'Drop Item 2')
    draw_enemy_drop(data, 2, contents.width - (hpx * 2), WLH * 11)
  end

  def draw_enemy_stat(actor, x, y, width, stat)
    color1 = system_color
    color2 = normal_color
    slash = false
    # Find highest level actor
    if Wora_Monbook::COMPARE_STATUS
      hactor = ($game_party.members.sort {|a,b| a.level <=> b.level })
      hactor = hactor[hactor.size - 1]
    end
    case stat
    when 'hp'
      vocab = Vocab::hp
      number = actor.maxhp
      hnumber = hactor.maxhp if Wora_Monbook::COMPARE_STATUS
      slash = true
    when 'mp'
      vocab = Vocab::mp
      number = actor.maxmp
      hnumber = hactor.maxmp if Wora_Monbook::COMPARE_STATUS
      slash = true
    when 'atk'
      vocab = Vocab::atk
      number = actor.atk
      hnumber = hactor.atk if Wora_Monbook::COMPARE_STATUS
    when 'def'
      vocab = Vocab::def
      number = actor.def
      hnumber = hactor.def if Wora_Monbook::COMPARE_STATUS
    when 'spi'
      vocab = Vocab::spi
      number = actor.spi
      hnumber = hactor.spi if Wora_Monbook::COMPARE_STATUS
    when 'agi'
      vocab = Vocab::agi
      number = actor.agi
      hnumber = hactor.agi if Wora_Monbook::COMPARE_STATUS
    when 'hit'
      vocab = 'HIT'
      number = actor.hit
      hnumber = hactor.hit if Wora_Monbook::COMPARE_STATUS
    when 'eva'
      vocab = 'EVA'
      number = actor.eva
      hnumber = hactor.eva if Wora_Monbook::COMPARE_STATUS
    when 'exp'
      vocab = 'EXP'
      number = actor.exp
      color2 = crisis_color
    when 'gold'
      vocab = 'Gold'
      number = actor.gold
      color2 = crisis_color
    end
    if Wora_Monbook::COMPARE_STATUS and !hnumber.nil?
      if hnumber > number # Higher
        color2 = power_up_color
      elsif hnumber < number # Less
        color2 = power_down_color
      elsif hnumber == number # Equal
        color2 = normal_color
      end
    end
    contents.font.color = color1
    contents.draw_text(x, y, 50, WLH, vocab)
    xr = x + width
    contents.font.color = color2
    if slash
      contents.draw_text(xr - 95, y, 40, WLH, number, 2)
      contents.draw_text(xr - 55, y, 11, WLH, '/', 2)
    end
    w_ava = slash ? 40 : 80
    contents.draw_text(xr - w_ava, y, w_ava, WLH, number, 2)
  end
 
  def draw_enemy_drop(actor, drop_id, x, y)
    drop = eval('actor.drop_item' + drop_id.to_s)
    if drop.kind.zero?
      contents.font.color = normal_color
      contents.draw_text(x, y, 200, WLH, "  ---------")
    else
      case drop.kind
      when 1; item = $data_items[drop.item_id]
      when 2; item = $data_weapons[drop.weapon_id]
      when 3; item = $data_armors[drop.armor_id]
      end
      draw_item_name(item, x, y)
    end
  end
end
#===============================================================
# ** Scene_MonsterBook
#--------------------------------------------------------------
class Scene_MonsterBook < Scene_Base
  def initialize(from_menu = false)
    @from_menu = from_menu
  end
 
  def start
    super
    create_menu_background
    $game_system.create_monbook
    @window_help = Window_MonsterBHelp.new
    # Create Monster List
    monlist = []
    $game_system.monbook.each_index do |i|
      next if i == 0 # The first index in $data_enemies is blank
      # If player found the monster
      if $game_system.monbook[i] and
    !Wora_Monbook::NO_DATA_MONSTER.include?(i)
        montext = i.to_s + Wora_Monbook::TEXT_DOT + ' ' + $data_enemies[i].name
      else # If player haven't found
        montext = i.to_s + Wora_Monbook::TEXT_DOT
      end
      monlist << montext
    end
    @window_monlist = Window_Command.new(544, monlist, 2)
    @window_monlist.y = @window_help.height
    @window_monlist.height = Graphics.height - @window_help.height
    @window_monlist.active = true
    @window_mondetail = Window_MonsterBDetail.new(@window_monlist)
    @window_mondetail.visible = false
  end
 
  def update
    super
    if @window_monlist.active
      @window_monlist.update
      if Input.trigger?(Input::C)
        # View monster's detail if found monster
        if $game_system.monbook[@window_monlist.index + 1] and
        !Wora_Monbook::NO_DATA_MONSTER.include?(@window_monlist.index + 1)
          Sound.play_decision
          @window_monlist.active = false
          @window_monlist.visible = false
          @window_mondetail.active = true
          @window_mondetail.visible = true
          @window_mondetail.write_detail(@window_monlist.index + 1)
        else
          Sound.play_cancel
        end
      elsif Input.trigger?(Input::B)
        Sound.play_cancel
        # Return
        $scene = @from_menu ? Scene_Menu.new(Wora_Monbook::MENU_INDEX) :
      Scene_Map.new
      end
    elsif @window_mondetail.active
      if Input.trigger?(Input::B)
        Sound.play_cancel
        @window_monlist.active = true
        @window_monlist.visible = true
        @window_mondetail.active = false
        @window_mondetail.visible = false
      end
    end
  end
 
  def terminate
    super
    dispose_menu_background
    @window_help.dispose
    @window_monlist.dispose
    @window_mondetail.dispose
  end
end

#=============================================================
# * Window_Command Insert Tool
#=============================================================
class Window_Command < Window_Selectable
  unless method_defined? :wora_cominstool_wincom_ini
    alias wora_cominstool_wincom_ini initialize
    alias wora_cominstool_wincom_drawitem draw_item
  end
 
  #------------------------------------
  # * [Alias] Initialize
  #------------------------------------
  def initialize(*args)
    @disabled_commands = [] # Array to keep track of disabled commands
    wora_cominstool_wincom_ini(*args)
  end
 
  #------------------------------------
  # * [Alias] Draw_Item
  #------------------------------------
  def draw_item(*args)
    wora_cominstool_wincom_drawitem(*args)
    # Set array's index to 1 if command is disabled
    @disabled_commands[args[0]] = args[1].nil? || args[1] ? nil : true
  end
 
  #------------------------------------
  # * Insert Command
  #------------------------------------
  def ins_command(index, text)
    @commands.insert(index, text) # Insert new commands
    @disabled_commands.insert(index, nil)
    # Set new height for window
    old_disabled_commands = @disabled_commands.dup
    self.height = (@commands.size + @column_max - 1) / @column_max * WLH + 32
    @item_max = @commands.size # Update @item_max to make refresh works correctly
    create_contents            # Create new content because window's size changed
    refresh                    # Redraw window's contents
    old_disabled_commands.each_index do |i|
      if !old_disabled_commands[i].nil?
        draw_item(i, false)    # Draw commands that disabled before
      end
    end
  end
 
  #------------------------------------
  # * Add Command
  #------------------------------------
  def add_command(text)
    ins_command(@commands.size, text) # Add new command to new index
  end
end

#=============================================================
# * Add command linked to Monster Book in Menu
#=============================================================
if Wora_Monbook::SHOW_IN_MENU
  class Scene_Menu < Scene_Base 
    #--------------------------------------------------------------------------
    # * Sort New Command(s)
    #--------------------------------------------------------------------------
    def wsort_newcommand
      @wsorted_command ||= [] # Array to collect sorted commands
      wnewcommand = @wnewcommand - @wsorted_command # Remove sorted commands
      wnewcommand.sort.each {|i| @menu_index += 1 if @menu_index >= i }
      @command_window.index = @menu_index # Set window's index to new index
      @wsorted_command = @wsorted_command + @wnewcommand # Add sorted commands
    end

    #--------------------------------------------------------------------------
    # * [Alias] Create Command Window
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_crecomwin create_command_window
    def create_command_window(*args)
      wora_menucomorg_scemenu_crecomwin(*args)
      # Insert new command
      @command_window.ins_command(Wora_Monbook::MENU_INDEX,
    Wora_Monbook::MENU_COMMAND)
      # Set index to correct one if @menu_index is after/equal to new command
      @wnewcommand ||= []
      @wnewcommand << Wora_Monbook::MENU_INDEX
      wsort_newcommand
    end

    #--------------------------------------------------------------------------
    # * [Alias] Update Command Selection
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_updcomsel update_command_selection
    def update_command_selection(*args)
      @menucomorpg_change = false
      # If player choose new command
      if Input.trigger?(Input::C) and @command_window.index ==
      Wora_Monbook::MENU_INDEX
        Sound.play_decision
        $scene = Scene_MonsterBook.new(true)
      else # If player choose index after new command
        if Input.trigger?(Input::C) and @command_window.index >
        Wora_Monbook::MENU_INDEX
          @command_window.index -= 1 # Decrease index to make old update works
          @menucomorpg_change = true
        end
        wora_menucomorg_scemenu_updcomsel(*args)
      end
      @command_window.index += 1 if @menucomorpg_change # Increase index back
    end
   
    #--------------------------------------------------------------------------
    # * [Alias] Update Actor Selection
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_updactsel update_actor_selection
    def update_actor_selection(*args)
      @menucomorpg_change = false
      # If player choose index after new command
      if Input.trigger?(Input::C) and @command_window.index >
      Wora_Monbook::MENU_INDEX
        @command_window.index -= 1 # Decrease index to make old update works
        @menucomorpg_change = true
      end
      wora_menucomorg_scemenu_updactsel(*args)
      @command_window.index += 1 if @menucomorpg_change # Increase index back
    end
  end
end
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2009, 09:01:20 PM
Ah, well that is poor naming on my part. Go through my script and use CTRL-H to find all instances of
Code: [Select]
disabled_commands
and replace it with
Code: [Select]
ma_disabled_commands
Title: Re: Quest Journal v. 1.1
Post by: Noriku on January 17, 2009, 09:07:37 PM
Works perfectly!
Thanks so much!
Title: Re: Quest Journal v. 1.1
Post by: SouthWall on January 27, 2009, 06:08:48 AM
This probably has a very simple solution, but I need your help in resolving a script conflict between this and another script that adds itself to the menu. No matter the menu index of Quest Journal, it disappears whenever I add this script (which has its own menu placement, of course). Here's the script:

Spoiler for:
Code: [Select]
################################################################################
=begin
################################################################################
Name:         Factions

By:           SojaBird
Version:      1.0 (full release)
Data:         03-01-'09
Site:         http://www.nestcast.blogspot.com

Discription:  The script is finished!

              After a long BETA-stage, the script finaly works as it should.
              Please be sure that you read all the info on how to use the
              script, before doing anything. After reading, you can go and edit
              the module wich is directly below the script info. With every
              change you make, the script will adept it's functionality, so that
              the factions you add, are displayed as they should.
             
              Enjoy and have fun!
             
             
              Greatzz,
              SojaBird.
               
################################################################################
      (\_/)                                                         (\_/)
      (o.o)                    READ BEFORE USING                    (o.o)
      (> <)                                                         (> <)

~Call script~
  Faction startup:
    add_faction(name, max_value, start_value, *help_text, *pic)
      This will add a faction to the system. Value's that must be insert are;
      - name (name of the faction)
      - max_value (the heighest amount of reputation the faction can get)
      - start_value (the reputation of the faction when entered in the system)
      Value's that could be insert for a personal touch are;
      - help_text (the text that will be displayed when the faction is selected
        in the menu (add ## to go the second line))
      - pic (the picture that can be shown in the menu)
    delete_faction(name)
      This will delete a faction from the system with the name of your choice.
      Value's that must be insert are;
      - name (the name of the faction that need to be deleted)
     
  Faction value changes:
    set_faction_value(name, value)
      This will set the value of a faction to the value of your choice. Value's
      that must be insert are;
      - name (the name of the faction that gets a new value)
      - value (the new value of the faction)
    add_faction_value(name, value)
      This will add an amount of reputation of your choice to a faction.
      Value's that must be insert are;
      - name (the name of the faction that gets reputation)
      - value (the value that needs to be add to the faction reputation)
    remove_faction_value(name, value)
      This will remove an amount of reputation of your choice from a faction.
      Value's that must be insert are;
      - name (the name of the faction that lose reputation)
      - value (the value that needs to be removed from the faction reputation)

  Faction max_value changes:
    set_faction_value_max(name, value)
      This will set the max_value of a faction to the value of your choice.
      Value's that must be insert are;
      - name (the name of the faction that gets a new max_value)
      - value (the new max_value of the faction)
    add_faction_value_max(name, value)
      This will add an amount to the max_value of your choice to a faction.
      Value's that must be insert are;
      - name (the name of the faction that gets a heigher max_value)
      - value (the value that needs to be add to the faction max_value)
    remove_faction_value_max(name, value)
      This will remove an amount of the max_value of your choice from a
      faction. Value's that must be insert are;
      - name (the name of the faction that gets a lower max_value)
      - value (the value that needs to be removed from the faction max_value)

  Faction info changes:
    change_faction_help(name, text)
      This will changes the help_text of a faction. Value's that must be insert
      are;
      - name (the name of the faction that gets a new help_text)
      - text (the new help text for the faction (a "/" will jump to the 2nd
        line))
    change_faction_pic(name, pic)
      This will changes the picture of a faction. Value's that must be insert
      are;
      - name (the name of the faction that gets a new picture)
      - pic (the name of the picture for the faction)

~Conditional Branch~
    faction?(name)
      This will check if a faction exists in the system. Value's that must be
      instert are;
      - name (the name of the faction that needs to be check on existence)
    faction_value?(name, value)
      This will check if a faction has a sertain minimum value. Value's that
      must be insert are;
      - name (the name of the faction that needs to have a sertain value)
      - value (the minimun value the faction needs to have)

~Extra's~
    F5 in testmode
      When you're in the DEBUG_mode (testmode), F5 will bring up the factions
      with their data, stored by the system.
    \FAC[name] in message
      When you put \FAC[name] in a message, it'll transform to the current value
      of the selected faction. Value's that must be insert are;
      - name (the name of the faction wich value must be displayed)

################################################################################
=end
################################################################################
module SojaBird_Factions
####################################
# Customize module
  You_Name_It = "Reputation" # Name that will showup in the menu
  Line_Height = 19 # Size of the text and bars (default = 19, wich will show 8 factions)
  Help_Name = 2 # Add's the faction-name in the descriptionwindow [0="Description", 1="Name: Description", 2="Name"|"Description"]
  Help_Picture = true # Add's the faction-picture to the descriptionwindow [true=Display, false=Don't display]
  Display_Picture = true # Add's the faction-picture to the selectionwindow [true=Display, false=Don't display]
  Empty_Picture = "" # The picture to be shown when no picture is added to the faction-info (put "" for realy empty)
  Empty_Description = "No extra information available." # The text that is displayed when there's no text added to the faction-info)
# Customize module: End
#####################################
end
#####################################
# Call script functions
  #-----------------------------------#
  # Change factions
    def add_faction(name, max_value, start_value, help_text = SojaBird_Factions::Empty_Description, pic = SojaBird_Factions::Empty_Picture)
      @info = [name, max_value, start_value, help_text, pic]
      @info[1] = @info[1] * -1 if @info[2] < 0
      $game_temp.faction_data.each do |data|
        if data[0] == name
          $game_temp.faction_data.delete_at $game_temp.faction_data.index(data)
        end
      end
      $game_temp.faction_data.push @info
      correct_faction_values(@info)
    end
   
    def delete_faction(name)
      $game_temp.faction_data.each do |data|
      if data[0] == name
          $game_temp.faction_data.delete(data)
        end
      end
    end
  # Change factions: End
  #-----------------------------------#
  # Change value
    def set_faction_value(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[2] = value
          correct_faction_values(data)
        end
      end
    end
   
    def add_faction_value(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[2] += value
          correct_faction_values(data)
        end
      end
    end
   
    def remove_faction_value(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[2] -= value
          correct_faction_values(data)
        end
      end
    end
  # Change value: End
  #-----------------------------------#
  # Change max_value
    def set_faction_max(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[1] = value
          correct_faction_values(data)
        end
      end
    end
   
    def add_faction_max(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[1] += value
          correct_faction_values(data)
        end
      end
    end
   
    def remove_faction_max(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[1] -= value
          correct_faction_values(data)
        end
      end
    end
  # Change max_value: End
  #-----------------------------------#
  # Correct values (no actual callscript)
    def correct_faction_values(data)
      data[1] *= -1 if data[2] < 0 and data[1] > 0
      data[1] *= -1 if data[2] > 0 and data[1] < 0
      data[2] = data[1] if data[2] < 0 and data[2] < data[1]
      data[2] = data[1] if data[2] > 0 and data[2] > data[1]
    end
  # Correct values: End
  #-----------------------------------#
  # Change extra's
    def change_faction_help(name, text)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[3] = text
        end
      end
    end
   
    def change_faction_pic(name, pic)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[4] = pic
        end
      end
    end
  # Change extra's: End
  #-----------------------------------#
  # User help
    # In testmode, F5 will show the factions-array
    def print_faction_data; p $game_temp.faction_data; end
  # User help: End
  #-----------------------------------#
  # Conditional-braches
    # As conditional-branch use 'faction?("name")', returns true if 'faction(name) exists'
    def faction?(name); $game_temp.faction_data.each do |data|; return true if data[0] == name; end; end
    # As conditional-branch use 'faction_value?("name", value)', returns true if 'faction_value >= value'
    def faction_value?(name, value); $game_temp.faction_data.each do |data|; if data[0] == name; return true if data[2] >= value; end; end; end
  # Conditional-braches: End
  #-----------------------------------#
# Call script: End
#####################################
#-----------------------------------#
#####################################
# Shows factions information
class Window_Factions < Window_Selectable
  include SojaBird_Factions
  def initialize(x, y, width, height, start)
    super(x, y, width, height, (2 * Line_Height))
    self.index = 0
    self.contents.font.size = Line_Height
    @max_lines = 304 / (Line_Height * 2)
    @start = start * @max_lines
    self.contents = Bitmap.new(width - 32, (2 * Line_Height) * @max_lines)
    refresh
  end
 
  def refresh
    self.contents.clear
    for faction in @start..@max_lines + @start - 1
      if $game_temp.faction_data[faction] != nil
        @item_max = faction - @start + 1
        data = $game_temp.faction_data[faction]
        x = 0
        y = (faction - @start) * Line_Height * 2
        if Display_Picture == true and data[4] != ""
          draw_picture(x, y, data)
          x += Cache.picture(data[4]).width
        end
        draw_bar(x, y, data)
        draw_name(x, y, data)
      end
    end
  end
 
  def draw_picture(x, y, data)
    pic = data[4]
    rect = Rect.new(0, (Line_Height * 2) - (Cache.picture(pic).height / 2), Cache.picture(pic).width - 1, Line_Height * 2 - 2)
    self.contents.blt(x + 1, y + 1, Cache.picture(pic), rect)
  end
 
  def draw_bar(x, y, data)
    ### Initialize ###
      # ~Parent info~
    @value = data[2]
    @value_max = data[1]
      # ~Color~
    @back_color = 4
    if @value > 0; color = 11
    elsif @value == 0; color = 4
    elsif @value < 0; color = 4; @back_color = 18
    end
      # ~Width~
    gauge_width = self.contents.width * @value / @value_max if @value_max != 0
    gauge_width = 0 if @value_max == 0
    border_width = self.contents.width
      # ~Position~
    @bar_x = 0
    @bar_x = self.contents.width - gauge_width if @value < 0
    @bar_y = y + Line_Height
      # ~Offset~
    if Display_Picture == true and data[4] != ""
      @picture_width = Cache.picture(data[4]).width
      @bar_x += @picture_width
      gauge_width -= @picture_width
      border_width -= @picture_width
    end
    ### Draw ###
      # ~Bar~
    self.contents.fill_rect(x + 1, @bar_y, border_width - 2, Line_Height - 1, text_color(4))
    self.contents.gradient_fill_rect(@bar_x + 1, @bar_y, gauge_width - 2, Line_Height - 1, text_color(@back_color), text_color(color))
      # ~Text~
    text_line = "#{@value}/#{@value_max}"
    if Display_Picture == true and data[4] != ""; x -= @picture_width; end
    self.contents.draw_text(x, @bar_y - 2, self.contents.width, Line_Height, text_line, 1)
  end
 
  def draw_name(x, y, data)
    name = data[0]
    self.contents.draw_text(x, y, self.contents.width, Line_Height, name)
  end
 
  def update_cursor
    self.cursor_rect.empty if @index < 0
    self.cursor_rect.set(0, @index * (Line_Height * 2), self.contents.width, Line_Height * 2)
  end
 
  def update_help
    if $game_temp.faction_data != []
      @description = $game_temp.faction_data[self.index + @start]
      text = ""
      text += @description[0] + ": " if Help_Name == 1
      text += @description[0] + "##" if Help_Name == 2
      text += @description[3]
      text.gsub!(/\n/, "")
      @help_window.set_text(text, 0, 4, @description[4]) if $game_temp.faction_data != []
    end
  end
end
# Window_Factions: End
#####################################
#-----------------------------------#
#####################################
# Faction info storage
class Game_Temp
  attr_accessor :faction_data
  alias old_initialize initialize
  def initialize
    old_initialize
    @faction_data = []
  end
end
# Game_Temp: End
#####################################
#-----------------------------------#
#####################################
# Operating scene
class Scene_Factions < Scene_Base
  def initialize(fac_list = 0)
    @fac_list = fac_list
    @max_lines = 304 / (SojaBird_Factions::Line_Height * 2)
  end
 
  def start
    super
    create_menu_background
    create_factions_windows
  end
 
  def create_factions_windows
    @faction_window = Window_Factions.new(0, 2*24+32, 544, 360-24, @fac_list)
    @help_window = Window_Help_Factions.new(0, 0, 544, 2*24+32)
    @faction_window.help_window = @help_window
  end
 
  def terminate
    super
    dispose_menu_background
    dispose_factions_windows
  end
 
  def dispose_factions_windows
    @faction_window.dispose
    @help_window.dispose
  end
 
  def update
    super
    update_menu_background
    update_factions_stuff
    update_factions_input
  end
 
  def update_factions_stuff
    @faction_window.update
    @help_window.update
  end
 
  def update_factions_input
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Menu.new(4)
    elsif Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
      if (@fac_list + 1) * @max_lines < $game_temp.faction_data.size
        Sound.play_cursor
        next_fac_list
      else
        Sound.play_buzzer
      end
    elsif Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
      if @fac_list > 0
        Sound.play_cursor
        prev_fac_list
      else
        Sound.play_buzzer
      end
    end
  end
 
  def next_fac_list
    @fac_list += 1
    $scene = Scene_Factions.new(@fac_list)
  end
 
  def prev_fac_list
    @fac_list -= 1
    $scene = Scene_Factions.new(@fac_list)
  end
end
# Scene_Factions: End
#####################################
#-----------------------------------#
#####################################
# Add's an option to the menu
class Scene_Menu < Scene_Base
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = SojaBird_Factions::You_Name_It
    s6 = Vocab::save
    s7 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    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

  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      # Factions Menu
        $scene = Scene_Factions.new
      when 5      # Save
        $scene = Scene_File.new(true, false, false)
      when 6      # End Game
        $scene = Scene_End.new
      end
    end
  end
end
# Scene_Menu: End
#####################################
#-----------------------------------#
#####################################
# Add's display factions-array with F5
class Scene_Map < Scene_Base
  alias old_update update
  def update
    old_update
    if $TEST and Input.trigger?(Input::F5)
      print_faction_data
    end
  end
end
# Scene_Map: End
#####################################
#-----------------------------------#
#####################################
# Fixes the return_scene for the file-scene
class Scene_File < Scene_Base
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(5)
    end
  end
end
# Scene_File: End
#####################################
#-----------------------------------#
#####################################
# Adjustable helpwindow height and text
class Window_Help_Factions < Window_Base
  def initialize(x = 0, y = 0, width= 544, height = WLH + 32)
    super(x, y, width, height)
  end
 
  def set_text(text, align = 0, x = 4, pic = "")
    if text != @text or align != @align or x != @x or pic != @pic
      self.contents.clear
      self.contents.font.color = normal_color
      rect = Rect.new(0, 0, Cache.picture(pic).width, 52)
      if SojaBird_Factions::Help_Picture == true and pic != ""
        y = 26 - (Cache.picture(pic).height / 2)
        self.contents.blt(0, y, Cache.picture(pic), rect)
        x += Cache.picture(pic).width
      end
      text = text.split(/\##/)
      for string in 0..text.size - 1
        self.contents.draw_text(x, string * WLH, self.width - 40, WLH, text.shift, align)
      end
      @text = text; @align = align; @x = x; @pic = pic
    end
  end
end
# Window_Help: End
#####################################
#-----------------------------------#
#####################################
# Enables to display reputation in messages
class Window_Message < Window_Selectable
  alias old_convert_special_characters convert_special_characters
 
  def convert_special_characters
    old_convert_special_characters
    @text.gsub!(/\\FAC\[(\w+)\]/i)  { "\x10#{$~}" }
  end
 
  def update_message
    loop do
      c = @text.slice!(/./m)
      case c
      when nil
        finish_message
        break
      when "\x00"
        new_line
        if @line_count >= MAX_LINE
          unless @text.empty?
            self.pause = true
            break
          end
        end
      when "\x01"
        @text.sub!(/\[([0-9]+)\]/, "")
        contents.font.color = text_color($1.to_i)
        next
      when "\x02"
        @gold_window.refresh
        @gold_window.open
      when "\x03"
        @wait_count = 15
        break
      when "\x04"
        @wait_count = 60
        break
      when "\x05"
        self.pause = true
        break
      when "\x06"
        @line_show_fast = true
      when "\x07"
        @line_show_fast = false
      when "\x08"
        @pause_skip = true
      #---------------------------------------NEW---#
      when "\x10"
        @text.sub(/\\FAC\[(\w+)\]/, "")
        $game_temp.faction_data.each do |data|
          if data[0] == $1
            @text.sub!(/\\FAC\[(\w+)\]/, data[2].to_s)
          end
        end
      #---------------------------------------NEW---#
      else
        contents.draw_text(@contents_x, @contents_y, 40, WLH, c)
        c_width = contents.text_size(c).width
        @contents_x += c_width
      end
      break unless @show_fast or @line_show_fast
    end
  end
end
# Window_Message: End
#####################################
#-----------------------------------#
#####################################
# Saves the faction-array
class Scene_File < Scene_Base
  alias old_write_save_data write_save_data
  alias old_read_save_data read_save_data
 
  def write_save_data(file)
    old_write_save_data(file)
    Marshal.dump($game_temp.faction_data, file)
  end
 
  def read_save_data(file)
    old_read_save_data(file)
    $game_temp.faction_data = Marshal.load(file)
  end
end
# Scene_File: End
#####################################
Title: Re: Quest Journal v. 1.1
Post by: codemeister1990 on February 04, 2009, 05:23:59 AM
got a problem
testing the default quest 1 so I can understand the scripting a bit
and I get the error...

Script 'Quest Journal' line 802: NameError occurred.

uninitialized constant Window_QuestInfo::Paragrapher

It happens whenever I try to enter the "quest log" (the thing that lets you view current quests)
Title: Re: Quest Journal v. 1.1
Post by: Heartofshadow on February 04, 2009, 08:06:02 AM
got a problem
testing the default quest 1 so I can understand the scripting a bit
and I get the error...

Script 'Quest Journal' line 802: NameError occurred.

uninitialized constant Window_QuestInfo::Paragrapher

It happens whenever I try to enter the "quest log" (the thing that lets you view current quests)

I'm gonna take a stab in the dark here and say you might have forgot to add the "Paragraph Formatter" script into your project. The Quest Journal Script requires Paragraph Formatter to work properly. It can be found by reading the first post of this thread.

If you do have it, my other guess is that you need to put Quest Journal below it. That's how mine is, and all works just dandy.


-Heart of Shadow-
Title: Re: Quest Journal v. 1.1
Post by: codemeister1990 on February 04, 2009, 09:58:58 AM
oh...my bad xD
Title: Re: Quest Journal v. 1.1
Post by: Corbeau on February 15, 2009, 10:16:24 PM
I seem to be having trouble making the Quest journal and the KGC_Enemyguide. In the Menu, they seem to occupy the same space. Entering Quest brings me to the monster manual.

I placed Quest journal above KGC_Enemyguide.

If anyone can help me maje these 2 things work togheter it would be great.
Title: Re: Quest Journal v. 1.1
Post by: CheeseMonster on February 16, 2009, 12:05:18 AM
When I'm working on a quest which has an ID of 10 or higher and try to use the script to complete an objective I get this error:

ArgumentError occured while running script

wrong number of argurments(0 for 1)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on February 16, 2009, 01:51:30 AM
@Corbeau: try putting Quest Journal below all KGC scripts that are integrated into the menu.

@CheeseMonster: I have never seen someone with that error before. What other scripts are you using? If possible, could you upload the project for me to take a look?
Title: Re: Quest Journal v. 1.1
Post by: Corbeau on February 16, 2009, 07:28:12 AM
Ok, it worked, i have no more menu problem.

Now i have an error telling me line
168     return name, description, objectives, prime, icon_index

Exact Error text is:
Script 'Quest Journal' line 168 NameError occurred.
undefined local variable method `prime' for ModAlg_QuestData:Module

I have been working on graphic a lot lately and my right now my patience is tin. I would normally mess around the script more before I ask for help, but since your answers are clear I tough I would ask right away. Thank you.
Title: Re: Quest Journal v. 1.1
Post by: CheeseMonster on February 16, 2009, 01:19:55 PM
These are the scripts I use:

Neo Message System
Prxus Party Manager
Side View Battle system
KGC's Mix Item
Minimap
Anaryu's Antilag
Paragraph Formatter
Quest Journal

Here's a (very) simple example of the error.

http://depositfiles.com/files/guwfln0cp (http://depositfiles.com/files/guwfln0cp)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on February 16, 2009, 04:05:39 PM
@Corbeau, around line 114, where you see:


Code: [Select]
    objectives = []
    name = '??????'
    description = '??????????'
    icon_index = 0


try putting prime = nil right below icon_index = 0 and see what happens.

@CheeseMonster: I'll take a look.

EDIT::

OK, it's because call script recognizes line breaks, so it doesn't read that (1) is meant to be attached to complete_objective. You can just take away the white space and:

Code: [Select]
$game_party.quests[10].complete_objective(0)
ought to fit. However, a nicer way might be to just assign the quest to a local variable, like this:

Code: [Select]
quest = $game_party.quests[10]
quest.complete_objective (0)

and that ought to work.
Title: Re: Quest Journal v. 1.1
Post by: CheeseMonster on February 16, 2009, 04:58:21 PM
Thanks, such a simple solution!  Should really have tried that myself.
Title: Re: Quest Journal v. 1.1
Post by: jegnan on March 11, 2009, 04:22:54 PM
hi,

I'm trying to use Japanese on this script, but it doesn't really let me write much on the description and the objectives part(one or two words each line). I realized one of the problem it has is the space. If I use the US space in between the Japanese letters, the script works half way. If I use Japanese space in between it, the script says the sentence is too long even though the sentence is composed of two words. Is there any solution to this?
Title: Re: Quest Journal v. 1.1
Post by: Aaronmanners on March 21, 2009, 09:19:14 PM
Hey, I love the script, to start off. It's WAY better than that Uber piece of shit I had before. I do have a question though. Is there any easy way to make it track the number of items you have? Ex: x/30 Bat Wings, at 30 or higher/30, it'd be complete, and if it's under / ever goes under, it uncompletes it. Is there a good way to do this?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on March 21, 2009, 10:49:09 PM
Do you mean, is there an easy way to display it? Or just to track it. To track it, all you need to do is use a variable and set it to Items in possession, which is one of the options you'll see in Control Variabls. Then just use a conditional branch and check if it is over 30.If it is, complete the quest. Of course, you might need to do this in a parallel process or something so that it properly updates itself.

I did not build anything in to make it displayable in the quest scene though, sorry.
Title: Re: Quest Journal v. 1.1
Post by: Aaronmanners on March 22, 2009, 03:28:19 AM
Do you mean, is there an easy way to display it? Or just to track it. To track it, all you need to do is use a variable and set it to Items in possession, which is one of the options you'll see in Control Variabls. Then just use a conditional branch and check if it is over 30.If it is, complete the quest. Of course, you might need to do this in a parallel process or something so that it properly updates itself.

I did not build anything in to make it displayable in the quest scene though, sorry.
Thank you for the quick reply. I understand it's not built into the script, but I think I could incorporate it through a common event or such - What I can't figure out is how to display a variable inside a string, if it's possible. I looked it up on the googles, but could only find something like #$game_variables[1], which didn't work.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on March 22, 2009, 05:32:11 AM
No, you'd have to build a code interpreter into where it is displayed. Because the information is saved, the text is static from when it is initialized, therefore it wouldn't update the variable from when it is first initialized. To do so, you'd have to go to where the text is drawn, so in the Window class, and have an interpreter that takes the text, recognizes a specific code that tells it to replace that with a variable. It's not hard; I will build it in for the next version, but I am swamped with school right now and won't be able to work on it, sorry.
Title: Re: Quest Journal v. 1.1
Post by: Aaronmanners on March 22, 2009, 02:36:59 PM
Alright. Thanks for the help man, I really appreciate it. Don't feel rushed though, it works fine as of right now. I'll see if I can do something like that you mentioned, and if I do, I'll put it up to save you the time.

Thank you.

Edit: I have it in place, however I can't find how to refresh it. Using the @info_window.refresh(@list_window.quest) simply lags it like a bitch; here's what I have- the item number simply stays at 0, no matter what (I checked to make sure it was the right ID and all)

Code: [Select]
quest.revealed_objectives.each { |i|
      # Get the correct color
      contents.font.color = quest.complete_objectives.include? (i) ?
        text_color (ModAlg_QuestData::COMPLETE_COLOUR) : quest.failed_objectives.include? (i) ?
        text_color (ModAlg_QuestData::FAILED_COLOUR) : text_color (ModAlg_QuestData::ACTIVE_COLOUR)
      # Get objective
      objective = quest.objectives[i]
      @objecti = objective
      @objecti.gsub!(/\\ITEM\[([0-9]+)\]/) { $game_party.item_number($1.to_i) }
      # Draw Bullet
      tw = contents.text_size (ModAlg_QuestData::BULLET_CHARACTER).width
      x = 8
      contents.draw_text (x, y, tw, WLH, ModAlg_QuestData::BULLET_CHARACTER)
      x += tw + 4
      # Format the objective
      obj_bitmap = Bitmap.new (contents.width - x, 2*WLH)
      obj_bitmap.font = contents.font
      obj_bitmap.font.size -= 4
      formatted_obj = formatter.format (@objecti, obj_bitmap)
      # Draw Objective
      bmp = artist.draw (formatted_obj)
      contents.blt (x, y + 4, bmp, bmp.rect)
      # Modify the Y accordingly
      y += WLH*([formatted_obj.lines.size, 2].min)
    }

The rest is the same; the objective is as this:
Code: [Select]
objective[0] = "Potions: \\ITEM[0] \\ITEM[1] #Used both for testing which it was- both stayed at 0 when potions were added.

Again, it works fine as of right now. However, if there's an easy way to finish this piece, I'd appreciate it.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on March 22, 2009, 05:55:07 PM
Yeah, that's because you are modifying the actual saved message, meaning that you are replacing the
Code: [Select]
\item[i]
with the variable in the actual saved message. What you actually want to do is preserve the saved string and re-interpret it whenever it is drawn. I also don't know why you are making it a class variable. Something like this might work:

Code: [Select]
quest.revealed_objectives.each { |i|
      # Get the correct color
      contents.font.color = quest.complete_objectives.include? (i) ?
        text_color (ModAlg_QuestData::COMPLETE_COLOUR) : quest.failed_objectives.include? (i) ?
        text_color (ModAlg_QuestData::FAILED_COLOUR) : text_color (ModAlg_QuestData::ACTIVE_COLOUR)
      # Get objective # Notice that here I use gsub instead of gsub!
      objective = quest.objectives[i].gsub (/\\ITEM\[([0-9]+)\]/) { $game_party.item_number($1.to_i) }
      # Draw Bullet
      tw = contents.text_size (ModAlg_QuestData::BULLET_CHARACTER).width
      x = 8
      contents.draw_text (x, y, tw, WLH, ModAlg_QuestData::BULLET_CHARACTER)
      x += tw + 4
      # Format the objective
      obj_bitmap = Bitmap.new (contents.width - x, 2*WLH)
      obj_bitmap.font = contents.font
      obj_bitmap.font.size -= 4
      formatted_obj = formatter.format (objective, obj_bitmap)
      # Draw Objective
      bmp = artist.draw (formatted_obj)
      contents.blt (x, y + 4, bmp, bmp.rect)
      # Modify the Y accordingly
      y += WLH*([formatted_obj.lines.size, 2].min)
    }
Title: Re: Quest Journal v. 1.1
Post by: Aaronmanners on March 22, 2009, 06:40:58 PM
Alright, I'll test that later today. My project just got set back 4 days cause my dad managed to corrupt every data file, haha. Gotta redo 4 days of work... no problem... heheh... :froghat:

E: Still doesn't work. But don't feel pressured or anything, I'm going to look into it on my own for now.

E2: Scratch that, I'm too lazy to pick up rgss(2) again... Don't feel pressured at all nonetheless.

E3: If you haven't started working on this yet, don't begin just for me. My RPG Maker keeps corrupting the file when I shut down my computer. Just gonna leave this project in the dust.
Title: Re: Quest Journal v. 1.1
Post by: Darkie on April 05, 2009, 03:07:23 AM
And the issues keep stacking.
I have a new one.

...

Every time I try to access the menu in my game, I get this error

????? 'Quest Journal' ? 918 ??? No Method Error ????????
undefined method 'diabled_commands' for #<Window_Command_Plus_Icons:0x1b22158>

...

If its any consolation, I am also using Omegas7 Menu Icons, and KGC_CustomMenuCommand (edited at line 230 with the string:

 @command_window = Window_Command_Plus_Icons.new(160, commands)

as is required to install the Omegas7 script)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 05, 2009, 07:27:16 AM
It's because Window COmmand Icons remakes Window_Command, and since disabled_commands is added to Window_Command, the problem arises there. I would need to see the Omegas7 Menu Icons script in order to fix it. Well, maybe I could just straight up replace the class I make the modifications in, but I can't be sure that would work. Also, consolation? Why would I need consolation?
Title: Re: Quest Journal v. 1.1
Post by: jegnan on April 05, 2009, 03:22:52 PM
hi,

I'm trying to use Japanese on this script, but it doesn't really let me write much on the description and the objectives part(one or two words each line. It causes an error if I write more than that). I realized one of the problem it has is the space. If I put the English space in between the Japanese letters, the script kind of works but not in a perfect way. If I use Japanese space in between them, the script says the sentence is too long even though the sentence is composed of two words. Is there any solution to this? Does it have something to do with the paragraph formatter?
Title: Re: Quest Journal v. 1.1
Post by: Darkie on April 05, 2009, 05:00:36 PM
Uhmm...
that was a misuse of of the term on my behalf.

... anyways.

...

Heres the Omegas7 Menu Icon script then:

Spoiler for:
# ========================================================================
#                     Omegas7's Menu Icons Script.
# ========================================================================
#           Version: 2.0   (Final).
# ========================================================================
#
#         Set icons for the commands in the menu command window.
#
# ========================================================================
#
#     Edit the below module:
#
#     MENU_ICONS[ID] = N
#     Replace ID with the menu command window command option.
#     Start counting from 0.
#     0 = First Option... 1 = Second Option...
#     Replace N with the icon index.
#
#     MENU_ICONS_SPACING_LEVEL is the amount of spaces before the
#     command text, when higher, more space for the icon,
#     when lower, less.
#
#     MENU_ICONS_Y_INCREASE is the amount of Y screen position to
#     increase for each line, by default is 24.
#     Use it for adjusting the icons positions to fit the text.
#
# ========================================================================



module OMEGAS7
 
  MENU_ICONS = []   # Don't edit this line.
 
  MENU_ICONS[0] = 83     # First option has icon number 50.
  MENU_ICONS[1] = 107
  MENU_ICONS[2] = 26
  MENU_ICONS[3] = 131
  MENU_ICONS[4] = 112
  MENU_ICONS[5] = 143
  MENU_ICONS[6] = 143
  MENU_ICONS[7] = 143
  MENU_ICONS[8] = 143   # Sixth option has icon number 55.
 
 
  MENU_ICONS_SPACING_LEVEL = 3   # 3 spaces before command text.
 
  MENU_ICONS_Y_INCREASE = 24   # 24 pixels between each icon.
 
end




class Window_Command_Plus_Icons < Window_Selectable
 
  include OMEGAS7
 
  attr_reader   :commands                 # command

  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    if row_max == 0
      row_max = (commands.size + column_max - 1) / column_max
    end
    super(0, 0, width, row_max * WLH + 32, spacing)
    @space = ""
    @commands = commands
    @item_max = commands.size
    @column_max = column_max
    refresh
    self.index = 0
  end

  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
   
    for i in 0..MENU_ICONS_SPACING_LEVEL.to_i
      @space += " "
    end
   
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, @space + @commands[index])
    draw_icon(MENU_ICONS[index],0,index * MENU_ICONS_Y_INCREASE)
   
    @space = ""
  end
end
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 05, 2009, 06:23:13 PM
hi,

I'm trying to use Japanese on this script, but it doesn't really let me write much on the description and the objectives part(one or two words each line. It causes an error if I write more than that). I realized one of the problem it has is the space. If I put the English space in between the Japanese letters, the script kind of works but not in a perfect way. If I use Japanese space in between them, the script says the sentence is too long even though the sentence is composed of two words. Is there any solution to this? Does it have something to do with the paragraph formatter?

Yeah, it's likely an error in the Paragraph Formatter. I will look into it when I can, but I'm in the middle of exams, so I probably won't gt around to it for a long long time  :(

@Darkie: OK, it should be easy enough to fix.

Try this, perhaps:

Code: [Select]
# ========================================================================
#                     Omegas7's Menu Icons Script.
# ========================================================================
#           Version: 2.0   (Final).
# ========================================================================
#
#         Set icons for the commands in the menu command window.
#
# ========================================================================
#
#     Edit the below module:
#
#     MENU_ICONS[ID] = N
#     Replace ID with the menu command window command option.
#     Start counting from 0.
#     0 = First Option... 1 = Second Option...
#     Replace N with the icon index.
#
#     MENU_ICONS_SPACING_LEVEL is the amount of spaces before the
#     command text, when higher, more space for the icon,
#     when lower, less.
#
#     MENU_ICONS_Y_INCREASE is the amount of Y screen position to
#     increase for each line, by default is 24.
#     Use it for adjusting the icons positions to fit the text.
#
# ========================================================================



module OMEGAS7
 
  MENU_ICONS = []   # Don't edit this line.
 
  MENU_ICONS[0] = 83     # First option has icon number 50.
  MENU_ICONS[1] = 107
  MENU_ICONS[2] = 26
  MENU_ICONS[3] = 131
  MENU_ICONS[4] = 112
  MENU_ICONS[5] = 143
  MENU_ICONS[6] = 143
  MENU_ICONS[7] = 143
  MENU_ICONS[8] = 143   # Sixth option has icon number 55.
 
 
  MENU_ICONS_SPACING_LEVEL = 3   # 3 spaces before command text.
 
  MENU_ICONS_Y_INCREASE = 24   # 24 pixels between each icon.
 
end



#==============================================================================
# ** Window Command Plus Icons
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of steps taken to make compatible with Quest Journal:
#    - changed super method to Window_Command, rather than Window_Selectable
#    - removed overlap between this class and Window_Command
#==============================================================================

class Window_Command_Plus_Icons < Window_Command
 
  include OMEGAS7
 
  def initialize (width, commands, column_max = 1, row_max = 0, spacing = 32)
    @space = ""
    for i in 0..MENU_ICONS_SPACING_LEVEL.to_i
      @space += " "
    end
    super (width, commands, column_max, row_max, spacing)
  end

  def draw_item(index, enabled = true)
    command = @commands[index].dup
    @commands[index] = @space + @commands[index]
    super (index, enabled)
    @commands[index] = command
    draw_icon(MENU_ICONS[index],0,index * MENU_ICONS_Y_INCREASE)
  end
end

 It's the same thing, I just changed it around a little bit to have a different super class.

You will aso need to change a line in the quest journal. At around line 921, you should see:

Code: [Select]
    @command_window = Window_Command.new(width, c)

change it to:

Code: [Select]
    @command_window = @command_window.class.new(width, c)
Title: Re: Quest Journal v. 1.1
Post by: Darkie on April 06, 2009, 06:42:13 AM
Sir! You are a genius!

Thank you very much! ^_^
Title: Re: Quest Journal v. 1.1
Post by: edd0345 on May 01, 2009, 02:56:01 PM
 :( I found another error. It may be just me and me noobness at rpg maker but i would like it if you would take a look.It was probably my fault. Please help. I took a screenie. See attachments please.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on May 02, 2009, 03:49:44 AM
Right above that line, put this line:

Code: [Select]
    p i, ModAlg_QuestData::MENU_INDEX

then tell me everything that prints out when you open the menu in-game
Title: Re: Quest Journal v. 1.1
Post by: edd0345 on May 03, 2009, 09:17:03 PM
Now it says:


Nil
4

Then another window pops up and says;

 Error 'Quest Journal' line 925 NoMethodError Occured
undefined method '>=' for nil:NilClass

Thanks for your time.  :) I will hope to hear back soon! Thank you! (Once again see attachments for screenshots)
Title: Re: Quest Journal v. 1.1
Post by: edd0345 on May 03, 2009, 10:00:52 PM
Ok, i fixed part of it. :) (i hope)
Now my problem is that the menu will actually open, but displays no quests tab Example:

Menu:                                        What I want it to be:
Items                                                   Items
Skills                                                    Skills
Equip                                                   Equip
Status                                                 Status
Party                                                   Party
Save                                                   Quests
Game End                                             Save
                                                          Game End

See attachment please
Title: Re: Quest Journal v. 1.1
Post by: edd0345 on May 03, 2009, 10:13:07 PM
I tried to take the party changer off, and it said the same thing as before, only this time it was

Nil
3

Then the other window opened up and said

Error 'Quest Journal' line 925 NoMethodError Occured
undefined method '>=' for nil:NilClass

Sorry for all the confusion!
Title: Re: Quest Journal v. 1.1
Post by: Grafikal on May 03, 2009, 10:19:04 PM
Wow, please edit your post instead of triple posting. MA gets around to help everyone in due time.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on May 04, 2009, 02:18:06 AM
What scripts do you have that modify the menu? IE, what is the script that allows for multiple commands in the menu.

In any case, since it seems you have a number of scripts, this will probably go faster if you upload your project for me to take a look at it.


If you do not want to share your project now, then just make a new project and add all the scripts you have into it and upload that.
Title: Re: Quest Journal v. 1.1
Post by: edd0345 on May 04, 2009, 08:54:34 PM
I really don't know how to upload the project, but i took some screenies of the scripts i have.
 :lol:
I have not touched or tampered with any of the main included scripts. Thank you.
Note: If you tell me how to upload the project I gladly would. Thanks! ;D

Edit: I figured it out! Its attached!

Edit 2: Here is the link to the mediafire version http://www.mediafire.com/?dei1myizmjm (http://www.mediafire.com/?dei1myizmjm)
Title: Re: Quest Journal v. 1.1
Post by: Grafikal on May 04, 2009, 09:32:58 PM
Note: If you tell me how to upload the project I gladly would. Thanks! ;D

Compress your game data (Not encrypted so that he can access the scripts) and then take that .exe and upload it using a file uploader site. http://www.sendspace.com/ or http://www.mediafire.com/ work fine. Then copy/paste the 'share' link to that download.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on May 06, 2009, 12:07:03 AM
ALright, edd, try two things:

First, place Quest Journal below all of the other scripts that modify the menu in the Script Editor.
Second, go into the script, press CTRL-H and replace all instances of:

Code: [Select]
disabled_commands

with:

Code: [Select]
ma_disabled_commands

And delete the p statement I asked you to include.

Tell me if there are other problems from there.
Title: Re: Quest Journal v. 1.1
Post by: edd0345 on May 07, 2009, 12:23:32 AM
Thanks much! I deleted some of the scripts i dont use and after the 1st one and your change it worked perfectly! Thanks a ton! ;D
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on May 28, 2009, 01:30:49 AM
aww, imageshack took it down. I put up a new screen though.
Title: Re: Quest Journal v. 1.1
Post by: Sayber on May 30, 2009, 12:25:17 PM
How do you make a quest? it works and all but i dont know how to make a quest! Help me or be forced to make bad games!
Title: Re: Quest Journal v. 1.1
Post by: Grafikal on May 30, 2009, 06:27:42 PM
this is where you put the :V at the end of your message
Title: Re: Quest Journal v. 1.1
Post by: Buland on May 31, 2009, 05:50:55 AM
This script is fabulous! However, I am facing a bit of a problem. Forgive me if I sound stupid but, how do I set my quest's ID? Also, after writing down the editable things, what else do I need to add in the script? Plus, do I have to do all of the things (like, the editable and uneditable) for every quest? If not, then what?

Forgive me, for I am new!  ::)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on May 31, 2009, 02:05:03 PM
I'm not sure what you mean.

To set up a quest, you make one of these for each quest in the area where it tells you to, somewhere around line 157

Code: [Select]
    #      when <quest_id> # Give the quest an ID number
    #        name = '<quest_name>'
    #        description = '<quest_description>'
    #        objectives[0] = '<first_objective>'
    #        ...
    #        objectives[n] = '<nth objective>'
    #        prime = [<objective_id>, ..., <objective_id>]
    #        icon_index = <quest_icon_index>

The quest ID of that quest is whatever you put as when <quest_id>. They have to be unique, and then that quest ID will refer to the quest you make below it.

As for having to set everything every time, no. The values will default to something, but something highly non-specific. Basically, the default values, if you don't set anything, are:

Code: [Select]
#      name = '??????'
    #      description = '??????????'
    #      objectives = []
    #      prime = [all objectives]
    #      icon_index = 0


So, if you have a quest like this:

Code: [Select]
      when 8 # Give the quest an ID number
        name = 'Feed the Bears'
        objectives[0] = 'Get Killed by a bear.'

Then the quest stats would be:

Code: [Select]
#      name = 'Feed the Bears'
    #      description = '??????????'
    #      objectives = ["Get KIlled by a bear"]
    #      prime = [0]
    #      icon_index = 0
Title: Re: Quest Journal v. 1.1
Post by: Buland on May 31, 2009, 03:21:57 PM
I'm not sure what you mean.

To set up a quest, you make one of these for each quest in the area where it tells you to, somewhere around line 157

Code: [Select]
    #      when <quest_id> # Give the quest an ID number
    #        name = '<quest_name>'
    #        description = '<quest_description>'
    #        objectives[0] = '<first_objective>'
    #        ...
    #        objectives[n] = '<nth objective>'
    #        prime = [<objective_id>, ..., <objective_id>]
    #        icon_index = <quest_icon_index>

The quest ID of that quest is whatever you put as when <quest_id>. They have to be unique, and then that quest ID will refer to the quest you make below it.

As for having to set everything every time, no. The values will default to something, but something highly non-specific. Basically, the default values, if you don't set anything, are:

Code: [Select]
#      name = '??????'
    #      description = '??????????'
    #      objectives = []
    #      prime = [all objectives]
    #      icon_index = 0


So, if you have a quest like this:

Code: [Select]
      when 8 # Give the quest an ID number
        name = 'Feed the Bears'
        objectives[0] = 'Get Killed by a bear.'

Then the quest stats would be:

Code: [Select]
#      name = 'Feed the Bears'
    #      description = '??????????'
    #      objectives = ["Get KIlled by a bear"]
    #      prime = [0]
    #      icon_index = 0
Where do I, not in the script, type in the Quest ID? Like... who or what is the Quest ID? Is it the NPC who starts the quest? Also, do I put in all of the editable things (for every quest) and then put the uneditable thing only once afterwards?

Thank you for taking some time to help me!
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on May 31, 2009, 04:50:47 PM
You initiate quests with a call script in events.

These are the commands:

Code: [Select]
#        $game_party.quests[quest_id].reveal_objective (objective_id)
#        $game_party.quests[quest_id].conceal_objective (objective_id)
#        $game_party.quests[quest_id].complete_objective (objective_id)
#        $game_party.quests[quest_id].uncomplete_objective (objective_id)
#        $game_party.quests[quest_id].fail_objective (objective_id)
#        $game_party.quests[quest_id].unfail_objective (objective_id)
#        $game_party.quests[quest_id].complete?
#        $game_party.quests[quest_id].failed?
#        $game_party.quests[quest_id].reward_given = true/false
#        $game_party.quests[quest_id].concealed = true/false
#        $game_party.quests.remove (quest_id)

Everywhere it says quest_id is where you set put in the quest ID.

If I understand correctly what your second question is, you put all of the editable stuff before the non-editable stuff, so:

Code: [Select]
when 1
...
when 2
...
when 3
...
# Non-Editable

I really suggest you grab the demo to see how everything works.

Title: Re: Quest Journal v. 1.1
Post by: Buland on June 01, 2009, 03:10:42 PM
Thanks for clarifying the vague image! Now... the only question left... what is the Quest ID?  ???

Plus, I downloaded the demo and extracted it... but it doesn't open.  :-[
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 01, 2009, 03:36:30 PM
I've explained what the quest ID is a lot though. What about it don't you understand specifically?

The quest ID is a number that identifies a specific quest and is unique to it.

Thus, when you make a quest:

when <quest_id>
  etc...

the quest ID is the number you put after when. And that number has to be unique to that quest and is the number you use to identify it.

So if you have three quests:

Code: [Select]
when 1
  name = "Quest A"
when 2
  name = "Quest B"
when 3
  name = "Quest C"

Then 1 is the quest ID for "Quest A", 2 is the quest ID for "Quest B", 3 is the quest ID for "Quest C"

and then when you call that quest in a script call, such as with $game_party.quests[1], you will be accessing all of the information you set under "when 1"

So $game_party.quests[1].name would give you "Quest A"

I think I've been pretty clear. The demo is the best way, of course, so I think we should focus on figuring out why you are unable to open it. What program are you using to extract it? What is it saying when you can't open it?
Title: Re: Quest Journal v. 1.1
Post by: Buland on June 02, 2009, 07:45:44 AM
I am using Mozilla Firefox and I downloaded it through Internet Download Manager. And when I open it, it doesn't say anything neither does it open. Perhaps you could give me some screen shots?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 02, 2009, 03:02:42 PM
Use WinRAR to extract it: http://www.rarsoft.com/

Title: Re: Quest Journal v. 1.1
Post by: zuneriol on June 06, 2009, 01:39:22 PM
This might sound noobish....but it's making me nuts!

I copied the scripts of the demo as well as the Paragraph Formatter....

I even copied the events to my project...

I am getting this error: NoMethodError occurred while running the script.
                               undefined method `quests' for #<Game_Party:0x2311390>

Here is my project with the problem...

Thanks!
Title: Re: Quest Journal v. 1.1
Post by: Bash on June 06, 2009, 04:07:35 PM
Your project is broken, it wont open up in VX.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 07, 2009, 07:41:39 PM
This might sound noobish....but it's making me nuts!

I copied the scripts of the demo as well as the Paragraph Formatter....

I even copied the events to my project...

I am getting this error: NoMethodError occurred while running the script.
                               undefined method `quests' for #<Game_Party:0x2311390>

Here is my project with the problem...

Thanks!

Make sure that you put it below other custom scripts that modify Game_Party.

And yeah, I can't open your project. I will try doing some replacement stuff and seeing if I can get it open.

EDIT::

Oh, you put it below Main. Put it above Main. I still couldn't run your project so I don't know if that will work, but give it a try. I know that that could cause that error though.
Title: Re: Quest Journal v. 1.1
Post by: Sartory on June 25, 2009, 04:31:16 PM

Ok, I copied the script from the demo and inputted my quest, I tried it in the demo and it worked fine, but when I pasted it into my own game I got several errors, and I'm stumped right now with this:

 (http://i39.tinypic.com/wvsl5v.jpg)

 I'd appreciate a little help  ;D
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 25, 2009, 04:33:34 PM
It's likely a compatibility issue. Which other scripts do you have?
Title: Re: Quest Journal v. 1.1
Post by: Sartory on June 25, 2009, 07:40:43 PM
I have Recover HP/MP/States when Level Up, MiniGame: Win the Lottery!,  Battle Result Window, Outline Text, a simple debugger, Item/Equipment/Skill Conditions, On-Screen Shop, Monster Book, Basic HUD, Floating Event's Name, Paragraph Formatter, and the Quest Journal.

I'm only getting an error when I try to initiate a quest, the game at least works.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 25, 2009, 08:35:37 PM
Can you upload your Scripts.rvdata?

I'm not too too familiar with those scripts. My initial guess would've been that Paragraph Formatter is included in one of the scripts, but I'm not too familiar with those scripts so that's probably not the case.

Just in case, try deleting the Paragraph Formatter and see if the Quest Journal still works. If not, put it back in and send me the Scripts.rvdata
Title: Re: Quest Journal v. 1.1
Post by: Sartory on June 26, 2009, 12:31:12 AM
Ok, I've attached my scripts to the previous post.  I hope you can find out what's wrong with it, I've been trying to figure it out for hours  :o
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 26, 2009, 02:27:00 AM
Yup, I think I fixed it. At least I got it to the menu.

Initially, it is a naming problem. Go to Quest Journal, and press CTRL-H

replace all instances of
Code: [Select]
disabled_commands
with:
Code: [Select]
ma_disabled_commands


However, I think in your attempts to fix the error on your own, you accidentally repasted part of the bestiary script. So, go to line 492 and notice that you have the same approx. 50 lines twice. Delete one of the:

Code: [Select]
#=============================================================
# * Add command linked to Monster Book in Menu
#=============================================================
if Wora_Monbook::SHOW_IN_MENU
  class Scene_Menu < Scene_Base  
    #--------------------------------------------------------------------------
    # * Sort New Command(s)
    #--------------------------------------------------------------------------
    def wsort_newcommand
      @wsorted_command ||= [] # Array to collect sorted commands
      wnewcommand = @wnewcommand - @wsorted_command # Remove sorted commands
      wnewcommand.sort.each {|i| @menu_index += 2 if @menu_index >= i }
      @command_window.index = @menu_index # Set window's index to new index
      @wsorted_command = @wsorted_command + @wnewcommand # Add sorted commands
    end

    #--------------------------------------------------------------------------
    # * [Alias] Create Command Window
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_crecomwin create_command_window
    def create_command_window(*args)
      wora_menucomorg_scemenu_crecomwin(*args)
      # Insert new command
      @command_window.ins_command(Wora_Monbook::MENU_INDEX,
    Wora_Monbook::MENU_COMMAND)
      # Set index to correct one if @menu_index is after/equal to new command
      @wnewcommand ||= []
      @wnewcommand << Wora_Monbook::MENU_INDEX
      wsort_newcommand
    end

    #--------------------------------------------------------------------------
    # * [Alias] Update Command Selection
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_updcomsel update_command_selection
    def update_command_selection(*args)
      @menucomorpg_change = false
      # If player choose new command
      if Input.trigger?(Input::C) and @command_window.index ==
      Wora_Monbook::MENU_INDEX
        Sound.play_decision
        $scene = Scene_MonsterBook.new(true)
      else # If player choose index after new command
        if Input.trigger?(Input::C) and @command_window.index >
        Wora_Monbook::MENU_INDEX
          @command_window.index -= 1 # Decrease index to make old update works
          @menucomorpg_change = true
        end
        wora_menucomorg_scemenu_updcomsel(*args)
      end
      @command_window.index += 1 if @menucomorpg_change # Increase index back
    end
    
    #--------------------------------------------------------------------------
    # * [Alias] Update Actor Selection
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_updactsel update_actor_selection
    def update_actor_selection(*args)
      @menucomorpg_change = false
      # If player choose index after new command
      if Input.trigger?(Input::C) and @command_window.index >
      Wora_Monbook::MENU_INDEX
        @command_window.index -= 1 # Decrease index to make old update works
        @menucomorpg_change = true
      end
      wora_menucomorg_scemenu_updactsel(*args)
      @command_window.index += 1 if @menucomorpg_change # Increase index back
    end
  end
end

So there should only be one of that section of code when you're finished.
Title: Re: Quest Journal v. 1.1
Post by: Sartory on June 26, 2009, 04:24:18 PM
I fixed that, but when I try to open the menu via the escape button, I get this error:
(http://i39.tinypic.com/2nc32h5.jpg)
I've attached the game itself this time, hopefully you can get it up and running  ;9
Title: Re: Quest Journal v. 1.1
Post by: game_guy on June 26, 2009, 04:36:18 PM
Hey modern algebra I made a program in visual basic that helps users easily make quests. I decided to post it here if thats ok. I actually made it for a friend who used your script but why not let everyone use it right?

http://www.sendspace.com/file/b2mdpo

Should be simple enough if anyone needs help on it let me know!
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 26, 2009, 05:20:24 PM
I fixed that, but when I try to open the menu via the escape button, I get this error:
(http://i39.tinypic.com/2nc32h5.jpg)
I've attached the game itself this time, hopefully you can get it up and running  ;9

You attached the exe, which is not the game itself. It needs everything else in the folder to run.

That said, I suspect you missed at least one of the disabled_commands -> ma_disabled_commands, or else you edited something yourself and caused the error.

Unfortunately, I'm going away very soon and I won't be back for about a week, so hopefully that's the problem and you get it fixed.

In case it is something else, I edited the Scripts.rvdata you sent me and now it works for me, so I attached it to this post. Hopefully it will work for you. Save it into your Data folder and replace the Scripts.rvdata already there. Hopefully that will resolve your problem.


@game_guy - that's awesome! Thank you. I will take a look at it and link to it in the first post.


EDIT::

Just tried it out. That is a very nice interface and very easy to use. Thank you for doing that; it's great!
Title: Re: Quest Journal v. 1.1
Post by: Sartory on June 26, 2009, 06:43:24 PM
UPDATE: I am supernoob, I had to start a new game in order to have the quest log effect applied.  All the scripts I am running work great now.  Thanks for all you help! :D

And I tried changing the scripts in the data folder, and nothing happened, which is why I asked you.  I guess I just needed to restart RMVX.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 27, 2009, 01:29:12 AM
OK, I found an internet connection for now, but not my computer, so no RMVX.

 I want you to stop trying to edit your scripts, since you're making things worse. Like I said, the Scripts.rvdata I sent works for me, but it doesn't sound like you knew what to do with it, so detailed instructions:

You aren't supposed to open it, not externally. You can edit it through RMVX. That's what you are doing when you play around with the Scripts Editor.

What I wanted you to do with the Scripts.rvdata I attached is save it into the data folder of your project.

So open up your project directory, where you should see a few folders (Graphics, Data, Audio), as well as the exe, an ini, and an rvproj files. Open up the Data folder. Delete the Scripts.rvdata that is in there, then copy the Scripts.rvdata I attached to my previous post and paste it into that folder. Then try the project.
Title: Re: Quest Journal v. 1.1
Post by: Hunter1787 on July 04, 2009, 12:16:40 AM
I just dont get where to put the scripts in!  HELP!
Title: Re: Quest Journal v. 1.1
Post by: Hunter1787 on July 04, 2009, 12:35:07 AM
Hey modern algebra I made a program in visual basic that helps users easily make quests. I decided to post it here if thats ok. I actually made it for a friend who used your script but why not let everyone use it right?

http://www.sendspace.com/file/b2mdpo

Should be simple enough if anyone needs help on it let me know!

Where do you insert the script?
Title: Re: Quest Journal v. 1.1
Post by: Grafikal on July 04, 2009, 02:30:10 AM
Look elsewhere. The answer doesn't have to be here. MA won't be back until around July 6th, so look elsewhere.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 05, 2009, 11:13:34 AM
You copy the script from the Script Editor of the demo. So open the demo, and up at the top there is a little icon of a paper and pencil. Click on that or press F11 and it will bring you to the Script Editor. Scroll down to below Materials and you'll see two entries: Paragraph Formatter and Quest Journal. Copy them and paste them into the Script Editor of your game at around the same place.

If you mean the thing that game_guy made, then that is a separate program altogether, and all you need to do is run it.
Title: Re: Quest Journal v. 1.1
Post by: heyoka on July 15, 2009, 10:52:49 AM
umm need help i keep gettin the error "Script 'Quest Journal' line 164: SyntaxError occurred" but i cant find whats wrong or anything please help me! btw this script is very good :blizj:

edit:
already fixed myself
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 15, 2009, 11:49:52 AM
You shouldn't get any syntax errors unless you miscopied the script or messed up setting quests up. Try recopying the script into your game; if that doesn't work, copy the lines around and including 164 and show them to me.

I will be gone for the next five days though.
Title: Re: Quest Journal v. 1.1
Post by: heyoka on July 15, 2009, 12:49:56 PM
yup worked but get other error now(when i wanna go to menu): Script 'Quest journal' line 954 nomethoderror occured. undifened method >= for nil:NilClass. the line is:       i += 1 if i >= ModAlg_QuestData::MENU_INDEX  lines around it and includ line 954:
Spoiler for:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Create Command Window
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_journal_menu_cmmnd_win_create create_command_window
  def create_command_window
    modalg_quest_journal_menu_cmmnd_win_create
    # If accessed through map, then don't add it to the menu
    return unless $game_system.quest_menuaccess
    c = @command_window.commands
    c.insert (ModAlg_QuestData::MENU_INDEX, ModAlg_QuestData::QUESTS_LABEL)
    width = @command_window.width
    disabled = @command_window.disabled_commands
    @command_window.dispose
    @command_window = Window_Command.new(width, c)
    @command_window.index = @menu_index
    # Disable all of the old commands as well
    disabled.each { |i|
      i += 1 if i >= ModAlg_QuestData::MENU_INDEX
      @command_window.draw_item (i, false)
    }
    if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled
      @command_window.draw_item (ModAlg_QuestData::MENU_INDEX, false)
    end
  end
 how to fix it or what did i wrong?
and by the way i used game_guy's thingy to generate it
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 17, 2009, 02:04:36 AM
Yeah, that's a compatibilty error with one of woratana's scripts, though I forget which one.

Try this:

Press CTRL-H, and find everything that is disabled_commands in the script and replace it with ma_disabled_commands, and see if that works.
Title: Re: Quest Journal v. 1.1
Post by: heyoka on July 17, 2009, 06:49:04 AM
DUDE THANKS SO MUCH IT WORKED!!!!!!!!!!! ;D ;D ;D ;D ;D ;D ;D ;D ;D thanks real lot :blizj:
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 18, 2009, 02:47:02 PM
That's probably another compatibility problem with one of your other scripts, or else maybe a configuration error. I'm thinking maybe it's sending an icon as an array, rather than an integer? I'm not sure; do you have an animated Icons script or something?

Some cursory things to try would be to place the Quest Journal below any other scripts you have. If that doesn't work, I'd need to see your project, or else a blank project with the error reproduced.
Title: Re: Quest Journal v. 1.1
Post by: heyoka on July 18, 2009, 06:53:06 PM
already found the glitch.........., forgot to put in the item id's so it didnt had an icon(noob fault sorry for bothering you) :-[ :-[ :-[ :-[ :-[
Title: Re: Quest Journal v. 1.1
Post by: ImmortalDreamer on July 30, 2009, 07:25:46 PM
Just a quick question regarding game guy's program to quickly create quests quickly. Do you need to have his program in the same folder as your game or where does it need to be?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on July 30, 2009, 08:30:23 PM
No, as far as I know you don't. It can be anywhere. Once you've finished generating quests though, you have to copy it and paste it in your Scripts Editor.
Title: Re: Quest Journal v. 1.1
Post by: kitten2021 on August 04, 2009, 05:10:32 AM
Hi! Umm... I'm new to this scripting thing, so I just wanted to make sure I was understanding the concept of what it was I was actually going to need to do with this quest script.
I just simply copy it out of your demo or from the .txt file and paste it into a new script in my RMVX scripting database manager under the "Materials" section right?
Is there anything in the script that I need to change so that it works with my game, or no?  ???
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 04, 2009, 05:26:50 AM
You're right about where to put it. As for making it work with your game, you have to set up all the quests. Just follow the instructions and you should be fine.
Title: Re: Quest Journal v. 1.1
Post by: kitten2021 on August 04, 2009, 05:34:11 AM
Instructions...? Oh! LOL, now I'm embarrassed...  :-[ LOL. Thank you very much.  :)
Title: Re: Quest Journal v. 1.1
Post by: lauronpegason on August 07, 2009, 11:08:23 AM
Hi, MA,
than you very much for your work. Unfortunately, I've looked over the pages of this discussion and nobody seems to be having my problem. My problem seems to be related to Dargor's Custom Commands Script. (Yes, I've edited the script as you suggested).
Since I'm also using Dargor's Bestiary and Party Changer Scripts, the 'Quests' command index should be '7' to be right before 'Save' and 'End Game'. I can get the command string properly and in the right position, but then all the following commands won't respond to their name: that would happen to all commands after 'Quests'. So, for instance: 'Save' will open the 'Bestiary' and 'End Game' will open the 'Save Game' screen. I hope I've been detailed enough.
If this can't be solved, I guess I'll switch to the KEY_ACCESS, but I'd like it best in the menu. Again, thank you a lot.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 07, 2009, 04:49:38 PM
Hmm...

And you have the Quest Journal underneath the Custom Commands script? I can't think of why that problem might occur.

Can you recreate the error in a separate project and send that to me? Or just send me the actual project if you trust me not to steal anything.

The other thing I could think of is just to set MENU ACCESS off in the Quest Journal and just add it manually through whatever interface Custom Commands lets you add options.
Title: Re: Quest Journal v. 1.1
Post by: lauronpegason on August 07, 2009, 05:16:38 PM
I created a new project, pasting only some of the scripts, and still I get the same error, so hopefully I won’t have to send you my official project, although I do certainly trust you enough ;) I hope it won’t bug you that some words of the scripts I used have been translated – I’m really Italian, you see. Thanks a lot for your help.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 07, 2009, 06:54:35 PM
No, I donèt mind - thatès why theyère configurable :)

Anyway, itès kind of  a hack fix, but go into the Quest Journal script and go to about line 899 to see this:

Code: [Select]
    if @menu_index == 'Quest'
      @menu_index = ModAlg_QuestData::MENU_INDEX
    elsif @menu_index >= ModAlg_QuestData::MENU_INDEX
      @menu_index += 1
    end

Change it to:

Code: [Select]
    if @menu_index == 'Quest'
      @menu_index = ModAlg_QuestData::MENU_INDEX
#    elsif @menu_index >= ModAlg_QuestData::MENU_INDEX
#      @menu_index += 1
    end

then go down to about line 936 and see this:

Code: [Select]
      if @command_window.index == ModAlg_QuestData::MENU_INDEX && Input.trigger? (Input::C)
        if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled
          Sound.play_buzzer
        else
          # Open Quest Window
          Sound.play_decision
          $scene = Scene_Quest.new
        end
        return
      end
      # If the command index is greater than it ought to be, make sure
      if @command_window.index > ModAlg_QuestData::MENU_INDEX
        @command_window.index = (@command_window.index - 1) % @command_window.commands.size
        changed = true
      end
    end

Replace it with:

Code: [Select]
      if @command_window.index == ModAlg_QuestData::MENU_INDEX && Input.trigger? (Input::C)
        if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled
          Sound.play_buzzer
        else
          # Open Quest Window
          Sound.play_decision
          $scene = Scene_Quest.new
        end
        return
      end
#~       # If the command index is greater than it ought to be, make sure
#~       if @command_window.index > ModAlg_QuestData::MENU_INDEX
#~         @command_window.index = (@command_window.index - 1) % @command_window.commands.size
#~         changed = true
#~       end
    end

Tell me if that works.
Title: Re: Quest Journal v. 1.1
Post by: lauronpegason on August 08, 2009, 06:23:53 AM
IT WORKS, IT WORKS!!! :lol: Thank you very much!
Of course I still have no clue of what you’ve done, it seems you “disabled” part of your script, but I hope it wasn’t too much trouble. Again, thanks.
Title: Re: Quest Journal v. 1.1
Post by: Selacius on August 10, 2009, 01:23:46 AM
How do we check to see if certain objectives of a quest have been revealed? I tried to do a conditional branch with $game_party.quests[1].revealed_objectives[0] as the script part, but it does not work.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 10, 2009, 01:31:30 AM
I don't think I put any special command for it. The easiest way to check that sort of thing, unless you need to check it for a number of different quests and stuff, is to just turn on a switch where you have the code to reveal the objective. If you had to check for every objective of every quest, then it might not be prudent, but if you only need to do it occasionally then that is the best way.
Title: Re: Quest Journal v. 1.1
Post by: Gordian on August 21, 2009, 10:04:31 AM
I have made everything so as in Demo. Everything it  looks good, but when I want to open "Quests" in Menu it appears error:

(http://img33.imageshack.us/img33/9944/error1e.jpg)

?

Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 21, 2009, 02:06:42 PM
I suspect you have not added the Paragraph Formatter. Get it here:  http://rmrk.net/index.php/topic,25129.0.html

Or you can get it from the demo.
Title: Re: Quest Journal v. 1.1
Post by: 5p4rk13r on September 13, 2009, 08:57:43 PM
This script looks amazing! And I'm sure it is, but I'm having some problems with it... I put in the script as is downloaded from the site and my game runs fine. But when I try to open the menu an error occurs which says:

"Script 'Quest Journal' line924: NoMethodErrorOccured
undefined method '>=' for nil:NilClass"

Am I doing something wrong? What's happening?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 14, 2009, 12:15:11 AM
It might be incompatible with other scripts. Do you have a script that modifies the menu?
Title: Re: Quest Journal v. 1.1
Post by: 5p4rk13r on September 14, 2009, 12:55:31 AM
Yes, I am using Woratana's Monster Book. If they are incompatible that is okay, the monster book isn't that important to me.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 14, 2009, 02:02:04 AM
I think I've seen this problem before; the solution is probably in one of the replies in this topic.

If I remember correctly, all you need to do is press CTRL+H and replace disabled_commands with ma_disabled_commands in my script and they'll be compatible. I think...

Alternatively, you could try another Monster book script or another Quest Journal; there are plenty out there. My monster Catalogue Script is here in the database, and there is also a KGC one I believe. Samo, Omegas7 and Lomastul all have quest logs too.
Title: Re: Quest Journal v. 1.1
Post by: 5p4rk13r on September 14, 2009, 02:22:21 AM
Thanks for the suggestions! I'll see what works!
Title: Re: Quest Journal v. 1.1
Post by: KaliosMaster on September 14, 2009, 04:04:32 PM
I got problem can you make the line $game_party.quests[1].complete_objective (0) shorter
on the quest journal because when i type $game_party.quests[1].complete_objective (0)
the quest journal says error it doesn't fit in one line the (0) part get to lower line
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 14, 2009, 05:11:35 PM
Separate it into two lines then:

Code: [Select]
quest = $game_party.quests[1]
quest.complete_objective (0)

If I were writing the script now, I would put in an easier interface, but I don't want to update the script with something superficial like that, sorry.


EDIT::

Just checked my email - don't report things like that. Reporting to a moderator is when something is wrong with the post; breaks the rles, flaming, etc... not for personal gain. Abuse it again and I will ban you.
Title: Re: Quest Journal v. 1.1
Post by: 5p4rk13r on September 14, 2009, 08:24:00 PM
Replacing disabled_commands with ma_disabled_commands worked! Thank you so much! this truly is a great script!
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 14, 2009, 08:37:42 PM
Good to hear! :)
Title: Re: Quest Journal v. 1.1
Post by: Rycr on September 17, 2009, 09:01:16 AM
Is there a simple way to check if a specific quest objective is complete?  I couldn't find a method specified in your script, so I kind of improvised.  I found out that this way works:
Code: [Select]
@>Conditional Branch: Script: $game_party.quests[2].complete_objectives.size == 2

Of course, it only works if the objectives are completed in order.

I suppose I could use:
Code: [Select]
@>Conditional Branch: Script: $game_party.quests[2].complete_objectives.index(1) != nil

EDIT: It seems as though I've forgotten about Switches.  That's what I get for playing around with RMVX scripts at four in the morning...
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 17, 2009, 10:56:20 AM
haha, yeah - the quest journal was designed to supplement quest making with a visual interface, but the execution of the quests was always intended to be done through the regular eventing processes. In retrospect, it wold've been a good idea to include easier ways of checking data like whether a specific objective had been completed, and the best code for it would be:

Code: [Select]
$game_party.quests[n].complete_objectives.include? (x)
Title: Re: Quest Journal v. 1.1
Post by: Rycr on September 17, 2009, 07:00:45 PM
Right, yeah, that would work better.  I'm a little new to Ruby and RGSS, so I haven't learned all of the methods and such just yet.

By the way, excellent job on this!  It's just what I needed.
Title: Re: Quest Journal v. 1.1
Post by: Sebastian Cool ^-^ on November 13, 2009, 11:44:03 AM
sought once the script! thanks.
Title: Re: Quest Journal v. 1.1
Post by: Starport592 on December 05, 2009, 09:11:18 PM
Hey, I absolutely *love* your scripts.  I'ma RPG VX noob in general, so if anything I say is stupid or not physically(Virtually) possible, just shout it out.

O.K.  I just saw your Quest Journal and was very very very impressed with it's comliments, and the look.  However, my computer tells me that i'm doing something wrong.  I've read though this entire thread to try and find a similar problem, but i can't seem to find one, so here it goes.

Lets get some things strait before we try and figure this out:
Paragraph script installed
demo script installed (Quest)
demo .txt file (re-installed & replaced demo script)

Here's the big one, and i think it might be it, but i doubt that it is.

Scene Menu ReDux + KGC Custom Menu Command

Now here's the situation, Whenever i try to open up the quests option in the custom menu, I get the following mesage:


Scipt 'Quest Journal (modern algebra)' line 734: NoMethodError Occured:

undefinded method 'list' for nil:NilClass.

Please Help!!!!!
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on December 05, 2009, 10:21:35 PM
You have both SMR and KGC CMC?

Try rearranging the order of the scripts and see what happens. By that I mean, try putting Quest Journal below all your other scripts (still above Main), and report what happens.

What the error is suggesting to me is that the quests variable in Game_Party isn't being initialized, and I don't think either SMR or KGC CMC would overwrite the initialize method of Game_Party, so I actually suspect it's a different script causing the problem. So, if no error pops up after you move the Quest script below all your other scripts, but something else kind of funky happens with the menu, then try putting the menu scripts below Quest, but otherwise all other scripts should stay above the Quest script.
Title: Re: Quest Journal v. 1.1
Post by: Starport592 on December 09, 2009, 10:37:59 PM
Ok, I figured out the problem, and it's a silly stupid one(I don't mean your code is stupid).  I should have seen it first when you said that paragraph formater is needed.  I need to put paragraph formatter DIRECTLY OVER the Quest Journal, just like other compatable scripts.  But...  There's just one more thing.  (Luved the quick reply)  Ok, now i get fixnum (Error 500) I'll look into that though becuase i could have sworn that i've seen that in this thread somewhere, so i'll get back to you later if i figure out the problem.  Thanks for these GREAT SCRIPTZZ!!!
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on December 09, 2009, 10:40:59 PM
Can you look into the script, and report exactly what that line is with the surrounding lines? Since you may have set up or removed quest data, a line number isn't sufficient for me to be able to look it up. Line 500 in my version is a blank line.
Title: Re: Quest Journal v. 1.1
Post by: Starport592 on December 09, 2009, 10:58:31 PM
Damn, told you I was a noob.  Well, i guess i wasn't too clear in my error.  My bad.  There is absolutely no problem with the code now.  But the YanFly ReDub is doin some sorta funny whenever i close the quest journal, and it gives me the fixnum.  I think it's a menu thing, and i still swear that i saw the fix in this thread before...  Oh well i can't find it now.

You might be able to help, but i'm goin over the YanFly's portion now to see if she can help, because i think now it's mostly her script, but i can still be wrong.  here's the line in her scipt.  Maybe you can make something of it?

            $scene = eval(menu_command[4] + ".new")

If that still doesn't help this was from line 500 (Well, i think you knew that) so yeah.  Her code is http://www.pockethouse.com/rpgvx/scripts/scenemenuredux.txt (http://www.pockethouse.com/rpgvx/scripts/scenemenuredux.txt)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on December 09, 2009, 11:28:41 PM
I think one of the first two or three posts in the Scene Menu Redux topic here on RMRK addresses it.

http://rmrk.net/index.php/topic,33381.msg404078.html#msg404078
Title: Re: Quest Journal v. 1.1
Post by: Starport592 on December 09, 2009, 11:36:58 PM
I think one of the first two or three posts in the Scene Menu Redux topic here on RMRK addresses it.

http://rmrk.net/index.php/topic,33381.msg404078.html#msg404078

THANK YOU!!! :tpg: ;D
Title: Re: Quest Journal v. 1.1
Post by: h3llh0und on December 15, 2009, 02:34:36 PM
Hey modern, love those scripts you make and i really want to use your quest system...

But after everything you did to the script, you didn't put a way to customize the quest category ;/

i'm making a "open world" game and will add alot os systems to it, one of them is "monster hunting" and I need a new quest menu just for it... or a new category

cant you make a menu before your quest system with customizable selections?

like... if the menu call your quest script it will check if there is more than one entry in system variable, if there is... then it will show a menu BEFORE your quest menu with the custom choices

it could be something like "monster hunt" "history quests" "side quests" and every menu would show only the quests linked to it

=====

and your bestiary could include custom content too... I made some monsters "like" and "hate" certain itens if it's not much trouble, cant you add a new call to your bestiary to show custom stats and make a way to unlock then by event?

========

sorry for those requests when it's just my first post... but i really need those and your's is the only quest system that really works for what i want to do

and sorry for the bad english, not my first lang ;x


edit==============================

dunno if you know about the "ACS" script... it's a crafting system that uses expandable category for itens...
if you could make your quest system like that it would be easier on the eyes
just anexed it if you never heard about the script.


about the objectives scroll... you could put it to scroll down and put your "notepad" feature later on a keyboard key press o.o

just a idea o/
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 08:21:33 AM
lolDecember.
Well, I started using this script and I copy-pasta'd it where it should go. The problem is, everytime I put an event, then the little code so it appears, the Quest Log doesn't appear. I then tried by making it able to put it up with L (In which I tried to change to another letter too but couldn't of course), and it didn't work either. Am I supposed to do something else beside copy pasting? If it isn't, what do I really have to put on the script tab on event to make it appear? Maybe I'm putting it wrong.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2010, 01:34:24 PM
Well, just look at the demo - what's in the event is how you advance quests and such. As for setting the quest to open on key press, I'm certain that I put in an option for that, but you have to choose buttons, and those don't correspond to letter keys. To set that up, you can press F1 and change the mapping, but by default L => Q, R=> W. So, Input::L means you have to press Q to open it.

As for opening it through a call script, I believe it's just $scene = Scene_Quest.new (0), but I'm not totally certain about that since I haven't looked at it for a long long time.

@h3llhound - sorry for not responding earlier. I totally missed your post. I don't really have any plans in the works for this script, and a few of those I wouldn't do anyway. The categories is a good idea however, so I might do that, but probably not for a while.
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 02:55:34 PM
Well, just look at the demo - what's in the event is how you advance quests and such. As for setting the quest to open on key press, I'm certain that I put in an option for that, but you have to choose buttons, and those don't correspond to letter keys. To set that up, you can press F1 and change the mapping, but by default L => Q, R=> W. So, Input::L means you have to press Q to open it.

As for opening it through a call script, I believe it's just $scene = Scene_Quest.new (0), but I'm not totally certain about that since I haven't looked at it for a long long time.

@h3llhound - sorry for not responding earlier. I totally missed your post. I don't really have any plans in the works for this script, and a few of those I wouldn't do anyway. The categories is a good idea however, so I might do that, but probably not for a while.
Well I don't want to call it actually, I just want to have it as an option on the menu. I don't think its the script but something I'm missing because its also happening with the catalogues. Is there really something I have to do about that (The script for catalogue base and paragraph editor are there, catalogue is above paragraph editor though, the base is above monster catalogue and the lowest is the Quest Log)? BTW, to add a quest I used the simple manager (the one that makes the script automatically), so it probably isn't my fault if it is by the code.... kind of (though its easy to do it without it).
And about the mapkeys, I should have known  :P
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2010, 03:00:32 PM
Well, first, make sure that MENU_ACCESS is true and MENU_INDEX is a number within range (doesn't have to be 4):

Code: [Select]
  MENU_ACCESS = true             # Can the script be accessed through the menu?
  MENU_INDEX = 4                 # If above is true, where in the command window?

If that's not working, then are you using a non-default menu? If so, try putting the Quest Journal below whatever menu script you have.

If that doesn't work, then depending on what menu script it is there may be a way to add it manually.
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 03:02:59 PM
Well, first, make sure that MENU_ACCESS is true and MENU_INDEX is a number within range (doesn't have to be 4):

Code: [Select]
  MENU_ACCESS = true             # Can the script be accessed through the menu?
  MENU_INDEX = 4                 # If above is true, where in the command window?

If that's not working, then are you using a non-default menu? If so, try putting the Quest Journal below whatever menu script you have.

If that doesn't work, then depending on what menu script it is there may be a way to add it manually.
Its the default.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2010, 03:06:17 PM
And MENU_ACCESS is true?


If you can, try uploading your project or, if you don't want to share your project right now, then try to recreate the error in another project and upload that.
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 03:16:03 PM
And MENU_ACCESS is true?


If you can, try uploading your project or, if you don't want to share your project right now, then try to recreate the error in another project and upload that.
Its too big right now.
And yeah, its true.

And I don't know what exactly the problem is, it doesn't say anything about error or something, it just doesn't put itself up, as well as with the calogues. So I may have to put it all the script again. (It didn't work before the catalogues either, just so you know)
In paragraph editor I got it from your demo, though, how exactly should the order be?
---
Catalogue Base
Monster Catalogue
---
Paragraph Formatter
Quest Journal
---
KTS
---
''Battle System''
?
(Thanks for fast reply tho)

Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2010, 03:32:30 PM
Well, that might be fine. I'd try putting the Quest Journal below all your other scripts but still above Main.

Also, Catalogues don't have an option to show in the menu by default.
Title: Re: Quest Journal v. 1.1
Post by: Loaded on January 17, 2010, 04:02:23 PM
Nice little script.
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 04:11:45 PM
Well, that might be fine. I'd try putting the Quest Journal below all your other scripts but still above Main.

Also, Catalogues don't have an option to show in the menu by default.
OH well, that might be it, gonna try it...

(Mind telling me how to see if it is really only the Quest Log?)

..Well it did work, but now it only opens with the Q key. The manu doesn't open it.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2010, 04:13:01 PM
There must be some kind of incompatibility. I won't be able to fix it unless I see your Scripts.rvdata.

I don't know what you mean by "how to see if it is really only the Quest Log"
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 04:21:34 PM
There must be some kind of incompatibility. I won't be able to fix it unless I see your Scripts.rvdata.

I don't know what you mean by "how to see if it is really only the Quest Log"
Make the catalog viewable in the menu, to see if its the Quest Journal or the main thing itself (incompatibility, etc...).
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2010, 04:33:47 PM
There is no option to make catalogues viewable in the menu.

I can't do any more unless I see your Scripts.rvdata. You can attach it to a post by clicking Additional Options when making your post. The Scripts.rvdata is in the Data folder of your project.
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 04:44:41 PM
There is no option to make catalogues viewable in the menu.

I can't do any more unless I see your Scripts.rvdata. You can attach it to a post by clicking Additional Options when making your post. The Scripts.rvdata is in the Data folder of your project.
K. Let me make a little one trying to simulate the problem...

(I copied the script into a little demo and they work over there, so its not a script issue..., I'll try to find it out by putting each script and testing it.. if not, I'll upload the script)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2010, 04:55:03 PM
Well, I don't need a full project - all I need is the Scripts.rvdata file. You don't have to do anything special to it.
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 04:57:27 PM
Well, I don't need a full project - all I need is the Scripts.rvdata file. You don't have to do anything special to it.
Yeah, but *points to edit*. And it wouldn't be a problem to you though right?
DDDDDDUUUHHHH.
That was pretty stupid.
One script was unnamed for the battle script, but it looked like it was just space. I just pasted the Quest Journal after it and it worked.
Thanks anyway! Keep up the good work!

EDIT: Time to put an avi now...
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 17, 2010, 05:20:46 PM
Well, you edited your post after I posted, but OK... sure

So anyway, it's working now? Good.
Title: Re: Quest Journal v. 1.1
Post by: MaxMatsu on January 17, 2010, 05:23:49 PM
Well, you edited your post after I posted, but OK... sure

So anyway, it's working now? Good.
Well yeah it was confusing because I editted it when you didn't post and submitted when you posted. So yeah...
And yeah, thanks anyway.
Title: Re: Quest Journal v. 1.1
Post by: drdisastro on February 08, 2010, 06:27:19 PM
Hi, Modern Algebra.

first of all, I just wanted you to know that I love your script.  That said, I am having some problems and I don't know what's wrong.   I am using your script, as well as paragrapher 1 and 2, in addition to OriginalWij's base script.  I called the first quest in your journal and when I accessed the journal, this error happened:

(http://www.mediafire.com/file/hzjja0t21ml/questjournalerror.jpg)


do you have any idea what I am doing wrong?  please note that I made another addition to your script that OriginalWij recommended to get your script to work with his:

Spoiler for:
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Item
  #     index   : item number
  #     enabled : enabled flag. When false, draw semi-transparently
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_itm_drw draw_item
  def draw_item (index, enabled = true, align = 0)
    # Run Original Method
    modalg_quest_jrnl_itm_drw (index, enabled, align)
    enabled ? @disabled_commands.delete (index) : @disabled_commands.push (index)
  end

thanks
DrD
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on February 08, 2010, 07:36:58 PM
Yeah, I left a line in the paragraph formatter that I shouldn't have when I was testing.

Go to Paragrapher 2 and find these lines near the end of the format method:

Code: [Select]

      if f.bitmap != specifications
        f.bitmap = Bitmap.new (max_width, f.lines.size*32)
      end
      p f
      return f
    end

delete the "p f" line, so it looks like this:

Code: [Select]

      if f.bitmap != specifications
        f.bitmap = Bitmap.new (max_width, f.lines.size*32)
      end
      return f
    end
Title: Re: Quest Journal v. 1.1
Post by: drdisastro on February 08, 2010, 08:18:37 PM
thanks, Modern Algebra.  Problem solved.   I really appreciate your help and your scripts.

take care
DrD
Title: Re: Quest Journal v. 1.1
Post by: Sakani17 on February 20, 2010, 10:03:18 PM
Is there a simple way to find the icon index of a icon or no?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on February 20, 2010, 10:58:07 PM
I usually just count rows (16 icons each row), but woratana wrote an icon preview script (included in his Christmas Gift Box (http://rmrk.net/index.php/topic,31518.0.html)) which I believe allows you to do just what you want (cursor over an icon and it shows the index of it in the Set).
Title: Re: Quest Journal v. 1.1
Post by: Roulent on March 02, 2010, 01:18:12 PM
Can you make a video tutorial because I'm still confused how to make a quest.
sorry for my bad english because im indonesian ;D
Title: Re: Quest Journal v. 1.1
Post by: l3x on March 11, 2010, 11:47:38 AM
Hey everyone could someone please explain how I could make a quest chain including about 4 - 6 NPCs

I've tried loads of things but i can only get upto the second objective..

Basicly there two main parts to the quest including 2 parts of a map and you have to do a quest for one of the npcs to get the map.

So like the first quest could be called "PART1"
and second "part2"

But how would I link the two quests togeather?

And I'm having abit of difficulty with the scripts on the npcs with the conditional branches could someone help/explain to me about this :) would be cool if someone posted a full tutorial on how to make a proper quest :)

Thanks -
l3x
Title: Re: Quest Journal v. 1.1
Post by: BloodyChaos on March 17, 2010, 02:25:03 AM
Hey Modern, first off i love your scripts they have improved many of my projects. This script is awesome and the script great. I just had a question, Can we make an unlimited amount of quests without running into problems? jw because a large part of my game is based on side quests (A way to get involved in the worlds outside of the storyline. I'm in the process of editing my quests to work with your script and no problems or anything, but my game expected length is long so lots and lots of quests. just a quick little question

Title: Re: Quest Journal v. 1.0
Post by: justin900 on April 01, 2010, 11:56:43 AM
hi, would it disturb you if i request something?, well i think im very confused now, maybe a video, or a more in depth explanation of how this very wonderful script works and how to use it, just saw the demo and i just cant get it, hey im waiting for you reply, thanks again, stay cool, --chael,
Title: Re: Quest Journal v. 1.1
Post by: Ecut on April 03, 2010, 02:47:17 AM
This is an amazing script, thank you so much for making this. It really helps keep track of what you are doing in the game.  :)
Title: Re: Quest Journal v. 1.1
Post by: DaniAngione on April 13, 2010, 06:36:16 PM
This is the best Quest Log script I've ever seen but my current project is on XP not VX :(

It's already on an advanced stage and I'd like to know if there's a way to convert this script to XP... I never worked with VX scripting so what should I look after for converting it?
Title: Re: Quest Journal v. 1.1
Post by: user3k on April 14, 2010, 12:10:32 AM
Can you make compatible with the version 2.0 of your Paragrapher Formatter?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 14, 2010, 01:12:03 AM
It is compatible already. It might not be compatible with another script that uses Paragraph Formatter 2.0, and it won't use the Special Codes Formatter since it chooses which formatter to use in the script itself (I could revise it to make it use that if you wish), but it is compatible certainly - I just tested it myself.

@Dani - It might not be an easy task to convert it. I haven't looked at this script for a very long time. Ruby is the same, but the libraries are different, so where I make a subclass of Scene_Base for instance, then you will have to see what methods of Scene_Base that class uses and incorporate them into XP. Further, the mechanism for adding itself to the menu would likely cause all kinds of errors in XP.
Title: Re: Quest Journal v. 1.1
Post by: DaniAngione on April 14, 2010, 03:37:06 AM
@Dani - It might not be an easy task to convert it. I haven't looked at this script for a very long time. Ruby is the same, but the libraries are different, so where I make a subclass of Scene_Base for instance, then you will have to see what methods of Scene_Base that class uses and incorporate them into XP. Further, the mechanism for adding itself to the menu would likely cause all kinds of errors in XP.

Yeah, I'll have to see about that. I'll try solving the issues with Scene_Base then and the mechanism I can probably completely wipe out and just add a scene change on my CMS for the log scene (I guess)
If I manage to get any positive results I'll post them here :)
Thanks for the answer!

------EDIT---------------------------------------------

Yeah, I'm having some really big trouble doing this. I managed to convert the basics but now the script is lacking some lines that were added on VX to basic scripts like Window_Command or Window_Selectable and by bringing these they're getting conflicts with other XP default scripts...

I think it'll be easier (although a little bit longer) if I make a new script "imitating" your windows and scene (and using your XP version of Formatter) instead of trying to copy and alter the VX script directly...
Title: Re: Quest Journal v. 1.1
Post by: MrMoo on April 21, 2010, 12:22:27 AM
Ok the font I'm using for my game doesn't look good with the script, so I just need a simple fix.
Can anyone give me the code for changing the font for only the quest scene and where to add it in the script?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 21, 2010, 12:37:05 AM
Well, there are a bunch of different windows, so you'll have to switch it in all of them.

So, search for "class Window_"

go to the initialize method of each window you find and underneath the line that starts with "super", put the following code:

Code: [Select]
contents.font.name = "Font"

Where font is the name of the font you want to use.

You can also use an array, like:

["Font 1", "Font 2", ..., "Font N"]

And that would try to use Font 1, and if the player doesn't have that font, it would use Font 2 instead, and so on until Font N


Don't do it for Window_Command or Window_Message though
Title: Re: Quest Journal v. 1.1
Post by: MrMoo on April 21, 2010, 12:44:08 AM
Thanks, and I assume contents.font.size = "#" will chance the size and contents.font.bold = true/false will change boldness, etc?
Edit: I tried it and it doesn't seem to work. I want to change only the font for the Description and Objectives (as the current font cuts it off for being too wide, due to boldness mostly). I change the font completely and it still does not affect the menu.

(http://dl.dropbox.com/u/337238/example.png)

I want the text inside the description box and the objective list to change, but leave the rest alone.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 21, 2010, 02:14:10 AM
Oh, right. Put it under create_contents instead of under super for Window_QuestInfo and see if that makes it any better?

If not I can probably write a patch for that particular font if you send me a copy of it.
Title: Re: Quest Journal v. 1.1
Post by: MrMoo on April 21, 2010, 02:58:55 AM
Thanks it works, sorta. The problem is that it changes everything in the quest info window, including headings (Description/Objectives/Quest Title), and the text inside the description box is still the old font. I'll paste my more current version and see if you can find a way to modify it. Thanks again MA, you're the best.

Code: [Select]
 
  #============================================================================
  # ** Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #  Holds in-game data for a quest
  #============================================================================

  class Quest
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Public Instance Variables
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    attr_reader   :name                # The name of the quest
    attr_reader   :id                  # The ID in $game_party.quests
    attr_reader   :description         # A blurb explaining the quest
    attr_reader   :objectives          # An array of strings holding objectives
    attr_reader   :prime_objectives    # An array of crucial objectives
    attr_reader   :icon_index          # The Icon associated with this quest
    attr_reader   :revealed_objectives # An array of revealed objectives
    attr_reader   :complete_objectives # An array of completed objectives
    attr_reader   :failed_objectives   # An array of failed objectives
    attr_accessor :reward_given        # A switch to ensure only one reward given
    attr_accessor :concealed           # A switch to show or not show the quest
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Object Initialization
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def initialize (id)
      @id = id
      # Set class variables to corresponding arguments
      @name, @description, @objectives, prime, @icon_index = ModAlg_QuestData.quest_data (id)
      # If no primary objectives are specified
      if prime.nil?
        # All objectives become primary
        prime = []
        for i in 0...@objectives.size
          prime.push (i)
        end
      end
      @prime_objectives = prime
      # Initialize non-public arrays
      @revealed_objectives = []
      @complete_objectives = []
      @failed_objectives = []
      @reward_given = false
      @concealed = false
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Reveal Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def reveal_objective (index)
      return if index >= @objectives.size
      # Add to revealed objectives
      @revealed_objectives |= [index]
      # Sort from lowest index to highest index
      @revealed_objectives.sort!
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Conceal Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def conceal_objective (index)
      @revealed_objectives.delete (index)
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Complete Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def complete_objective (index)
      return if index >= @objectives.size
      # If the objective is failed, you cannot complete it.
      return if @failed_objectives.include? (index)
      # Reveal the objective if it was not previously revealed
      reveal_objective (index) unless @revealed_objectives.include? (index)
      # Add to complete objectives
      @complete_objectives |= [index]
      # Sort from lowest index to highest index
      @complete_objectives.sort!
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Uncomplete Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def uncomplete_objective (index)
      @complete_objectives.delete (index)
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Fail Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def fail_objective (index)
      return if index >= @objectives.size
      # Reveal the objective if it has not yet been revealed
      reveal_objective (index) unless @revealed_objectives.include? (index)
      # Add to revealed objectives
      @failed_objectives |= [index]
      # Sort from lowest index to highest index
      @failed_objectives.sort!
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Unfail Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def unfail_objective (index)
      @failed_objectives.delete (index)
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Complete?
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def complete?
      # Check if all prime objectives have been completed
      return (@complete_objectives & @prime_objectives) == @prime_objectives
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Failed?
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def failed?
      # Check if any prime objectives have been failed
      return (@failed_objectives & @prime_objectives) != []
    end
  end
end

#==============================================================================
# ** Ellipse
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Stores an ellipse object.
#==============================================================================

class Ellipse
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :a # The width of the oval
  attr_reader   :b # The Height of the oval
  attr_reader   :x # the top left x position
  attr_reader   :y # the top left y position
  attr_reader   :h # The x position of the origin
  attr_reader   :k # The y position of the origin
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #     x : the top left x position
  #     y : the top left y position
  #     a : the width of oval from origin to the side
  #     b : the height of oval from origin. If nil, then a is radius of circle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize (x, y, a, b = nil)
    @x = x
    @y = y
    @a = a
    @b = b.nil? ? a : b
    @h = x + a
    @k = y + @b
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Within?
  #    x : the x coordinate being tested
  #    y : the y coordinate being tested
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def within? (x, y)
    x_square = ((x - @h)*(x - @h)).to_f / (@a*@a)
    y_square = ((y - @k)*(y - @k)).to_f / (@b*@b)
    # If "radius" <= 1, then it must be within the ellipse
    return (x_square + y_square) <= 1
  end
end

#==============================================================================
# ** Bitmap
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This adds the methods fill_ellipse, outline_ellipse, and fill_rounded_rect
#==============================================================================

class Bitmap
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Outline Ellipse
  #    ellipse : the ellipse being drawn
  #    width   : the width of the bar
  #    colour  : the colour of the outline
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def outline_ellipse (ellipse, colour = font.color, width = 1, steps = 0)
    # For neatness, define local variables a and b to the ellipse variables
    a, b = ellipse.a, ellipse.b
    # Use Ramanujan's approximation of the Circumference of an ellipse
    steps = Math::PI*(3*(a + b) - Math.sqrt((3*a + b)*(a + 3*b))) if steps == 0
    radian_modifier = (2*Math::PI) / steps
    for i in 0...steps
      t = (radian_modifier*i) % (2*Math::PI)
      # Expressed parametrically:
      #   x = h + acos(t), y = k + bsin(t) : where t ranges from 0 to 2pi
      x = (ellipse.h + (a*Math.cos(t)))
      y = (ellipse.k + (b*Math.sin(t)))
      set_pixel (x, y, colour)
    end
    # Thicken the line
    if width > 1
      ellipse = Ellipse.new (ellipse.x + 1, ellipse.y + 1, ellipse.a - 1, ellipse.b - 1)
      outline_ellipse (ellipse, colour, width - 1, steps)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Fill Ellipse
  #    ellipse : the ellipse being drawn
  #    colour  : the colour of the outline
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def fill_ellipse (ellipse, colour = font.color, steps = 0)
    # For neatness, define local variables a and b to the ellipse variables
    a, b = ellipse.a, ellipse.b
    # Use Ramanujan's approximation of the Circumference of an ellipse
    steps = Math::PI*(3*(a + b) - Math.sqrt((3*a + b)*(a + 3*b))) if steps == 0
    radian_modifier = (2*Math::PI) / steps
    for i in 0...(steps / 2)
      t = (radian_modifier*i) % (2*Math::PI)
      # Expressed parametrically:
      #   x = h + acos(t), y = k + bsin(t) : where t ranges from 0 to 2pi
      x = ellipse.h + (a*Math.cos(t))
      y = ellipse.k - (b*Math.sin(t))
      fill_rect (x, y, 1, 2*(ellipse.k - y), colour)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Fill Rounded Rectangle
  #    rect    : the rectangle being drawn
  #    colour  : the colour of the outline
  #    w       : the number of pixels to cover by rounding
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #  Used to fill a rectangle with rounded corners
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def fill_rounded_rect (rect, colour = font.color, w = 8)
    # Draw Body of the rectangle
    fill_rect (rect.x + w, rect.y, rect.width - 2*w, rect.height, colour)
    # Draw Left Vertical Rect
    fill_rect (rect.x, rect.y + w, w, rect.height - 2*w, colour)
    # Draw Right Vertical Rect
    x = rect.x + rect.width - w
    fill_rect (x, rect.y + w, w, rect.height - 2*w, colour)
    # Make a circle
    circle = Ellipse.new (0, 0, w)
    for i in 0...w
      for j in 0...w
        # Upper Left Corner
        set_pixel (rect.x + i, rect.y + j, colour) if circle.within? (i, j)
        # Upper Right Corner
        set_pixel (rect.x + rect.width - w + i, rect.y + j, colour) if circle.within? (i + w, j)
        # Bottom Left Corner
        set_pixel (rect.x + i, rect.y + rect.height - w + j, colour) if circle.within? (i, j + w)
        # Bottom Right Corner
        set_pixel (rect.x + rect.width - w + i, rect.y + rect.height - w + j, colour) if circle.within? (i + w, j + w)
      end
    end
  end
end

#==============================================================================
# ** Window_VarySizeHelp
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window is the same as Window_Help, but with variable size
#==============================================================================

class Window_VarySizeHelp < Window_Help
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize (h_x = 0, h_y = 0, h_width = Graphics.width, h_height = WLH + 32)
    super ()
    contents.font.name = "Century Gothic"
    self.x, self.y, self.width, self.height = h_x, h_y, h_width, h_height
    contents.dispose
    self.contents = Bitmap.new (h_width - 32, h_height - 32)
  end
end

#==============================================================================
# ** Game_System
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new instance variables - quest_disabled, quest_keyaccess
#    aliased method - initialize
#==============================================================================

class Game_System
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :quest_disabled   # Can you access quest journal at this time
  attr_accessor :quest_keyaccess  # Is it accessible by key?
  attr_accessor :quest_menuaccess # Is it accessible through the menu
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_qst_jrnl_system_init_quests initialize
  def initialize
    # Run Original Method
    modalg_qst_jrnl_system_init_quests
    # Initialize new variables
    @quest_disabled = false
    @quest_keyaccess = ModAlg_QuestData::KEY_ACCESS
    @quest_menuaccess = ModAlg_QuestData::MENU_ACCESS
  end
end

#==============================================================================
# ** Game_Party
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new instance variable - quests
#    aliased method - initialize
#==============================================================================

class Game_Party
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :quests
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_qst_jrnl_party_init_quests initialize
  def initialize
    # Run Original Method
    modalg_qst_jrnl_party_init_quests
    # Initialize @quests
    @quests = Game_Quests.new
  end
end

#==============================================================================
# ** Game_Quests
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This class handles Quests. It is a wrapper for the built-in class "Hash".
# The instance of this class is accessed by $game_party.quests
#==============================================================================

class Game_Quests
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    @data = {}
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Quest
  #    quest_id : the ID of the quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def [] (quest_id)
    @data[quest_id] = ModAlg_QuestData::Quest.new (quest_id) if @data[quest_id] == nil
    return @data[quest_id]
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def list
    quest_list = @data.values
    quest_list.each { |i| quest_list.delete (i) if i.concealed }
    return quest_list
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Completed Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def completed_list
    complete_quests = []
    list.each { |i| complete_quests.push (i) if i.complete? }
    return complete_quests
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Failed Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def failed_list
    failed_quests = []
    list.each { |i| failed_quests.push (i) if i.failed? }
    return failed_quests
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Active Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def active_list
    return list - failed_list - completed_list
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Revealed?
  #    quest_id : the ID of a checked quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def revealed? (quest_id)
    return @data[quest_id] != nil
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Remove Quest
  #    quest_id : the ID of a checked quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def remove (quest_id)
    @data.delete (quest_id)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Clear
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def clear
    @data.clear
  end
end

#==============================================================================
# ** Window_Command
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new instance variable - disabled_commands
#    aliased method - initialize, draw_item
#==============================================================================

class Window_Command
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variable
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader :disabled_commands
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Initialize
  #     width      : window width
  #     commands   : command string array
  #     column_max : digit count (if 2 or more, horizontal selection)
  #     row_max    : row count (0: match command count)
  #     spacing    : blank space when items are arrange horizontally
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_intlz initialize
  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    # Initialize new instance variable
    @disabled_commands = []
    # Run Original Method
    modalg_quest_jrnl_intlz (width, commands, column_max, row_max, spacing)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Item
  #     index   : item number
  #     enabled : enabled flag. When false, draw semi-transparently
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_itm_drw draw_item
  def draw_item (index, enabled = true)
    # Run Original Method
    modalg_quest_jrnl_itm_drw (index, enabled)
    enabled ? @disabled_commands.delete (index) : @disabled_commands.push (index)
  end
end

#==============================================================================
# ** Window_Message
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    aliaed method - convert_special_characters
#==============================================================================

class Window_Message
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Convert Special Characters
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_spec_char_convert convert_special_characters
  def convert_special_characters
    @text.gsub! (/\\NQ\[(\d+)\]/i) { $game_party.quests[$1.to_i] } # Name Quest
    # Run Original Method
    modalg_quest_jrnl_spec_char_convert
  end
end

#==============================================================================
# ** Window_QuestLabel
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window signifies that this is a quest list
#==============================================================================

class Window_QuestLabel < Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    super (0, 0, 160 + WLH, 32 + WLH)
    contents.font.name = "Century Gothic"
    create_contents
    contents.font.color = system_color
    contents.draw_text (0, 0, contents.width, WLH, ModAlg_QuestData::QUESTS_LABEL, 1)
  end
end

#==============================================================================
# ** Window_QuestCategory
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window displays which category is being viewed
#==============================================================================

class Window_QuestCategory < Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    super (0, WLH + 32, 160 + WLH, 64)
    contents.font.name = "Century Gothic"
    create_contents
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #    category_index : icon to highlight -
  #                       0 => All, 1 => Active, 2 => Complete, 3 => Failed
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (category_index = 0)
    contents.clear
    # Retrieve Icon Bitmaps
    bitmap = Cache.system("Iconset")
    icon_index = ModAlg_QuestData::ACTIVE_QUEST_ICON
    active_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    icon_index = ModAlg_QuestData::COMPLETE_QUEST_ICON
    complete_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    icon_index = ModAlg_QuestData::FAILED_QUEST_ICON
    failed_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    # Combine the three icons for the All Icon
    all_icon = Bitmap.new (40, 32)
    all_icon.blt (0, 0, bitmap, complete_rect)
    all_icon.blt (20, 0, bitmap, failed_rect)
    all_icon.blt (8, 10, bitmap, active_rect)
    distance = (contents.width - 112) / 3
    x = 0
    # Draw the 'All' Icon onto the window
    contents.blt (x, 0, all_icon, all_icon.rect, category_index == 0 ? 255 : 128)
    x += 40 + distance
    # Draw the 'Active' Icon onto the window
    contents.blt (x, 4, bitmap, active_rect, category_index == 1 ? 255 : 128)
    x += 24 + distance
    # Draw the 'Complete' Icon onto the window
    contents.blt (x, 4, bitmap, complete_rect, category_index == 2 ? 255 : 128)
    x += 24 + distance
    # Draw the 'Failed' Icon onto the window
    contents.blt (x, 4, bitmap, failed_rect, category_index == 3 ? 255 : 128)
  end
end

#==============================================================================
# ** Window_QuestList
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window displays the list of quests
#==============================================================================

class Window_QuestList < Window_Selectable
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize (category_index = 0, index = 0)
    super (0, 64 + (WLH + 32), 160 + WLH, Graphics.height - 64 - 2*(WLH + 32))
    contents.font.name = "Century Gothic"
    @data = []
    @column_max = 1
    refresh (category_index)
    self.index = index
    self.active = true
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def quest
    return @data[self.index]
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #    category_index : List to show -
  #                       0 => All, 1 => Active, 2 => Complete, 3 => Failed
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (category_index = 0)
    font = Font.new
    @data.clear
    self.index = 0
    # Get the quest list to be drawn
    case category_index
    when 0
      @data = $game_party.quests.list
    when 1
      @data = $game_party.quests.active_list
      font.color = text_color (ModAlg_QuestData::ACTIVE_COLOUR)
    when 2
      @data = $game_party.quests.completed_list
      font.color = text_color (ModAlg_QuestData::COMPLETE_COLOUR)
    when 3
      @data = $game_party.quests.failed_list
      font.color = text_color (ModAlg_QuestData::FAILED_COLOUR)
    end
    @item_max = @data.size
    unless contents == nil
      # Clear Contents
      contents.clear
      return if @data.empty?
      contents.dispose
    end
    # Create Contents
    self.contents = Bitmap.new (width - 32, WLH*@data.size)
    contents.font = font
    # Draw the Quest Names
    for i in 0...@data.size
      quest = @data[i]
      # If all, distinguish between quest types by colour
      if category_index == 0
        if quest.complete?
          contents.font.color = text_color (ModAlg_QuestData::COMPLETE_COLOUR)
        elsif quest.failed?
          contents.font.color = text_color (ModAlg_QuestData::FAILED_COLOUR)
        else # Active
          contents.font.color = text_color (ModAlg_QuestData::ACTIVE_COLOUR)
        end
      end
      draw_icon (quest.icon_index, 0, i*WLH)
      # Draw the name of the quest
      contents.draw_text (24, i*WLH, contents.width - 24, WLH, quest.name)
    end
  end
end

#==============================================================================
# ** Window_QuestInfo
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window displays the information on the quest being viewed
#==============================================================================

class Window_QuestInfo < Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    super (160 + WLH, 0, Graphics.width - (160 + WLH), Graphics.height - (32 + WLH))
    create_contents
    contents.font.name = "Century Gothic"
    contents.font.bold = false
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (quest = nil)
    contents.clear
    return if quest == nil
    # Draw the name of the Quest, centred
    contents.font.color = normal_color
    contents.draw_text (0, 0, contents.width, WLH, quest.name, 1)
    # If the font has set width characters
    if contents.text_size ('w').width == contents.text_size ('i').width
      formatter = Paragrapher::Formatter_2.new
    else
      formatter = Paragrapher::Formatter.new
    end
    # Format the description
    desc_bitmap = Bitmap.new (contents.width - 16, (2.4*WLH).to_i)
    desc_bitmap.font.size -= 4
    formatted_desc = formatter.format (quest.description, desc_bitmap)
    # Draw the Description Box
    box_height = [WLH*(formatted_desc.lines.size + 1), 3*WLH].min
    rect = Rect.new (2, (1.5*WLH).to_i, contents.width - 4, box_height)
    contents.fill_rounded_rect (rect, system_color, 10)
    rect.x, rect.y = rect.x + 2, rect.y + 2
    rect.width, rect.height = rect.width - 4, rect.height - 4
    contents.fill_rounded_rect (rect, Color.new (0, 0, 0, 0), 10)
    tw = contents.text_size ('Description').width
    # Draw the description signifier
    contents.fill_rect (32, (1.5*WLH).to_i, tw + 2, 2, Color.new (0, 0, 0, 0))
    contents.font.color = system_color
    contents.draw_text (33, WLH, tw, WLH, 'Description')
    # Paragraph Artist
    artist = Paragrapher::Artist.new
    # If bitmap is too large
    if formatted_desc.lines.size < 2
      formatted_desc.bitmap = Bitmap.new (contents.width - 16, formatted_desc.lines.size*WLH)
      formatted_desc.bitmap.font.size -= 4
    end
    bmp = artist.draw (formatted_desc)
    # Centre within the box
    y = rect.y + 4 + (rect.height - bmp.height) / 2
    contents.blt (8, y, bmp, bmp.rect)
    bmp.dispose
    y = 2*WLH + rect.height + 4
    # Draw Objectives Signifier Text
    contents.font.color = system_color
    tw = contents.text_size ('Objectives').width
    contents.draw_text (32, y, tw, WLH, 'Objectives')
    y += WLH
    quest.revealed_objectives.each { |i|
      # Get the correct color
      contents.font.color = quest.complete_objectives.include? (i) ?
        text_color (ModAlg_QuestData::COMPLETE_COLOUR) : quest.failed_objectives.include? (i) ?
        text_color (ModAlg_QuestData::FAILED_COLOUR) : text_color (ModAlg_QuestData::ACTIVE_COLOUR)
      # Get objective
      objective = quest.objectives[i]
      # Draw Bullet
      tw = contents.text_size (ModAlg_QuestData::BULLET_CHARACTER).width
      x = 8
      contents.draw_text (x, y, tw, WLH, ModAlg_QuestData::BULLET_CHARACTER)
      x += tw + 4
      # Format the objective
      obj_bitmap = Bitmap.new (contents.width - x, 2*WLH)
      obj_bitmap.font = contents.font
      obj_bitmap.font.size -= 4
      formatted_obj = formatter.format (objective, obj_bitmap)
      # Draw Objective
      bmp = artist.draw (formatted_obj)
      contents.blt (x, y + 4, bmp, bmp.rect)
      # Modify the Y accordingly
      y += WLH*([formatted_obj.lines.size, 2].min)
    }
  end
end

#==============================================================================
# ** Scene_Map
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    aliased method - update
#==============================================================================

class Scene_Map < Scene_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Frame Update
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_journal_map_upd_key_access update
  def update
    modalg_quest_journal_map_upd_key_access
    # If the quest log can be accessed by key and is not empty or disabled
    if $game_system.quest_keyaccess && !$game_system.quest_disabled && !$game_party.quests.list.empty?
      $scene = Scene_Quest.new if Input.trigger? (ModAlg_QuestData::MAPKEY_BUTTON)
    end
  end
end

#==============================================================================
# ** Scene_Menu
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    aliased methods - initialize, create_command_window, update_command_selection
#==============================================================================

class Scene_Menu < Scene_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_init initialize
  def initialize(menu_index = 0)
    modalg_quest_jrnl_init (menu_index)
    return unless $game_system.quest_menuaccess
    if @menu_index == 'Quest'
      @menu_index = ModAlg_QuestData::MENU_INDEX
    elsif @menu_index >= ModAlg_QuestData::MENU_INDEX
      @menu_index += 1
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Create Command Window
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_journal_menu_cmmnd_win_create create_command_window
  def create_command_window
    modalg_quest_journal_menu_cmmnd_win_create
    # If accessed through map, then don't add it to the menu
    return unless $game_system.quest_menuaccess
    c = @command_window.commands
    c.insert (ModAlg_QuestData::MENU_INDEX, ModAlg_QuestData::QUESTS_LABEL)
    width = @command_window.width
    disabled = @command_window.disabled_commands
    @command_window.dispose
    @command_window = Window_Command.new(width, c)
    @command_window.index = @menu_index
    # Disable all of the old commands as well
    disabled.each { |i|
      i += 1 if i >= ModAlg_QuestData::MENU_INDEX
      @command_window.draw_item (i, false)
    }
    if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled
      @command_window.draw_item (ModAlg_QuestData::MENU_INDEX, false)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Command Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_journal_menu_cmmnd_select_upd update_command_selection
  def update_command_selection
    if $game_system.quest_menuaccess
      changed = false
      if @command_window.index == ModAlg_QuestData::MENU_INDEX && Input.trigger? (Input::C)
        if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled
          Sound.play_buzzer
        else
          # Open Quest Window
          Sound.play_decision
          $scene = Scene_Quest.new
        end
        return
      end
      # If the command index is greater than it ought to be, make sure
      if @command_window.index > ModAlg_QuestData::MENU_INDEX
        @command_window.index = (@command_window.index - 1) % @command_window.commands.size
        changed = true
      end
    end
    modalg_quest_journal_menu_cmmnd_select_upd
    return unless $game_system.quest_menuaccess
    @command_window.index = (@command_window.index + 1) % @command_window.commands.size if changed
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Actor Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_actor_selection_upd update_actor_selection
  def update_actor_selection
    changed = false
    if $game_system.quest_menuaccess && @command_window.index > ModAlg_QuestData::MENU_INDEX
      @command_window.index = (@command_window.index - 1) % @command_window.commands.size
      changed = true
    end
    modalg_quest_jrnl_actor_selection_upd
    return unless $game_system.quest_menuaccess
    @command_window.index = (@command_window.index + 1) % @command_window.commands.size if changed
  end
end

#==============================================================================
# ** Scene_Quest
#------------------------------------------------------------------------------
#  This class performs the quest screen processing.
#==============================================================================

class Scene_Quest < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(category_index = 0, quest_index = 0)
    @category_index = category_index
    @quest_index = quest_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    # Create Windows
    @label_window = Window_QuestLabel.new
    @category_window = Window_QuestCategory.new
    @category_window.refresh (@category_index)
    @list_window = Window_QuestList.new (@category_index, @quest_index)
    @info_window = Window_QuestInfo.new
    @info_window.refresh (@list_window.quest)
    @help_window = Window_VarySizeHelp.new
    @help_window.y = Graphics.height - @help_window.height
    @help_window.set_text ('Use Horizontal Arrow Keys to change categories', 1)
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @label_window.dispose
    @category_window.dispose
    @list_window.dispose
    @info_window.dispose
    @help_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    # Since the only possible activity is from @list_window, put it here
    @list_window.update
    if Input.trigger?(Input::B) # If Button B is pressed
      Sound.play_cancel
      # If Returning to Menu
      if $game_system.quest_menuaccess
        $scene = Scene_Menu.new ('Quest')
      else # Returning to Map
        $scene = Scene_Map.new
      end
    elsif Input.trigger? (Input::C) # If C button is pressed
      # Open Journal (eventually)
    elsif Input.trigger? (Input::LEFT) # If Left direction pressed
      # Play Cursor SE
      Sound.play_cursor
      # Refresh Category Window
      @category_index = (@category_index - 1) % 4
      @category_window.refresh (@category_index)
      @list_window.refresh (@category_index)
      @info_window.refresh (@list_window.quest)
    elsif Input.trigger? (Input::RIGHT) # If Right direction pressed
      # Play Cursor SE
      Sound.play_cursor
      # Refresh Category Window
      @category_index = (@category_index + 1) % 4
      @category_window.refresh (@category_index)
      @list_window.refresh (@category_index)
      @info_window.refresh (@list_window.quest)
    # If scrolling through quests
    elsif Input.trigger? (Input::DOWN) || Input.trigger? (Input::UP)
      # Refresh Info Window
      @info_window.refresh (@list_window.quest)
    end
  end
end
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 21, 2010, 03:26:35 AM
Code: [Select]
#==============================================================================
# ** Window_QuestInfo
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window displays the information on the quest being viewed
#==============================================================================

class Window_QuestInfo < Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    super (160 + WLH, 0, Graphics.width - (160 + WLH), Graphics.height - (32 + WLH))
    create_contents
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (quest = nil)
    contents.clear
    return if quest == nil
    # Draw the name of the Quest, centred
    contents.font.color = normal_color
    contents.draw_text (0, 0, contents.width, WLH, quest.name, 1)
    # If the font has set width characters
    if contents.text_size ('w').width == contents.text_size ('i').width
      formatter = Paragrapher::Formatter_2.new
    else
      formatter = Paragrapher::Formatter.new
    end
    # Format the description
    desc_bitmap = Bitmap.new (contents.width - 16, (2.4*WLH).to_i)
    desc_bitmap.font.size -= 4
    desc_bitmap.font.name = "Century Gothic"
    desc_bitmap.font.bold = false
    formatted_desc = formatter.format (quest.description, desc_bitmap)
    # Draw the Description Box
    box_height = [WLH*(formatted_desc.lines.size + 1), 3*WLH].min
    rect = Rect.new (2, (1.5*WLH).to_i, contents.width - 4, box_height)
    contents.fill_rounded_rect (rect, system_color, 10)
    rect.x, rect.y = rect.x + 2, rect.y + 2
    rect.width, rect.height = rect.width - 4, rect.height - 4
    contents.fill_rounded_rect (rect, Color.new (0, 0, 0, 0), 10)
    tw = contents.text_size ('Description').width
    # Draw the description signifier
    contents.fill_rect (32, (1.5*WLH).to_i, tw + 2, 2, Color.new (0, 0, 0, 0))
    contents.font.color = system_color
    contents.draw_text (33, WLH, tw, WLH, 'Description')
    # Paragraph Artist
    artist = Paragrapher::Artist.new
    # If bitmap is too large
    if formatted_desc.lines.size < 2
      formatted_desc.bitmap = Bitmap.new (contents.width - 16, formatted_desc.lines.size*WLH)
      formatted_desc.bitmap.font.size -= 4
    end
    bmp = artist.draw (formatted_desc)
    # Centre within the box
    y = rect.y + 4 + (rect.height - bmp.height) / 2
    contents.blt (8, y, bmp, bmp.rect)
    bmp.dispose
    y = 2*WLH + rect.height + 4
    # Draw Objectives Signifier Text
    contents.font.color = system_color
    tw = contents.text_size ('Objectives').width
    contents.draw_text (32, y, tw, WLH, 'Objectives')
    y += WLH
    quest.revealed_objectives.each { |i|
      # Get the correct color
      contents.font.color = quest.complete_objectives.include? (i) ?
        text_color (ModAlg_QuestData::COMPLETE_COLOUR) : quest.failed_objectives.include? (i) ?
        text_color (ModAlg_QuestData::FAILED_COLOUR) : text_color (ModAlg_QuestData::ACTIVE_COLOUR)
      # Get objective
      objective = quest.objectives[i]
      # Draw Bullet
      tw = contents.text_size (ModAlg_QuestData::BULLET_CHARACTER).width
      x = 8
      contents.draw_text (x, y, tw, WLH, ModAlg_QuestData::BULLET_CHARACTER)
      x += tw + 4
      # Format the objective
      obj_bitmap = Bitmap.new (contents.width - x, 2*WLH)
      obj_bitmap.font = contents.font
      obj_bitmap.font.name = "Century Gothic"
      obj_bitmap.font.bold = false
      obj_bitmap.font.size -= 4
      formatted_obj = formatter.format (objective, obj_bitmap)
      # Draw Objective
      bmp = artist.draw (formatted_obj)
      contents.blt (x, y + 4, bmp, bmp.rect)
      # Modify the Y accordingly
      y += WLH*([formatted_obj.lines.size, 2].min)
    }
  end
end

Alright, try this I guess. Just replace Window_QuestInfo with it, or put it in its own slot below the Quest Journal.
Title: Re: Quest Journal v. 1.1
Post by: MrMoo on April 21, 2010, 05:01:34 AM
Completely fixed. You are getting a special thanks in my credits, seriously MA. Thanks for taking the time to do this super basic request which is otherwise a waste of time for most scripters.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 21, 2010, 07:41:51 PM
I'm happy to do it :)

If I had known how to script when I wrote this, I would've added that feature from the beginning.
Title: Re: Quest Journal v. 1.1
Post by: kitten2021 on April 24, 2010, 08:50:18 PM
Modern, can you help me out please...? I made a 'Test' map in my game to test the script out in, right? The objective of the Test Quest was to find a flower and obtain a flower petal then return it to the girl. I keep getting an error every time I get the quest and try to open up my Menu to look at it. This is what I have so in the script and the error I am receiving:

http://kitten2021.deviantart.com/art/ErrorInScripting-161836079

Please let me know what you think I'm doing wrong... Thanks a million!
Title: Re: Quest Journal v. 1.1
Post by: Heartofshadow on April 24, 2010, 09:09:10 PM
Well, comparing your screenshot to what I have in my project, I noticed yours reads "objective[0]" and "objective[1]"..

Those instances of "objective", within the when case for the quest, need to read "objectives". That should fix that error.

Ex: objectives[0], objectives[1], etc.


-Heart of Shadow-
Title: Re: Quest Journal v. 1.1
Post by: kitten2021 on April 24, 2010, 09:18:45 PM
=0.0=
Now I'm just embarrassed... Thanks for the help, that ~is~ what the problem was... :D
Title: Re: Quest Journal v. 1.1
Post by: zubin73 on April 25, 2010, 08:43:39 AM
I'm facing a strange trouble.the command $game_party.quests[quest_id].complete_objective (objective_id) is just so long that it isn't fitting in one line in the script box.and thats why I'm getting a runtime error.if I remove the space between .complete_objective and the (objective_id) then the script doesn't work.see the screenshot where I get the error(marked in red)-
(http://img232.imageshack.us/img232/3221/picaj.jpg)

(http://img265.imageshack.us/img265/4135/pic2w.jpg)

Edited:sorry I didn't see your previous posts.it works now with the solution you've given.
Title: Re: Quest Journal v. 1.1
Post by: Strak on May 05, 2010, 04:03:36 AM
Hey, this is a great script. Nice work, looks great, nice... customizability... or whatever the word is... Great job!
Title: Re: Quest Journal v. 1.1
Post by: zubin73 on May 05, 2010, 07:01:01 AM
Hey Modern Algebra,this script is great,but is there any way to make it compatible with woratana's simple mouse system.I mean the journal doesn't respond to the mouse.
Title: Re: Quest Journal v. 1.1
Post by: SirJackRex on May 19, 2010, 02:53:54 AM
This is a fantastic script. Thank you, Modern Algebra!

This is a silly question, but I'm not a scripter so I might as well. Is it possible to put apostrophes in the quests information without messing up the syntax or whatever?
Title: Re: Quest Journal v. 1.1
Post by: cozziekuns on May 19, 2010, 03:30:04 AM
Yep, but it's not really flexible. For example, say you want to change the description to "Martha needs someone to play with her dog's friend", you would need to change the apostrophe marks into quotation marks.

For example: description = 'Martha needs someone to play with her dog' would turn into:

description = "Martha needs someone to play with her dog's friend", which should work.
Title: Re: Quest Journal v. 1.1
Post by: SirJackRex on May 19, 2010, 05:45:15 AM
Thank you very much, cozziekuns. That worked and I am one happy camper!
Title: Re: Quest Journal v. 1.1
Post by: hikick10 on May 29, 2010, 12:32:44 AM
I put ur script in my game and got the following error: Script 'Quest Journal' line924: NoMethodError occured. undefined method >=' for   nil:NilClass




How do I fix?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on May 29, 2010, 12:36:14 AM
It could be an incompatibility. Try placing it below any other custom scripts you have in the editor, but still above Main.
Title: Re: Quest Journal v. 1.1
Post by: hikick10 on June 03, 2010, 10:50:57 PM
It is below all exept for main, I can't understand why it won't work... Unless it needs the paragraph format script. (doubtful)
Title: Re: Quest Journal v. 1.1
Post by: cozziekuns on June 03, 2010, 10:52:04 PM
It is below all exept for main, I can't understand why it won't work... Unless it needs the paragraph format script. (doubtful)

It needs the paragraph formatter script.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 03, 2010, 10:58:25 PM
It needs the paragraph formatter script.

Thanks cozzie :)
Title: Re: Quest Journal v. 1.1
Post by: Cascading Dragon on June 03, 2010, 11:51:11 PM
It is below all exept for main, I can't understand why it won't work... Unless it needs the paragraph format script. (doubtful)
Are you dense? Did you even bother reading the main page?

Quote
This script also REQUIRES the Paragraph Formatter

Its right there!

Sorry to sound mad but...at least read the main page....geez
Title: Re: Quest Journal v. 1.1
Post by: hikick10 on June 08, 2010, 04:34:26 PM
Lol. I'm felling stupid...  ;D
thnks
Title: Re: Quest Journal v. 1.1
Post by: hikick10 on June 08, 2010, 04:38:46 PM
I put it in, but it's still giving me that nilclass error.
What's that mean? It must be because of a conflicting script or something...
 ???
Title: Re: Quest Journal v. 1.1
Post by: game_guy on June 12, 2010, 12:17:51 AM
Hey modern algebra I made a program in visual basic that helps users easily make quests. I decided to post it here if thats ok. I actually made it for a friend who used your script but why not let everyone use it right?

http://www.sendspace.com/file/b2mdpo

Should be simple enough if anyone needs help on it let me know!

Sorry for the HUGE necropost. Thought it was a necropost xD
Hey guys? Who wants this updated for saving and loading support? Except this time it'll be remade in c#, possible a different design. Let me know if you guys have any suggestions k?

EDIT:
Heres a preview. Its all I got so far.
Spoiler for:
(http://i678.photobucket.com/albums/vv143/GameGuysProjects/privew.png)

EDIT 2:
Heres a preview of the Quest Editor itself.
Spoiler for:
(http://i678.photobucket.com/albums/vv143/GameGuysProjects/preview2.png)

EDIT 3:
I finished the config and sent it to MA. He's testing it and making sure it generates the script right. When I get his input I'll release it.
Title: Re: Quest Journal v. 1.1
Post by: Mitsarugi on June 18, 2010, 08:25:18 AM
WOW! game_guy that's cool i took a look at the old version, but this one is really a master piece hope you release it soon ^^
Title: Re: Quest Journal v. 1.1
Post by: game_guy on June 18, 2010, 05:18:47 PM
Here it is. http://rmrk.net/index.php/topic,38995.0.html Maybe you missed it. I released it a few days ago. Anyways enjoy! =D
Title: Re: Quest Journal v. 1.1
Post by: Mitsarugi on June 18, 2010, 08:36:44 PM
Thank you game_guy :)
Title: Re: Quest Journal v. 1.1
Post by: Countdown on June 19, 2010, 08:25:38 PM
Hey MA.  Awesome script.  One problem, I'm using your Phantasia-esque CMS (http://rmrk.net/index.php?topic=35085.0) and I keep getting errors.  I've followed the instructions to get it to work, but it's not working.  How would I make it so that I can access the Quest Journal from the menu?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 19, 2010, 09:07:18 PM
Umm, try placing the Quest Journal above Phantasia in the Script Editor, and then add it to the menu through the interface in Phantasia-esque
Title: Re: Quest Journal v. 1.1
Post by: Countdown on June 19, 2010, 10:39:06 PM
Oh, what do you know, it works.  Thanks.

Title: Re: Quest Journal v. 1.1
Post by: attak1616 on June 28, 2010, 07:25:20 PM
When do you roughly thing you will make version 2.0 of the Quest Journal? :P
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on June 29, 2010, 01:01:59 PM
Not for a long time. Lots to do before then.
Title: Re: Quest Journal v. 1.1
Post by: Mara on July 05, 2010, 10:37:40 PM
Im new in this, and im just starting to figure out how to use scripts (it seems important if you want to make a prober game) Can anyone tell me how to use the quest log? and maybe some basics knowledge about scripts?

Thanks you in advance :P
Title: Re: Quest Journal v. 1.1
Post by: flumi94 on August 01, 2010, 01:03:02 AM
that drives me freaggin mad  >:(

im german but i can understand english very good.... but....  HOW CAN I GET A QUEST INGAME I HAVE NO DAMN CLUE HOW TO GET THEM INGAME!!!

sry for capslock but its so annoying theres no explaining in this thread about that..... :mad:

i have that script that i need for... and i have the journal config.

so what do i have to do ? -.-
Title: Re: Quest Journal v. 1.1
Post by: cozziekuns on August 01, 2010, 01:51:15 AM
What are you talking about? It says them in the instructions. You can also check the demo to find out how it works.
Title: Re: Quest Journal v. 1.1
Post by: flumi94 on August 01, 2010, 02:00:31 AM
What are you talking about? It says them in the instructions. You can also check the demo to find out how it works.


how do i import a quest  into a event ?!....

i really dont get it
Title: Re: Quest Journal v. 1.1
Post by: Zacksquest on August 19, 2010, 06:22:40 PM
I get all the scripting, but my Quests Journal won't show up in the menu... does a quest have to be available already, and how do you do that when the game starts up?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 19, 2010, 09:52:01 PM
Well, no, but you have to turn the MENU_ACCESS constant to true. If it still isn't there, it means you're probably using a custom menu scene and I can't help you unless I know what that is. Most custom menu scenes have built in ways to add new scripts to the command list, so just add it as you would any other script.
Title: Re: Quest Journal v. 1.1
Post by: hikick10 on August 20, 2010, 01:27:57 AM
I've got the quest script as well as paragraph formater put below everything except for main. Here's the error:
                                                                                                                                                     
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 20, 2010, 01:37:10 AM
probably means you have woratana's monster book or something. Go into the script, press CTR+H. In the find field, put "disabled_commands". In the replace field, but "ma_disabled_commands". Replace all.
Title: Re: Quest Journal v. 1.1
Post by: hikick10 on August 20, 2010, 02:14:50 AM
Ty modern.




(never would have thought of that)
Title: Re: Quest Journal v. 1.1
Post by: hikick10 on August 20, 2010, 02:32:51 AM
New error.
This time it popped up when i selected the even that starts the quest.
Yes I did fill out the quest info and objective.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 20, 2010, 04:14:53 AM
When you reference a quest it should simply be 1, not quest_1.
Title: Re: Quest Journal v. 1.1
Post by: hikick10 on August 20, 2010, 08:41:24 PM
I've redone the quest using the reveal objective and the other quest commands. (plus a variable)
With an error as a result what does it mean this time?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on August 21, 2010, 02:11:11 AM
Well, it means a method was called and an argument that had to be passed to it wasn't. Since there's no line number, then that means it happened while running a call script? If so, show me what you have in the call script where that error happens.

(If I had to take a guess though, I would say it might be that a line was split into two when putting it in, so you have something like:
Code: [Select]
$game_party.quests[1].reveal_objective
(0)

a line like that would cause an error - if that is the problem, you can fix it by splitting it at a better point, like the following:

Code: [Select]
q = $game_party.quests[1]
q.reveal_objective (0)
)
Title: Re: Quest Journal v. 1.1
Post by: fthmdg on September 18, 2010, 10:02:28 PM
Hello! First off, awesome script! I love the way the menu works, and with GameGuy's app it makes it so easy to edit quests! So thanks to both of you!

Right now I'm trying to get it to work with Syvkal's Ring Menu. I got the menu to come up, display the menu choice, and pull up the quest menu scene when it's selected. Your script is working perfectly, but for some reason when I try to exit the quest menu and go back to the ring menu, it crashes.

 didn't modify your script other than taking out the scene_menu section since I'm using a different menu

And here's the modified version of Syvkal's Ring Menu.
Spoiler for:
#==============================================================================
# ** Ring Menu
#-------------------------------------------------------------------------------
# by Syvkal
# Version 1.0
# 06-23-08
#==============================================================================
 
  #===================================================#
  #  **  C O N F I G U R A T I O N   S Y S T E M  **  #
  #===================================================#
 
 # Amount of frames for Startup Animation
 STARTUP_FRAMES = 20
 # Amount of frames for Movement Animation
 MOVING_FRAMES = 15
 # Radius of the Menu Ring
 RING_R = 75
 # Disabled icon to display when disabled
 ICON_DISABLE= Cache::picture('Icon_Disable')
 
  #===================================================#
  #  **     E N D   C O N F I G U R A T I O N     **  #
  #===================================================#
 
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  Edited to add Ring Menu
#==============================================================================
 
class Scene_Menu < Scene_Base
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias initialize_original initialize
 alias start_selection_original start_actor_selection
 alias end_selection_original end_actor_selection
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0, move = true)
   @move = move
   initialize_original(menu_index)
 end
 #--------------------------------------------------------------------------
 # * Start processing
 #--------------------------------------------------------------------------
 def start
   super
   create_menu_background
   create_command_window
   @gold_window = Window_Gold.new(0, 360)
   @location_window = Window_location.new(0, 0)
 end
 #--------------------------------------------------------------------------
 # * Termination Processing
 #--------------------------------------------------------------------------
 def terminate
   super
   dispose_menu_background
   @command_window.dispose
   @gold_window.dispose
   @status_window.dispose if @status_window
   @location_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   super
   update_menu_background
   @command_window.update
   @gold_window.update
   @status_window.update if @status_window
   @location_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 = "Save Game"     ;  s6 = "Load Game"
   s7 = Vocab::Quest    ;  s8 = Vocab::game_end
   c1 = Cache::picture('Icon_Items');  c2 = Cache::picture('Icon_Skills')
   c3 = Cache::picture('Icon_Equip');  c4 = Cache::picture('Icon_Status')
   c5 = Cache::picture('Icon_Save');  c6 = Cache::picture('Icon_Load')
   c7 = Cache::picture('Icon_Quest'); c8 = Cache::picture('Icon_End')
   @command_window = Window_RingMenu.new(232, 164, [s1, s2, s3, s4, s5, s6, s7, s8], [c1, c2, c3, c4, c5, c6, c7, c8], @move, @menu_index)
   if $game_party.members.size == 0
     @command_window.disable_item(0)
     @command_window.disable_item(1)
     @command_window.disable_item(2)
     @command_window.disable_item(3)
   end
   if $game_system.save_disabled
     @command_window.disable_item(4)
   end
 end
 #--------------------------------------------------------------------------
 # * Create Command Window
 #--------------------------------------------------------------------------
 def create_status_window
   names = []
   chars = []
   for i in 0...$game_party.members.size
     names = $game_party.members.name
     chars = $game_party.members
   end
   @status_window = Window_RingMenu.new(255, 200, names, chars, true, $game_party.last_actor_index, true)
 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      # Skill
       $scene = Scene_Skill.new
     when 2      # Equipment
       $scene = Scene_Equip.new
     when 3      # Status
       $scene = Scene_Status.new
     when 4      # Save
       $scene = Scene_File.new(true, false, false)
     when 5      # Load
       $scene = Scene_File.new(false, false, false)
     when 6      # Quest
       $scene = Scene_Quest.new
     when 7      # End Game
       $scene = Scene_End.new
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Start Actor Selection
 #--------------------------------------------------------------------------
 def start_actor_selection
   @command_window.active = false
   @command_window.visible = false
   create_status_window
   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
   @command_window.visible = true
   @status_window.dispose if @status_window
   @status_window = nil
 end
end
 
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  Edited to return to the menu properly when loading
#==============================================================================
 
class Scene_File
 alias return_scene_original return_scene
 def return_scene
   if @from_title
     $scene = Scene_Title.new
   elsif @from_event
     $scene = Scene_Map.new
   else
     if @saving
       $scene = Scene_Menu.new(4)
     else
       $scene = Scene_Menu.new(5)
     end
   end
 end
end
 
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
#  Edited to return to the menu properly due to loading being added
#==============================================================================
 
class Scene_End
 alias return_scene_original return_scene
 def return_scene
   $scene = Scene_Menu.new(6)
 end
end
 
#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
#  This class shows the current map name.
#==============================================================================
 
class Window_location < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(x, y)
   super(x, y, 160, (WLH*2) + 32)
   self.contents = Bitmap.new(width - 32, height - 32)
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   $maps = load_data("Data/MapInfos.rvdata")
   @map_id = $game_map.map_id
   @currmap = $maps[@map_id].name
   self.contents.font.color = system_color
   self.contents.draw_text(0, -4, 128, 32, "Location :")
   self.contents.font.color = normal_color
   self.contents.draw_text(0, -4+WLH, 128, 32, @currmap, 1)
 end
end
 
#==============================================================================
# ** Window_RingMenu
#------------------------------------------------------------------------------
#  This Window creates a Ring Menu system
#==============================================================================
 
class Window_RingMenu < Window_Base
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :index
 attr_reader   :item_max
 #--------------------------------------------------------------------------
 # * Refresh Setup
 #--------------------------------------------------------------------------
 START = 1
 WAIT  = 2
 MOVER = 3
 MOVEL = 4
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(center_x, center_y, commands, items, move = true, index = 0, character = false)
   super(0, 0, 544, 416)
   self.contents = Bitmap.new(width-32, height-32)
   self.opacity = 0
   @move = move
   @char = character
   @startup = STARTUP_FRAMES
   @commands = commands
   @item_max = commands.size
   @index = index
   @items = items
   @disabled = []
   for i in 0...commands.size-1
     @disabled = false
   end
   @cx = center_x
   @cy = center_y
   start_setup
   refresh
 end
 #--------------------------------------------------------------------------
 # * Start Setup
 #--------------------------------------------------------------------------
 def start_setup
   @mode = START
   @steps = @startup
 end
 #--------------------------------------------------------------------------
 # * Disable index
 #     index : item number
 #--------------------------------------------------------------------------
 def disable_item(index)
   @disabled[index] = true
 end
 #--------------------------------------------------------------------------
 # * Determines if is moving
 #--------------------------------------------------------------------------
 def animation?
   return @mode != WAIT
 end
 #--------------------------------------------------------------------------
 # * Determine if cursor is moveable
 #--------------------------------------------------------------------------
 def cursor_movable?
   return false if (not visible or not active)
   return false if (@opening or @closing)
   return false if animation?
   return true
 end
 #--------------------------------------------------------------------------
 # * Move cursor right
 #--------------------------------------------------------------------------
 def cursor_right
   @index -= 1
   @index = @items.size - 1 if @index < 0
   @mode = MOVER
   @steps = MOVING_FRAMES
 end
 #--------------------------------------------------------------------------
 # * Move cursor left
 #--------------------------------------------------------------------------
 def cursor_left
   @index += 1
   @index = 0 if @index >= @items.size
   @mode = MOVEL
   @steps = MOVING_FRAMES
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   super
   if self.active
     if cursor_movable?
       last_index = @index
       if Input.repeat?(Input::DOWN) or Input.repeat?(Input::RIGHT)
         cursor_right
       end
       if Input.repeat?(Input::UP) or Input.repeat?(Input::LEFT)
         cursor_left
       end
       if @index != last_index
         Sound.play_cursor
       end
     end
     refresh
   end
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh   
   self.contents.clear
   case @mode
   when START
     refresh_start
   when WAIT
     refresh_wait
   when MOVER
     refresh_move(1)
   when MOVEL
     refresh_move(0)
   end
   rect = Rect.new(18, 196, self.contents.width-32, 32)
   self.contents.draw_text(rect, @commands[@index], 1)
 end
 #--------------------------------------------------------------------------
 # * Refresh Start Period
 #--------------------------------------------------------------------------
 def refresh_start
   d1 = 2.0 * Math::PI / @item_max
   d2 = 1.0 * Math::PI / @startup
   for i in 0...@item_max
     j = i - @index
     if @move
       r = RING_R - 1.0 * RING_R * @steps / @startup
       d = d1 * j + d2 * @steps
     else
       r = RING_R
       d = d1 * j
     end
     x = @cx + ( r * Math.sin( d ) ).to_i
     y = @cy - ( r * Math.cos( d ) ).to_i
     draw_item(x, y, i)
   end
   @steps -= 1
   if @steps < 1
     @mode = WAIT
   end
 end
 #--------------------------------------------------------------------------
 # * Refresh Wait Period
 #--------------------------------------------------------------------------
 def refresh_wait
   d = 2.0 * Math::PI / @item_max
   for i in 0...@item_max
     j = i - @index
     x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
     y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
     draw_item(x, y, i)
   end
 end
 #--------------------------------------------------------------------------
 # * Refresh Movement Period
 #--------------------------------------------------------------------------
 def refresh_move( mode )
   d1 = 2.0 * Math::PI / @item_max
   d2 = d1 / MOVING_FRAMES
   d2 *= -1 if mode != 0
   for i in 0...@item_max
     j = i - @index
     d = d1 * j + d2 * @steps
     x = @cx + ( RING_R * Math.sin( d ) ).to_i
     y = @cy - ( RING_R * Math.cos( d ) ).to_i
     draw_item(x, y, i)
   end
   @steps -= 1
   if @steps < 1
     @mode = WAIT
   end
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     index : item number
 #--------------------------------------------------------------------------
 def draw_item(x, y, index)
   if @char
     if @index == index
       draw_character(@items[index].character_name, @items[index].character_index , x, y)
       if @mode == WAIT
         #draw_actor_hp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 270, true)
         #draw_actor_mp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 180, false)
         #draw_actor_exp_ring(@items[index], @cx, @cy-16, 50, 6, 155, 12, false)
       end
     else
       draw_character(@items[index].character_name, @items[index].character_index , x, y, false)
     end
   else
     rect = Rect.new(0, 0, @items[index].width, @items[index].height)
     if @index == index
       self.contents.blt( x, y, @items[index], rect )
       if @disabled[@index]
         self.contents.blt( x, y, ICON_DISABLE, rect )
       end
     else
       self.contents.blt( x, y, @items[index], rect, 128 )
     end
   end
 end
end
 
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  Edited to allow disabled character icons
#==============================================================================
 
class Window_Base < Window
 #--------------------------------------------------------------------------
 # * Draw Character Graphic
 #--------------------------------------------------------------------------
 def draw_character(character_name, character_index, x, y, enabled = true)
   return if character_name == nil
   bitmap = Cache.character(character_name)
   sign = character_name[/^[\!\$]./]
   if sign != nil and sign.include?('$')
     cw = bitmap.width / 3
     ch = bitmap.height / 4
   else
     cw = bitmap.width / 12
     ch = bitmap.height / 8
   end
   n = character_index
   src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
   self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 128)
 end
end


The Ring Menu crashes on line 430 with a TypeError.

'String can't be coerced into Fixnum'

Line 430 reads "j = i - @index"
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on September 22, 2010, 06:04:17 PM
Well, firstly, use a code box when posting scripts because BBCode corrupts the script. Secondly, line 430 in the script you posted is a comment. Thirdly, that script requires a number of graphics which you didn't provide and which I have no interest in hunting down.

If I had to take a guess from what you said the error was, then this particular problem is probably the following: at around line 1030 of the Quest Journal script, there is a line like this:

Code: [Select]
        $scene = Scene_Menu.new ('Quest')

It relies on a code in Scene_Menu which converts that into an integer; with a custom menu, that may or may not happen. I'm guessing it doesn't in this case. Just change it to whatever index the Quest Journal is in your menu, so:

Code: [Select]
        $scene = Scene_Menu.new (6)
Title: Re: Quest Journal v. 1.1
Post by: fthmdg on September 23, 2010, 02:06:41 AM
Sorry about that. And yeah, 430 was commented out because it was raising an error, and I was trying a few things out.

I already got some help though, but thanks
Title: Re: Quest Journal v. 1.1
Post by: shadowlink97 on October 29, 2010, 12:38:14 AM
I'm having problems with this MAJOR NOOB!

I used the custom thing by cool man and i made an event that states: call script, "$game_party.quests[Save the girl].reveal_objective (Find some rope)" When my quest is name = "Save the girl"
      description = "You happened along a pit that held a female voice, it called for help."
      icon_index = 79
      objectives[0] = "Find some rope"
      objectives[1] = "Climb down the pit"
      objectives[2] = "Investigate the voice"
      prime = []
      prime.push(0)
      prime.push(1)
      prime.push(2)
   
in the script

Did I do something wrong? Please help with easy steps
 :-[

 
Title: Re: Quest Journal v. 1.1
Post by: shadowlink97 on October 29, 2010, 12:47:34 AM
Sorry, I forgot to put that my error was called "Syntax error occurred while running script" but it wont show me where


I looked at the above section about the argument, adjusted my call script, and now it working, thx for the script
Title: Re: Quest Journal v. 1.1
Post by: hexgame on November 19, 2010, 10:31:42 PM
I'm trying to creat a few repeatable quests for some NPCs but I'm having trouble. Basically for alchemy for example.. I go out and collect different types of herbs and turn them into an alchemy vendor to craft potions for me.

If you could guide me through it, I would appreciate it.
Title: Re: Quest Journal v. 1.1
Post by: Adrien on January 12, 2011, 05:49:59 PM
I has a question

You know after you give the reward for the quest, if you continue to talk to said person all they may say is "thank you". Well I have some on who gives you choices after.

SO:

- Say thank you if reward is given
 -- show choices after some text.

But its stuck in a loop. Every time I talk to them it says "Thank you" and then it shows some text and then the choices.

How would I get them to say "thank you" only upon giving you the reward, and then every time you talk to them after that it just go straight to the text and then choices?

Hope that made sense

Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 12, 2011, 06:57:32 PM
Just use a self-switch and a conditional branch. So, have the event something like this:

@>Conditional Branch: Self Switch [A] == OFF
    @>Text: Thank You
    @>Control Self Switch: [A] is ON
  :  Branch End
@>The rest of the stuff you want to put
Title: Re: Quest Journal v. 1.1
Post by: Secretmapper on January 16, 2011, 06:13:55 AM
#        $game_party.quests[quest_id].reveal_objective (objective_id)
#        $game_party.quests[quest_id].conceal_objective (objective_id)
#        $game_party.quests[quest_id].complete_objective (objective_id)
#        $game_party.quests[quest_id].uncomplete_objective (objective_id)
#        $game_party.quests[quest_id].fail_objective (objective_id)
#        $game_party.quests[quest_id].unfail_objective (objective_id)
#        $game_party.quests[quest_id].complete?
#        $game_party.quests[quest_id].failed?
#        $game_party.quests[quest_id].reward_given = true/false
#        $game_party.quests[quest_id].concealed = true/false
#        $game_party.quests.remove (quest_id)
Title: Re: Quest Journal v. 1.1
Post by: Mitsarugi on January 18, 2011, 10:26:07 PM
Added a little extra to your script hope you don't mind , locations!
 

2nd part:
Code: [Select]
#==============================================================================
# ** Game_Party
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new instance variable - quests
#    aliased method - initialize
#==============================================================================

class Game_Party
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :quests
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_qst_jrnl_party_init_quests initialize
  def initialize
    # Run Original Method
    modalg_qst_jrnl_party_init_quests
    # Initialize @quests
    @quests = Game_Quests.new
  end
end

#==============================================================================
# ** Game_Quests
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This class handles Quests. It is a wrapper for the built-in class "Hash".
# The instance of this class is accessed by $game_party.quests
#==============================================================================

class Game_Quests
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    @data = {}
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Quest
  #    quest_id : the ID of the quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def [] (quest_id)
    @data[quest_id] = ModAlg_QuestData::Quest.new (quest_id) if @data[quest_id] == nil
    return @data[quest_id]
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def list
    quest_list = @data.values
    quest_list.each { |i| quest_list.delete (i) if i.concealed }
    return quest_list
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Completed Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def completed_list
    complete_quests = []
    list.each { |i| complete_quests.push (i) if i.complete? }
    return complete_quests
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Failed Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def failed_list
    failed_quests = []
    list.each { |i| failed_quests.push (i) if i.failed? }
    return failed_quests
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Active Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def active_list
    return list - failed_list - completed_list
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Revealed?
  #    quest_id : the ID of a checked quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def revealed? (quest_id)
    return @data[quest_id] != nil
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Remove Quest
  #    quest_id : the ID of a checked quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def remove (quest_id)
    @data.delete (quest_id)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Clear
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def clear
    @data.clear
  end
end

#==============================================================================
# ** Window_Command
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new instance variable - disabled_commands
#    aliased method - initialize, draw_item
#==============================================================================

class Window_Command
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variable
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader :disabled_commands
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Initialize
  #     width      : window width
  #     commands   : command string array
  #     column_max : digit count (if 2 or more, horizontal selection)
  #     row_max    : row count (0: match command count)
  #     spacing    : blank space when items are arrange horizontally
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_intlz initialize
  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    # Initialize new instance variable
    @disabled_commands = []
    # Run Original Method
    modalg_quest_jrnl_intlz (width, commands, column_max, row_max, spacing)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Item
  #     index   : item number
  #     enabled : enabled flag. When false, draw semi-transparently
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_itm_drw draw_item
  def draw_item (index, enabled = true)
    # Run Original Method
    modalg_quest_jrnl_itm_drw (index, enabled)
    enabled ? @disabled_commands.delete (index) : @disabled_commands.push (index)
  end
end

#==============================================================================
# ** Window_Message
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    aliaed method - convert_special_characters
#==============================================================================

class Window_Message
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Convert Special Characters
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_spec_char_convert convert_special_characters
  def convert_special_characters
    @text.gsub! (/\\NQ\[(\d+)\]/i) { $game_party.quests[$1.to_i] } # Name Quest
    # Run Original Method
    modalg_quest_jrnl_spec_char_convert
  end
end

#==============================================================================
# ** Window_QuestLabel
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window signifies that this is a quest list
#==============================================================================

class Window_QuestLabel < Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    super (0, 0, 160 + WLH, 32 + WLH)
    create_contents
    contents.font.color = system_color
    contents.draw_text (0, 0, contents.width, WLH, ModAlg_QuestData::QUESTS_LABEL, 1)
  end
end

#==============================================================================
# ** Window_QuestCategory
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window displays which category is being viewed
#==============================================================================

class Window_QuestCategory < Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    super (0, WLH + 32, 160 + WLH, 64)
    create_contents
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #    category_index : icon to highlight -
  #                       0 => All, 1 => Active, 2 => Complete, 3 => Failed
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (category_index = 0)
    contents.clear
    # Retrieve Icon Bitmaps
    bitmap = Cache.system("Iconset")
    icon_index = ModAlg_QuestData::ACTIVE_QUEST_ICON
    active_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    icon_index = ModAlg_QuestData::COMPLETE_QUEST_ICON
    complete_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    icon_index = ModAlg_QuestData::FAILED_QUEST_ICON
    failed_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    # Combine the three icons for the All Icon
    all_icon = Bitmap.new (40, 32)
    all_icon.blt (0, 0, bitmap, complete_rect)
    all_icon.blt (20, 0, bitmap, failed_rect)
    all_icon.blt (8, 10, bitmap, active_rect)
    distance = (contents.width - 112) / 3
    x = 0
    # Draw the 'All' Icon onto the window
    contents.blt (x, 0, all_icon, all_icon.rect, category_index == 0 ? 255 : 128)
    x += 40 + distance
    # Draw the 'Active' Icon onto the window
    contents.blt (x, 4, bitmap, active_rect, category_index == 1 ? 255 : 128)
    x += 24 + distance
    # Draw the 'Complete' Icon onto the window
    contents.blt (x, 4, bitmap, complete_rect, category_index == 2 ? 255 : 128)
    x += 24 + distance
    # Draw the 'Failed' Icon onto the window
    contents.blt (x, 4, bitmap, failed_rect, category_index == 3 ? 255 : 128)
  end
end

#==============================================================================
# ** Window_QuestList
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window displays the list of quests
#==============================================================================

class Window_QuestList < Window_Selectable
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize (category_index = 0, index = 0)
    super (0, 64 + (WLH + 32), 160 + WLH, Graphics.height - 64 - 2*(WLH + 32))
    @data = []
    @column_max = 1
    refresh (category_index)
    self.index = index
    self.active = true
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def quest
    return @data[self.index]
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #    category_index : List to show -
  #                       0 => All, 1 => Active, 2 => Complete, 3 => Failed
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (category_index = 0)
    font = Font.new
    @data.clear
    self.index = 0
    # Get the quest list to be drawn
    case category_index
    when 0
      @data = $game_party.quests.list
    when 1
      @data = $game_party.quests.active_list
      font.color = text_color (ModAlg_QuestData::ACTIVE_COLOUR)
    when 2
      @data = $game_party.quests.completed_list
      font.color = text_color (ModAlg_QuestData::COMPLETE_COLOUR)
    when 3
      @data = $game_party.quests.failed_list
      font.color = text_color (ModAlg_QuestData::FAILED_COLOUR)
    end
    @item_max = @data.size
    unless contents == nil
      # Clear Contents
      contents.clear
      return if @data.empty?
      contents.dispose
    end
    # Create Contents
    self.contents = Bitmap.new (width - 32, WLH*@data.size)
    contents.font = font
    # Draw the Quest Names
    for i in 0...@data.size
      quest = @data[i]
      # If all, distinguish between quest types by colour
      if category_index == 0
        if quest.complete?
          contents.font.color = text_color (ModAlg_QuestData::COMPLETE_COLOUR)
        elsif quest.failed?
          contents.font.color = text_color (ModAlg_QuestData::FAILED_COLOUR)
        else # Active
          contents.font.color = text_color (ModAlg_QuestData::ACTIVE_COLOUR)
        end
      end
      draw_icon (quest.icon_index, 0, i*WLH)
      # Draw the name of the quest
      contents.draw_text (24, i*WLH, contents.width - 24, WLH, quest.name)
    end
  end
end

#==============================================================================
# ** Window_QuestInfo
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window displays the information on the quest being viewed
#==============================================================================

class Window_QuestInfo < Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize
    super (160 + WLH, 0, Graphics.width - (160 + WLH), Graphics.height - (32 + WLH))
    create_contents
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (quest = nil)
    contents.clear
    return if quest == nil
    # Draw the name of the Quest, centred
    contents.font.color = normal_color
    contents.draw_text (0, 0, contents.width, WLH, quest.name, 1)
    # If the font has set width characters
    if contents.text_size ('w').width == contents.text_size ('i').width
      formatter = Paragrapher::Formatter_2.new
    else
      formatter = Paragrapher::Formatter.new
    end
    # Format the description
    desc_bitmap = Bitmap.new (contents.width - 16, (2.4*WLH).to_i)
    desc_bitmap.font.size -= 4
    formatted_desc = formatter.format (quest.description, desc_bitmap)
    # Draw the Description Box
    box_height = [WLH*(formatted_desc.lines.size + 1), 3*WLH].min
    rect = Rect.new (2, (1.5*WLH).to_i, contents.width - 4, box_height)
    contents.fill_rounded_rect (rect, system_color, 10)
    rect.x, rect.y = rect.x + 2, rect.y + 2
    rect.width, rect.height = rect.width - 4, rect.height - 4
    contents.fill_rounded_rect (rect, Color.new (0, 0, 0, 0), 10)
    tw = contents.text_size ('Description').width
    # Draw the description signifier
    contents.fill_rect (32, (1.5*WLH).to_i, tw + 2, 2, Color.new (0, 0, 0, 0))
    contents.font.color = system_color
    contents.draw_text (33, WLH, tw, WLH, 'Description')           
    # Paragraph Artist
    artist = Paragrapher::Artist.new
    # If bitmap is too large
    if formatted_desc.lines.size < 2
      formatted_desc.bitmap = Bitmap.new (contents.width - 16, formatted_desc.lines.size*WLH)
      formatted_desc.bitmap.font.size -= 4
    end
    bmp = artist.draw (formatted_desc)
    # Centre within the box
    y = rect.y + 4 + (rect.height - bmp.height) / 2
    contents.blt (8, y, bmp, bmp.rect)
    bmp.dispose
    y = 2*WLH + rect.height + 4
   
 ###############################################################################   
    # Format the description
    loc_bitmap = Bitmap.new (contents.width - 16, (2.4*WLH).to_i)
    loc_bitmap.font.size -= 4
    formatted_loc = formatter.format (quest.location, loc_bitmap)
    # Draw the Description Box
#~     box_height = [WLH*(formatted_loc.lines.size + 1), 3*WLH].min
#~     rect = Rect.new (2, (1.5*WLH).to_i, contents.width - 4, box_height)
#~     contents.fill_rounded_rect (rect, system_color, 10)
#~     rect.x, rect.y = rect.x + 2, rect.y + 2
#~     rect.width, rect.height = rect.width - 4, rect.height - 4
#~     contents.fill_rounded_rect (rect, Color.new (0, 0, 0, 0), 10)
#~     tw = contents.text_size ('Location').width
    # Draw the description signifier
    contents.fill_rect (32, 300, tw + 2, 2, Color.new (0, 0, 0, 0)) #(32,(1.5*WLH).to_i,
    contents.font.color = normal_color
    contents.draw_text (33, 300, tw, WLH, 'Location')
    # Paragraph Artist
    artist = Paragrapher::Artist.new
    # If bitmap is too large
    if formatted_loc.lines.size < 2
      formatted_loc.bitmap = Bitmap.new (contents.width - 16, formatted_loc.lines.size*WLH)
      formatted_loc.bitmap.font.size -= 4
    end
    bmp = artist.draw (formatted_loc)
    # Centre within the box
    y = 305 #rect.y + 4 + (rect.height - bmp.height) / 2
    x = 125
    contents.blt (x, y, bmp, bmp.rect)
    bmp.dispose
    y = 2*WLH + rect.height + 4       
   
 ###############################################################################             
       
    # Draw Objectives Signifier Text
    contents.font.color = system_color
    tw = contents.text_size ('Objectives').width
    contents.draw_text (32, y, tw, WLH, 'Objectives')
    y += WLH
    quest.revealed_objectives.each { |i|
      # Get the correct color
      contents.font.color = quest.complete_objectives.include? (i) ?
        text_color (ModAlg_QuestData::COMPLETE_COLOUR) : quest.failed_objectives.include? (i) ?
        text_color (ModAlg_QuestData::FAILED_COLOUR) : text_color (ModAlg_QuestData::ACTIVE_COLOUR)
      # Get objective
      objective = quest.objectives[i]
      # Draw Bullet
      tw = contents.text_size (ModAlg_QuestData::BULLET_CHARACTER).width
      x = 8
      contents.draw_text (x, y, tw, WLH, ModAlg_QuestData::BULLET_CHARACTER)
      x += tw + 4
      # Format the objective
      obj_bitmap = Bitmap.new (contents.width - x, 2*WLH)
      obj_bitmap.font = contents.font
      obj_bitmap.font.size -= 4
      formatted_obj = formatter.format (objective, obj_bitmap)
      # Draw Objective
      bmp = artist.draw (formatted_obj)
      contents.blt (x, y + 4, bmp, bmp.rect)
      # Modify the Y accordingly
      y += WLH*([formatted_obj.lines.size, 2].min)
    }
  end
end

#==============================================================================
# ** Scene_Map
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    aliased method - update
#==============================================================================

class Scene_Map < Scene_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Frame Update
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_journal_map_upd_key_access update
  def update
    modalg_quest_journal_map_upd_key_access
    # If the quest log can be accessed by key and is not empty or disabled
    if $game_system.quest_keyaccess && !$game_system.quest_disabled && !$game_party.quests.list.empty?
      $scene = Scene_Quest.new if Input.trigger? (ModAlg_QuestData::MAPKEY_BUTTON)
    end
  end
end

#==============================================================================
# ** Scene_Menu
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    aliased methods - initialize, create_command_window, update_command_selection
#==============================================================================

class Scene_Menu < Scene_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_init initialize
  def initialize(menu_index = 0)
    modalg_quest_jrnl_init (menu_index)
    return unless $game_system.quest_menuaccess
    if @menu_index == 'Quests'
      @menu_index = ModAlg_QuestData::MENU_INDEX
    elsif @menu_index >= ModAlg_QuestData::MENU_INDEX
      @menu_index += 1
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Create Command Window
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_journal_menu_cmmnd_win_create create_command_window
  def create_command_window
    modalg_quest_journal_menu_cmmnd_win_create
    # If accessed through map, then don't add it to the menu
    return unless $game_system.quest_menuaccess
    c = @command_window.commands
    c.insert (ModAlg_QuestData::MENU_INDEX, ModAlg_QuestData::QUESTS_LABEL)
    width = @command_window.width
    disabled = @command_window.disabled_commands
    @command_window.dispose
    @command_window = Window_Command.new(width, c)
    @command_window.index = @menu_index
    # Disable all of the old commands as well
    disabled.each { |i|
      i += 1 if i >= ModAlg_QuestData::MENU_INDEX
      @command_window.draw_item (i, false)
    }
    if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled
      @command_window.draw_item (ModAlg_QuestData::MENU_INDEX, false)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Command Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_journal_menu_cmmnd_select_upd update_command_selection
  def update_command_selection
    if $game_system.quest_menuaccess
      changed = false
      if @command_window.index == ModAlg_QuestData::MENU_INDEX && Input.trigger? (Input::C)
        if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled
          Sound.play_buzzer
        else
          # Open Quest Window
          Sound.play_decision
          $scene = Scene_Quest.new
        end
        return
      end
      # If the command index is greater than it ought to be, make sure
      if @command_window.index > ModAlg_QuestData::MENU_INDEX
        @command_window.index = (@command_window.index - 1) % @command_window.commands.size
        changed = true
      end
    end
    modalg_quest_journal_menu_cmmnd_select_upd
    return unless $game_system.quest_menuaccess
    @command_window.index = (@command_window.index + 1) % @command_window.commands.size if changed
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Actor Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_quest_jrnl_actor_selection_upd update_actor_selection
  def update_actor_selection
    changed = false
    if $game_system.quest_menuaccess && @command_window.index > ModAlg_QuestData::MENU_INDEX
      @command_window.index = (@command_window.index - 1) % @command_window.commands.size
      changed = true
    end
    modalg_quest_jrnl_actor_selection_upd
    return unless $game_system.quest_menuaccess
    @command_window.index = (@command_window.index + 1) % @command_window.commands.size if changed
  end
end

#==============================================================================
# ** Scene_Quest
#------------------------------------------------------------------------------
#  This class performs the quest screen processing.
#==============================================================================

class Scene_Quest < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(category_index = 0, quest_index = 0)
    @category_index = category_index
    @quest_index = quest_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    # Create Windows
    @label_window = Window_QuestLabel.new
    @category_window = Window_QuestCategory.new
    @category_window.refresh (@category_index)
    @list_window = Window_QuestList.new (@category_index, @quest_index)
    @info_window = Window_QuestInfo.new
    @info_window.refresh (@list_window.quest)
    @help_window = Window_VarySizeHelp.new
    @help_window.y = Graphics.height - @help_window.height
    @help_window.set_text ('Use Horizontal Arrow Keys to change categories', 1)
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @label_window.dispose
    @category_window.dispose
    @list_window.dispose
    @info_window.dispose
    @help_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    # Since the only possible activity is from @list_window, put it here
    @list_window.update
    if Input.trigger?(Input::B) # If Button B is pressed
      Sound.play_cancel
      $scene = Scene_Menu.new
      # If Returning to Menu
#~       if $game_system.quest_menuaccess
#~         $scene = Scene_Menu.new('Quests')
#~       else # Returning to Map
#~         $scene = Scene_Menu.new
#~       end
    elsif Input.trigger? (Input::C) # If C button is pressed
      # Open Journal (eventually)
    elsif Input.trigger? (Input::LEFT) # If Left direction pressed
      # Play Cursor SE
      Sound.play_cursor
      # Refresh Category Window
      @category_index = (@category_index - 1) % 4
      @category_window.refresh (@category_index)
      @list_window.refresh (@category_index)
      @info_window.refresh (@list_window.quest)
    elsif Input.trigger? (Input::RIGHT) # If Right direction pressed
      # Play Cursor SE
      Sound.play_cursor
      # Refresh Category Window
      @category_index = (@category_index + 1) % 4
      @category_window.refresh (@category_index)
      @list_window.refresh (@category_index)
      @info_window.refresh (@list_window.quest)
    # If scrolling through quests
    elsif Input.trigger? (Input::DOWN) || Input.trigger? (Input::UP)
      # Refresh Info Window
      @info_window.refresh (@list_window.quest)
    end
  end
end
Title: Re: Quest Journal v. 1.1
Post by: Mitsarugi on January 18, 2011, 10:27:10 PM

1rst part:
Code: [Select]
#==============================================================================
#  Quest Journal
#  Version: 1.1
#  Author: modern algebra (rmrk.net)
#  Date: March 24, 2008
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Description:
#      Basically, this script is an objective based quest log that allows the
#    user to make quests and reveal them to the characters through specified
#    script calls. It is objective based, meaning that you advance the quest
#    by having the player complete objectives and you can choose when to reveal
#    these objectives and when to set them as complete or as failed. That being
#    said, this script does not build quests, it more or less gives you a
#    graphical interface for showing quest progress. It does run by script
#    call, and so read the instructions carefully if you want to use this script
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Instructions:
#      Basically, set up all of your quests in the module below. The Constants
#    section is annotated, so read the comments near them to determine what you
#    should set these constants to. As you can see, they are filled in with
#    default values currently, and so that should give you an idea of what to
#    do.
#
#      Setting up quests can be a little bit harder. You will have to set one
#    of these up for every quest that you want represented in the scene. Refer
#    to the editable region inside the class Quest for further instructions
#
#      Once they are setup, you can activate them at any time in the game by
#    this code:
#
#      $game_party.quests[quest_id]
#
#    There are several methods you can call that are of relevance. Namely:
#
#        $game_party.quests[quest_id].reveal_objective (objective_id)
#        $game_party.quests[quest_id].conceal_objective (objective_id)
#        $game_party.quests[quest_id].complete_objective (objective_id)
#        $game_party.quests[quest_id].uncomplete_objective (objective_id)
#        $game_party.quests[quest_id].fail_objective (objective_id)
#        $game_party.quests[quest_id].unfail_objective (objective_id)
#        $game_party.quests[quest_id].complete?
#        $game_party.quests[quest_id].failed?
#        $game_party.quests[quest_id].reward_given = true/false
#        $game_party.quests[quest_id].concealed = true/false
#        $game_party.quests.remove (quest_id)
#
#   
#   
#    -reveal_objective :naturally allows the specified objective to appear in the Quest Journal for browsing
#    by the user.
#    -complete_objective :notes when an objective is complete.
#    -fail_objective :notes when the player has done something that fails this
#    objective.
#    -complete? :returns true if all primary objectives have been
#    completed.
#    -failed? :returns true if any primary objective has been
#    failed.
#    -reward_given :serves the function of a switch. You should
#    essentially make the reward event look like this:
#
#      @> Conditional Branch: Script: $game_party.quests[quest_id].complete?
#        @> Conditional Branch: Script: $game_party.quests[quest_id].reward_given
#          @> ...Thank you or whatever you want the event to say once the reward has been given
#        @> Else
#          @> ...Give Reward
#          @> Script: $game_party.quests[quest_id].reward_given = true
#        @> Branch End
#      @> Branch End
#
#     Later versions of this script will have an auto-reward system and also a
#     Journal to which the player can write notes.
#
#     You can also disable access to the Quest Log at any time with the code:
#       $game_system.quest_disabled = true
#
#     And you can change how it is accessed with the codes:
#     
#       $game_system.quest_keyaccess = true / false  # ON MAP
#       $game_system.quest_menuaccess = true / false # IN MENU
#
#     Also, in a message, \nq[quest_id] will retrieve the name of a quest and
#     print it in a message
#================================================================================
# *** Quest Data
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This is the configuration class for the Quest Journal
#================================================================================

module ModAlg_QuestData
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Constants
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Editable Region
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  QUESTS_LABEL = 'Quests'        # What you want Quests to be called (eg. 'Missions')
  ACTIVE_QUEST_ICON = 149        # What icon signifies a quest is active
  COMPLETE_QUEST_ICON = 150      # What icon signifies a quest is complete
  FAILED_QUEST_ICON = 179        # What icon signifies a quest is failed
  BULLET_CHARACTER = '?'         # The character used for listing objectives
  ACTIVE_COLOUR = 0              # The colour of a quest that is active
  COMPLETE_COLOUR = 11           # The colour of a quest that is complete
  FAILED_COLOUR = 18             # The colour of a quest that is failed
  MENU_ACCESS = true             # Can the script be accessed through the menu?
  MENU_INDEX = 4                 # If above is true, where in the command window?
  KEY_ACCESS = false             # Can the quest log be accessed by a key         
  MAPKEY_BUTTON = Input::L       # If above is true, which button?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Quest Data
  #----------------------------------------------------------------------------
  #  Returns skeleton data for the quesr
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def self.quest_data (id)
    # Set class variables to corresponding arguments
    objectives = []
    name = '??????'
    description = '??????????'
    icon_index = 0
    case id
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * EDITABLE REGION
    #------------------------------------------------------------------------
    #  To set up a quest, first identify it with an ID - this can be anything
    #  as long as it is not the same as another quest, but it is important to
    #  remember this ID as it is the only way to access your quest.
    #    In any case, the format for setting up a quest is:
    #
    #      when <quest_id> # Give the quest an ID number
    #        name = '<quest_name>'
    #        description = '<quest_description>'
    #        objectives[0] = '<first_objective>'
    #        ...
    #        objectives[n] = '<nth objective>'
    #        prime = [<objective_id>, ..., <objective_id>]
    #        icon_index = <quest_icon_index>
    #
    #    Each of these values have an importance.
    #      name is the name of the quest
    #      description is a small blurb explaining the overall goal of the quest
    #      objective[0..n] are short-term goals that lead to the overall goal
    #      primes are which objectives need to be complete before the quest is
    #        considered to be complete
    #      icon_index is the icon that represents the quest
    #
    #    Note that any of the above values can be omitted without throwing an
    #    error, but for the quest to work properly you should at least set the
    #    name, description, and objectives. If you do omit these, the default
    #    values are:
    #   
    #      name = '??????'
    #      description = '??????????'
    #      objectives = []
    #      prime = [all objectives]
    #      icon_index = 0
    #
    #   If you do want to require that all objectives must be satisfied before
    #   the quest is complete, then do not bother defining it. Otherwise, be
    #   sure to set it.
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    when 1 # Fetch
      name = 'Fetch'
      description = 'Martha needs someone to play with her dog'
      objectives[0] = 'Find a stick'
      objectives[1] = 'Throw the stick to the dog'
      objectives[2] = 'Retrieve the stick from the dog'
      icon_index = 79
      location = 'Yeah it works!!'
      when 2 #clock key
        name = "Clock key"
        description ="The item shop keeper is going nuts because of his clock, he would like to turn it off, but he doesn't seem to be able to find the key."
        objectives[0] ="Find out where the key could be"
        objectives[1] ="Find something to dig"
        objectives[2] ="Dig to find the key"
        objectives[3] ="Return to the item shop keeper to hand him over the key"
        objectives[4] ="Turn of the clock for the item shop keeper"
        icon_index = 80
        prime = [0,2]
      when 3 #
#~         name = ""
#~         description =""
#~         objectives[0] =""
#~         objectives[1] =""
#~         objectives[2] =""
#~         objectives[3] =""
#~         objectives[4] =""
#~         icon_index =
#~         prime = [] 
      when 4 # Cat Retrieval
      name = 'Cat Retrieval'
      description = 'Mrs.Bunderby has lost her cat, and she has employed you to find it.'
      objectives[0] = 'Find the lost cat'
      objectives[1] = 'Find a way to get to the cat'
      objectives[2] = 'Climb the tree and retrieve the cat'
      objectives[3] = "Return a cat to Mrs. Bunderby"
      # Set prime objectives in an array based on index
      prime = [0, 2]
      icon_index = 137
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * END EDITABLE REGION
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    end
    return name, description, objectives, prime, icon_index, location
  end
 
  #============================================================================
  # ** Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #  Holds in-game data for a quest
  #============================================================================

  class Quest
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Public Instance Variables
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    attr_reader   :name                # The name of the quest
    attr_reader   :id                  # The ID in $game_party.quests
    attr_reader   :description         # A blurb explaining the quest
    attr_reader   :objectives          # An array of strings holding objectives
    attr_reader   :prime_objectives    # An array of crucial objectives
    attr_reader   :icon_index          # The Icon associated with this quest
    attr_reader   :revealed_objectives # An array of revealed objectives
    attr_reader   :complete_objectives # An array of completed objectives
    attr_reader   :failed_objectives   # An array of failed objectives
    attr_accessor :reward_given        # A switch to ensure only one reward given
    attr_accessor :concealed           # A switch to show or not show the quest
    attr_reader   :location
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Object Initialization
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def initialize (id)
      @id = id
      # Set class variables to corresponding arguments
      @name, @description, @objectives, prime, @icon_index, @location = ModAlg_QuestData.quest_data (id)
      # If no primary objectives are specified
      if prime.nil?
        # All objectives become primary
        prime = []
        for i in 0...@objectives.size
          prime.push (i)
        end
      end
      @prime_objectives = prime
      # Initialize non-public arrays
      @revealed_objectives = []
      @complete_objectives = []
      @failed_objectives = []
      @reward_given = false
      @concealed = false
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Reveal Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def reveal_objective (index)
      return if index >= @objectives.size
      # Add to revealed objectives
      @revealed_objectives |= [index]
      # Sort from lowest index to highest index
      @revealed_objectives.sort!
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Conceal Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def conceal_objective (index)
      @revealed_objectives.delete (index)
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Complete Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def complete_objective (index)
      return if index >= @objectives.size
      # If the objective is failed, you cannot complete it.
      return if @failed_objectives.include? (index)
      # Reveal the objective if it was not previously revealed
      reveal_objective (index) unless @revealed_objectives.include? (index)
      # Add to complete objectives
      @complete_objectives |= [index]
      # Sort from lowest index to highest index
      @complete_objectives.sort!
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Uncomplete Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def uncomplete_objective (index)
      @complete_objectives.delete (index)
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Fail Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def fail_objective (index)
      return if index >= @objectives.size
      # Reveal the objective if it has not yet been revealed
      reveal_objective (index) unless @revealed_objectives.include? (index)
      # Add to revealed objectives
      @failed_objectives |= [index]
      # Sort from lowest index to highest index
      @failed_objectives.sort!
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Unfail Objective
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def unfail_objective (index)
      @failed_objectives.delete (index)
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Complete?
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def complete?
      # Check if all prime objectives have been completed
      return (@complete_objectives & @prime_objectives) == @prime_objectives
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Failed?
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def failed?
      # Check if any prime objectives have been failed
      return (@failed_objectives & @prime_objectives) != []
    end
  end
end

#==============================================================================
# ** Ellipse
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Stores an ellipse object.
#==============================================================================

class Ellipse
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :a # The width of the oval
  attr_reader   :b # The Height of the oval
  attr_reader   :x # the top left x position
  attr_reader   :y # the top left y position
  attr_reader   :h # The x position of the origin
  attr_reader   :k # The y position of the origin
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #     x : the top left x position
  #     y : the top left y position
  #     a : the width of oval from origin to the side
  #     b : the height of oval from origin. If nil, then a is radius of circle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize (x, y, a, b = nil)
    @x = x
    @y = y
    @a = a
    @b = b.nil? ? a : b
    @h = x + a
    @k = y + @b
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Within?
  #    x : the x coordinate being tested
  #    y : the y coordinate being tested
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def within? (x, y)
    x_square = ((x - @h)*(x - @h)).to_f / (@a*@a)
    y_square = ((y - @k)*(y - @k)).to_f / (@b*@b)
    # If "radius" <= 1, then it must be within the ellipse
    return (x_square + y_square) <= 1
  end
end

#==============================================================================
# ** Bitmap
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This adds the methods fill_ellipse, outline_ellipse, and fill_rounded_rect
#==============================================================================

class Bitmap
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Outline Ellipse
  #    ellipse : the ellipse being drawn
  #    width   : the width of the bar
  #    colour  : the colour of the outline
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def outline_ellipse (ellipse, colour = font.color, width = 1, steps = 0)
    # For neatness, define local variables a and b to the ellipse variables
    a, b = ellipse.a, ellipse.b
    # Use Ramanujan's approximation of the Circumference of an ellipse
    steps = Math::PI*(3*(a + b) - Math.sqrt((3*a + b)*(a + 3*b))) if steps == 0
    radian_modifier = (2*Math::PI) / steps
    for i in 0...steps
      t = (radian_modifier*i) % (2*Math::PI)
      # Expressed parametrically:
      #   x = h + acos(t), y = k + bsin(t) : where t ranges from 0 to 2pi
      x = (ellipse.h + (a*Math.cos(t)))
      y = (ellipse.k + (b*Math.sin(t)))
      set_pixel (x, y, colour)
    end
    # Thicken the line
    if width > 1
      ellipse = Ellipse.new (ellipse.x + 1, ellipse.y + 1, ellipse.a - 1, ellipse.b - 1)
      outline_ellipse (ellipse, colour, width - 1, steps)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Fill Ellipse
  #    ellipse : the ellipse being drawn
  #    colour  : the colour of the outline
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def fill_ellipse (ellipse, colour = font.color, steps = 0)
    # For neatness, define local variables a and b to the ellipse variables
    a, b = ellipse.a, ellipse.b
    # Use Ramanujan's approximation of the Circumference of an ellipse
    steps = Math::PI*(3*(a + b) - Math.sqrt((3*a + b)*(a + 3*b))) if steps == 0
    radian_modifier = (2*Math::PI) / steps
    for i in 0...(steps / 2)
      t = (radian_modifier*i) % (2*Math::PI)
      # Expressed parametrically:
      #   x = h + acos(t), y = k + bsin(t) : where t ranges from 0 to 2pi
      x = ellipse.h + (a*Math.cos(t))
      y = ellipse.k - (b*Math.sin(t))
      fill_rect (x, y, 1, 2*(ellipse.k - y), colour)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Fill Rounded Rectangle
  #    rect    : the rectangle being drawn
  #    colour  : the colour of the outline
  #    w       : the number of pixels to cover by rounding
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #  Used to fill a rectangle with rounded corners
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def fill_rounded_rect (rect, colour = font.color, w = 8)
    # Draw Body of the rectangle
    fill_rect (rect.x + w, rect.y, rect.width - 2*w, rect.height, colour)
    # Draw Left Vertical Rect
    fill_rect (rect.x, rect.y + w, w, rect.height - 2*w, colour)
    # Draw Right Vertical Rect
    x = rect.x + rect.width - w
    fill_rect (x, rect.y + w, w, rect.height - 2*w, colour)
    # Make a circle
    circle = Ellipse.new (0, 0, w)
    for i in 0...w
      for j in 0...w
        # Upper Left Corner
        set_pixel (rect.x + i, rect.y + j, colour) if circle.within? (i, j)
        # Upper Right Corner
        set_pixel (rect.x + rect.width - w + i, rect.y + j, colour) if circle.within? (i + w, j)
        # Bottom Left Corner
        set_pixel (rect.x + i, rect.y + rect.height - w + j, colour) if circle.within? (i, j + w)
        # Bottom Right Corner
        set_pixel (rect.x + rect.width - w + i, rect.y + rect.height - w + j, colour) if circle.within? (i + w, j + w)
      end
    end
  end
end

#==============================================================================
# ** Window_VarySizeHelp
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This window is the same as Window_Help, but with variable size
#==============================================================================

class Window_VarySizeHelp < Window_Help
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize (h_x = 0, h_y = 0, h_width = Graphics.width, h_height = WLH + 32)
    super ()
    self.x, self.y, self.width, self.height = h_x, h_y, h_width, h_height
    contents.dispose
    self.contents = Bitmap.new (h_width - 32, h_height - 32)
  end
end

#==============================================================================
# ** Game_System
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new instance variables - quest_disabled, quest_keyaccess
#    aliased method - initialize
#==============================================================================

class Game_System
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :quest_disabled   # Can you access quest journal at this time
  attr_accessor :quest_keyaccess  # Is it accessible by key?
  attr_accessor :quest_menuaccess # Is it accessible through the menu
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_qst_jrnl_system_init_quests initialize
  def initialize
    # Run Original Method
    modalg_qst_jrnl_system_init_quests
    # Initialize new variables
    @quest_disabled = false
    @quest_keyaccess = ModAlg_QuestData::KEY_ACCESS
    @quest_menuaccess = ModAlg_QuestData::MENU_ACCESS
  end
end
Title: Can't Find script!! D:
Post by: BladesOfHades on January 25, 2011, 05:21:36 PM
Ive been looking in the post for a link to the demo and I can't find it. Btw modern your scripts are god! :D but I still can't find it. Just if you can help please.

EDIT:// OMG! I am so blind. Ehh. Found the script but demo would still be good :)
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on January 25, 2011, 06:20:44 PM
At the very bottom of the first post, there are two links - one to the demo and one to the script. Here it is: http://rmrk.net/index.php?action=dlattach;topic=25533.0;attach=11274

It is a pretty minimal demo though. Not sure how much it helps people.
Title: Re: Quest Journal v. 1.1
Post by: BladesOfHades on January 25, 2011, 06:32:25 PM
:D and its a RAR file THank you THank you Thank you!! You are the Best haha
Title: Re: Quest Journal v. 1.1
Post by: Bravo2Kilo on February 12, 2011, 12:37:57 AM
is there a way to call the quest journal through an item instead of the menu
ive tried setting up common event that the item calls and the common event says this
$scene = Scene_Quest.new
but it doesn't work i keep getting this error
Script 'Window_Base' line 158:NoMethodError occured.  undefined method ' for [1]:Array
can someone please help
Title: Re: Quest Journal v. 1.1
Post by: Zazomei on February 14, 2011, 09:04:58 AM
Hi Modern Algebra, I've recently downloaded this script, and the paragraph formatter as well, I've done everything perfectly and have looked at both the demo and other sites for help. I've tried finding other people with my same problem but to no avail. It seems that when I use the complete_objective command script my game crashes and an error pops up that says "Argument Error occurred while running script. Wrong number of arguments(0 for 1)."
I have tried everything, and the wierd thing is one objective does complete, but every other one doesn't. I've spent hours now trying to find something I've done wrong but nothing seems to work. i would really appreciate help i love your scripts and i would like this one to work. I see this thread is old but i wasn't sure where else to post it, thanks for your time!
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on February 14, 2011, 02:06:01 PM
Show me exactly what you put in the call script. And note that it should have an argument, so not just complete_objective, but complete_objective (a), where a is the ID of the objective you are completing.

If I had to take a guess, you have the same problem as identified and answered earlier:

Well, it means a method was called and an argument that had to be passed to it wasn't. Since there's no line number, then that means it happened while running a call script? If so, show me what you have in the call script where that error happens.

(If I had to take a guess though, I would say it might be that a line was split into two when putting it in, so you have something like:
Code: [Select]
$game_party.quests[1].reveal_objective
(0)

a line like that would cause an error - if that is the problem, you can fix it by splitting it at a better point, like the following:

Code: [Select]
q = $game_party.quests[1]
q.reveal_objective (0)
)
Title: Re: Quest Journal v. 1.1
Post by: Mitsarugi on February 24, 2011, 10:09:58 AM
i'm making a nice add-on for your script , it's an quest acception window 80% done tho :p

when you talk to an NPC it opens a window that tells the details and you can choose to accept it or not :)
+ i added the location to your script (hard to find back NPC otherwise)
Title: Re: Quest Journal v. 1.1
Post by: rofl1337 on March 01, 2011, 07:51:15 PM
hey, modern algebra
if you ever update the script again, could you add a feature that lets the user set a quest that calls a common event on completion?
That would add several interesting possiblities, such as adding custom rewards or letting the player choose how he wants to progress.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on March 01, 2011, 10:12:15 PM
Err, well given that the quest only completes due to the custom action of the game creator, I fail to see how it would serve any purpose. Ie. you can do that already by just putting the common event call in the event(s) where you finish the quest.

Besides, I don't think I'll ever update this script.
Title: Re: Quest Journal v. 1.1
Post by: IXFURU on March 13, 2011, 12:39:51 PM
Modern Sir, I'm getting an error.

I was trying to invent a common event journal at first, but gave up on the idea and am currently trying to put this script into my game to replace it.  I'm fairly certain I've set up the script right.  So, it must be some sort of compatability problem between this script and another one.  Here's the Error:

NoMethodError occured
undefined method 'quest' for #<Game_Party:0x9ce2e08>

And before you ask, I've taken the liberty of creating this link to where my project can be found, so you can take  a look at it.  There are many scripts in it after all, including several which customize the Menu.  I know from reading this entire topic that this can cause issues.

Here's the link:
http://www.megaupload.com/?d=QURNVWX1

IMPORTANT:
I got it temporarily set up so that you start in a place AFTER the initial intro cutscene.  This will save you some time if you wanted to playtest it.  Just make sure you F9 and turn the switch called "BadNews10" #89 ON to bring up the initializing of the JOURNAL.  What happens here are a number of quests are open upon the player starting the actual gameplay (through an Autorun event).  The event tied to the initializing is on map "HOME" in the middle along the southern wall. 
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on March 13, 2011, 05:17:46 PM
Well, it says that it is temporarily unavailable, but if you have accurately copied out the error message then the problem is you forgot to pluralize quest.

It's $game_party.quests, not $game_party.quest
Title: Re: Quest Journal v. 1.1
Post by: IXFURU on March 13, 2011, 06:38:52 PM
Modern! 

Once again, you are correct.  I actually got another similar error after fixing that one.  I had made "objectives", "objective".

As always I appreciate it!  Love the script.
Title: Re: Quest Journal v. 1.1
Post by: IXFURU on March 22, 2011, 09:40:10 PM
I don't know if this constitutes a double post.  But, I wanted you to know I'd responded, and if I just edit the last post, I'm not sure it you would be able to notice.  So. . .

Modern, I've read this post and saw where you didn't want to make the objectives scrollable.  So, I was wondering, to your knowledge, has anyone else modified your script that way?  I really need it to scroll.  I use it not only to store quests, but also information on specific topics.  Stuff the player should be able to access, once he/she has learned it,  at any time.  I tried the idea of making fonts smaller and closing the gap between the objectives (the latter with which  I had an overlapping problem!)   Anyway, I was just wondering.  And if you don't know of such a modification, what would be the keys to implementing the idea myself?
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on March 22, 2011, 11:39:15 PM
I on't know of any such modification - it would certainly be easy to do though. Essentially, all you'd need to do is make it so that the refresh method for the quest details window not only clears the contents but calculates how much room is needed and make the contents Bitmap large enough to accomodate that. After that, it is a simple matter of checking if Up or Down are pressed and changing the oy of the window accordingly. You would also need to introduce into the update method a simple check for whether Button C (Enter) was pressed. If so, play decision and turn on whatever you will have that makes the quest details window active and the list window inactive.
Title: Re: Quest Journal v. 1.1
Post by: kitten2021 on April 03, 2011, 09:05:00 PM
I know this might seem a simple fix, but I've even removed the script and re-added it to clear up anything that I might have done to the script. I get a different error almost every time I run my game and its directly related to the Quest Log... Maybe I'm just not understanding it, or maybe I'm just typing it up wrong in the script, I have no clue, but its becoming frustrating... -.-'

When I added a quest to the script, I get an error that talks about the Prime. I only want there to be one Quest objective, but it wont accept it until I add a second quest objective.

Code: [Select]
    when 0001
      name = 'Mission Report Delivery'
      description = 'Deliver the Mission Report on the scouting mission that was performed against Kalic Von Sonne to Captain Rhyes.'
      objective[0] = 'Pick up Mission Report'
      objectives[1] = 'Deliver Mission Report to Captain Rhyes'
      prime = [0,1]
      icon_index = 141

After I have done this, I tried to get it to run in the game, and instead I get the following error:

http://rpgmaker.net/media/content/users/4763/locker/MAs_QuestJournal_ObjectiveError.png

But this is all I have set up in my Event to start the quest:

Code: [Select]
$game_party.quests[0001].concealed = false
$game_party.quests[0001].uncomplete_objectiv
e (0)

This is probably something I'm just doing wrong, but again, I'm just confused...  :'(

Thanks for any help you guys can offer~
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 03, 2011, 09:25:56 PM
Well, firstly, don't put the leading 0s as it is unnecessary and it tells the interpreter to use a different base. Just put 1, not 0001.

Secondly, you have it there as objective[0]; it has to be objectives[0]. You forgot the plural, which is probably why you were encountering a problem with prime, since you didn't have any objectives. That is also why you had the error with objective being an undefined local variable.

Thirdly, when using call scripts, each line is interpreted separately and so you can't let them divide like that. So, instead of:

Code: [Select]
$game_party.quests[0001].uncomplete_objectiv
e (0)

do:

Code: [Select]
q = $game_party.quests[1]
q.uncomplete_objective (0)
Title: Re: Quest Journal v. 1.1
Post by: kitten2021 on April 03, 2011, 10:00:20 PM
Well, firstly, don't put the leading 0s as it is unnecessary and it tells the interpreter to use a different base. Just put 1, not 0001.

OK, fixed that one; didn't realize it would cause an issue doing that... Thanks.

Secondly, you have it there as objective[0]; it has to be objectives[0]. You forgot the plural, which is probably why you were encountering a problem with prime, since you didn't have any objectives.

I did this, and figured out what you were talking about... Thank you very much for clearing that one up. :)
Now, when I open the game and play it though, this is what I see with the Quest Info:

(http://rpgmaker.net/media/content/users/4763/locker/MAs_QuestJournal_QuestObjective_NotThere.png)
(Sorry, I tried to hide it under a "Show" button, but I couldn't figure out how to do that...) :(

Code: [Select]
q = $game_party.quests[1]
q.uncomplete_objective (0)

Will this work the same way if I do:

Code: [Select]
q.complete? (0)

Or am I looking at this wrong? As far as I see it in the script, it says to place down the "complete?" code and then it would check to see if all the objectives are completed then that would end the quest... Or am I not reading it right again...?    -.-'
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 03, 2011, 10:27:39 PM
Yeah, well you need to reveal the objective in order for it to show up in the Quest Journal.

Secondly, yes q.complete? would work, but you'd need to put the q = $game_party.quests[1] above it everytime you wanted to refer back to the quest as q. Since you would normally only need to check complete? if in a Conditional Branch, just write out the whole thing as $game_party.quests[1].complete?
Title: Re: Quest Journal v. 1.1
Post by: kitten2021 on April 04, 2011, 12:09:39 AM
You are amazing, MA... Thank you so very much for walking me through this problem. :)
Title: Re: Quest Journal v. 1.1
Post by: game_guy on April 05, 2011, 06:13:40 AM
MA, I had an idea I wanted to do for my new config. For the color options, I wanted to let the user choose from a color picker. But seeing you're option is based from a window skin it makes it a tad bit difficult. So I had an idea for a modification you could do.

In the script, check to see if the option is a number or a color.
Code: [Select]
if color.is_a?(Color)
elsif color.is_a?(Numeric)
end

And in my config, users would be able to use window skin colors or a color picker.

Also shoulda mentioned this in the config post but I'm planning on creating a system where it will load your icon sheet and you can choose the icon. Visual icon viewer FTW! Same thing with the color, it'll most likely load the window skin up and let you choose which color.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 05, 2011, 02:41:03 PM
Yeah, that's a good idea. I have done that for my newer scripts, though I usually use it as an array rather than a color object. I really should update this Quest Journal to v. 2 but I won't be able to until exams are over on the 21. But once that is done, I will update this script and the ATS and will include that feature.
Title: Re: Quest Journal v. 1.1
Post by: Nakuto Inaru on April 18, 2011, 12:48:35 AM
I've been using game_guy's Quest Journal Config and i'm not too sure on how to create a quest. He told me to refer to this thread for help. I know i'm supposed to replace the script with the one I made in his program, but I don't know how to continue on and make the quest via eventing. Is GG's config supposed to take away all the scripting put into events or just reduce them? Help soon always appreciated. ;D
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 18, 2011, 02:04:54 AM
Not supposed to do anything to the evented stuff. All the instructions are in the script and I can't really explain it better in a general way than I did there. If you have a more specific question then maybe I can help. For instance, if you wanted to know how to reveal a new objective, then I could say use this code:

Code: [Select]
$game_party.quests[quest_id].reveal_objective (objective_id)

and this code to complete the objective:

Code: [Select]
$game_party.quests[quest_id].complete_objective (objective_id)

But all of that is spelled out in the script and I have no idea how I could better help you in a general way than I did in the script itself.
Title: Re: Quest Journal v. 1.1
Post by: game_guy on April 30, 2011, 06:24:59 PM
I've just released the brand new config app for this script. Check it out! :)
http://rmrk.net/index.php/topic,38995.msg452927.html#msg452927

EDIT:
MA, if I may request, after you release 2.0, you should still keep 1.1 in your first post as well. As the new features in 2.0 look great and stuff, I still like the simplicity of 1.1 and I'm sure a few others agree as well. Just a suggestion.
Title: Re: Quest Journal v. 1.1
Post by: modern algebra on April 30, 2011, 07:11:51 PM
I intend to keep it up, if for no other reason than that it has over 4000 downloads and my pride won't let me delete that record :P But yeah, the changes in 2.0 are mostly superficial but the configuration became pretty unwieldy; I can certainly see why some people would want to stick with 1.1

The new config tool looks awesome!
Title: Re: Quest Journal v. 2.0
Post by: modern algebra on May 01, 2011, 08:45:39 PM
As promised, I have now released 2.0. You can find the script here (http://pastebin.com/XX3SMtJK) and I have attached a demo to the first post here (http://rmrk.net/index.php?action=dlattach;topic=25533.0;attach=23391). Enjoy and help me out by giving feedback.

Version 1.1 is still up and supported for anyone who encounters any problems using that. I will help you out.

For people already using 1.1 and wanting to convert their projects to the new Quest Journal 2.0, you don't have to TOTALLY restart making all of your quests. Just go to line 392 and replace the when branches there with the ones you made for 1.1. Then, if you wanted to make use of the new features like rewards, you can add those lines. Otherwise, the quests you setup will look and operate exactly like they did in 1.1. Similarly, all of the old commands, like $game_party.quests[id].reveal_objective (y) still work, so you won't need to go changing every event you ever used it for. But there are easier ways to do it now.
Title: Re: Quest Journal v. 2.0
Post by: game_guy on May 02, 2011, 02:04:21 AM
And bam, I've got the base design for the 2.0 config app done <3
Title: Re: Quest Journal v. 2.0
Post by: modern algebra on May 02, 2011, 04:13:14 AM
Sweet! You're fast.
Title: Re: Quest Journal v. 2.0
Post by: pacdiggity on May 02, 2011, 12:51:31 PM
That's incredible G_G.
And amazing work, MA. You keep me motivated.
(Your scripting is fucking magic.)
Title: Re: Quest Journal v. 2.0
Post by: modern algebra on May 03, 2011, 05:38:45 AM
I'm glad you like it. I'm a little worried that the number of settings might be daunting and will not really be used, but hopefully that is not the case. Just remember folks, the only things you need to create are the quests - changing any of the settings is purely optional as the script works fine without modifying those at all. If you are happy without the new features, you don't have to touch them.
Title: Re: Quest Journal v. 2.0
Post by: Jensen on May 05, 2011, 09:52:14 PM
Yo!

First off: this is the best Quest Script out there, all categories. Loving it.

Buuuut... I´ve got two little problems. Probably I´m the cause somehow, but I can´t seem to figure it out myself, so I need some help.

(http://i51.tinypic.com/eqtrpv.png)

1. The text is getting cut off.


I´ve got all necessary scripts. Above the Full HP/MP when lvl up script are the default VX scripts. Below your Bitmap Addons are Yanfly´s Melody System. That´s the only scripts I´m using. Any ideas? This happend to Quest Journal 1.1 in an old project of mine btw, even though I used Paragraph Formatter there too...

(http://i55.tinypic.com/2vnf7r8.png)

===========================================================

2. It´s says it is compatible with Melody Menu System, but I had to put the Quests in the menu manually, via the Common Event future in Melody Menu. The compatibility between those two systems should be plug and play, yes?



EDIT: Need to stress that this is a really good script and I really like most of your work, Modern! You´re keeping lots of game making nerds happy!
Title: Re: Quest Journal v. 2.0
Post by: modern algebra on May 05, 2011, 10:42:18 PM
1. That is annoying. The problem is that the Paragraph Formatter relies on the text_size method of Bitmap, but that method is inaccurate for some fonts. It's a tough problem to fix as it needs to be tailored to specific fonts and/or characters. At one time I had developed a script which allowed you to choose a font and then generate a script to fix it by manually tweaking the value returned for each character, but I stopped for some reason. I will see if I can't go back and finish that. In the meantime, could you send me the font you are using? (Also, you can use "\n" (just one \, not \\) to manually break the line since you are using Special Codes Formatter, but that is not a permanent solution. I will fix it for you either with the generator or otherwise). Also, your post made me decide to repost the script. I added a feature that allows you to turn off the text justification (making the text fit the line) - that will probably solve the font issue in most cases. Again though, I will make you a real fix once you send me the font.

2. To be compatible with Main Menu Melody, it needs to be underneath Main Menu Melody in the order. I probably should have made that more clear, but if you were to do that there would be no reason to manually add it. That said, aside from convenience, the only difference between manually adding it and not is that if it were automatically added then the change_quest_access code will work. If you manually add it, you need to assign switches to perform those functions.
Title: Re: Quest Journal v. 2.0a
Post by: game_guy on May 06, 2011, 01:17:53 AM
Hey MA, you wouldn't mind if I redid my quest system to basically kind of follow yours would you? I wouldn't be using your code, but mostly just the features and configuration you offer.
Title: Re: Quest Journal v. 2.0a
Post by: modern algebra on May 06, 2011, 01:22:45 AM
Not at all. Have fun with it!
Title: Re: Quest Journal v. 2.0a
Post by: yuyu! on May 06, 2011, 01:27:52 AM
Let me take the time to say... that demo was adorable. :) Who knew Ralph could have such a soft-side?
Title: Re: Quest Journal v. 2.0a
Post by: Mitsarugi on May 07, 2011, 12:20:23 PM
Modern Algebra i see you added many fonctions to your script and i was wondering if you could please add some fonctions for me like an add-on?
a fonction to show the clients location and the clients name would be handy, don't you think so?
so we know at least who and where the quest came from :)
Title: Re: Quest Journal v. 2.0a
Post by: LoganF on May 07, 2011, 01:05:01 PM
I wrote up such an add-on for the previous version, though unreleased anywhere as it is unfinished. It added a few features:

- client location/name
- quest level (to give details on the battle difficulty of the area you'd be going to)
- rewards list, including money earned and items you'd receive

This was written at time when I was learning to script, so I ended up butchering MA's original script (Sorry about that) and made a number of changes as a means of learning, but if he doesn't (or doesn't want to) make such a thing, I'll happily work on a conversion (and use better coding practices) to expand it.

My add-on also provided a front-end to selecting and activating quests because my particular game is/was (not sure yet) going to provide a kind of quest board for you to choose the quest(s) to complete.

Some screenshots of said extras:
Spoiler for:
(http://i671.photobucket.com/albums/vv73/Tohme_Rhiazanho/MAQJadd1.jpg)
First page: client details and quest summary

(http://i671.photobucket.com/albums/vv73/Tohme_Rhiazanho/MAQJadd2.jpg)
Second page: quest objectives

(http://i671.photobucket.com/albums/vv73/Tohme_Rhiazanho/MAQJadd3.jpg)
Third page: For the rewards, the icons mean (in order): exp, money, items.

Also happy to make it any specific requirements too.
Title: Re: Quest Journal v. 2.0a
Post by: Mitsarugi on May 07, 2011, 03:32:24 PM
I wrote up such an add-on for the previous version, though unreleased anywhere as it is unfinished. It added a few features:

- client location/name
- quest level (to give details on the battle difficulty of the area you'd be going to)
- rewards list, including money earned and items you'd receive

This was written at time when I was learning to script, so I ended up butchering MA's original script (Sorry about that) and made a number of changes as a means of learning, but if he doesn't (or doesn't want to) make such a thing, I'll happily work on a conversion (and use better coding practices) to expand it.

My add-on also provided a front-end to selecting and activating quests because my particular game is/was (not sure yet) going to provide a kind of quest board for you to choose the quest(s) to complete.

Some screenshots of said extras:
Spoiler for:
(http://i671.photobucket.com/albums/vv73/Tohme_Rhiazanho/MAQJadd1.jpg)
First page: client details and quest summary

(http://i671.photobucket.com/albums/vv73/Tohme_Rhiazanho/MAQJadd2.jpg)
Second page: quest objectives

(http://i671.photobucket.com/albums/vv73/Tohme_Rhiazanho/MAQJadd3.jpg)
Third page: For the rewards, the icons mean (in order): exp, money, items.

Also happy to make it any specific requirements too.



O.O that is exactly what i ment

"activating quests because my particular game is/was (not sure yet) going to provide a kind of quest board for you to choose the quest(s) to complete."
and this is what i was trying to code O.O

could you share your add-on plz?
Title: Re: Quest Journal v. 2.0a
Post by: modern algebra on May 07, 2011, 10:47:18 PM
Well a couple of those features were added in 2.0. Categories are customizable, you can specify rewards to show, and you can call a scene to purchase quests with the call_quest_shop feature (you could even not show a price by making the cost -1 if you wanted it to just be a select feature, rather than costing money - I think that would give you the gold for getting it though).

That said, I think you should certainly release your addon though Logan if you're comfortable with it - I am still supporting 1.1 and the format you have looks like it's quite different stylistically with pages and all. The more options for people the better as far as I am concerned.

Anyway, it certainly wouldn't be hard to add a client/location or level feature either if you want them Mitsarugi. Where in the info window would you want it to show up? Would you want them to be together on the same line or one above the other?
Title: Re: Quest Journal v. 2.0a
Post by: LoganF on May 08, 2011, 12:08:24 AM
Well, I'd probably restart from an original version of 1.1 since, as I noted before, I kinda butchered the version I have what with the Quest Journal being by first dive into RGSS2 (though I'll probably still do a v2 add-on first).

I'll keep a post updated with progress though, for feedback sake.
Title: Re: Quest Journal v. 2.0a
Post by: Mitsarugi on May 08, 2011, 12:12:33 PM
Well, I'd probably restart from an original version of 1.1 since, as I noted before, I kinda butchered the version I have what with the Quest Journal being by first dive into RGSS2 (though I'll probably still do a v2 add-on first).

I'll keep a post updated with progress though, for feedback sake.

i think your version is quite complete or scrollable like 2.0 from modern algebra would be nice too.

example:
|  QUESTS  |                                  QUEST TITLE
(Catagories)                 |     
Quest 1                       |    Client:.............. Difficulty/Level:****
Quest 2                       |    ...................................................                               
Quest 3                       |    Reward:.................Location:...........   
etc...                          |              ..................               
                                 |    Quest Description:       
                                 |     ................................................
                                 |     ................................................
                                 |     ................................................
                                 |     Goal:
                                 |     1........................................................
                                 |     2........................................................
                                 |     etc...


example Quest board:

                                    QUEST TITLE
                                                     Difficulty/Level:****
Quest fee:..............Client:..............
........................................................(IMAGE)
Reward:.................Location:...........
...................................................
Quest Description:
................................................
................................................
................................................
................................................
Goal:
1........................................................
2........................................................
etc...
Accept ?
Yes.........No
Title: Re: Quest Journal v. 2.0a
Post by: lauronpegason on May 08, 2011, 03:13:13 PM
I've been waiting a long time for this!!! I'm so happy the new version is finally out! I like it even more than the previous one!
Unfortunately I have to report a compatibility issue with Dargor's Custom Commands... Quest Journal v. 1.1 caused the same bug before you solved it. You know I'm really bad at scripting, so I'll need your skills once more to fix this. If you can't remember, the thing is that whenever you opened the menu or went back to it, for some reason the label for Quests kept multiplying - which is kind of spooky :) Thanks very much in advance! Here (http://www.hbgames.org/forums/viewtopic.php?f=11&t=43211)'s the Script that causes the incompatibility.
Title: Re: Quest Journal v. 2.0a
Post by: modern algebra on May 08, 2011, 03:44:32 PM
Well, you could always just turn MENU_ACCESS off and add it manually to Dargor's Custom Commands.

I will add compatibility with it though, but I probably won't get started on it for a while as I will be entering a contest soon.

EDIT:: Err, meh - I'll do it soon.

@Mitsarugi -

I'm not going to change the order of the things already there and put rewards at the top since the way I did that in the script makes it a little difficult. It would be possible, but I don't really see a reason for that much customizability. I'm also not going to put the banner under the title/difficulty stuff since my main idea for including that banner was as a way for people to use that image to show whatever they want to start it off. IE. They could make an image that says the Quest Name, Client, and Difficulty level and have that at the top instead of the name.

But I like the arrangement you have for client name, difficulty level, and location and will add that as a possibility.

EDIT::
Well, maybe I'll add an option to configure the order. We'll see.
Title: Re: Quest Journal v. 2.0a
Post by: Mitsarugi on May 08, 2011, 07:44:55 PM
Well, you could always just turn MENU_ACCESS off and add it manually to Dargor's Custom Commands.

I will add compatibility with it though, but I probably won't get started on it for a while as I will be entering a contest soon.

EDIT:: Err, meh - I'll do it soon.

@Mitsarugi -

I'm not going to change the order of the things already there and put rewards at the top since the way I did that in the script makes it a little difficult. It would be possible, but I don't really see a reason for that much customizability. I'm also not going to put the banner under the title/difficulty stuff since my main idea for including that banner was as a way for people to use that image to show whatever they want to start it off. IE. They could make an image that says the Quest Name, Client, and Difficulty level and have that at the top instead of the name.

But I like the arrangement you have for client name, difficulty level, and location and will add that as a possibility.

EDIT::
Well, maybe I'll add an option to configure the order. We'll see.

thank you Modern Algebra ^^
Title: Re: Quest Journal v. 2.0a
Post by: Jensen on May 08, 2011, 08:14:14 PM
1. That is annoying. The problem is that the Paragraph Formatter relies on the text_size method of Bitmap, but that method is inaccurate for some fonts. It's a tough problem to fix as it needs to be tailored to specific fonts and/or characters. At one time I had developed a script which allowed you to choose a font and then generate a script to fix it by manually tweaking the value returned for each character, but I stopped for some reason. I will see if I can't go back and finish that. In the meantime, could you send me the font you are using? (Also, you can use "\n" (just one \, not \\) to manually break the line since you are using Special Codes Formatter, but that is not a permanent solution. I will fix it for you either with the generator or otherwise). Also, your post made me decide to repost the script. I added a feature that allows you to turn off the text justification (making the text fit the line) - that will probably solve the font issue in most cases. Again though, I will make you a real fix once you send me the font.

Hm, it should be the default RMVX font... But JUSTIFY_PARAGRAPHS = false worked fine, so no sweat.

2. To be compatible with Main Menu Melody, it needs to be underneath Main Menu Melody in the order.

Roger. I works now.
Title: Re: Quest Journal v. 2.0a
Post by: lauronpegason on May 09, 2011, 09:41:52 AM
While I wasn't able to resolve that compatibility issue by myself so far, I encountered a much smaller problem. I don't know if anybody else encountered this, but here's what I did.

If you create quests with only two objectives, and leave the "prime [ ]" blank, it should mean that all objectives are to be satisfied in order to complete that quest, but then, as soon as you reveal it you'll find the quest name on the left in the ":complete" colour, for some reason, rather than the ":active" colour (the objectives are instead in the right ":active" colour, just the name of the quest is wrong, but the quest will also appear under the ":complete" category, which is kind of confusing for a quest you've only just revealed).

I resolved this just by specifying that the latter objective had to be completed ("prime [1]"), which worked fine for me, as the second was simply consequent to the first.

Apart from all that, good luck for your contest and thanks again for this script!

EDIT: Mh, I guess I was doing it wrong: it works fine even omitting the "prime [0, 1, 2...]" completely. I thought that leaving it blank would be the same as omitting it, silly me :P So, in order to make it that all objectives need to be satisfied I have to rather omit the "prime [ ]" completely or to specify which objectives are to be met. Got it now :)
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on May 09, 2011, 05:36:57 PM
Yeah, sorry for not making that clear. I guess that is a change from 1.1.

Anyway, I have now released 2.1. You can get it at Pastebin (http://pastebin.com/XX3SMtJK) or from the demo (http://rmrk.net/index.php?action=dlattach;topic=25533.0;attach=23391).

It adds compatibility with Dargor's Custom Commands as well as functionality to show client, location, and level and reorder the information screen.

An ugly screenshot to show it:

(http://img809.imageshack.us/img809/4820/qj4.png)

Also, I'm glad you like it apart from these little hitches so far derk.
Title: Re: Quest Journal v. 2.1
Post by: hexgame on May 11, 2011, 08:27:27 AM
Nice, a new version! I love this script :)


I found an error though in your demo. When you return to Ralph with the seashells, you get this error.


Quote
??????NoMethodError ?????????

undefined method 'give_reward' for #<Game_Interpreter:0x2f54200>



As well as this error when you hit action once all quests are sold out in the quest shop.


Quote
?????'QJ2 - IMPLEMENTATION'? 1488 ??? NoMethodError ???????

undefined method 'cost' for nil:NilClass




Also, how would I go about adding little quest icons, such as "!"s and "?"s like in world of warcraft?
Title: Re: Quest Journal v. 2.1
Post by: lauronpegason on May 11, 2011, 08:49:30 AM
OK, if I'm not mistaken... instead of "give_reward (5)" it ought to be either "change_reward_status (5)" or "change_reward_status (5, true)", I think Modern Algebra just forgot to update that command between the various Demo releases. There's no such command as "give_reward (quest_ID)" anymore.

About the little quest icons, like in WoW, the Quest Journal only provides a graphic interface to keep track of quests. The feature you refer to has to be achieved through single Events (Quest-givers). You can use Modern Algebra's Character Hover Graphics (http://rmrk.net/index.php/topic,31941.0.html).
Title: Re: Quest Journal v. 2.1
Post by: hexgame on May 11, 2011, 09:06:19 AM
Yup, that was the error, I already figured it out and came here to edit my post and tell him about it. But you beat me to it.

I also edited my post with a new error, one which I can't fix.


One more thing. Is it possible to have the quest price in the shop show the text "Free" when the price is set to 0?
Title: Re: Quest Journal v. 2.1a
Post by: modern algebra on May 11, 2011, 03:07:37 PM
Sorry about that, the command was supposed to be give_quest_reward, not give_reward. It was a new feature added in 2.1 which automatically distributes the specified awards. I'm not sure how useful it is though - it is generally better, in my opinion, to just do everything by events and only update quest progress as a supplementary thing.

Anyway, I have fixed both the demo error and the script error and uploaded Version 2.1a (http://rmrk.net/index.php?action=dlattach;topic=25533.0;attach=23391)

As for the "Free" thing, I don't really see a need to add that to the script. However, if you just want it to not show at all, you could set the cost to -1 (I fixed it so that it won't give you money if you take the quest). If you really wanted the "Free" thing, you could just go into the script and find these lines (at around 784 of IMPLEMENTATION):

Code: [Select]
    if quest.cost > -1 # Draw the quest's cost if > -1
      self.contents.font.color = text_color (QuestData::COLOURS[:active])
      self.contents.draw_text (rect, quest.cost.to_s, 2)
      rect.width -= (self.contents.text_size (quest.cost.to_s).width + 6)

Change it to:

Code: [Select]
    if quest.cost > -1 # Draw the quest's cost if > -1
      self.contents.font.color = text_color (QuestData::COLOURS[:active])
      text = quest.cost == 0 ? "Free" : quest.cost.to_s
      self.contents.draw_text (rect, text, 2)
      rect.width -= (self.contents.text_size (text).width + 6)
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on May 11, 2011, 09:44:28 PM
Yeah, sorry for not making that clear. I guess that is a change from 1.1.

Anyway, I have now released 2.1. You can get it at Pastebin (http://pastebin.com/XX3SMtJK) or from the demo (http://rmrk.net/index.php?action=dlattach;topic=25533.0;attach=23391).

It adds compatibility with Dargor's Custom Commands as well as functionality to show client, location, and level and reorder the information screen.

An ugly screenshot to show it:

(http://img809.imageshack.us/img809/4820/qj4.png)

Also, I'm glad you like it apart from these little hitches so far derk.


WOW O.O thats pretty ,thanks a lot Modern Algebra
Love your scripting talents ^^
Title: Re: Quest Journal v. 2.1
Post by: hexgame on May 12, 2011, 03:24:06 AM
Thanks MA, you've been very helpful. I have one more question though. You stated we are now able to  reorder the quest tabs. Where exactly is this located? I want to move the "all quests" tab to the last spot.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on May 12, 2011, 04:43:00 AM
It's the very first option at line 255. You'd change:

Code: [Select]
  CATEGORIES = [:all, :active, :complete, :failed]

to:

Code: [Select]
  CATEGORIES = [:active, :complete, :failed, :all]

(assuming you aren't using custom categories of course). But the order you put them in that array determines the order they show up in the journal. You can also remove categories altogether if you so desire.
Title: Re: Quest Journal v. 2.1
Post by: hexgame on May 12, 2011, 04:55:19 AM
Such a small line, no wonder I didn't see it. Thanks again :)
Title: Re: Quest Journal v. 2.1
Post by: Lunarea on May 13, 2011, 03:46:33 AM
I have a question about using the new quest journal with your scene tutorial. I would have posted in the scene tutorial thread, but I wasn't sure if it was okay to bump it since it's a few pages back now and I was the last to post in it.

Anyway, I've got a quest menu tutorial and I needed a way to refresh the quest screen while in it. You posted a nifty fix for me here, which worked wonderfully with the 1.1 version:
Code: [Select]
class Scene_Quest
  def refresh
    index = @list_window.index
    @list_window.refresh (@category_index)
    @list_window.index = index
    @info_window.refresh (@list_window.quest)
  end
end

However, it doesn't work with the new version. It gives me an argument error (1 for 0 arguments) on the 4th line.

It's probably a very simple fix, but not being a scripter, I worry that I would make VX explode if I messed around with it too much.  :-[

I appreciate any help  :D
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on May 13, 2011, 04:18:38 AM
Err, try changing it to:

Code: [Select]
class Scene_Quest
  def refresh
    index = @list_window.index
    @list_window.change_list (QuestData::CATEGORIES[@category_index])
    @list_window.index = index
    @info_window.refresh (@list_window.quest)
  end
end
Title: Re: Quest Journal v. 2.1
Post by: Lunarea on May 13, 2011, 04:35:52 AM
It worked like a charm!

Thank you  ;D
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on May 13, 2011, 04:38:38 AM
No problem! It's always nice to see my scripts used by really talented game designers like you and derkunstler :)
Title: Re: Quest Journal v. 2.1
Post by: Helladen on May 15, 2011, 12:41:05 PM
Looks nice - the shop part of the quest system's borders are very thin around the text, but the rest looks perfect.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on May 15, 2011, 01:12:01 PM
I don't really know what it means for the border to be thin, but if you mean the text doesn't fit, then you can always adjust the value of PURCHASE_LIST_WIDTH at line 362 to make it bigger or smaller.
Title: Re: Quest Journal v. 2.1
Post by: Helladen on May 15, 2011, 01:14:15 PM
Yeah that will work. At its current state the borders around the text are too close together, meaning it looks like some of the text is on top of the outer border if that makes sense.
Title: Re: Quest Journal v. 2.1
Post by: hexgame on May 15, 2011, 06:46:41 PM
Yeah that will work. At its current state the borders around the text are too close together, meaning it looks like some of the text is on top of the outer border if that makes sense.

I don't have that problem at all. Are you using a different font or font size?
Title: Re: Quest Journal v. 2.1
Post by: Jensen on May 22, 2011, 03:57:28 PM
Yo, Modern, I´m here to annoy some more.

Looks nice - the shop part of the quest system's borders are very thin around the text, but the rest looks perfect.

Happens in the regular quest scene aswell, not just in the shop:

(http://forumbilder.se/images/942201154504Pe680.jpg) (http://forumbilder.se)

=======================================================================

I´m using give_quest_reward (quest_id) to hand out quest rewards
for the player. All my quests reward honor. The thing is, I´m using a
system of common events to notify the player when he levels up or
learn new skills.

I don´t want the script to give a level up message. When you give
the player experience via eventing you can choose not to show level
up message, but I didn´t find that option in the script.

Is there a way to turn off that message?

===========================EDIT========================================

Just a small request:

Would love it if you could - instead of icons - show quest levels in text
form.
Like: Lvl 1, Lvl 2, Lvl 3... and so on.
Maybe the text could be customizable?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on May 22, 2011, 04:47:40 PM
1.
Since the paragraph formatter relies on the text_size method of Bitmap, it sometimes runs into trouble with some fonts, or more regularly, non-English characters like the ones you have in your example. Though, in that case, it might be a problem with the script itself since it should have been cut off if that were the problem, not overlap the border. I will look into it.

2.
For using text for the level, all you need to do is set the icon for level to 0. That will just show the number though, ie. "X" not "Level X". If you wanted to add some text to it, find these lines in the script:

Code: [Select]
    else
      set_font (1)
      self.contents.draw_text (0, y, contents.width, WLH, @quest.level.to_s, 2)
    end

Change the self.contents.draw_text line to:
Code: [Select]
      self.contents.draw_text (0, y, contents.width, WLH, "Lvl #{@quest.level}", 2)

(You could replace Lvl with whatever you want that text to be.

3.
For the give_quest_reward, find these lines in the script:

Code: [Select]
      when 4 # Experience
        @params = [0, 0, 0, reward[1], true]
        command_315

Change the @params line to:

Code: [Select]
        @params = [0, 0, 0, reward[1], false]
Title: Re: Quest Journal v. 2.1
Post by: Jensen on May 22, 2011, 06:26:40 PM
1. No sweat. It´s not a big deal.

2. Tried it. Works

3. Tried it. Works.

Thank you!
Title: Re: Quest Journal v. 2.1
Post by: Japur on May 29, 2011, 10:48:52 AM
I can't believe how briliant this script is. It seems like you said to yourself: okay, this one is going to be BIG. And it is. There's so much effort in this script and it really shows. I love it and I'm using it in a little game I'm making, and I have to say: this script almost defines the game. It wouldn't contain the fewest bit of awesomeness without this script.

Very, very well done.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on May 31, 2011, 01:51:08 AM
I am glad you like it!

I guess the script did get a bit bulky, but I had seen the previous version in quite a few games and it always looked the exact same, so I figured I should redo it and give the user options to customize it and really make it their own.

Anyway, thanks for the kind words! It means a lot coming from a game designer with your skill (dying for a demo of Nora's Dragon Stories, btw)
Title: Re: Quest Journal v. 2.1
Post by: Pinky on June 12, 2011, 03:18:09 AM
Hi, is there away to use this without the paragraph formatter? I am using the Neo Message Script by wortana.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on June 12, 2011, 10:16:59 PM
No, there isn't. But the paragraph formatter shouldn't interfere with NMS - it shouldn't interact with it at all I don't think.
Title: Re: Quest Journal v. 2.1
Post by: Pinky on June 12, 2011, 10:32:31 PM
Okay I guess I need to test it to be sure.
Title: Re: Quest Journal v. 2.1
Post by: kawagiri on July 02, 2011, 08:15:40 PM
i'm no real scripter, but can this script omit any quests belonging to a custom catagory from all, active and complete, i wanted a challenges category seperate from standard quests.
Title: Re: Quest Journal v. 2.1
Post by: The Frontera on July 04, 2011, 06:46:32 AM
I Have a problem with the script.
I use Neo Save System V and since I added Quest Journal v2.1a and the new Paraghraph Formatter every time I try to open the save scene I get this error:

Script 'Neo Save System V' line 504: ArgumentError occurred.
undefined class/module Pharagrapher::Formatter_2

When I used the old Quest Journal v1.1 and the old paragraph formatter it worked, but now it doesn't.
Can someone help me ?
I really need theese two scripts !
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on July 04, 2011, 01:11:38 PM
@kawagiri - no, I'm afraid not. I can write an addon for that though, but give me some time.

@Frontera - I don't know why anything requires it, but the Formatter_2 is one of the additional paragrapher classes and is located under that heading in the Paragraph Formatter (http://rmrk.net/index.php/topic,25129.0.html) topic. So you can just copy this into its own slot below the other Formatter slots:

Code: [Select]
#==============================================================================
# ** Paragrapher::Formatter 2 (Using Zeriab's Algorithm)
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  This algorithm was written by Zeriab for fonts which have characters of
# the same width. This is like Courier New, UMEGothic and fonts of that sort.
# This algorithm attaches a cost to each line based on the amount of white
# space at the end of that line. It will display the way of writing the text
# with the lowest total cost. In prcatice, this will mean that it will, as
# much as possible, reduce the spacing between letters in a line and make
# the spacing more consistent for each line of the paragraph
#==============================================================================

module Paragrapher
  class Formatter_2
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Format
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def format (string, specifications)
      f = Formatted_Text.new
      f.lines, f.blank_width, word_lengths, words = [], [], [], []
      tracker = 0
      for i in 0...string.size
        if string[i,1] == " " || i == string.size - 1
          if i == string.size - 1
            i += 1
          end
          word_lengths.push (i - tracker)
          words.push (string[tracker, i - tracker])
          tracker = i + 1
        end
      end
      if specifications.class == Bitmap
        max_width = specifications.width
        f.bitmap = specifications
      elsif specifications.class == Fixnum || specifications.class == Float
        max_width = specifications
        f.bitmap = Bitmap.new (1,1)
      else
        # Error Catching: Bad specification
        bitmap = Bitmap.new (200, 64)
        f = format ('Specifications Error', bitmap)
        p 'Specifications Error: Please Pass Fixnum, Float or Bitmap'
        return f
      end
      tw = f.bitmap.text_size('a').width
      max_width = [max_width / tw, 180].min
      # Error Catching: Word too long
      if word_lengths.max > max_width
        f = format ('Too long' , specifications)
        p 'One or more words is too long for specified width'
        return f
      end
      position = line_break (word_lengths, max_width)
      lines = give_lines (position, position.size - 1, words)
      max_width *= tw
      for i in 0...lines.size
        line = lines[i]
        f.lines.push (line.scan (/./))
        if i == lines.size - 1
          f.blank_width.push (0)
        else
          text_width = line.size * tw
          extra_space = max_width - text_width
          f.blank_width.push (extra_space.to_f / (line.size.to_f - 1.0))
        end
      end
      if f.bitmap != specifications
        f.bitmap = Bitmap.new (max_width, f.lines.size*32)
      end
      return f
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Line Break (written by Zeriab)
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def line_break(word_lengths, max_length)
    return false  if max_length > 180
    word_lengths.unshift(nil)
    extra_spaces = Table.new(word_lengths.size,word_lengths.size)
    line_prices = Table.new(word_lengths.size,word_lengths.size)
    word_price = []
    position = []
    inf = max_length*max_length + 1
    for i in 1...word_lengths.size
      extra_spaces[i,i] = max_length - word_lengths[i]
      for j in (i+1)..[word_lengths.size-1, max_length/2+i+1].min
      extra_spaces[i,j] = extra_spaces[i,j-1] - word_lengths[j]-1
      end
    end
    for i in 1...word_lengths.size
      for j in i..[word_lengths.size-1, max_length/2+i+1].min
      if extra_spaces[i,j] < 0
        line_prices[i,j] = inf
      elsif j == word_lengths.size-1 and extra_spaces[i,j] >= 0
        line_prices[i,j] = 0
      else
        line_prices[i,j] = extra_spaces[i,j]*extra_spaces[i,j]
      end
        end
    end
    word_price[0] = 0
    for j in 1...word_lengths.size
      word_price[j] = inf
      for ik in 1..j
      i = j - ik + 1
      break  if line_prices[i,j] == inf
      if word_price[i-1] + line_prices[i,j] < word_price[j]
        word_price[j] = word_price[i-1] + line_prices[i,j]
        position[j] = i
      end
      end
    end
    return position
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Give_Lines (written by Zeriab)
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def give_lines(position,last_index,words)
    first_index = position[last_index]
    word_array = []
    if first_index != 1
      word_array = give_lines(position, first_index - 1,words)
    end
    str = ""
    for x in first_index..last_index
      str += ' '  if x != first_index
      str += words[x-1]
    end
    word_array << str
    return word_array
    end
  end
end

I'm still curious though, as to why it is calling the Formatter_2 at all. Have you removed the old Quest Journal 1.1?
Title: Re: Quest Journal v. 2.1
Post by: kawagiri on July 04, 2011, 01:45:40 PM
Thanks i really appreciate it :)

i didn't want challenges cluttering up the main quest line when challenges are going to be large lists of challenging tasks and puzzles to complete for extra items with specific benefits ^^

(you can't "fail" them, but you may see the tasks too difficult and decide to move on, with different tiers of challenges for each area/continent and different tiers of challenges to complete it would get cluttered quite quick... e.g. "area a - easy challenges", "area a - medium challenges", "area a - hard challenges", "area a - extreme challenges", "area b - easy challenges" etc. etc. etc.  :lol: )
Title: Re: Quest Journal v. 2.1
Post by: The Frontera on July 04, 2011, 04:54:26 PM
Ok, now with the "Pharagrapher::Formatter_2" I can open the save scene, but when I scroll down to save slot 4, exactly when the cursor reaches this save slot,  I get this error:

Script 'Neo Save System V' line 510: ArgumentError occurred.
undefined class/module ModAlg_QuestData::

The strange thing is that this error cames up only on save slot 4, all others (1,2,3,5,6,7,8...) work fine.
Can you help me and fix it ?
ah, yes, I removed the Quest Journal v1.1
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on July 04, 2011, 05:22:50 PM
OK... well there is no ModAlg_QuestData in this script - the module's name is simply QuestData. So I have to guess that maybe the Neo-Save System V that you're using has some kind of patch designed for the Quest Journal 1.1 and that is what is causing the problems. To fix it, I will need to see the save script you're using, since my script isn't the source of the error.
Title: Re: Quest Journal v. 2.1
Post by: The Frontera on July 04, 2011, 05:34:57 PM
Problem solved !
I think it was caused by a corrupted savefile, because I deleted all of them and now it works without any problems
I took the Neo Save System V script I'm using from the topic on this website, so you probably have the same I have, and I haven't got any patches, so that ModAlg_QuestData error is really strange...
However, now everything is ok !
Thanks a lot modern algebra !
You are always the best !
This script is Awesome !
Continue creating such great scripts !

Title: Re: Quest Journal v. 2.1
Post by: Adrien on July 08, 2011, 11:31:27 PM
Hey, I was wondering how you would do:

if monster id of 4 was encountered in a random battle  set quest id of 2 to complete. is that possible with this script?
Title: Re: Quest Journal v. 2.1
Post by: pacdiggity on July 09, 2011, 12:07:29 AM
Have a battle event do that. Have an event set to the battle span and trigger on the earliest possible opportunity. Make it set the id to complete.
Title: Re: Quest Journal v. 2.1
Post by: Adrien on July 09, 2011, 12:15:25 AM
this quest complete can only trigger once even if you manage to kill the same monster id again in a random battle. Could you please provide a sample of how to do this?
Title: Re: Quest Journal v. 2.1
Post by: pacdiggity on July 09, 2011, 12:18:55 AM
In the battle event, have a variable raised whenever you kill the monster or just encounter it. Have the event check if that variable is the number of monsters killed you desire, then if it is set the quest to complete.
Title: Re: Quest Journal v. 2.1
Post by: Adrien on July 09, 2011, 12:25:01 AM
that sounds like it would happen every time i killed that creature - like If i encounter monster id 4 slaughter it then AFTER the battle - quest complete. every time i encounter monster id 4 the quest will complete...I dont follow could you post a screen shotted example please?
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 16, 2011, 10:48:50 PM
Hello i really need help with this. Basically I've  copied the quest journal script bellow materials and above main, and i don't know what else to put there is another script, but i don't know what it is. So i downloaded the demo and copied the scripts out of that and a load of errors come up so i don't know what to do. I really badly want to use this rpg maker vx program to make a good rpg, but in struggling at the moment. Can someone please post what the second script is i need and any other tips i need.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on August 16, 2011, 10:55:59 PM
Umm, well it's the Paragraph Formatter, but if you copied all the scripts from the demo than you should have it.

The "load of errors" is not very specific. It might be that you have more than one copy of the same script (if you copied out of the demo without first deleting the ones you had already gotten.

It might also be incompatibility with some other script that you have.

Does the demo work for you?
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 16, 2011, 11:07:34 PM
dont worry i have it and will try and paste it in under materials and above main and let you know if it works

Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 16, 2011, 11:16:18 PM
OK now i get this error

????????NoMethodError???????????
undefined method 'reveal_quest' for # <Game_Interpreter:0x37e8d38>

I have wrote "reveal_quest (1)"   And the "1" being the id of a quest i wrote.

Don't know what the problem is?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on August 16, 2011, 11:35:43 PM
reveal_quest should work.

The fact that it doesn't might mean you misspelled it in the actual script command, or it might mean you put the Implementation part of the script below Main, or it might mean you're using V. 1.1 instead of 2.1. So make sure it's none of those things.
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 16, 2011, 11:39:19 PM
no now the same message comes up but with reveal objective????
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on August 16, 2011, 11:40:04 PM
Sorry, just edited the above post when I took a look at the script - see if you made any of those mistakes.

Also, maybe you didn't copy the implementation part of the script into your game at all.
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 16, 2011, 11:42:21 PM
yes woops im using version 1.02 does that mean i have to get the latest or something above what?

meaning whats the latest version out?  or a version that the quest script will work on?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on August 16, 2011, 11:51:31 PM
1.02? What?

The only two versions of this script you could possibly get from this topic are 1.1 and 2.1a. Unless you're referring to the version of RPG Maker VX you're using, in which case, no. Extremely, extremely, no.

Do you have v. 2.1a of the Quest Journal script?

If no and you have v. 1.1, delete it and download the 2.1 demo. If yes and you copied it from the demo, did you retrieve both the scripts out of the QJ2-CONFIGURATION and QJ2-IMPLEMENTATION slots that were in the demo.

If no, then go back to the demo and get both of them. If yes, then make sure both are in your script editor and both are above Main.
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 16, 2011, 11:53:16 PM
ok im sorry i mis understood i was using v 1.1

 and by the way extremely extremely no what ? what do you mean
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 17, 2011, 12:02:28 AM
ok done. Now I,ve got rid of that message and copied the other 2 files from the demo over, i encounter another error which is this:
 
???QJ2-IMPLEMENTATION? 271 ??? NoMethodError ???
undefined method 'include'? for nil:NilClass

and line 271 is this :  return if !@data[quest_id] ||@id_sort.include? (quest_id)

Any ideas?????


ohh and btw i made a new game and the message goes away. once i finish the dialog i press escape and go to quests and it says unable to find graphics/pictures/fractal
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 17, 2011, 12:31:55 AM
would you like me to send you my game so far ?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on August 17, 2011, 12:44:45 AM
Yeah, do that.
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 17, 2011, 12:45:49 AM
okay thanks for your help so far btw :D
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on August 17, 2011, 12:47:47 AM
Oh, wait never mind - sorry, I didn't read your last posts. It's just that you were using an old save file - just delete all the old save files since the script won't work with them - that's pretty much the case with most scripts. Unless you have some emotional attachment to this particular save file like it's your test file and it's 5 hours in, in which case I can write something to initialize the necessary data. Otherwise, just delete the old savefiles.
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 17, 2011, 12:49:52 AM
yh i did i still get the same error heres the game btw
Title: Re: Quest Journal v. 2.1
Post by: Lunarea on August 17, 2011, 12:50:40 AM
I've encountered an error with the script. It happens when I use the "remove_quest" script input:
(http://i242.photobucket.com/albums/ff267/lunarea_album/Stuff/Error-QJ01copy.png)

Removing line 907 doesn't crash the game when "remove_quest" is used anymore, but it yields a new error when the menu is opened:
(http://i242.photobucket.com/albums/ff267/lunarea_album/Stuff/Error-QJ02.png)

It's not an issue for me, really, as I've been using "conceal_quest" instead. But I thought I'd report it, just in case.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on August 17, 2011, 12:51:34 AM
Well, that other error is just because you don't have the fractal graphic and you have a quest set up with that banner. Just get rid of the quests that were set up for the demo and it will go away.

@lunarea - thanks for the report. I will fix it. For some reason, it's already fixed in my version - I must have uploaded the wrong copy of the script.
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 17, 2011, 12:52:35 AM
ok thanks
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 17, 2011, 12:56:52 AM
YAYYYYYYYYYYYYYYY IT WORKS

anyway ideas how to add a different background image and a custom menu of my licking to the start screen ? do i need a custom script for that or is it easy to change the music and the image?

and one other thing was while in dialog with an npc is there a way to make the conversation bigger, because whenever i test it the convocation goes out of the box. So i have to edit the text and press enter to shorten the words on a line. If it isnt possible themn is there a way i can add a barrier in the text option so when i type a word over the dialog limit it goes into a new line? i saw there were 2 arrows but i have no idea what there for? anyway thanks for your help
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on August 17, 2011, 01:06:54 AM
Alright, I uploaded the new version of the script. If anyone doesn't want to redownload, all you need to do is go to the line Lunarea identified in Implementation:

Code: [Select]
  def remove (quest_id)
    conceal_quest
    @data.delete (quest_id)
  end

and replace it with:

Code: [Select]
  def remove (quest_id)
    conceal_quest (quest_id)
    @data.delete (quest_id)
  end

@Redpants - I'm glad it's working. To change the background image, just read the instructions. Once you do, you'll notice there is an option like this in the configuration section:

Code: [Select]
  BG_PICTURE = ""           # The filename of the background picture

All you need to do is put the name of the file you want to use inside those quotation marks.

I don't know what you mean by custom menu of your liking. If you mean how the quest scene itself is arranged there are a lot of options you can utilize to reconfigure it - read all the instructions. However, if you mean the menu where you choose things like items, equipments, quests, etc.. then you need a totally different script. Go to the RMVX Script Index (stickied in the Database) and look under the Menu Systems category. The Quest Journal is supported in some of them natively as long as it is under them. In others you might need to go through their own configurations to add the quest journal to the menu.


Also, this is not the place to keep asking these questions (go to the Tutorials board and make a new topic) but the two arrows indicate the amount of space you have to write (Ie the problem you are having). If using a face graphic, you only have to the first arrow. If not using a face graphic, you have to the second arrow. If you go over those arrows, then your words get cut off. They exist to indicate how much space you have. If you press the Preview button, you will see how it shows up in game.
Title: Re: Quest Journal v. 2.1
Post by: Redpants on August 17, 2011, 11:16:31 AM
Thanks for all your help and answering my questions I'm sure it was stressful :P anyway I'm sure it will help others in the future who have encountered the same problems as me. Anyway all your help was appreciated it thanks.

DONE!
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on August 18, 2011, 02:03:49 AM
Modern algebra i had this idea and i was wondering if you could add it into your script please ;p
i would like to have the quests shown in sub categories, like this .


+Location 1
Quest 1
Quest 2
+Location 2
+Location 3

so i can click on the location/client's name (it expands) and see what quests can be done then  reclick it to contract it.

would save a lot of space if you have a lot of quests ^^

example http://www.rpgmakervx.net/index.php?showtopic=34037&hl=sky%27s
i want to use your script coz it has everything i need ^^ only this option is missing
Title: Re: Quest Journal v. 2.1
Post by: IneedHELP! on September 04, 2011, 03:20:08 AM
hi ummm, how do you make a quest that requires you to get some things

i.e.
'Claire has told me to get 10 swords for the guard trainees'
because I can't figure out how.

plz show images aswell or make a demo PLZZZZZZZzz :P :P :P :P :P :P :P :P :P :P
Title: Re: Quest Journal v. 2.1
Post by: pacdiggity on September 04, 2011, 10:02:56 AM
How about the demo... that's already there?
Title: Re: Quest Journal v. 2.1
Post by: IneedHELP! on September 05, 2011, 06:10:28 AM
um yeah it is there but the only thing is the stick I mean like 100 or 10 things
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on September 08, 2011, 01:03:44 AM
um yeah it is there but the only thing is the stick I mean like 100 or 10 things

like this? http://rpg-maker-vx.bbactif.com/t10324p20-fenetre-de-quete
the 4rth post
its a window that shows how much items you need, would be great if Modern Algebra would add that option ^^
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on September 24, 2011, 05:14:00 PM
Modern Algebra is it possible to add an option to show how much of an item you already have?
like a quest asks you to get 4 iron ore and when you get 1 or more it says so in the quest window?

Examples:
Objectives
Get 4 Iron ore  1/4

Objectives
Kill 20 Crabs 13/20
Title: Re: Quest Journal v. 2.1
Post by: JonFawkes on September 24, 2011, 05:31:50 PM
Modern Algebra is it possible to add an option to show how much of an item you already have?
like a quest asks you to get 4 iron ore and when you get 1 or more it says so in the quest window?

Examples:
Objectives
Get 4 Iron ore  1/4

Objectives
Kill 20 Crabs 13/20
Since this script requires Paragraph Formatter and Special Codes formatter, you can probably just use
Code: [Select]
\v[x]
and store those quest objectives in a variable. For example:
Code: [Select]
Every time you kill a crab
Change Variable 0001: add 1

On the objectives, you would write
Kill 20 Crabs \v[1]/20
I don't know how you should tell it to complete the quest, but probably something that checks "When Variable 0001 >= 20, run script "complete_objective (1, 2)"
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on September 24, 2011, 06:24:48 PM
Modern Algebra is it possible to add an option to show how much of an item you already have?
like a quest asks you to get 4 iron ore and when you get 1 or more it says so in the quest window?

Examples:
Objectives
Get 4 Iron ore  1/4

Objectives
Kill 20 Crabs 13/20
Since this script requires Paragraph Formatter and Special Codes formatter, you can probably just use
Code: [Select]
\v[x]
and store those quest objectives in a variable. For example:
Code: [Select]
Every time you kill a crab
Change Variable 0001: add 1

On the objectives, you would write
Kill 20 Crabs \v[1]/20
I don't know how you should tell it to complete the quest, but probably something that checks "When Variable 0001 >= 20, run script "complete_objective (1, 2)"


yes you could do that , but i'm looking at it and found the piece of code it needs ^^, still need to get it work tho :p

Code: [Select]
$game_party.item_number($data_items[1]) #which is the number of Potions the player has

Code: [Select]
self.contents.draw_text(0, 0, contents.width, WLH,[$game_party.item_number($data_items[1]), "/ ","4"] ) #this is how it could be used in a text but i can't get it to work otherwise :p
Title: Re: Quest Journal v. 2.1
Post by: cozziekuns on September 24, 2011, 07:19:12 PM
Check the control variables event. There should be something which outputs:

Control Variables: [Variable] = [Item] in your inventory.
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on September 24, 2011, 07:34:05 PM
Check the control variables event. There should be something which outputs:

Control Variables: [Variable] = [Item] in your inventory.

yeah but even so i would like it to show in the quest window without using 9999999 variables for it to work ;p
and with that piece of code i posted it should be possible if i knew how to use it

Code: [Select]
when 0 # Quest 1 <- Remember: Quest IDs MUST be unique!
      name = "Missing Iron ore"
      description = "Find the Iron ore Ralph Lost"
      objectives[0] = "Go to the mine"
      objectives[1] = [$game_party.item_number($data_items[1]),"/" ,"4"]
       

this doesn't work tho  :'(



EDIT: + i don't know how to let it check the number of items to see if you have the required number
Title: Re: Quest Journal v. 2.1
Post by: JonFawkes on September 24, 2011, 09:17:30 PM
I think the program is interpreting
Code: [Select]
objectives[1] = [$game_party.item_number($data_items[1]),"/" ,"4"]
As an array and not a string. I'm not sure how to fix this, but maybe something like this?
Code: [Select]
objectives[1] = $game_party.item_number($data_items[1])+"/4"
I don't think that's quite correct, I think you need a way to draw text for the item_number variable
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on September 24, 2011, 09:46:20 PM
I think the program is interpreting
Code: [Select]
objectives[1] = [$game_party.item_number($data_items[1]),"/" ,"4"]
As an array and not a string. I'm not sure how to fix this, but maybe something like this?
Code: [Select]
objectives[1] = $game_party.item_number($data_items[1])+"/4"
I don't think that's quite correct, I think you need a way to draw text for the item_number variable
nope your code doesn't work -> gets to title screen and crashes while going in game
my code gets in game , in quest scene then crashes when selecting the quest with the code
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on September 24, 2011, 10:42:34 PM
i got it to work for half of it :D

add
Code: [Select]
      text.gsub! (/\\MIID\[([0-9]+)\]/i) { $game_party.item_number($data_items[$1.to_i]) }
at the end of line 228 in "Special Codes Formatter"
then in "QJ2 - CONFIGURATION"
Code: [Select]
objectives[2] = "\\MIID[1]/4"
this will show you how much potions you have (1/4 , 2/4, ect) ....still trying to make it work so it completes the quest once you have the required amount of items ;p


EDIT: lol it doesn't update more then once -_-', it only shows the number of items the first time i go to the Quest scene, then after doesn't update, i'll try to fix it (i am a noob scripter ;p)

EDIT2: Modern Algebra your variable call for the texts doest work either (\\V)

EDIT3: Would be nice to be able to do something like this
Code: [Select]
when 0 # Quest 1 <- Remember: Quest IDs MUST be unique!
      name = "Missing Iron ore"
      description = "Find the Iron ore Ralph Lost"
      objectives[0] = "Go to the mine"
      if $game_party.item_number($data_items[1]) >= 4 #potions
        objectives[1] = "Find the lost Iron ore.  \\c[3]Complete!\\c[0]"
      else
        objectives[1] = "Find the lost Iron ore.  \\MIID[1]/4"
        end
and then it should stop updating once it says "Complete!"
but i dont even know how to update the number because even the \\V command doesn't update
Title: Re: Quest Journal v. 2.1
Post by: pacdiggity on September 25, 2011, 12:37:12 AM
That's unnecessary. The problem with JonFawkes' code was that $game_party.item_number returns an integer, and that you were adding string to it. You also cannot store the objective as an array. The way to do it would be this:
Code: [Select]
when 0 # Quest 1 <- Remember: Quest IDs MUST be unique!
      name = "Missing Iron ore"
      description = "Find the Iron ore Ralph Lost"
      objectives[0] = "Go to the mine"
      objectives[1] = $game_party.item_number($data_items[1]).to_s + " / 4"
Notice the .to_s in the last line that converts the number to string, so you can add the " / 4" to it.
However, I don't think that'll work. I'm not familiar with the way quests are handled in this game, but I don't think that they're updated. Basically, if it's updated then it'll be fine. If it's not, then it'll say 0 / 4 forever.
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on September 25, 2011, 12:42:33 AM
That's unnecessary. The problem with JonFawkes' code was that $game_party.item_number returns an integer, and that you were adding string to it. You also cannot store the objective as an array. The way to do it would be this:
Code: [Select]
when 0 # Quest 1 <- Remember: Quest IDs MUST be unique!
      name = "Missing Iron ore"
      description = "Find the Iron ore Ralph Lost"
      objectives[0] = "Go to the mine"
      objectives[1] = $game_party.item_number($data_items[1]).to_s + " / 4"
Notice the .to_s in the last line that converts the number to string, so you can add the " / 4" to it.
However, I don't think that'll work. I'm not familiar with the way quests are handled in this game, but I don't think that they're updated. Basically, if it's updated then it'll be fine. If it's not, then it'll say 0 / 4 forever.

yes that works but doesn't even update once and the way i did update at least once :)
so i guess it's updated but only the first time you enter the Quest scene....tested it and yeah it only updates the first time, so when entering and having 0
it'll stay 0/4 forever and when entering and having 51 it'll stay 51/4 forever
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on October 13, 2011, 06:31:46 PM
My little addon which will show the items needed for a quest and the number owned , i show in the demo how it works ;p


http://www.mediafire.com/?uw5i71wvrmwxx1i

Title: Re: Quest Journal v. 2.1
Post by: WillCGjr on November 01, 2011, 10:08:37 PM
Hey guys i know I'm pretty late with RMVX, or any of the RPG makers. but i just found this script from another website, but i wanted to come to the source. I love the script, i downloaded a demo from a different website, and it was finding a stick for a dog. I'm probably completely dumb, since i am very new at creating games but is it possible to create a quest like "talking to someone">finding a key>bring the key back to complete the quest.
Ive been tampering with this quest system, i like how it looks, I'm showing credit for M.A's script, lol can someone help a confused person...thanks...
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on November 01, 2011, 11:17:01 PM
The demo with finding a stick is for v. 1.1, so you may want to test out v. 2.1. It does include a quest like the one you are referring to, though it is talk to someone > get mushrooms > bring mushrooms back to complete.

With both 1.1 and 2.1 though, the script doesn't really make the quests - it is just a graphical representation of quests you make through eventing or other means. While 2.1 has more scripted options for tracking quest progress, etc. all that you need to do is update this script once the player reveals/fails/completes a quest objective.

So, in your example, the actual quest would all be through eventing and, in particular, through switches and conditional branches.

So, your quest giving event would be like this:

Page 1:

@>Text: -, -, Normal, Bottom
  :        : Hi. Can you help me find a key?
@>Show Choices: Yes, No
  : When [Yes]
    @>Text: -, -, Normal, Bottom
      :        : Thanks! I dropped it down the sewer.
    @>Control Self-Switch: A is ON
    @>
  : When [No]
    @>Text: -, -, Normal, Bottom
      :        : Aww, what can I possibly do?
    @>
  : Branch End



Page 2:
Condition: Self-Switch A is ON

@>Conditional Branch: Self-Switch B == ON
    @>Text: -, -, Normal, Bottom
      :        : Thanks again for finding my key!
    @>
  : Else
    @>Conditional Branch: [Key] in Inventory
        @>Text: -, -, Normal, Bottom
          :        : Wow! You found my key! Here's money!
        @>Change Gold: +100
        @>Change Items: [Key], -1
        @>Control Self-Switch: B = ON
        @>
      : Else
        @>Text: -, -, Normal, Bottom
          :        : Have you found my key yet? I told you it's in the sewers.
        @>
      : Branch End
    @>
  : Branch End
@>


Then you'd have some event in the sewers somewhere where you actually receive the Key:

Page 1:

@>Conditional Branch: Self-Switch A == OFF
    @>Text: -, -, Normal, Bottom
      :        : You found a key!
    @>Control Self-Switch: A = ON
    @>
  :  Branch END


So, that would functionally be the quest (though you'd likely want to add graphical flourishes and sound effects, etc.), without any updating of the Quest Journal.

All the quest journal does is give you a way to graphically show progress in the quest - it doesn't modify anything else.

So you would set the quest up in the Configuration section of the script (let's say it's Quest 10), and maybe you'd set it up like this:

Code: [Select]
    when 10 # Quest 1 <- Remember: Quest IDs MUST be unique!
      name = "Sewer Key"
      description = "Quest Giver lost his key! Find it for him so he can go back home."
      objectives[0] = "Search in the sewer for Quest Giver's key"
      objectives[1] = "Return the key to Quest Giver"
      icon_index = 80

Then, the only changes you'd make to the events of the quest itself are script calls to update progress. Since I don't know if you are using 1.1 or 2.1, I will provide versions of both:

Spoiler for Quest Journal 2.1a:
Quest-Giving Event

Page 1:

@>Text: -, -, Normal, Bottom
  :        : Hi. Can you help me find a key?
@>Show Choices: Yes, No
  : When [Yes]
    @>Text: -, -, Normal, Bottom
      :        : Thanks! I dropped it down the sewer.
    @>Control Self-Switch: A is ON
    @>Script: reveal_objective (10, 0)
    @>
  : When [No]
    @>Text: -, -, Normal, Bottom
      :        : Aww, what can I possibly do?
    @>
  : Branch End


Page 2:
Condition: Self-Switch A is ON

@>Conditional Branch: Self-Switch B == ON
    @>Text: -, -, Normal, Bottom
      :        : Thanks again for finding my key!
    @>
  : Else
    @>Conditional Branch: [Key] in Inventory
        @>Text: -, -, Normal, Bottom
          :        : Wow! You found my key! Here's money!
        @>Change Gold: +100
        @>Change Items: [Key], -1
        @>Control Self-Switch: B = ON
        @>Script: complete_objective (10, 1)
        @>
      : Else
        @>Text: -, -, Normal, Bottom
          :        : Have you found my key yet? I told you it's in the sewers.
        @>
      : Branch End
    @>
  : Branch End
@>


Key giving event

Page 1:

@>Conditional Branch: Self-Switch A == OFF
    @>Text: -, -, Normal, Bottom
      :        : You found a key!
    @>Control Self-Switch: A = ON
    @>Script: complete_objective (10, 0)
      :        : reveal_objective (10, 1)
    @>
  :  Branch END

Spoiler for Quest Journal 1.1:
Quest-Giving Event

Page 1:

@>Text: -, -, Normal, Bottom
  :        : Hi. Can you help me find a key?
@>Show Choices: Yes, No
  : When [Yes]
    @>Text: -, -, Normal, Bottom
      :        : Thanks! I dropped it down the sewer.
    @>Control Self-Switch: A is ON
    @>Script: q = $game_party.quests[10]
      :        : q.reveal_objective (0)
    @>
  : When [No]
    @>Text: -, -, Normal, Bottom
      :        : Aww, what can I possibly do?
    @>
  : Branch End


Page 2:
Condition: Self-Switch A is ON

@>Conditional Branch: Self-Switch B == ON
    @>Text: -, -, Normal, Bottom
      :        : Thanks again for finding my key!
    @>
  : Else
    @>Conditional Branch: [Key] in Inventory
        @>Text: -, -, Normal, Bottom
          :        : Wow! You found my key! Here's money!
        @>Change Gold: +100
        @>Change Items: [Key], -1
        @>Control Self-Switch: B = ON
        @>Script: q = $game_party.quests[10]
          :        : q.complete_objective (1)
        @>
      : Else
        @>Text: -, -, Normal, Bottom
          :        : Have you found my key yet? I told you it's in the sewers.
        @>
      : Branch End
    @>
  : Branch End
@>


Key giving event

Page 1:

@>Conditional Branch: Self-Switch A == OFF
    @>Text: -, -, Normal, Bottom
      :        : You found a key!
    @>Control Self-Switch: A = ON
    @>Script: q = $game_party.quests[10]
      :        : q.complete_objective (0)
      :        : q.reveal_objective (1)
    @>
  :  Branch END
Title: Re: Quest Journal v. 2.1
Post by: WillCGjr on November 01, 2011, 11:21:09 PM
Awesome! thanks Modern Algebra! and if i didnt come to the source, my computer would probably be on the floor in pieces cuz i would still be pulling my hair out!! lol thanks again!
Title: Re: Quest Journal v. 2.1
Post by: WillCGjr on November 02, 2011, 07:50:56 PM
I have a new problem after setting up the quests...sorry guys...
it says:

Script 'QJ2=Implementation Line 875: Nomethoderror occurred.
undefined method 'formatter' for
#<Paragrapher::Paragrapher:0x3a2bc88>

i dont under stant it, and i read carefully what Modern Algebra put, even checked the Tutorial Demo.
everything is correct unless im not seeing something? Can someone help?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on November 02, 2011, 10:09:36 PM
Did you add the Paragraph Formatter?

NB: This script REQUIRES the Paragraph Formatter (http://rmrk.net/index.php/topic,25129.0.html)! The Special Codes Formatter (http://rmrk.net/index.php/topic,25129.0.html) (found under the Addons in that same topic) is also recommended. If you want the Description box rounded, then you need the Bitmap Addons (http://rmrk.net/index.php/topic,32286.0.html) script.
Title: Re: Quest Journal v. 2.1
Post by: WillCGjr on November 02, 2011, 10:46:40 PM
yes i added the formatter. I set up the quest just like the tutorial and tried the way you did on your post, i dont kno whats going on?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on November 02, 2011, 10:54:01 PM
Well, the Quest Journal 2.1a requires the Paragraph Formatter 2.0. Maybe you're still using the paragraph formatter from the 1.1 demo? Because that would be outdated, so you'd need to replace it with the Paragraph Formatter 2.0.
Title: Re: Quest Journal v. 2.1
Post by: WillCGjr on November 02, 2011, 11:58:07 PM
yupp im an idiot...thats what it was...haha thanks again. Sorry to keep ya busy over an idiot like me lol
Title: Re: Quest Journal v. 2.1
Post by: IXFURU on November 16, 2011, 12:20:39 AM
Modern,

I've been using version 1.1 of the Quest script for a very long time.  I just recently noticed that in August you updated the script.  I wouldn't normally get the newer version of the script, (as the original suits my needs just fine).  However, I noticed that in the 2.1b, you are able to scroll the side with the objectives, which is something I've been having to work around for quite some time by creating more than one quest out of longer quests with more objectives.   

At any rate, I put in the new script, and simply replaced the 'when' section with the section I had created with 1.1 as instructed.  The problem is that there now seems to be a compatibility problem with the Neo Save System 3.0.     This problem occurs when I try to continue a previously saved game, or after I access the save system from a new game, it causes the error when I move the cursor down from the first save position.   Here's the error:

(http://i16.photobucket.com/albums/b38/Dwiguitar/errorRW.png)

And here's the part of the Neo Save System which gets the error  It's line 416, which is the line that reads
"data[slot_id]['gamepar'] = Marshal.load(file)"


Code: [Select]
  def load_save_data(slot_id)
    file_name = make_filename(slot_id)
    if file_exist?(slot_id) or FileTest.exist?(file_name)
      @exist_list[slot_id] = true
      @data[slot_id] = {}
      # Start load data
      file = File.open(file_name, "r")
      @data[slot_id]['time'] = file.mtime
      @data[slot_id]['char'] = Marshal.load(file)
      @data[slot_id]['frame'] = Marshal.load(file)
      @data[slot_id]['last_bgm'] = Marshal.load(file)
      @data[slot_id]['last_bgs'] = Marshal.load(file)
      @data[slot_id]['gamesys'] = Marshal.load(file)
      @data[slot_id]['gamemes'] = Marshal.load(file)
      @data[slot_id]['gameswi'] = Marshal.load(file)
      @data[slot_id]['gamevar'] = Marshal.load(file)
      @data[slot_id]['gameselfvar'] = Marshal.load(file)
      @data[slot_id]['gameactor'] = Marshal.load(file)
      @data[slot_id]['gamepar'] = Marshal.load(file)
      @data[slot_id]['gametro'] = Marshal.load(file)
      @data[slot_id]['gamemap'] = Marshal.load(file)
      @data[slot_id]['total_sec'] = @data[slot_id]['frame'] / Graphics.frame_rate
      @data[slot_id]['map_name'] = get_mapname(@data[slot_id]['gamemap'].map_id)
      file.close
    else
      @exist_list[slot_id] = false
      @data[slot_id] = -1
    end
  end
Title: Re: Quest Journal v. 2.1
Post by: LoganF on November 16, 2011, 01:35:17 AM
Putting in new scripts pretty much renders your old save files unusable. When you try to load the game, it's trying to load a state that no longer exists any more.

It's partly due to version 2 of this script being a complete rewrite. As such a lot of the names used for modules/variables etc were changed and no longer exist. For example, in v1.1 the module for handling quests was called "ModAlg_QuestData". It is now called "QuestData".

It's a very common issue people run into and is likely to be solved simply by starting a new game.
Title: Re: Quest Journal v. 2.1
Post by: micusficus on December 05, 2011, 05:00:41 AM
I'm just having a little bit of conflict with Yanfly's System Options script. Apologies if I missed this in an earlier post but I feel like I've scoured the internet with a fine tooth comb and have come up empty.

My problem is that System Options changes your window style to one of several options in a graphics/windows folder, but Quest Journal still wants to use the old graphics/system/window image. How can I get it to accept the default?
Title: Re: Quest Journal v. 2.1
Post by: Adrien on December 05, 2011, 05:07:08 AM
Line 271 of the config script: WINDOWS_SKIN = "custom" where custom is your window skin
Title: Re: Quest Journal v. 2.1
Post by: micusficus on December 05, 2011, 05:55:16 AM
Sorry for not being more specific with the codes and whatnot.

Quote
   # The following adjusts the window skins used for your game. Match the
    # Window skins with the names accordingly. Within the windowskin hash,
    # the following settings are adjusted as such:
    #     Name - File Name
    #     Opac - Back Opacity
    #     Bold - Bold font?
    #   Italic - Italic font?
    #   Shadow - Use shadows?
    #     Size - Font Size
    #     Font - Font Set
    DEFAULT_SKIN_VALUE  = 3
    WINDOW_HASH ={
    # Window ID => [      Name, Opac,  Bold, Italic, Shadow, Size,    Font],
              1 => [   "Plain",  200, false,  false,   true,   14, DEFAULT],
              2 => [    "Mint",  200, false,  false,   true,   14, DEFAULT],
              3 => ["Strawberry",  200, false,  false,   true,   14, DEFAULT],
              4 => [  "Banana",  200, false,  false,   true,   14, DEFAULT],
              5 => [     "Nut",  200, false,  false,   true,   14, DEFAULT],
              6 => [  "Wasted",  200, false,  false,   true,   16, "Monofonto"],
    } # Do not remove this.

Is there any way to have the windows match no matter which of this six window styles they choose?
Title: Re: Quest Journal v. 2.1
Post by: Adrien on December 05, 2011, 06:31:43 AM
if you want the same window skin no matter which si you choose change the text in the "" to that of your window skin name. is that what your getting at?
Title: Re: Quest Journal v. 2.1
Post by: micusficus on December 05, 2011, 08:43:38 AM
I just want line 271 to accept the default that the system options script sets. I can't just type one thing in between those quotes because there's a possibility of six options. I don't even know how to direct it to graphics/windows instead of graphics/system. I just want all of my windows to be the same uniform style.
Title: Re: Quest Journal v. 2.1
Post by: LoganF on December 05, 2011, 10:20:57 AM
The problem is that Yanfly's System Options script creates a method that is called during a new window's creation that sets the default windowskin in the base Window class, but then QJ comes along and changes those settings afterwards.

This can be fixed in a number of ways, but the version of Implementation script below prevents QJ changing those default values if the System Options script is being used. For everyone not using it, then QJ will set those values instead. Those values refers to both the window skin graphic and the opacity values. I only did a quick test to check that the set window skin was used in QJ after changing it in SystemOptions. There may be other issues since SystemOptions changes a lot more than just windowskin and opacity.

MA will probably make a more appropriate fix if and when he gets time to do so.

http://pastebin.com/mDHYHJq1
Title: Re: Quest Journal v. 2.1
Post by: micusficus on December 05, 2011, 12:50:33 PM
That totally fixed it. Thank you so much!
Title: Re: Quest Journal v. 2.1
Post by: Adrien on December 05, 2011, 08:43:22 PM
issue:

I cant understand why i am getting this error. it happens when I accept a quest and then go into my menu and select quests to see the details of that quest.

ideas?

--note: the paragraph formatter may sit above or bellow these scripts how ever the same errors occurs.

This script works fine if you have no quests though.

So heres what I did. I took out every script but the paragraph formatter and the quest journal and the RPG Tankentai Sideview Battle System. Now either it clashes so heavily with the RPG Tankentai Sideview Battle System or there is an internal issue in the quest journal script that is causing this issue....

Ideas?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on December 06, 2011, 03:34:09 AM
Are you using Paragraph Formatter 2.0? Or are you using 1.1? This script requires 2.0.
Title: Re: Quest Journal v. 2.1
Post by: Adrien on December 06, 2011, 03:36:44 AM
AHHH shit...Should have checked that before bugging you. 1.1 - well with that said - your download link, all of them - wants me to download a .php file? 0o? No other download on this or any other site asks me to download a .php file. do you have the project on media fire or something like that I could grab it from?
Title: Re: Quest Journal v. 2.1
Post by: Adrien on December 06, 2011, 04:15:44 AM
Using codes like \c[22]Some text\c[0] do not work. For example:

objectives[0]= "Bla bla fiddy bla \\c[22]yo ho\\c[0] bla bla"

will produce:

 Bla bla fiddy bla \c[22]yo ho\c[0] bla bla

instead of the appropriate colo for yo ho
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on December 06, 2011, 04:47:50 AM
The php thing is weird - I find it is happening with Firefox and SMF. Hopefully it will be fixed soon. In the meantime, do you have another browser you could use to download things? If not, I can upload to sendspace.

With respect to the codes, you need to have the Special Codes Formatter, but also, if you are using "" for options, then you need to escape back slashes. Ie. It needs to be "\\c[22]Some text\\c[0]"
Title: Re: Quest Journal v. 2.1
Post by: Adrien on December 06, 2011, 04:50:38 AM
Wait wait wait....This is whats giving me the issue:

Code: [Select]
     
      name = "Tracking down the Bandits"
      banner = "" # If using, must be a file from the Pictures folder
      description = "The bandits that took over the South Trade Route are held up in the \\c[22]Ruins of Ickta\\c[0]. You have been asked to rid them of the place so the monks can have their place of worship back."
      objectives[0] = "Slaughter the Bandits in the \\c[22]Ruins of Ickta\\c[0]."
      rewards = [] # 2 Mana Ups and 500 Gold
      icon_index = 137


what are you saying I have to do?

Because this is what I am saying doesnt work.

For example this will spit out:

The bandits that took over the South Trade Route are held up in the \c[22]Ruins of Ickta\c[0]. You have been asked to rid them of the place so the monks can have their place of worship back.

for the description of the quest in the quest window when viewing this quest
Title: Re: Quest Journal v. 2.1
Post by: Adrien on December 06, 2011, 05:26:26 AM
So would you consider this a bug then?
Title: Re: Quest Journal v. 2.1
Post by: pacdiggity on December 06, 2011, 09:50:20 AM
With respect to the codes, you need to have the Special Codes Formatter, but also, if you are using "" for options, then you need to escape back slashes.
Do you have that?
Title: Re: Quest Journal v. 2.1
Post by: Adrien on December 11, 2011, 08:27:17 PM
Since this script uses the paragraph format script \\lb does not work to split up paragraphs - so is there another way of splitting up paragraphs?
Title: Re: Quest Journal v. 2.1
Post by: Bigace on December 12, 2011, 11:25:00 PM
Is there chance this can be translated to XP, as this is best Quest Journal I've seen but sadly its on VX. :'(
Title: Re: Quest Journal v. 2.1
Post by: game_guy on December 14, 2011, 05:53:36 AM
I still need to upgrade my Quest Config program. xD If you guys would like me to, I wouldn't mind picking up the project again.
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on December 17, 2011, 08:32:24 PM
I still need to upgrade my Quest Config program. xD If you guys would like me to, I wouldn't mind picking up the project again.
that would be cool :D maybe update it with the demo i made? (it has an addon)
Title: Re: Quest Journal v. 2.1
Post by: Peverell Crest on December 19, 2011, 01:12:46 PM
Hello modern algebra. I want to thank you for this script. It has been very useful in the game I am trying to make.

I have two inquiries, though.

First, I am wondering if there is a way where I can complete a quest even if there are some failed objectives?
I am aware about the prime argument, but what I want to do is set up a conditional branch where it will check the number of failed objectives, and decide upon it if the quest will fail or be completed. (e.g.: fail more than two out of five objectives, the quest will fail, otherwise, the quest will be completed.)

Another one is that; is it possible to add an icon at the description?
In line 348, I wanted to write a description where it defines the meaning of each icon.

Code: [Select]
VOCAB_HELP_GENERAL = "[show the icon for active quest here]Active Quests, [show the icon for completed quest here]Completed Quests, [show the icon for failed quest here]Failed Quests"

Thanks ! ^-^
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on December 19, 2011, 01:33:10 PM
For the first, yes. All you would need to do is make sure there are no prime objectives. That way, the quest wouldn't automatically fail. Then you could easily enough check how many objectives have been failed through the traditional means. Ie, if you are looking or particular objectives to be failed, then you could use this code in a conditional branch [see line 160 of implementation]:

Code: [Select]
#        objective_failed? (quest_id, objective_id_1, ... objective_id_n)
#          This is satisfied if all the listed objectives have been failed



And no, there is currently no way built in to the Quest Journal to show icons in the Help Window. However, you could grab my Global Text Codes script (just find it in the RMVX Script Index), and if you use that, then all you would need to do is something like this:

Code: [Select]
VOCAB_HELP_GENERAL = "\\i[149]Active Quests : \\i[150]Completed Quests : \\i[179]Failed Quests"
Title: Re: Quest Journal v. 2.1
Post by: game_guy on December 20, 2011, 01:56:31 AM
MA, I'd like to get permission to include the add-on scripts in the configuration program.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on December 20, 2011, 04:28:02 AM
Yeah, sounds great!
Title: Re: Quest Journal v. 2.1
Post by: Peverell Crest on December 20, 2011, 12:44:50 PM
ma, thanks for the Global Text Codes solution. It worked for me. ;D


I still have a problem with my first inquiry, however. How can I set up a quest with no prime objective? If I did not define the prime, it will require that all objectives must be completed in order to complete the quest. prime = [none] is not a valid value; and thus generated a crash.
But even if I can set up a quest without a prime objective, how can I complete or fail the quest? There is no script command that will enable me to complete or fail a quest directly. Like:
Code: [Select]
complete_quest (quest_id)
fail_quest (quest_id)

:-[
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on December 20, 2011, 05:50:09 PM
Just set it directly as:

Code: [Select]
prime = []

then there will be no prime objectives, though I suppose that would make it automatically complete. without doing anything.

I guess I would need to add a feature that allows for manual completion. Here: paste the following into its own slot below the Quest Journal:

Code: [Select]
#==============================================================================
# ** Game_Quest
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new public instance variable - manual_complete; manual_fail
#    aliased method - initialize; complete?; failed?
#==============================================================================

class Game_Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :manual_complete
  attr_accessor :manual_fail
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_mancomqj2_initz_5gf1 initialize
  def initialize(*args, &block)
    ma_mancomqj2_initz_5gf1(*args, &block) # Run Original Method
    @manual_complete = false
    @manual_fail = false
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Check if Complete
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mlg_qj2mncomp_compl_6yo9 complete?
  def complete?(*args, &block)
    if @prime_objectives.empty?
      return @manual_complete
    else
      mlg_qj2mncomp_compl_6yo9(*args, &block) # Run Original Method
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Check if Failed
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mlg_qj2manclet_failed_4rm9 failed?
  def failed?(*args, &block)
    if @prime_objectives.empty?
      return @manual_fail
    else
      mlg_qj2manclet_failed_4rm9(*args, &block)
    end
  end
end

#==============================================================================
# ** Game_Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new methods - manually_fail_quest; manually_complete_quest
#==============================================================================

class Game_Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Manually Complete Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def manually_complete_quest(quest_id)
    $game_party.quests[quest_id].manual_complete = true
    $game_party.quests[quest_id].manual_fail = false
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Manually Fail Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def manually_fail_quest(quest_id)
    $game_party.quests[quest_id].manual_complete = false
    $game_party.quests[quest_id].manual_fail = true
  end
end

Now, what you will need to do is directly set the prime to [], as above. To complete the quest, you use the code:

Code: [Select]
manually_complete_quest (quest_id)

To fail a quest, use the code:

Code: [Select]
manually_fail_quest (quest_id)

Where quest_id for both is, of course, an integer.

Mind you, the manual control only applies to quests where there are no prime objectives.

That is untested, so tell me if there are errors.
Title: Re: Quest Journal v. 2.1
Post by: Peverell Crest on December 21, 2011, 07:17:28 AM
Thank you so much, ma.
It works perfectly!!! :tpg:
Title: Re: Quest Journal v. 2.1
Post by: Adrien on January 06, 2012, 02:09:20 AM
might want to consider making this scroll properly on the right hand side where you see quest info. just a thought:

Title: Re: Quest Journal v. 2.1
Post by: modern algebra on January 06, 2012, 02:23:08 AM
What do you mean by properly? No cut off at the bottom?

It is designed to scroll incrementally when the player is moving it, so I did not bother changing the size of the actual contents since there will always be some cut off at least. I suppose I could change it and make it so that if a character stops scrolling it at a point where there would be cut off, it forces it to scroll the rest of the distance.
Title: Re: Quest Journal v. 2.1
Post by: Adrien on January 06, 2012, 06:14:33 AM
wait I can scroll down to see other objectives if they are listed? how? pressing the down button does nothing >_>
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on January 06, 2012, 02:45:26 PM
Well, assuming that you are using 2.1, all you need to do is press enter and then the window should be scrollable.

If you are not able to do that, it is a bug, but not one that I know how to reproduce; if you could make a new project and reproduce the error for me and send it, then I will take a look.
Title: Re: Quest Journal v. 2.1
Post by: Geraxxx on January 20, 2012, 12:28:09 PM
sorry i cant good write english but i have a question.

i have insert a quest in a questlog...after i complete this quest how i can delete this from the questlog?

Title: Re: Quest Journal v. 2.1
Post by: modern algebra on January 20, 2012, 09:01:58 PM
In a call script:
Code: [Select]
remove_quest(quest_id)

So, if you wanted to get rid of Quest 7, then it would be:

Code: [Select]
remove_quest(5)

That's assuming you're using 2.1 and not 1.1
Title: Re: Quest Journal v. 2.1
Post by: ThugLifeWhyteboi on January 22, 2012, 12:32:50 PM
Hi, I am having a problem with the Script v. 2.1, it seems like a bug, because it will only happen if i press the "Esc"  Menu button really fast after loading a file, if i wait like 2 seconds and press it, it wont happen, its really wierd. heres the error:
Script 'Quest Journal2.1' line 2154: NomethodError occured.    Undefined method 'each' for nil:class, thanks, it would be really cool if this could be fixed, because it is very useful and beautiful in my game. Chronicles: The Sacred Verses...
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on January 22, 2012, 04:01:16 PM
I need more information than that. Line 2154 is not the same for both of us, since as you add quests and the like, the line numbers get changed (I'm assuming that you have not separated CONFIGURATION and IMPLEMENTATION into separate slots). So, just post the immediate context of that line in your game - ie. between 2-3 lines above it and 2-3 lines below it, and tell me which one in the section you post is line 2154.
Title: Re: Quest Journal v. 2.1
Post by: DarkBox on February 15, 2012, 08:45:57 AM
Hey there. I'm trying to update my game's quest log from 1.1 to 2.1 but im having a really big issue. i am using vx Neo Save System VI, and i cannot load files saved with the old quest lolg 1.1. It says
Script 'Neo Save System VI' line 517: ArgumentError occurred.
undefined class/module ModAlg_QuestData::

this is its script:
Code: [Select]
#==========================================================================
# ? [VX] ? Neo Save System VI ? ?
#---------------------------------------------------------------------------
# ? Author: Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Last Updated:
# ? Version: III -> VI (By Helladen)
# ? Screenshot image credit Andreas21, and Cybersam
# ? Commerical usage ask Wortana.
#---------------------------------------------------------------------------
# ? Log VI:
# - Cleaned up comments and code format.
# - Added corresponding map variables system to MAP_NO_NAME.
# - Added where you can use premade images that use a map's name.
#---------------------------------------------------------------------------
# ? Log V:
# - Screenshot support for those who want tone/weather/sprites.
# - Added an option to stay in save screen after you save the game.
#---------------------------------------------------------------------------
# ? Log IV:
# - New addition for hiding map names. You can control the switch to
#   allow MAP_NO_NAME_LIST to work or not.
# - Revised some of the settings and script organization.
# - Added an option to disable the vocab::Gold text right of the number.
# - Added an option to use default opacity or not.
# - Swap tile compatibility support.
#---------------------------------------------------------------------------
# ? Log III:
# - Changed back to draw tile map for save image, don't need any image.
# - For drawing tile map, the characters won't show on the tile map.
#---------------------------------------------------------------------------
# ? Log II:
# - Screenshot DLL is not work with Vista Aero, so I remove it
#   and use image for each map instead of screenshot.
# - Actor's level in last version (V.1) is incorrect.
#---------------------------------------------------------------------------
# ? Features:
# - Unlimited save slots, you can choose max save slot
# - Many configuration options
# - Swap tile support
# - You can use image for scene's background
# - Choose your save file's name, and folder to store save files
# - Choose to show only information you want
# - Editable text for information's title
# - Draw tile map for map that player is currently on.
# - Remove text you don't want from map's name (e.g. tags for special script)
# - Choose map that you don't want to show the name on
# - Include save confirmation window before overwrite old save
#===========================================================================

module Wora_NSS Wora_NSS
  #==========================================================================
  # * START NEO SAVE SYSTEM - SETUP
  #--------------------------------------------------------------------------
  OPACITY_DEFAULT = true # This will use the default opacity for windows.
  # Please note that this will affect both opacitys below.
 
  NSS_WINDOW_OPACITY = 255 # All windows' opacity (Lowest 0 - 255 Highest).
 
  # You can change this to 0 in case you want to use image for background.
  NSS_IMAGE_BG = '' # Background image file name, it must be in folder picture
  #    use '' for no background.
  NSS_IMAGE_BG_OPACITY = 255 # Opacity for background image.
 
  # If you use the screenshot method this does not matter.
  SWAP_TILE = true # Make this false if you don't use the swap_tile script
  SWAP_TILE_SWITCH = 278 # The switch needs to be the same as your swap tile
  #    switch, but if SWAP_TILE is false it does not matter.
 
  # If this is true it will screenshot the map, if false it will draw it.
  SCREENSHOT_IMAGE = true # Drawing the map is good because it doesn't require
  # a .DLL or images for the screenshot, and it will have tone and
  # weather. If you are using SwapXT and this value is false you need to turn
  # on swap tile.
 
  # Do you want to use your own custom images for each map via map name.
  PREMADE_IMAGE = false # If this is true it sets its priority over
  #    screenshots/etc.
 
  # Image type for screenshot '.bmp', or '.jpg', or '.png'.
  IMAGE_FILETYPE = '.png'
 
  # If this is true then the scene will not change when you save the game.
  SCENE_CHANGE = true # Changes scene to map instead of remaining in Save screen.

  MAX_SAVE_SLOT = 20 # Max save slots.
  SLOT_NAME = 'SLOT {id}'
 
  # Name of the slot (show in save slots list), use {id} for slot ID.
  SAVE_FILE_NAME = 'Save{id}.rvdata'
  # Save file name, you can also change its file type from .rvdata to other.
 
  # Use {id} for save slot ID.
  SAVE_PATH = 'Save/' # Path to store save file, e.g. 'Save/' or '' (for game folder).
  SAVED_SLOT_ICON = 133 # Icon Index for saved slot.
 
  EMPTY_SLOT_ICON = 141 # Icon Index for empty slot.
  EMPTY_SLOT_TEXT = '-NO DATA-' # Text to show for empty slot's data.
 
  DRAW_GOLD = true # Draw Gold.
  DRAW_PLAYTIME = true # Draw playtime.
  DRAW_LOCATION = true # Draw location.
  DRAW_FACE = true # Draw actor's face.
  DRAW_LEVEL = true # Draw actor's level.
  DRAW_NAME = true # Draw actor's name.
  DRAW_TEXT_GOLD = false # Draw the vocab::Gold text to the right of the number.
 
  PLAYTIME_TEXT = 'Play Time: '
  GOLD_TEXT = 'Gold: '
  LOCATION_TEXT = 'Location: '
  LV_TEXT = 'Lv. '
 
  MAP_NAME_TEXT_SUB = %w{}
  # Text that you want to remove from map name,
  # e.g. %w{[LN] [DA]} will remove text '[LN]' and '[DA]' from map name.
 
  # Do we want to use corresponding variables for each map number in MAP_NO_NAME_LIST?
  MAP_NO_NAME_VARIABLE = true # You just apply the value one to the variable which
  # is the map number to change it from MAP_NO_NAME.
 
  MAP_NO_NAME_LIST = [2] # ID of Map that will not show map name, e.g. [1,2,3].
  MAP_NO_NAME = '???' # What you will use to call the map in the no name list.

  # This is a switch that can activate or deactivate maps from being displayed as
  # MAP_NO_NAME. If it is off then maps will return back to normal.
  MAP_NO_NAME_SWITCH = 278 # This switch has to be on for MAP_NO_NAME_LIST to work.
 
  MAP_BORDER = Color.new(0,0,0,200) # Map image border color (R,G,B,Opacity).
  FACE_BORDER = Color.new(0,0,0,200) # Face border color.
 
  # Save confirmation window
  SFC_Text_Confirm = 'Overwrite Save File' # Text to confirm to save file.
  SFC_Text_Cancel = 'Cancel' # Text to cancel to save.
  SFC_Window_Width = 200 # Width of Confirmation Window.
  SFC_Window_X_Offset = 0 # Move Confirmation Window horizontally.
  SFC_Window_Y_Offset = 0 # Move Confirmation Window vertically.
 
  #-------------------------------------------------------------------------
  # END NEO SAVE SYSTEM - SETUP (Edit below at your own risk)
  #=========================================================================
 
  #-------------------------------------------------------------
  # Screenshot V2 by Andreas21 and Cybersam
  #-------------------------------------------------------------
  @screen = Win32API.new 'screenshot', 'Screenshot', %w(l l l l p l l), ''
  @readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
  @findwindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
  module_function
 
  def self.shot(file_name)
case IMAGE_FILETYPE
  when '.bmp'; typid = 0
  when '.jpg'; typid = 1
  when '.png'; typid = 2
end

# Get Screenshot
filename = file_name + IMAGE_FILETYPE
@screen.call(0, 0, Graphics.width, Graphics.height, filename, self.handel,
typid)
  end
 
  def self.handel
game_name = "\0" * 256
@readini.call('Game','Title','',game_name,255,".\\Game.ini")
game_name.delete!("\0")

return @findwindow.call('RGSS Player',game_name)
  end
end

class Scene_File < Scene_Base
  include Wora_NSS
  attr_reader :window_slotdetail
 
  #-------------------------------------------------------------------------
  # * Start processing
  #-------------------------------------------------------------------------
  def start
super

create_menu_background

if NSS_IMAGE_BG != ''
  @bg = Sprite.new
  @bg.bitmap = Cache.picture(NSS_IMAGE_BG)
  @bg.opacity = NSS_IMAGE_BG_OPACITY
end

@help_window = Window_Help.new
command = []

(1..MAX_SAVE_SLOT).each do |i|
  command << SLOT_NAME.clone.gsub!(/\{ID\}/i) { i.to_s }
end

@window_slotdetail = Window_NSS_SlotDetail.new
@window_slotlist = Window_SlotList.new(160, command)
@window_slotlist.y = @help_window.height
@window_slotlist.height = Graphics.height - @help_window.height

if !OPACITY_DEFAULT
  @help_window.opacity = NSS_WINDOW_OPACITY
  @window_slotdetail.opacity = @window_slotlist.opacity = NSS_WINDOW_OPACITY
end

# Create folder for save file
if SAVE_PATH != ''
  Dir.mkdir(SAVE_PATH) if !FileTest.directory?(SAVE_PATH)
end

if @saving
  @index = $game_temp.last_file_index
  @help_window.set_text(Vocab::SaveMessage)
else
  @index = self.latest_file_index
  @help_window.set_text(Vocab::LoadMessage)
 
  (1..MAX_SAVE_SLOT).each do |i|
@window_slotlist.draw_item(i-1, false) if !@window_slotdetail.file_exist?(i)
  end
end

@window_slotlist.index = @index

# Draw information
@last_slot_index = @window_slotlist.index
@window_slotdetail.draw_data(@last_slot_index + 1)
  end
 
  #-------------------------------------------------------------------------- 
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
super

dispose_menu_background

unless @bg.nil?
  @bg.bitmap.dispose
  @bg.dispose
end

@window_slotlist.dispose
@window_slotdetail.dispose
@help_window.dispose
  end
 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
super

if !@confirm_window.nil?
  @confirm_window.update
 
  if Input.trigger?(Input::C)
if @confirm_window.index == 0
  determine_savefile
  @confirm_window.dispose
  @confirm_window = nil
else
  Sound.play_cancel
  @confirm_window.dispose
  @confirm_window = nil
end
  elsif Input.trigger?(Input::B)
Sound.play_cancel
@confirm_window.dispose
@confirm_window = nil
  end
else
  update_menu_background
  @window_slotlist.update
 
  if @window_slotlist.index != @last_slot_index
@last_slot_index = @window_slotlist.index
@window_slotdetail.draw_data(@last_slot_index + 1)
  end
 
  @help_window.update
  update_savefile_selection
end
  end
 
  #--------------------------------------------------------------------------
  # * Update Save File Selection
  #--------------------------------------------------------------------------
  def update_savefile_selection
if Input.trigger?(Input::C)
  if @saving and @window_slotdetail.file_exist?(@last_slot_index + 1)
Sound.play_decision
text1 = SFC_Text_Confirm
text2 = SFC_Text_Cancel
@confirm_window = Window_Command.new(SFC_Window_Width,[text1,text2])
@confirm_window.x = ((544 - @confirm_window.width) / 2) + SFC_Window_X_Offset
@confirm_window.y = ((416 - @confirm_window.height) / 2) + SFC_Window_Y_Offset
  else
determine_savefile
  end
elsif Input.trigger?(Input::B)
  Sound.play_cancel
  return_scene
end
  end
 
  #--------------------------------------------------------------------------
  # * Execute Save
  #--------------------------------------------------------------------------
  def do_save
if SCREENSHOT_IMAGE
  File.rename(SAVE_PATH + 'temp' + IMAGE_FILETYPE,
  make_filename(@last_slot_index).gsub(/\..*$/){ '_ss' } + IMAGE_FILETYPE) 
end 

file = File.open(make_filename(@last_slot_index), "wb")
write_save_data(file)
file.close   

# Alter the scene after the saving is done
if SCENE_CHANGE
  $scene = Scene_Map.new
else
  $scene = Scene_File.new(true, false, false)
end
  end
 
  #--------------------------------------------------------------------------
  # * Execute Load
  #--------------------------------------------------------------------------
  def do_load
file = File.open(make_filename(@last_slot_index), "rb")
read_save_data(file)
file.close
$scene = Scene_Map.new
RPG::BGM.fade(1500)
Graphics.fadeout(60)
Graphics.wait(40)
@last_bgm.play
@last_bgs.play
  end
 
  #--------------------------------------------------------------------------
  # * Confirm Save File
  #--------------------------------------------------------------------------
  def determine_savefile
if @saving
  Sound.play_save
  do_save
else
  if @window_slotdetail.file_exist?(@last_slot_index + 1)
Sound.play_load
do_load
  else
Sound.play_buzzer
return
  end
end

$game_temp.last_file_index = @last_slot_index
  end
 
  #--------------------------------------------------------------------------
  # * Create Filename
  # file_index : save file index (0-3)
  #--------------------------------------------------------------------------
  def make_filename(file_index)
return SAVE_PATH + SAVE_FILE_NAME.gsub(/\{ID\}/i) { (file_index + 1).to_s }
  end
 
  #--------------------------------------------------------------------------
  # * Select File With Newest Timestamp
  #--------------------------------------------------------------------------
  def latest_file_index
latest_index = 0
latest_time = Time.at(0)

(1..MAX_SAVE_SLOT).each do |i|
  file_name = make_filename(i - 1)
  next if !@window_slotdetail.file_exist?(i)
  file_time = File.mtime(file_name)
 
  if file_time > latest_time
latest_time = file_time
latest_index = i - 1
  end
end

return latest_index
  end

class Window_SlotList < Window_Command
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
icon_index = 0
self.contents.clear_rect(rect)

if $scene.window_slotdetail.file_exist?(index + 1)
  icon_index = Wora_NSS::SAVED_SLOT_ICON
else
  icon_index = Wora_NSS::EMPTY_SLOT_ICON
end

if !icon_index.nil?
  rect.x -= 4
  draw_icon(icon_index, rect.x, rect.y, enabled) # Draw Icon
  rect.x += 26
  rect.width -= 20
end

self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index])
  end
 
  def cursor_down(wrap = false)
if @index < @item_max - 1 or wrap
  @index = (@index + 1) % @item_max
end
  end

  def cursor_up(wrap = false)
if @index > 0 or wrap
  @index = (@index - 1 + @item_max) % @item_max
end
  end
end

class Window_NSS_SlotDetail < Window_Base
  include Wora_NSS
 
  def initialize
super(160, 56, 384, 360)

@data = []
@exist_list = []
@bitmap_list = {}
@map_name = []
  end
 
  def dispose
dispose_tilemap
super
  end

  def draw_data(slot_id)
contents.clear # 352, 328
dispose_tilemap

load_save_data(slot_id) if @data[slot_id].nil?
  if @exist_list[slot_id]
save_data = @data[slot_id]
contents.fill_rect(0,30,352,152, MAP_BORDER)

if PREMADE_IMAGE
  bitmap = get_bitmap("Graphics/Save/" + @data[slot_id]['map_name'] + IMAGE_FILETYPE)
  rect = Rect.new((Graphics.width-348)/2,(Graphics.height-156)/2,348,156)
  contents.blt(2,32,bitmap,rect)
elsif SCREENSHOT_IMAGE and save_data['ss']
  bitmap = get_bitmap(save_data['ss_path'])
  rect = Rect.new((Graphics.width-348)/2,(Graphics.height-156)/2,348,156)
  contents.blt(2,32,bitmap,rect)
elsif SWAP_TILE and $game_switches[SWAP_TILE_SWITCH]
  create_swaptilemap(save_data['gamemap'].data, save_data['gamemap'].display_x,
  save_data['gamemap'].display_y)
else
  create_tilemap(save_data['gamemap'].data, save_data['gamemap'].display_x,
  save_data['gamemap'].display_y)
end

if DRAW_GOLD
  gold_textsize = contents.text_size(save_data['gamepar'].gold).width
  goldt_textsize = contents.text_size(GOLD_TEXT).width 
  contents.font.color = system_color
      contents.font.size = 18
  contents.draw_text(0, 0, goldt_textsize, WLH, GOLD_TEXT)
  contents.font.color = normal_color
  contents.draw_text(goldt_textsize, 0, gold_textsize, WLH, save_data['gamepar'].gold) 

  if DRAW_TEXT_GOLD
contents.draw_text(goldt_textsize + gold_textsize, 0, 200, WLH, Vocab::gold)

  else
gold_textsize = 0
goldt_textsize = 0
  end
end
   
if DRAW_PLAYTIME
  hour = save_data['total_sec'] / 60 / 60
  min = save_data['total_sec'] / 60 % 60
  sec = save_data['total_sec'] % 60
  time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
  pt_textsize = contents.text_size(PLAYTIME_TEXT).width
  ts_textsize = contents.text_size(time_string).width
  contents.font.color = system_color
  contents.draw_text(contents.width - ts_textsize - pt_textsize, 0,
  pt_textsize, WLH, PLAYTIME_TEXT)
  contents.draw_text(goldt_textsize + gold_textsize,0,200,WLH, Vocab::gold)
  contents.font.color = normal_color
  contents.draw_text(0, 0, contents.width, WLH, time_string, 2)
end

if DRAW_LOCATION
  lc_textsize = contents.text_size(LOCATION_TEXT).width
  mn_textsize = contents.text_size(save_data['map_name']).width
  contents.font.color = system_color
  contents.draw_text(0, 190, contents.width, WLH, LOCATION_TEXT)
  contents.font.color = normal_color
  contents.draw_text(lc_textsize, 190, contents.width, WLH, save_data['map_name'])
end

# Draw level & name
save_data['gamepar'].members.each_index do |i|
  actor = save_data['gameactor'][save_data['gamepar'].members[i].id]
  face_x_base = (i*80) + (i*8)
  face_y_base = 216
  lvn_y_plus = 10
  lv_textsize = contents.text_size(actor.level).width
  lvt_textsize = contents.text_size(LV_TEXT).width
 
if DRAW_FACE
  contents.fill_rect(face_x_base, face_y_base, 84, 84, FACE_BORDER)
  draw_face(actor.face_name, actor.face_index, face_x_base + 2,
  face_y_base + 2, 80)
end

if DRAW_LEVEL
  contents.font.color = system_color
  contents.draw_text(face_x_base + 2 + 80 - lv_textsize - lvt_textsize,
  face_y_base + 2 + 80 - WLH + lvn_y_plus, lvt_textsize, WLH, LV_TEXT)
  contents.font.color = normal_color
  contents.draw_text(face_x_base + 2 + 80 - lv_textsize,
  face_y_base + 2 + 80 - WLH + lvn_y_plus, lv_textsize, WLH, actor.level)
end

if DRAW_NAME
      contents.font.size = 16
  contents.draw_text(face_x_base, face_y_base + 2 + 80 + lvn_y_plus - 6, 82,
  WLH, actor.name, 1)
      contents.font.size = 18
end
  end
else
  contents.draw_text(0,0, contents.width, contents.height - WLH, EMPTY_SLOT_TEXT, 1)
end
  end
 
  def load_save_data(slot_id)
file_name = make_filename(slot_id)

if file_exist?(slot_id) or FileTest.exist?(file_name)
  @exist_list[slot_id] = true
  @data[slot_id] = {}
 
  # Start load data
  file = File.open(file_name, "r")
  @data[slot_id]['time'] = file.mtime
  @data[slot_id]['char'] = Marshal.load(file)
  @data[slot_id]['frame'] = Marshal.load(file)
  @data[slot_id]['last_bgm'] = Marshal.load(file)
  @data[slot_id]['last_bgs'] = Marshal.load(file)
  @data[slot_id]['gamesys'] = Marshal.load(file)
  @data[slot_id]['gamemes'] = Marshal.load(file)
  @data[slot_id]['gameswi'] = Marshal.load(file)
  @data[slot_id]['gamevar'] = Marshal.load(file)
  @data[slot_id]['gameselfvar'] = Marshal.load(file)
  @data[slot_id]['gameactor'] = Marshal.load(file)
  @data[slot_id]['gamepar'] = Marshal.load(file)
  @data[slot_id]['gametro'] = Marshal.load(file)
  @data[slot_id]['gamemap'] = Marshal.load(file)
  @data[slot_id]['total_sec'] = @data[slot_id]['frame'] / Graphics.frame_rate
 
  # Save the image
  if SCREENSHOT_IMAGE
@data[slot_id]['ss_path'] = file_name.gsub(/\..*$/){'_ss'} + IMAGE_FILETYPE
@data[slot_id]['ss'] = FileTest.exist?(@data[slot_id]['ss_path'])
  end
 
  @data[slot_id]['map_name'] = get_mapname(@data[slot_id]['gamemap'].map_id)
  file.close
else
  @exist_list[slot_id] = false
  @data[slot_id] = -1
end
  end

  def make_filename(file_index)
return SAVE_PATH + SAVE_FILE_NAME.gsub(/\{ID\}/i) { (file_index).to_s }
  end
 
  def file_exist?(slot_id)
return @exist_list[slot_id] if !@exist_list[slot_id].nil?

@exist_list[slot_id] = FileTest.exist?(make_filename(slot_id))

return @exist_list[slot_id]
  end
 
  def get_bitmap(path)
if !@bitmap_list.include?(path)
  @bitmap_list[path] = Bitmap.new(path)
end

return @bitmap_list[path]
  end
 
  def get_mapname(map_id)
if @map_data.nil?
  @map_data = load_data("Data/MapInfos.rvdata")
end
 
if @map_name[map_id].nil?
  if MAP_NO_NAME_LIST.include?(map_id) and $game_switches[MAP_NO_NAME_SWITCH]
if $game_variables[map_id] == 0 or !MAP_NO_NAME_VARIABLE
  @map_name[map_id] = MAP_NO_NAME
else
  @map_name[map_id] = @map_data[map_id].name
end 
  else
@map_name[map_id] = @map_data[map_id].name
  end

  MAP_NAME_TEXT_SUB.each_index do |i|
@map_name[map_id].sub!(MAP_NAME_TEXT_SUB[i], '')
@mapname = @map_name[map_id]
  end
end

return @map_name[map_id]
  end   
 
  def create_tilemap(map_data, ox, oy)
@viewport = Viewport.new(self.x + 2 + 16, self.y + 32 + 16, 348,156)
@viewport.z = self.z
@tilemap = Tilemap.new(@viewport)
@tilemap.bitmaps[0] = Cache.system("TileA1")
@tilemap.bitmaps[1] = Cache.system("TileA2")
@tilemap.bitmaps[2] = Cache.system("TileA3")
@tilemap.bitmaps[3] = Cache.system("TileA4")
@tilemap.bitmaps[4] = Cache.system("TileA5")
@tilemap.bitmaps[5] = Cache.system("TileB")
@tilemap.bitmaps[6] = Cache.system("TileC")
@tilemap.bitmaps[7] = Cache.system("TileD")
@tilemap.bitmaps[8] = Cache.system("TileE")
@tilemap.map_data = map_data
@tilemap.ox = ox / 8 + 99
@tilemap.oy = oy / 8 + 90
  end
 
  def create_swaptilemap(map_data, ox, oy)
@viewport = Viewport.new(self.x + 2 + 16, self.y + 32 + 16, 348,156)
@viewport.z = self.z
@tilemap = Tilemap.new(@viewport)

tile1 = Cache_Swap_Tiles.swap($tileA1 + ".png") rescue nil
tile2 = Cache_Swap_Tiles.swap($tileA2 + ".png") rescue nil
tile3 = Cache_Swap_Tiles.swap($tileA3 + ".png") rescue nil
tile4 = Cache_Swap_Tiles.swap($tileA4 + ".png") rescue nil
tile5 = Cache_Swap_Tiles.swap($tileA5 + ".png") rescue nil
tile6 = Cache_Swap_Tiles.swap($tileB + ".png") rescue nil
tile7 = Cache_Swap_Tiles.swap($tileC + ".png") rescue nil
tile8 = Cache_Swap_Tiles.swap($tileD + ".png") rescue nil
tile9 = Cache_Swap_Tiles.swap($tileE + ".png") rescue nil

if $tileA1 != nil
  @tilemap.bitmaps[0] = tile1
else
  @tilemap.bitmaps[0] = Cache.system("TileA1")
end

if $tileA2 != nil
  @tilemap.bitmaps[1] = tile2
else
  @tilemap.bitmaps[1] = Cache.system("TileA2")
end

if $tileA3 != nil
  @tilemap.bitmaps[2] = tile3 
else
  @tilemap.bitmaps[2] = Cache.system("TileA3")
end 

if $tileA4 != nil
  @tilemap.bitmaps[3] = tile4
else
  @tilemap.bitmaps[3] = Cache.system("TileA4")
end

if $tileA5 != nil
  @tilemap.bitmaps[4] = tile5 
else
  @tilemap.bitmaps[4] = Cache.system("TileA5")
end

if $tileB != nil
  @tilemap.bitmaps[5] = tile6
else
  @tilemap.bitmaps[5] = Cache.system("TileB") 
end 

if $tileC != nil
  @tilemap.bitmaps[6] = tile7
else
  @tilemap.bitmaps[6] = Cache.system("TileC")
end 

if $tileD != nil
  @tilemap.bitmaps[7] = tile8
else
  @tilemap.bitmaps[7] = Cache.system("TileD") 
end

if $tileE != nil
  @tilemap.bitmaps[8] = tile9
else
  @tilemap.bitmaps[8] = Cache.system("TileE") 
end
 
@tilemap.map_data = map_data
@tilemap.ox = ox / 8 + 99
@tilemap.oy = oy / 8 + 90
  end

  def dispose_tilemap
unless @tilemap.nil?
  @tilemap.dispose
  @tilemap = nil
  end
end
  end
end

class Scene_Title < Scene_Base
  def check_continue
file_name = Wora_NSS::SAVE_PATH + Wora_NSS::SAVE_FILE_NAME.gsub(/\{ID\}/i) { '*' }
@continue_enabled = (Dir.glob(file_name).size > 0)
  end
end

class Scene_Map < Scene_Base
  alias wora_nss_scemap_ter terminate
 
  def terminate
Wora_NSS.shot(Wora_NSS::SAVE_PATH + 'temp')
wora_nss_scemap_ter
  end
end
#======================================================================
# END - NEO SAVE SYSTEM by Woratana and Helladen
#======================================================================

Someone had this same issue on page 18 but they just stopped using old saves. I however need to use the old saves because I am just updating my game and not releasing it... Is there anything you can do to help me out? Do you know anything about how data is saved in a save file or how we could change it to work with the new version?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on February 15, 2012, 02:24:00 PM
It's possible to preserve the old save files, but it'd be a bit of a hassle and I really don't want to do it unless there's a good reason. Why do you want to update? Is there some feature in 2.1 that you really want?
Title: Re: Quest Journal v. 2.1
Post by: DarkBox on February 15, 2012, 02:28:52 PM
It's possible to preserve the old save files, but it'd be a bit of a hassle and I really don't want to do it unless there's a good reason. Why do you want to update? Is there some feature in 2.1 that you really want?

I really don't mean to be a hassle and I seriously appreciate your help! :)
My other team member thinks its really important for us to update to 2.1. We love the custom categories, the reward system, and the text in 1.1 is getting cut off a bit, also the icons, etc. I've been looking at trying to edit the save file, but theyre saved in some kind of marshal thing and i have no clue how to actually edit them properly XD
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on February 15, 2012, 02:48:31 PM
Alright, well I'll do it sometime in the next week or two. I have something I am working right now that I want to get finished before doing any thing else.
Title: Re: Quest Journal v. 2.1
Post by: DarkBox on February 15, 2012, 03:04:29 PM
Alright, well I'll do it sometime in the next week or two. I have something I am working right now that I want to get finished before doing any thing else.
alright, that's fine. we'll release this update with the old journal and then maybe the new journal system for our version 2 release.
Title: Re: Quest Journal v. 2.1
Post by: icywind on February 16, 2012, 10:45:37 PM
Will you be making a VXA version?
Title: Re: Quest Journal v. 2.1
Post by: Hoodlum on February 17, 2012, 12:06:16 AM
I'm having an issue with this Quest Journal. When my description of the quest is too long (making the right-hand window scrollable), the last revealed objective dissapears. Screenshot:
(http://i.imgur.com/lC2QQ.jpg)
But when I change the font size in configuration to smaller, the last objective is visible:
(http://i.imgur.com/cooz9.jpg)
What the hell is wrong? Is there any way to fix this?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on February 17, 2012, 12:21:51 AM
Well, it appears that the contents size is being inaccurately calculated, but I am unfortunately unable to reproduce the error in my copy of the script.

That could mean it is an incompatibility or simply an oversight, but I will need to see the error in action. I would appreciate it if you could either: (a) send me the malfunctioning project; or (b) create a new project, reproduce the error, and send me that. Otherwise, I will not be able to help.
Title: Re: Quest Journal v. 2.1
Post by: Hoodlum on February 17, 2012, 12:30:44 AM
It's apparently not an incompatibility. I've tried this with demo project included in first post and result is the same. Quest in config:
Code: [Select]
when 1 # Quest 1
      name = "Duch"
      banner = "" # If using, must be a file from the Pictures folder
      description = "Jedna z wielu miejskich legend Pojebanowa mówi o duchu Thomasa Stoltza Seniora, zmarlego w \"wypadku samochodowym\" ksiegowego mafii. Wladze miasta nie maja nic do powiedzenia na ten temat, nie chcac wywolywac ogólnej paniki i dementuja wszystkie plotki, z pewnoscia bylyby jednak wdzieczne za uciszenie calej sprawy - w ten czy inny sposób."
      client = ""
      location = ""
      objectives[0] = "The first objective (ID 0)"
      objectives[1] = "Do this next (ID 1)"
      objectives[2] = "Return to collect your reward"
      objectives[3] = "next one"
      level = 0
      common_event = 0
      icon_index = 212
      custom_categories = []
Maybe these lines are the problem... Description is wrote in one line (it's wrapped in my post though).
Title: Re: Quest Journal v. 2.1
Post by: Necrofenser on February 17, 2012, 10:27:58 AM
I really like your script! Its very useful, can I use it in my commercial game?
Also will you ever update Quest Journal to be compatible with RPG Make VX Ace?
Title: Re: Quest Journal v. 2.1
Post by: pacdiggity on February 17, 2012, 11:03:39 AM
MA, people are going to keep asking for an Ace version as long as they have to until one is made. I don't know if you're planning on doing one soon, but if you're not I'd gladly attempt a porting if you allowed it (knowing that I'm still yet to understand completely how scenes are handled in Ace. Kinda waiting for an English release to explain that better to me ._.). Because I know you're a busy man. And it would certainly get people to stop pestering you about it.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on February 17, 2012, 12:16:59 PM
Thanks for the offer, but see attached :)

Not that I understand why people are so keen on it - RMVX Ace is not even released yet. They can't even use it.


As for the commercial thing, sure, as long as I get a free copy of the game  ^-^
Title: Re: Quest Journal v. 2.1
Post by: pacdiggity on February 17, 2012, 12:19:40 PM
Dang, you're fast ^_^
Awesome.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on February 17, 2012, 12:22:04 PM
That said, I would certainly encourage you to write your own Quest script. It's a lot of fun.
Title: Re: Quest Journal v. 2.1
Post by: Hoodlum on February 17, 2012, 10:41:28 PM
modern algebra, so what about my problem? Is there any way to fix this?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on February 17, 2012, 11:15:59 PM
It should be fixed. Get it from the first post. If you download the demo (http://rmrk.net/index.php?action=dlattach;topic=25533.0;attach=25804), you should only need to copy the IMPLEMENTATION section of the script, so you shouldn't need to disturb the CONFIGURATION section (unless you are updating from a version older than 2.1b).

Sorry for the error and thanks for reporting it. Just for the record, though, patience is a virtue  :police:
Title: Re: Quest Journal v. 2.1
Post by: Hoodlum on February 17, 2012, 11:32:45 PM
Sorry for the error and thanks for reporting it. Just for the record, though, patience is a virtue  :police:
Big thanks for this. And I am patient, you just didn't answered my last post and haven't told me that you are going to fix that bug. :P
Thanks again, awesome script.
Title: Re: Quest Journal v. 2.1
Post by: DarkBox on February 27, 2012, 09:45:07 AM
Alright, well I'll do it sometime in the next week or two. I have something I am working right now that I want to get finished before doing any thing else.
Hey there, modern algebra. Have you had a chance to check out my issue yet?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on February 27, 2012, 10:31:28 PM
No, sorry. I will try to do it before the week is over.
Title: Re: Quest Journal v. 2.1
Post by: swick on March 05, 2012, 03:00:10 PM
So I keep getting an error when I try to reveal just one quest, (the first and only one >.>) and it goes a little something like this:

NoMethodError occurred while running the script.

undefined method 'reveal_quest' for #<Game_Interpreter:0x2d14968>


Any idea what's up? I know I must be doing something wrong with the eventing or whatever, also I am using game_guy's Quest Journal Config.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on March 05, 2012, 09:08:09 PM
game_guy's Quest Journal Config only works for v. 1.1 of the Quest Journal, which means that if you pasted in the code generated by that, you are using v. 1.1. Almost all of the shortcut codes like reveal_quest were brought in with 2.0, so you can't use codes like reveal_quest. Read the header of the script generated by game_guy's program and you should see how those things are done in 1.1.
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on March 10, 2012, 06:38:50 PM
Thanks for the offer, but see attached :)

Not that I understand why people are so keen on it - RMVX Ace is not even released yet. They can't even use it.


As for the commercial thing, sure, as long as I get a free copy of the game  ^-^
Wow looks pretty nice that way, would be nice to make it that way in VX ^^
Title: Re: Quest Journal v. 2.1
Post by: Solomonghull on March 12, 2012, 08:13:30 PM
I've tried the demo but I'm still really confused on how to add my own quests in. Please help.

Sol.
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on March 12, 2012, 09:49:26 PM
In the abstract, I can't say it any better than I do in the Instructions and the Demo. Ask a more specific question and maybe I can help, but if I undertake to explain everything all over again then it will end up being identical to what I've already written in the instructions for the script.
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on March 12, 2012, 09:52:42 PM
I've tried the demo but I'm still really confused on how to add my own quests in. Please help.

Sol.
i'll try and make a demo once i have time and feel like it......(having a bad hair day -_-")
Title: Re: Quest Journal v. 2.1
Post by: cronospo on April 17, 2012, 04:47:08 PM
Hi everyone!
First of all, thanks for this wonderful script.

Just a (newbie) question: I would like to display in the description of a quest (or sub-quest) a variable (number, word...), modified during the game.
For example, an enemy is killing the 100 king's sons. The number decreases during the time, when you receive the quest to save the king's sons, I would like to display "Save the last 86 king's sons". It's possibile? How can i do it?

Thanks!
Title: Re: Quest Journal v. 2.1
Post by: Mitsarugi on April 27, 2012, 09:38:11 AM
Hi everyone!
First of all, thanks for this wonderful script.

Just a (newbie) question: I would like to display in the description of a quest (or sub-quest) a variable (number, word...), modified during the game.
For example, an enemy is killing the 100 king's sons. The number decreases during the time, when you receive the quest to save the king's sons, I would like to display "Save the last 86 king's sons". It's possibile? How can i do it?

Thanks!

i made that add-on ^^ here: http://rmrk.net/index.php/topic,44878.0.html
Title: Re: Quest Journal v. 2.1
Post by: kitten2021 on April 28, 2012, 08:59:36 PM
You know, modern_algebra, I think what might help a little more - because I see repeated questions posted through-out here - would be a YouTube video showing you the 'basics' of the script.

The video could show the copying/downloading of the script, installing it into your RMVX engine, then creating 1 basic quest in the script itself. Then it could as well show how to summon the quest in an event, say like with a person on the map, an event person. I know for me, I require an actual visible explanation of how to do things; just telling me wont work and eventually I'll just give up and move on.

I know that's a very large waste of your time, but if it stops people from posting the same things over and over again, it could actually be a great time saver. :)

I hope this is helpful!
Title: Re: Quest Journal v. 2.1
Post by: VirtueComplex on October 12, 2012, 07:15:23 PM
This is truly a wonderful script Modern. I'm not sure if this is just my inexperience, but i've foreseen a small issue with this for me in the future. Using the event command "script" I noticed that the box for writing script into is quite limited in length before the line splits to the line below it. I've noticed that for example if there were quests that fall in the double digits it would fit perfectly.

(For example Quest 1-99). --->$game_party.quests[12].complete_objective(0)

However, upon adding a third quest to make the quest ID a three digit number it sends the objective variable to the next line causing a script error, because as far as i know the entire command has to be on the same line or there is an Argument Error. For me namely, the error is 'ArgumentError occured while running script. wrong number of arguments(0 for 1). After some testing, I realized as beforementioned that as the command stretched on the next line it would cause and error.

For example $game_party.quests[122].complete_objective(0)   <--The quests digits when at 3 will push part of the command to the next line, causing an error  :'( .

I guess what i'm asking is there anyway to make this so that I can have more than 99 Quests? Because my game could use a lot more quests than that for the current project i'm working on.

I only have a very basic scripting knowledge (About enough to navigate the script without causing a nuclear explosion), so forgive me if i sound incompetent. :P

Thank you for taking time to read this. :]
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on October 12, 2012, 07:57:34 PM
Errm, well, assuming that you are using v. 2.1 and not 1.1, you really don't need to call the Game_Quest methods directly like that. I created a number of methods directly in Game_Interpreter to help fix that issue.

All you would need to do is use the following code:

Code: [Select]
complete_objective(122, 0)

All of the methods that are available to you are quoted in the first post:

Instructions

Paste this script into the Script Editor (F11) in its own slot above Main and below Materials.

I would recommend separating the Configuration module from the Script itself in two different slots, as I think it makes it neater. That is totally optional though. If you do want to do it though, instructions on where to make the split are located in the Script Header at line 20.

Instructions for creating, updating and monitoring quests, as well as for changing the settings, are all in the Script header and in the two EDITABLE REGIONS. It is highly recommended that you take the time to familiarize yourself with them in detail.

In brief, however, the following codes are used to update quest progress:

Code: [Select]
reveal_objective (quest_id, objective_id_1, ..., objective_id_n)
  quest_id : the integer ID of the quest you want to access.
  objective_id_1, ..., objective_id_n : a list of the IDs of the
    objectives you want to operate on. It can be as few as one or as
    many as all of them.
conceal_objective (quest_id, objective_id_1, ..., objective_id_n)
complete_objective (quest_id, objective_id_1, ..., objective_id_n)
uncomplete_objective (quest_id, objective_id_1, ..., objective_id_n)
fail_objective (quest_id, objective_id_1, ..., objective_id_n)
unfail_objective (quest_id, objective_id_1, ..., objective_id_n)
change_reward_status (quest_id, value)

The following codes are used in a conditional progress to monitor quest progress (each of the objective_etc? will only return as true if the quest is also revealed):

Code: [Select]
quest_revealed? (quest_id)
  quest_id : the integer ID of the quest you want to access.
objective_revealed? (quest_id, objective_id_1, ... objective_id_n)
  objective_id_1, ..., objective_id_n : a list of the IDs of the
    objectives you want to operate on. It can be as few as one or as
    many as all of them.
quest_complete? (quest_id)
objective_complete? (quest_id, objective_id_1, ... objective_id_n)
quest_failed? (quest_id)
objective_failed? (quest_id, objective_id_1, ... objective_id_n)
quest_rewarded? (quest_id)

For details on what each of these does, see the script. As well, there are lots of other instructions in the script you should pay attention to. Read them carefully!

You can also change the attributes of quests in-game with any of the following codes:

Code: [Select]
quest (quest_id).method = new_value
  method : the attribute you want to change. This can be either:
    banner; name; description; objectives; prime_objectives; rewards;
    common_event_id; icon_index; or custom_categories.
  new_value : this is the value that you are changing it to. It must
    be of the same form as the original (ie. a string for name or
    description, an array of strings for objectives, an integer for
    icon_index, etc...)


If you are still using 1.1, then I recommend you switch to 2.1, but if you are unwilling to do that, then please see the section on Call Script Errors in my Script Troubleshooting for the Non-Scripter (http://rmrk.net/index.php/topic,40220.0.html) tutorial. It has tips for breaking up the code into local variables in order to have the operative portion fit on one line.
Title: Re: Quest Journal v. 2.1
Post by: VirtueComplex on October 12, 2012, 09:50:00 PM
You're a life saver modern, thank you. I hadn't even noticed I had picked up 1.1. Updated to 2.1 and my problem is solved. Sorry about the confusion. Also thank you for such a quick reply, it means a lot! Keep up the good work buddy :]
Title: Re: Quest Journal v. 2.1
Post by: &&&&&&&&&&&&& on September 22, 2013, 12:16:29 AM
Please use [Insert code] to post scripts. It makes it easier on everybody.

Code: [Select]
Like this.

Code: [Select]
[code] *YOUR SCRIPT* [*/code]
Title: Re: Quest Journal v. 2.1
Post by: Strak on January 01, 2014, 01:19:48 AM
I hate to be the guy who asks the same question as the guy before him, but I've got a problem. It seems like the mission log doesn't want to scroll down when there are too many objectives, and you need to scroll to see them. It always tends to cut off the last objective, or if there is a reward, it doesn't show the reward (I have the rewards displayed at the bottom). I updated my implementation section with 2.1c, but it still has the same problem. Not sure what to do about it. I'll post both my config section and implementation section.

CONFIG (http://pastebin.com/L83Hg59d)
IMPLEMENTATION (http://pastebin.com/hWJH4Hcj)
Title: Re: Quest Journal v. 2.1
Post by: EvilM00s on March 07, 2014, 04:25:57 PM
This rocks, MA. In the project and playtested!


This project is gonna have your name all over it.
Title: Re: Quest Journal v. 2.1
Post by: loveisnoise on September 16, 2014, 09:36:45 AM
I really like your script!  :D i just have one question, is it possible to make quests only show up in one category?
Title: Re: Quest Journal v. 2.1
Post by: Chaos17 on September 17, 2014, 02:01:51 AM
Hi everyone!
First of all, thanks for this wonderful script.

Just a (newbie) question: I would like to display in the description of a quest (or sub-quest) a variable (number, word...), modified during the game.
For example, an enemy is killing the 100 king's sons. The number decreases during the time, when you receive the quest to save the king's sons, I would like to display "Save the last 86 king's sons". It's possibile? How can i do it?

Thanks!

i made that add-on ^^ here: http://rmrk.net/index.php/topic,44878.0.html
I didn't know about this!
*throw himself on the script*
Thank you I will take a look!
Title: Re: Quest Journal v. 2.1
Post by: Hogonka on December 04, 2014, 03:42:29 PM
I have added a fourth Quest and Now I keep getting errors anyone have any Idea how this is is possible?
Title: Re: Quest Journal v. 2.1
Post by: modern algebra on December 05, 2014, 02:16:58 AM
Well, I'd need to know what the errors are.
Title: Re: Quest Journal v. 2.1
Post by: GetEquppedPsyko on April 08, 2015, 08:04:15 PM
I know that switches can be used to make quests unavailable for purchase until said switch is turned on, but I was wondering if there is any sort of way I can make purchasing a quest trigger a switch to turn on. I looked through the script but couldn't find a clear answer as to if this would be possible.

This may have been answered before (sorry if it has!) but essentially I want to create almost monster hunter like quests where you can hunt X monster for X guild but you can only reach that monster if X switch has been triggered by purchasing said quest.
Title: Re: Quest Journal v. 2.1
Post by: Regless on May 05, 2015, 12:26:19 AM
Hello. I'm hoping someone can help me. At the moment the quest objectives text seem to be built when the game initializes then then never afterwards. This poses a problem since I tend to change the objectives during play testing. I could hard code them in, but I plan on releasing them in chapters and foresee this becoming a major hassle for my audience players. So...


Is it possible to to get an update method for the quests objectives so that when I change them during play testing it updates without me having to hard code it in or restart the game? Thank you.
Title: Re: Quest Journal v. 2.1
Post by: blackberry-chan on May 08, 2018, 11:49:45 PM
I was using the old version of this script (and loving it), but decided to upgrade to this new version before I had too many quests put in that I would then have to transfer.  I got the Paragraph Formatter in place, switched over to the new Quest Journal, put all my quests back in, tweaked the settings... and encountered an error on trying to playtest.  Only then did I notice where it says "VX" at the top of this forum XD  I'm using VX Ace, but because the old version of the Quest Journal worked perfectly, I never realized these scripts weren't made for Ace.  Am I simply out of luck?  Is there any way to get the Paragraph Formatter/Quest Journal 2.1 to work in VX Ace, or should I just switch back to Quest Journal 1.1, which I know does work?

Edit: This is me being a moron.  Disregard.  Sorry for bumping the thread needlessly.