The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: modern algebra on February 19, 2012, 08:01:42 PM

Title: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 19, 2012, 08:01:42 PM
Quest Journal
Version: 1.0.3
Author: modern algebra
Date: 24 September 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.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs9.postimage.org%2Fxqkg17zcf%2Fqj1.png&hash=5e47bea9a18d2749a7b24d2728c511f8b6246d1c)
The default setup.

Keep in mind that there are dozens of ways you can rearrange that. I did not give that quest a banner, but aside from that, you can totally rearrange the order in which the data is shown (on a quest per quest basis, if necessary), you can add new categories, you can change the icons of the default categories, you can add new types of data to show, you can change the font used for any particular entry, you can remove the category label window, etc. You have a lot of control over how the script looks, so even if you don't like the look of the default setup shown above, give the script a try and see if you can change it to your satisfaction.

Instructions

Paste this script into its own slot in the Script Editor, above Main but below Materials. You may wish to separate the configuration part of the script from the rest of it, for easier updating. See the header of the script on where the spot to do that is.

Please see the Header of the Script for detailed instructions on configuration and use.

Script


The script is too long. Please get it from Pastebin (http://pastebin.com/4pAz9KG5). A demo will be released shortly.

Addons

Debug Addon (http://rmrk.net/index.php/topic,47539.0/topicseen.html) - napoleon has written a script that creates a debug menu for the Quest Journal, allowing you to manually complete or fail objectives in game to assist in testing.
Remove Quests from Default Categories (http://rmrk.net/index.php?topic=45127.msg580428#msg580428) - Some people use the script to display both quests and other information, and they would like the other information not to show up in the all, active, complete, and failed categories. This addon is for them.

Credit



Thanks


Support


Please post in this topic at RMRK.net to report any bugs, ask any questions, or make any comments or suggestions. Given the size of this script, I know that I have likely made errors and oversights. I greatly appreciate when someone reports errors.

Known Compatibility Issues

None currently. If you are using a custom menu script, however, it is recommended that the Quest Journal be below it in the Script Editor.

Demo


Brady has been kind enough to make a nice demo (http://rmrk.net/index.php/topic,45127.msg528094.html#msg528094) for working with the Quest Journal.

I will also be releasing a demo some time.

Author's Notes

This script imports most of the features from the VX version 2.1, as well as adds quite a few more.

One of the features that has not been imported is the Quest Shop. I will likely write an addon to the script for that feature sometime in the future, but for now I figured I would just release the basic script.
Title: Re: Quest Journal 1.0 [VXA]
Post by: DoctorTodd on February 19, 2012, 08:12:07 PM
Looks great, I'm glad you decided to export it to VXA.
Title: Re: Quest Journal 1.0 [VXA]
Post by: Bravo2Kilo on February 20, 2012, 03:38:20 AM
this is awesome this is one of the things I have been waiting for to come out for Ace
great job modern algebra
Title: Re: Quest Journal 1.0 [VXA]
Post by: Lunarea on February 20, 2012, 06:07:18 AM
I know of so many people that have been waiting for this script! (myself included)

Thanks so much.  :)
Title: Re: Quest Journal 1.0 [VXA]
Post by: hexgame on February 20, 2012, 06:14:05 AM
Yay, now all I need is someone to port over that Advanced Crafting System (ACS) script and all my favorite scripts will be ready for the English release :)
Title: Re: Quest Journal 1.0 [VXA]
Post by: AlexArmstrong on February 20, 2012, 03:44:30 PM
IT'S TOTALLY AWESOME!
May I call it "MALG Whatever Database"? (or AnythingJournal)
Because, even if you don't want quest journal, you can create with this script whatever you want. Wise using really grants ton of capabilities!
I played a little bit and got this - Travel Guide for jrpg tourists (Screenshot):
http://imageshack.us/photo/my-images/88/img1zw.png
With QuestJournal for old VX I created Achievments scene, with Ace version it's much easier, and (thanks to categories!) can be combined with other cool things (like Quest+Notes+Achievments Scene). 
This scripts makes me very happy! I like huge descriptions. And ranks (star icons super, and F-E-D-C-B-A-S for ninja games!). Omg, Global Text Codes works, I get colored quest name right now. It's remind me about ATS, both scripts have great customization (there was Synthesys Shop example in ATS VX 3.0 demo, and I created Teleportation System with Advanced Choises).
What it's all about. I really want to say "Thank you, modern algebra!". For AnythingJournal and other scripts :)
Title: Re: Quest Journal 1.0 [VXA]
Post by: cozziekuns on February 20, 2012, 05:38:05 PM
The legend returns.

Great job, MA!
Title: Re: Quest Journal 1.0 [VXA]
Post by: pacdiggity on February 20, 2012, 07:54:37 PM
Needs more Neo Gauge.
THIS IS AWESOME YOU ARE AMAZING.
Title: Re: Quest Journal 1.0 [VXA]
Post by: modern algebra on February 20, 2012, 09:01:55 PM
Well, I am glad you all like it and I hope that it doesn't disappoint!

And I am glad that you like the customization AlexArmstrong, It's always hard to choose a balance between ease of use and customizability, and I don't think I ever strike it right. So it's nice to know when people put it to good use :) The travel journal looks good too. P.S. You don't need to put the "Major Name:" (Mayor?) inside the quest data itself: you can change it in the VOCAB hash itself. client and location are around line 355, and you can just change it from "" to "Major Name:"
Title: Re: Quest Journal 1.0 [VXA]
Post by: AlexArmstrong on February 21, 2012, 04:44:11 PM
Yes, I really like it. It's not simple easy script, but it have good instructions. After 1.5 hours I easily created travel guide first version in about 15 min (banner was the hardest thing xD). And yes, it was just quick test version, so i doesn't put much work in it (actually, even "name" word not neccessary, it's ok just with icon and text like "Mayor Daniel" or "King Arthur", "Elder Ralph" etc.).
Oh no, our publishing house made a mistake in travel guide... Sure, he is "mayor". No wonder so less tourists buying our guide xD
Well, waiting your other new scripts! (type of interesting in crafting system too). Best regards!

Oh, just now I get "can't convert symbol into string error" on this string  @data[quest_id].custom_categories.include?(list_type)
I created new category :guide and add q[:custom_categories] = [:guide] in my quest. I'm not sure, maybe I'm just missed something in categories, but I have no idea, what it is.
Title: Re: Quest Journal 1.0 [VXA]
Post by: modern algebra on February 21, 2012, 09:33:04 PM
Nah, that's my bad. Grab Version 1.0a from the first post. You don't need to replace the configuration, just the rest.
Title: Re: Quest Journal 1.0 [VXA]
Post by: Bravo2Kilo on February 21, 2012, 11:56:50 PM
there is an error when CONCURRENT_ACTIVITY is set to false
Script 'Window Selectable' line 212 NoMethodError occurred.
undefined method 'call' for :on_category_ok:Symbol
Title: Re: Quest Journal 1.0 [VXA]
Post by: modern algebra on February 22, 2012, 12:09:33 AM
Sorry, CTRL+F the following line:

Code: [Select]
    @quest_category_window.set_handler(:ok, :on_category_ok)

and change it to:

Code: [Select]
    @quest_category_window.set_handler(:ok, method(:on_category_ok))
Title: Re: Quest Journal 1.0 [VXA]
Post by: Zennethe on February 22, 2012, 10:21:10 AM
You've done it again... Love it! So glad such talented people are part of the RM community.

Yay, now all I need is someone to port over that Advanced Crafting System (ACS) script and all my favorite scripts will be ready for the English release :)
Now sure if this is exactly what you are looking for BUT in case it is...
http://grimoirecastle.wordpress.com/2011/12/12/synthesis-shop/ (http://grimoirecastle.wordpress.com/2011/12/12/synthesis-shop/)
Title: Re: Quest Journal 1.0b [VXA]
Post by: Seiryuki on February 22, 2012, 01:44:36 PM
The last script I need. Big thanks once again. ^-^
Title: Re: Quest Journal 1.0b [VXA]
Post by: Balthier99 on February 23, 2012, 10:53:59 PM

I can't use "objective_revealed?(a, b)" on a condition branch. It gives a No Method Error on Game_Interpreter.

Apart from that, it's an amazing script!
Once you are done with your extended choices, I'll have everything I need for my project's systems!

Title: Re: Quest Journal 1.0b [VXA]
Post by: modern algebra on February 24, 2012, 12:20:04 AM
Sorry, I will post the fixed version shortly.

Edit: Version 1.0c has been released
Title: Re: Quest Journal 1.0c [VXA]
Post by: Bravo2Kilo on February 24, 2012, 05:42:06 AM
I think there might be a problem with the description formatting
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1215.photobucket.com%2Falbums%2Fcc514%2Fdartdaman%2FFormatingError.png&hash=dd735a8e4ce8742db3403228695d1163e12ad140)
I used the script call quest(1).description = "" to change the description and this is how it turned out.
Title: Re: Quest Journal 1.0c [VXA]
Post by: modern algebra on February 24, 2012, 02:41:48 PM
Well, that's probably just a result of the width limitations in the Script field. I think what is happening is that the text between your "" extends over one line, and so it inserts \n after each line in the box, which is the next line code. The next line code is recognized by the formatting in this script since I wanted the user to be able to manually break line with \n if they wanted to do so. To fix your problem, you could do something like this in the script call instead:

Code: [Select]
d = "Jessica has told me that Boris is "
d += "looking for me. Maybe I should talk "
d += "to him before I do anything else."
quest(1).description = d
Title: Re: Quest Journal 1.0c [VXA]
Post by: Bravo2Kilo on February 24, 2012, 05:12:47 PM
it works great now thanks for the help modern algebra
Title: Re: Quest Journal 1.0c [VXA]
Post by: Balthier99 on February 24, 2012, 05:58:37 PM

Is there a way to make the "objectives" to have a different VOCAB on different custom layouts? For example: I have quests that use the default layout and the "objectives" VOCAB is set to "Summary". On another (custom) layout, I'd also like to use the "objectives", but this time with the VOCAB "Notes". I think I could create a new BASIC_DATA_TYPE and set its VOCAB to "Notes", but then it wouldn't answer to the functions I can use with objectives, like "reveal_objective(x, y)".
Title: Re: Quest Journal 1.0c [VXA]
Post by: modern algebra on February 25, 2012, 01:58:17 AM
I don't think that's a feature I care to add to the main script, but maybe I will write a little work around that would permit you to do it.
Title: Re: Quest Journal 1.0c [VXA]
Post by: Balthier99 on February 26, 2012, 11:45:44 AM
I understand. Thanks for that.
Title: Re: Quest Journal 1.0d [VXA]
Post by: Ambience on March 07, 2012, 11:51:38 PM
Thanks for the hard work. However, I got a problem. I do always get this Error (pic below), after the complete_objective function. I added a picture. The script I wrote are: "quest(1)", "reveal_objective(1, 1)" and "complete_objective (1, 1)", where it crashes.
As I'm the only one experiencing the problem I think it's my fault, but I don't know where. I used the sample quest for testing.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.abload.de%2Fthumb%2Fvxa_error2qxs1.png&hash=d32fb902ddff7e2214ab6bbd01cad5e4616fbd79) (http://www.abload.de/image.php?img=vxa_error2qxs1.png)
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on March 07, 2012, 11:55:28 PM
Don't put a space between complete_objective and (1, 1). In other words, do this:

Code: [Select]
complete_objective(1, 1)

And not this:

Code: [Select]
complete_objective (1, 1)
Title: Re: Quest Journal 1.0d [VXA]
Post by: Lunarea on March 13, 2012, 12:20:03 AM
I haven't seen this in the thread, but what are your TOS for using this script in commercial projects? Or do you have general TOS for commercial projects with all of your scripts?  :)
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on March 13, 2012, 01:19:39 AM
Generally, I am fine with people using my scripts in commercial projects, as long as I get a free copy of the game when it's finished.  :police:
Title: Re: Quest Journal 1.0d [VXA]
Post by: Lunarea on March 13, 2012, 01:36:51 AM
Great! I have a friend who's going to be branching into commercial projects with Ace, and I'm just about to recommend your scripts. I'll make sure you get a copy of his game when he's done developing. :)
Title: Re: Quest Journal 1.0d [VXA]
Post by: Mitsarugi on March 14, 2012, 11:26:21 PM
Wow MA i wish the VX version could look like that, it looks awesome :p
Title: Re: Quest Journal 1.0d [VXA]
Post by: Brandobscure001 on March 15, 2012, 04:17:13 PM
Good morning.
I love your script, but I can not make it work I speak French.
I can not do a quest!
how to activate the quest 1

Thank you in advance.
Title: Re: Quest Journal 1.0d [VXA]
Post by: Mitsarugi on March 15, 2012, 07:54:17 PM
Good morning.
I love your script, but I can not make it work I speak French.
I can not do a quest!
how to activate the quest 1

Thank you in advance.
Si tu veut je peut te l'expliquer mieux ^^ (oui je parle français, (depuis 10 ans ;p))
If you like i could explain you how it works  (yes i speak french (for 10 years now ;p)
Title: Re: Quest Journal 1.0d [VXA]
Post by: Brandobscure001 on March 16, 2012, 04:50:19 PM
Oui ce serait formidable :D
Merci.
je sais faire l'appelle de script mais le reste non ^^

Anglais.

Yes it would be great :D
Thank you.
I know how the script calls but not the rest ^^
Title: Re: Quest Journal 1.0d [VXA]
Post by: Mitsarugi on March 17, 2012, 02:45:35 AM
Oui ce serait formidable :D
Merci.
je sais faire l'appelle de script mais le reste non ^^

Anglais.

Yes it would be great :D
Thank you.
I know how the script calls but not the rest ^^
il me semble que le script est pareil que la version pour VX , tu devrait telecharger la demo de VX, cest tres bien expliquer (jai pas RMVXA)
http://rmrk.net/index.php/topic,25533.0.html  tu peut utiliser Google traduction sur le topic ^^

it looks like the script is the same as the VX version, you should download the demo for VX, its really well explained (i dont have RMVXA)
http://rmrk.net/index.php/topic,25533.0.html you can use Google Translation on the topic ^^
Title: Re: Quest Journal 1.0d [VXA]
Post by: Watfordj on March 17, 2012, 06:04:10 AM
how do i make a quest for hunting a certain amount of monsters?
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on March 17, 2012, 02:14:10 PM
You do it with events, not through this script. This script just graphically represents that quest.

You would set up the quest in the script like this:

Code: [Select]

    when 7 # Quest 7 - this ID doesn't need to be 7, but it has to be unique
      q[:name]              = "Animal Trouble in Lynis"
      q[:level]             = 1
      q[:icon_index]        = 333
      q[:description]       = "Wolves are attacking the town of Lynis. The mayor has put a bounty on their heads."
      q[:objectives][0]     = "Speak to Mayor Trakia."
      q[:objectives][1]     = "Kill 5 Wolves.     \\v[4] / 5"
      q[:objectives][2]     = "Return their pelts to Mayor Trakia."
      q[:client]            = "Mayor Trakia"
      q[:location]          = "Black Forest"
      q[:rewards]           = [
        [:gold, 500],
      ]

As a sample, you would then set up the actual quest through events. In this example, I am using the pelt count as a proxy for wolves killed, meaning every wolf would need to have a 100% drop rate for pelts. However, that is not totally necessary. You could do it simply by kills, but you would need to set up counting events in every troop that has wolves (if you are doing random encounters). If you are not doing random encounters, you would just need to count the wolves in the troop inside the event in which the battle is called. Anyway, the following event does it by pelt count.

So first, you hear a rumour about the wolf troubles. That event would look like this:

@>Text: Hey, you might not want to go to Lynis. I hear there are wolves attacking that town every night!
@>Script: reveal_objective(7, 0)

7 is the quest ID I chose at the very top of the event I setup - "when 7". It has to be unique so that you can identify it when you are modifying objective status. That reveals the "Talk to Mayor Trakia" objective.

Then in Lynis, there would be this Mayor Trakia event:

Page 1: No conditions
  @>Text: Please help us! We are being attacked by wolves! I will give you 500 Gold if you kill five of them.
  @>Show Choices: OK!, No thanks!
   : When OK!
    @>Text: Oh thank you so much! Bring me five pelts for your reward.
    @>Script: complete_objective(7,0)
                   reveal_objective(7, 1, 2)
    @>Control Switches: Switch 34 is ON

Page 2: Condition: Switch 34 is ON
  @>Conditional Branch: Variable 4 >= 5
    @>Text: Oh, you have the pelts! That is wonderful news! Here is your reward
    @>Change Gold: +500
    @>Change Items: -5 Wolf Pelts
    @>Script: complete_objective(7,2)
    @>           quest(7).objectives[1] = "Kill 5 Wolves   5/5"
    @>Control Switch: Switch 34 = OFF
    @>Control Self-Switch: A = ON
  : Else
    @>Text: Please return when you have killed the savage beasts!
  @>Branch End

Page 3, Condition: Self-Switch A is ON
  @>Text: Thank you for your earlier assistance.

Switch 34 and Variable 4 were randomly chosen IDs. Again they can be any ID, as long as you are consistent. I chose variable 4 actually when setting up the quest, as I set that to be the pelt count.

Now all that is left is counting the wolves killed. This can be done with a parallel process common event like this:

Common Event, Trigger: Parallel Process, Switch Condition: Switch 34
  @>Variable Operation: [004: Pelt Count] = [Wolf Pelt] is present
  @>Conditional Branch: Variable [004: Pelt Count] >= 5
    @>Variable Operation: [004: Pelt Count] = 5
    @>Script: complete_objective(7, 1)
   : Else
    @>Conditional Branch: Script: objective_complete?(7, 1)
      @>Script: uncomplete_objective(7, 1)
     : Branch END
   : Branch END
  @>Wait: 6 frames


That's all very messy, but I am sure you can adapt it to your needs.
Title: Re: Quest Journal 1.0d [VXA]
Post by: Korten12 on March 17, 2012, 08:49:14 PM
I am trying to use it in RPG Maker VX Ace and I keep getting this error:

Script 'Quest Log' line 795: NameError occurred

uninitialized constant Object::DataManager

Anyone able to help? D:
Title: Re: Quest Journal 1.0d [VXA]
Post by: Understatement on March 18, 2012, 09:55:21 AM
Hello.

First off, thankyou modern algebra for these wonderful scripts. I'm a total newbie with RPG Maker, first time using scripts, first time everything. I decided to try out your quest script.

This may be dumb but how do you move the quests to "completed" after the objectives are met? I've placed objective_complete?(ID, 0,1,2 etc) in my conditional branch to get my rewards but the quest didn't move to complete.

Also, is this script really customizable in terms of changing graphics?
I've put a picture in the banner section and it was real neat. Wonder if you can customize other parts.

Thankyou so much for inspiring me and I hope to learn a lot from you.
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on March 18, 2012, 02:15:35 PM
With respect to your first question, the code you chose only checks whether the specified objectives are complete.

There are two ways to complete a script. Firstly, a quest completes when all prime objectives are completed. Which objectives are prime depends on the value of q[:prime_objectives] when you setup the quest. If you do not include it altogether, then all objectives are prime. If it is [x, y, z], then only objectives x, y, and z are prime.

To complete an objective, you use the following code in a regular Script event command (ie not the Conditional Branch field):

Code: [Select]
complete_objective(ID, x, y, ..., z)

Where x, y, and z are the objectives you want to complete. Once all the prime objectives are completed in this manner, then the quest status changes to complete. If any one of the prime objectives are failed, then the quest status changes to failed.

Alternatively, you can set it so that there are no prime objectives in the following way when setting the quest up:
Code: [Select]
q[:prime_objectives] = []

If you do that, then quests will never auto-complete or auto-fail, and so if you want to change the quest's status to complete or failed, you have to use one of the following codes (again in a Script event command, not in the Conditional Branch field):

Code: [Select]
manually_complete_quest(ID)
manually_fail_quest(ID)

Quests will still auto-activate whenever an objective is revealed (unless you've turned that feature off), but if you want to change its status back to active after completing or failing the quest, you must use the code:

Code: [Select]
manually_activate_quest(ID)

In all of the above code samples, ID should be replaced with the integer ID of the quest you are modifying and x, y, and z with the IDs of the objectives of which you are changing the status.

With respect to your second question as to how graphically customizable it is, the following is a semi-complete list:


There might be more that I am forgetting.
Title: Re: Quest Journal 1.0d [VXA]
Post by: Countdown on March 31, 2012, 08:03:58 PM
I get:

"Script 'Quest Journal' line 1583: TypeError occurred.
can't convert true into Integer"

it worked fine until I tried to make the journal accessible from the menu.


Never mind, it was an error on my part. So far I like the script, MA!
Title: Re: Quest Journal 1.0d [VXA]
Post by: Ace5095 on April 11, 2012, 10:29:22 AM
Yeah well,I am loving this,but what's up with this!?

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F9JKaD.png&hash=5f46b3db79d04ee0c511caa5d136e8975ce7d1d6) (http://imgur.com/9JKaD)

What's up with those question marks?

Great Script BTW!!!
Title: Re: Quest Journal 1.0d [VXA]
Post by: Trihan on April 11, 2012, 10:48:09 AM
It looks like your system isn't rendering the diamonds in the font properly for some reason.
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on April 11, 2012, 02:04:59 PM
Yeah, what Trihan said. Your font does not know how to reperesent the diamond. Just change the following line:

   
Code: [Select]
objective_bullet: "?",

to a character your font recognizes.
Title: Re: Quest Journal 1.0d [VXA]
Post by: Ace5095 on April 12, 2012, 09:20:14 AM
Yeah, what Trihan said. Your font does not know how to reperesent the diamond. Just change the following line:

   
Code: [Select]
objective_bullet: "?",

to a character your font recognizes.

Thanks,it is working perfectly!!!!
Title: Re: Quest Journal 1.0d [VXA]
Post by: jwei44 on April 28, 2012, 10:05:22 PM
Just wondering, unless I overlooked it, how would I mask rewards?

E.g. the reward is 5000 gold, but before a certain point (say a script call), the reward is ???

Like, a script call to questlog(questID, rewardIndex, bool hide)
true for hide, false for reveal
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on April 28, 2012, 11:14:47 PM
I guess I barely explained rewards in the script itself. Anyway, you would set it up in the quest itself as:

Code: [Select]
q[:rewards] = [
  [:gold, 500],
  [:string, 0, "???"]
]

The 0 in the string array is just the index of any icon you want to show. 0 is no icon, but you could change that to some other icon.

Then, when you want to reveal what it actually is, you would use the following code in a script call:

Code: [Select]
  quest(x).rewards[1] = [:weapon, 12]

Where x is the ID of the quest you setup. I use since array indices start at zero, so its ID is 1 since it is the reward after the gold. In that particular case, it is changed to give Weapon 12.
Title: Re: Quest Journal 1.0d [VXA]
Post by: jwei44 on April 28, 2012, 11:25:09 PM
Alright, thats what i was looking for! Thanks. But would this work to add a reward?

Say I did not want the player knowing how many rewards they would get? Would I just leave blank strings?
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on April 28, 2012, 11:28:16 PM
You could just leave blank strings, or you could just push the new entries to the array. Ie: you could have the above example and it would show just the two rewards in the Quest scene.

But then you could use the following code:

Code: [Select]
quest(x).rewards.push([:item, 1, 2])

and then the quest would show three awards: the gold, Weapon 12, and now 2 of item 1.
Title: Re: Quest Journal 1.0d [VXA]
Post by: jwei44 on April 28, 2012, 11:30:07 PM
Thank you! You are a godsend!
Title: Re: Quest Journal 1.0d [VXA]
Post by: marjoni01 on April 30, 2012, 10:59:12 PM
This is really a dumb question...
But, How can I enable the Quests scene?
It's always disabled in menu or in map
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on April 30, 2012, 11:33:05 PM
Just reveal any objective of any quest. It is disabled until there is something in the journal to see.
Title: Re: Quest Journal 1.0d [VXA]
Post by: marjoni01 on May 01, 2012, 12:08:00 AM
Oh it's like that...
I thought It can be open without any quest..
Anyway, Thanks for the fast reply ^_^
Title: Re: Quest Journal 1.0d [VXA]
Post by: Cleeq on May 01, 2012, 08:13:33 PM
This script looks awesome, hope to be implementing it soon.  Thanks!
Title: Re: Quest Journal 1.0d [VXA]
Post by: synbi on May 23, 2012, 04:43:58 AM
Where can I change the font size of the text inside the "description" box? I'd prefer it somewhat smaller than the default font size, but I didn't find the right line to edit this. Same with the text in Quest Objectives - is there a way to change the font size for these?

Also, might it be possible to place just plain text inside the "rewards" section? The main quest of my game doesn't have any specific item rewards, but as a flavor text it'd be nice to include something there. For example I tried this:

q[:rewards]           = "The King has promised you great wealth should you succeed with your quest, young hero."

but it didn't show up in the game at all.
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on May 23, 2012, 04:57:28 AM
In the Configuration section, you ought to see the following:

Code: [Select]
  FONTSIZES = {
    normal:         false, # normal: default font size
    scene_label:    28,    # scene_label: fontsize for the Scene Label window
    category_label: 24,    # category_label: fontsize for Category Label window
  } # <= Do not touch.

As explained in the instrunctions dealing with font aspects generally, you can change the i=size of the description text by simply inserting a line to do so. In other words, something like this:

Code: [Select]
  FONTSIZES = {
    normal:         false, # normal: default font size
    description:    16, # <- THIS
    scene_label:    28,    # scene_label: fontsize for the Scene Label window
    category_label: 24,    # category_label: fontsize for Category Label window
  } # <= Do not touch.

Change the 16 to whatever you want the font size to be. Mind you, it won't change the line height, just the size of the text.
For the reward thing, not really, no. I'd recommend just adding it to the description.
Title: Re: Quest Journal 1.0d [VXA]
Post by: synbi on May 23, 2012, 05:19:32 AM
Thanks for the fast reply! - must've missed that part about the font size I see  ::) The rewards text part I can live without, it's very minor.
Title: Re: Quest Journal 1.0d [VXA]
Post by: Chaos17 on May 27, 2012, 01:39:37 AM
Hello,

I read in the instruction there is a demoi but I didn't saw it in the first page.
Can you upload one please ?
My english isn't that good to be able to understand all the instructions.
Title: Re: Quest Journal 1.0d [VXA]
Post by: shadowfox43 on June 03, 2012, 07:15:34 AM
I am wondering when the demo will be released.
Thanks in advanced
Title: Re: Quest Journal 1.0d [VXA]
Post by: spywaretoff on June 08, 2012, 11:27:15 AM
hello,

Is it possible to delete the categories and only see the active quest?

Thank you
Title: Re: Quest Journal 1.0d [VXA]
Post by: modern algebra on June 08, 2012, 07:27:27 PM
Yes. Around line 357, you ought to see this:

Code: [Select]
  #  CATEGORIES - This array allows you to set which categories are available
  # in the Quest scene. The default categories are :all, :active, :complete,
  # and :failed, and their names are self-explanatory. You can add custom
  # categories as well, but note that you will need to make sure that each new
  # category has an icon set in the ICONS hash, as well as a label set in the
  # CATEGORY_VOCAB hash (if you are using SHOW_CATEGORY_LABEL). It is also
  # advisable to give it a sort type, unless you are fine with it being sorted
  # by ID, as is default.
  CATEGORIES = [:all, :active, :complete, :failed]

Just change the last line there to:

Code: [Select]
  CATEGORIES = [:active]
Title: Re: Quest Journal 1.0d [VXA]
Post by: spywaretoff on June 08, 2012, 07:38:56 PM
Thank you but it gives me an error at line 2464

error :

"Undefined method 'height' for nil: NilClass"

EDIT :

On a blank project it gives me an error line 2547

@quest_category_window.activate if QuestData::CONCURRENT_ACTIVITY &&

Title: Re: Quest Journal 1.0.1 [VXA]
Post by: modern algebra on June 08, 2012, 08:25:50 PM
Sorry about that. The script removes the category window altogether when there is only one category, and it looks like I did not account for its absence at all points in the script. It should be fixed now, so you can grab the script again from pastebin. It is not necessary to replace the configuration section of the script if you have already altered aspects of that.


@others - I will try to release a demo sometime this week or the next.
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: spywaretoff on June 08, 2012, 08:40:03 PM
Thank you it's perfect like this!

Superb script it helps me a lot in my game,
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: Chaos17 on June 08, 2012, 09:27:11 PM
Quote
@others - I will try to release a demo sometime this week or the next.
Yes, please :)
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: Iperks on June 12, 2012, 06:09:07 PM
great script im already using this in my game!
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: Brady on June 13, 2012, 01:44:06 AM
Just wanted to give my compliments on this.  It's a rad script; been usin' it from the start of my project now and by havin' access to this it's inspired me to make more of the Chapter Two section and allow it to have some more questy type options :)
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: Chaos17 on June 16, 2012, 07:57:22 AM
Don't forget about the demo, please  ;D
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: skaraflame on June 25, 2012, 05:37:17 AM
I have no idea how to begin working this. I need a demo D:
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: Teel on July 07, 2012, 02:27:05 PM
Hi ! (:
I want to use this script but with Syvkal's Ring Menu (http://www.rpgmakervxace.net/topic/1836-ring-menu-vxace/) (the pastebin (http://pastebin.com/raw.php?i=aYssBtG9)) but I don't know where in the quest script, I can "put" the menu quest in the ring menu (I've already the Icon)

EDIT : Finally, I found how display the icon ! x)
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: DeathShrimp on July 16, 2012, 10:23:50 AM
Hi, I am getting the following error :

Script 'Game_Interpreter' line 1409 : NoMethodError occured.
undefined method 'remove_quest' for
#<Game_Interpreter:0x8281f74>

It is being triggered when I use the script call event and the command remove_quest(5)
Using RMVXA
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: modern algebra on July 16, 2012, 01:54:24 PM
Hi, I am getting the following error :

Script 'Game_Interpreter' line 1409 : NoMethodError occured.
undefined method 'remove_quest' for
#<Game_Interpreter:0x8281f74>

It is being triggered when I use the script call event and the command remove_quest(5)
Using RMVXA

Sorry, use delete_quest, not remove_quest.

So:

Code: [Select]
delete_quest(5)

I must have left remove_quest in the instructions accidentally from a previous version.

Hi ! (:
I want to use this script but with Syvkal's Ring Menu (http://www.rpgmakervxace.net/topic/1836-ring-menu-vxace/) (the pastebin (http://pastebin.com/raw.php?i=aYssBtG9)) but I don't know where in the quest script, I can "put" the menu quest in the ring menu (I've already the Icon)

EDIT : Finally, I found how display the icon ! x)

So, just to be clear, this is resolved?
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: DeathShrimp on July 16, 2012, 02:00:51 PM
Yes I resolved it, thanks for the reply. I used the following command manually_complete_quest(5) instead. What was strange was that some of the quests with remove_quest would work and some would give me that error, love your script though. Currently using your script in my project Defender of Alefguard.
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: modern algebra on July 16, 2012, 02:15:12 PM
Good to hear/read!
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: Brady on July 18, 2012, 09:36:23 AM
For anyone who's been having trouble getting started with the script, I've drawn up a short, unofficial basics demo (with moderns permission, for those who would like to know) to cover the foundations of the script.

This covers receiving quests, completing and revealing objectives, finishing quests and repeating quests.  There's no combat, just collection and interaction, and only takes five minutes to run through, but should give you all the understanding you need to get started with the script.

Hopefully this will help anyone having problems until modern has time to make his official demo :)

http://www.mediafire.com/download.php?3l1hxljnmso290l

Have fun :D
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: AdamWillard on July 18, 2012, 11:06:49 PM
Found a bug in the demo that reset my red flower key items to 1. Below is how I came across this issue. Hope it helps!

I picked up 10 red flowers first before talking to the quest giver who requests white flowers. I did not talk to the girl to wants red flowers again before this. I then picked up a few white flowers and completed the quest multiple times. After this I went over to the old man and then the sword. I did not view the credits before completing the red flower quest. After this I went back to the first map with the red flower quest but my red flowers were reset to 1. There were still red flowers in the field but the amount only totaled to 9 after the reset, thus not allowing me to complete the quest.
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: Brady on July 18, 2012, 11:19:34 PM
(above issue mentioned has been fixed.  The issue was in the repeatable boys page, where it was taking reds instead of whites.  modern actually noticed this issue at first, but apparently I forgot to change it on both pages.)

For anyone who's been having trouble getting started with the script, I've drawn up a short, unofficial basics demo (with moderns permission, for those who would like to know) to cover the foundations of the script.

This covers receiving quests, completing and revealing objectives, finishing quests and repeating quests.  There's no combat, just collection and interaction, and only takes five minutes to run through, but should give you all the understanding you need to get started with the script.

Hopefully this will help anyone having problems until modern has time to make his official demo

http://www.mediafire.com/?sy17loho2mofc02

Hopefully, there should be no more issues within it.

Have fun :D
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: username78 on July 22, 2012, 02:48:48 AM
Hi,
I'm having some trouble with this. The script looks wonderful, but when I open up my project I get the error "Script 'Quest Journal Insturctions' line 3: SyntaxError occurred.

unexpected '.'
                #   Version: 1.0.1
How can I fix this? Also, would it be possible to use this with a ring menu script and if you don't mind me asking, how exactly could that be done?
Thanks!
Edit: Nevermind, fixed it! Getting this script to work with this ring menu script (http://www.rpgmakervxace.net/topic/1836-ring-menu-vxace/page__hl__%2Bring+%2Bmenu) would be really great though if anyone knows how.
Edit: Turns out their compatible! Nevermind.
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: talias on July 22, 2012, 07:57:05 PM
First off, thanks for the great script.

But I have a slight problem. I have made a custom category called "Notes" and included a quest in it, but the quest is also appearing in "Active" category. Is there any way to uninclude a quest in category.
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: akira12 on July 23, 2012, 01:14:43 AM
Help, I get this error:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1156.photobucket.com%2Falbums%2Fp567%2Fsammyas%2FSinttulom.png&hash=d0e7cc1a2f4f9f8b278c42889ebbcab861b7727a)
using delete_quest (2) or using reset_quest (2)

sorry for my bad English xD
Title: Re: Quest Journal 1.0.1 [VXA]
Post by: modern algebra on July 24, 2012, 10:10:56 PM
Sorry, there was an error in the script. It is now fixed and you can get the new script from the first post. Also, you shouldn't put a space between the command and the brackets. It should be:

Code: [Select]
delete_quest(2)

and not:

Code: [Select]
delete_quest (2)

But the error you are getting was my fault. Retrieve the script from the first post and replace it and it should work. You don't need to replace any of the configuration, you just need to change the part following this:

Code: [Select]
#==============================================================================
# *** DataManager
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - self.extract_save_contents
#==============================================================================

In the main post, it is line 807, but it may be different for you depending on your configuration.


@talias - sorry, there isn't.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: Wiimeiser on July 25, 2012, 12:49:36 AM
Quote
#==============================================================================
# *** DataManager
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - self.extract_save_contents
#==============================================================================
 
class << DataManager
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Extract Save Contents
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias maqj_extractsavecons_2kw5 extract_save_contents
  def extract_save_contents(*args, &block)
    maqj_extractsavecons_2kw5(*args, &block) # Call Original Method
    if $game_party.quests.nil?
      $game_party.init_maqj_data
      $game_system.init_maqj_data
    end
  end
end

Quote
#==============================================================================
# *** DataManager
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - self.extract_save_contents
#==============================================================================

class << DataManager
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Extract Save Contents
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias maqj_extractsavecons_2kw5 extract_save_contents
  def extract_save_contents(*args, &block)
    maqj_extractsavecons_2kw5(*args, &block) # Call Original Method
    if $game_party.quests.nil?
      $game_party.init_maqj_data
      $game_system.init_maqj_data
    end
  end
end

First is from the script at Pastebin and second is from my project. I don't see any difference...
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: modern algebra on July 25, 2012, 12:56:54 AM
No, I meant everything after those lines. All I am saying is that if you have done any configuration on the script, you don't need to do it all over. You only need to replace everything after the identified lines and can keep all the configuration intact.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: lostboyrufio on August 07, 2012, 07:50:16 AM
Was wondering if anyone could help me out with something. I'm just trying to get this script to plug into Yanfly's Ace Menu Engine but I can' seem to call the script into Yanfly's correctly. As of right now I've been able to get Tsukihime's "Select Skill System" working with it but not MA's quest journal. I'm probably just overlooking something quite obvious but any help would be much appreciated. I've never been much of a coding guy  :P

This is how Yanfly's code works for calling menu scenes:

Code: [Select]
      when :item
        add_command(Vocab::item,   :item,   main_commands_enabled)
      when :skill
        add_command(Vocab::skill,  :skill,  main_commands_enabled)
      when :equip
        add_command(Vocab::equip,  :equip,  main_commands_enabled)
      when :status
        add_command(Vocab::status, :status, main_commands_enabled)
      when :battle_setup #<--- Tsukihime's Script
        add_command("Traits", :battle_skill, true)
      when :formation
        add_formation_command
      when :save
        add_original_commands
        add_save_command
      when :game_end
        add_game_end_command
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: modern algebra on August 08, 2012, 10:22:17 PM
Not able to test since I am not at my computer, but does it not work just to put the Quest Journal under Yanfly's script in the Script Editor (keeping in mind that you also would have had to set MENU_ACCESS to true at line 238 and chosen an index at line 240)?
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: lostboyrufio on August 09, 2012, 05:15:31 AM
Yeah I've definitely made sure to read through your script and have marked it with an index number, and I always make sure to insert scripts properly based upon what they are most likely heavily modifying or overwriting. Yanfly's script ends up ignoring the listing of the index and instead just pushes all other menu options below the ones in his Menu Engine. I only ask if it's possible to incorporate the two together as Yanfly's script forces the Exit Game command to come before anything not being pulled by the Menu Engine. So in essence, my menu currently comes out like this:

Inventory
Equipment
Status
Skills
Tsukihime's Script
Formation
Save / Load
Exit Game
Quest Journal
Monster Catalogue

If you can't think of a way for Menu Engine Ace to incorporate your scripts I'll just keep trying to find a workaround. Thanks for your time though.


[EDIT]
I found a workaround, it involved me making a fake instance in Yanfly's script but not allowing the instance to actually show on the menu as a command. This for some reason moved the Save / Load command and the Exit Game commands to the bottom. Its weird and I'm hoping this doesn't lead to strange errors later.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: modern algebra on August 09, 2012, 08:07:37 PM
Hm, well I'm glad it's fixed for you.

I just tried the two scripts together and it worked fine; I wasn't able to reproduce the problem. Any chance that you could do me a favour and make a new game with the initial error reproduced? I'd like to see what was going wrong so that I could fix it for other users.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: timedead on September 22, 2012, 05:24:39 AM
Yeah I've definitely made sure to read through your script and have marked it with an index number, and I always make sure to insert scripts properly based upon what they are most likely heavily modifying or overwriting. Yanfly's script ends up ignoring the listing of the index and instead just pushes all other menu options below the ones in his Menu Engine. I only ask if it's possible to incorporate the two together as Yanfly's script forces the Exit Game command to come before anything not being pulled by the Menu Engine. So in essence, my menu currently comes out like this:

Inventory
Equipment
Status
Skills
Tsukihime's Script
Formation
Save / Load
Exit Game
Quest Journal
Monster Catalogue

If you can't think of a way for Menu Engine Ace to incorporate your scripts I'll just keep trying to find a workaround. Thanks for your time though.


[EDIT]
I found a workaround, it involved me making a fake instance in Yanfly's script but not allowing the instance to actually show on the menu as a command. This for some reason moved the Save / Load command and the Exit Game commands to the bottom. Its weird and I'm hoping this doesn't lead to strange errors later.

How exactly did you go about doing this? I'm trying to call this script with yanflies as well. I have gotten the Quest Journal icon itself to appear, but upon clicking it my games crashes.

 
Code: [Select]
  #--------------------------------------------------------------------------
  # new method: command_journal
  #--------------------------------------------------------------------------
  def command_journal
    return unless $imported['MA_QuestJournal_1.0']
    SceneManager.call(Scene_Quest)
  end
^My Method inside yanflies (When the object is chosen from the menu this method is called to open the "Scene_Quest" Which is where I'm assuming the window setup is.)

Code: [Select]
    for command in YEA::MENU::COMMANDS
      case command
      #--- Default Commands ---
      when :item
        add_command(Vocab::item,   :item,   main_commands_enabled)
      when :skill
        add_command(Vocab::skill,  :skill,  main_commands_enabled)
      when :equip
        add_command(Vocab::equip,  :equip,  main_commands_enabled)
      when :status
        add_command(Vocab::status, :status, main_commands_enabled)
      when :journal
        add_command("Journal", :command_journal, true)
      when :formation
        add_formation_command
      when :save
        add_original_commands
        add_save_command
      when :game_end
        add_game_end_command

 And here's where I created the journal inside the menu commands.

Please, any help? I might be using the wrong scene perhaps?
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: modern algebra on September 22, 2012, 01:01:55 PM
As long as the Quest Journal is below YEA Menu Engine, you shouldn't need to edit anything in either script. It ought to be added to the menu automatically, and whenever I've tested it that is exactly what happens. I uploaded a project where I just pasted the two scripts into the same project, without editing anything at all, and it works fine.

Anyway, obviously it's a real problem, so could you please create a project with that error and share it so that I can see what is going wrong? I'd like to be able to fix this error.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: timedead on September 23, 2012, 03:18:04 AM
As long as the Quest Journal is below YEA Menu Engine, you shouldn't need to edit anything in either script. It ought to be added to the menu automatically, and whenever I've tested it that is exactly what happens. I uploaded a project where I just pasted the two scripts into the same project, without editing anything at all, and it works fine.

Anyway, obviously it's a real problem, so could you please create a project with that error and share it so that I can see what is going wrong? I'd like to be able to fix this error.

Yes, but I am using a "Ring" menu system Since I do not use all of the menu options and im making a "Horror" game not a RPG I needed a simpler menu, when I put both scripts together (yours below yafles) the icon for the script does not appear. This is why I tried to create my own method. This method setup I am using makes the icon appear, however when selected the whole game itself crashes/freezes.

 Here's an example of my menu system: http://screensnapr.com/v/pNrKIu.jpg
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: modern algebra on September 23, 2012, 04:19:11 AM
I'd need to see the ring menu script itself.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: timedead on September 23, 2012, 04:39:42 AM
I'd need to see the ring menu script itself.

Have a look:
http://pastebin.com/QkLjQ1yf
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: modern algebra on September 23, 2012, 05:10:12 AM
Well, it seems to work for me; I put the scripts in this order:

YEA Menu
Ring Menu
Quest Journal

All I needed to do was name a picture "Quests Icon" and it worked without any modifications to any script. A demo is attached.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: timedead on September 23, 2012, 05:33:08 AM
Well, it seems to work for me; I put the scripts in this order:

YEA Menu
Ring Menu
Quest Journal

All I needed to do was name a picture "Quests Icon" and it worked without any modifications to any script. A demo is attached.

 It doesn't seem to work for me...
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: Wiimeiser on September 23, 2012, 06:33:29 AM
It works on my end, only problem is there are empty icon spaces next to the options on the title menu and other stuff like that.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: timedead on September 23, 2012, 07:39:29 AM
It works on my end, only problem is there are empty icon spaces next to the options on the title menu and other stuff like that.

 I have it setup like in the demo, I also use other menu editing scripts like yafle's status and item menu screens. Any idea if those could interfere?
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: modern algebra on September 23, 2012, 11:59:21 AM
It might be possible. Try adding your other scripts into the working demo one by one and tell me when you hit a snag. Then upload that demo and tell me which script was the last that you added.


@Wiimeiser - that would happen whether you use the Quest Journal or not. If it's an error, it's an error inherent to YEA Menu.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: timedead on September 24, 2012, 03:34:22 AM
It might be possible. Try adding your other scripts into the working demo one by one and tell me when you hit a snag. Then upload that demo and tell me which script was the last that you added.


@Wiimeiser - that would happen whether you use the Quest Journal or not. If it's an error, it's an error inherent to YEA Menu.

 I implemented all my scripts into your demo, and it still works, what possibly could be the problem?

EDIT: Would you mine actually taking a peak at the demo and giving me your thoughts?
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: modern algebra on September 24, 2012, 12:23:37 PM
Might it be that you are still using the version of YEA Menu Engine that you had tried to edit? Try replacing it with a fresh copy. If that doesn't work, then I could take a look at your project - just upload it.
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: timedead on September 25, 2012, 07:14:03 AM
Might it be that you are still using the version of YEA Menu Engine that you had tried to edit? Try replacing it with a fresh copy. If that doesn't work, then I could take a look at your project - just upload it.

I coudln't get it, I pm'd you a demo. :/ Sorry.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on September 25, 2012, 11:03:31 AM
Thanks, I will take a look when I get the chance
Title: Re: Quest Journal 1.0.2 [VXA]
Post by: Yin on September 25, 2012, 04:48:25 PM
I've been using this script for about a day and just wanted to know a few things before I customize it completely:

Is there a way to change the color of the blue lines?
Could I hide categories until a quest from that category is unlocked?
Could I add more to the description of a quest through a script call or by flipping a switch or variable?
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on September 25, 2012, 10:43:38 PM
1. Yes. Around line 482 you will see:

Code: [Select]
    # line:  This sets the colour for lines or boxes drawn in the quest scene
    line:             :system_color,
    # line_shadow:  This sets the colour of the shadow for lines or boxes drawn
    #  in the quest scene
    line_shadow: [0, 0, 0, 128],

As explained above those lines at line 461:

Code: [Select]
  #  COLOURS - This lets you change the colour for various aspects of the
  # quest scene. Each can be set in one of three ways:
  #    :symbol - If you use a symbol, the colour will be the result of calling
  #      the method of the same name. For instance, if you set something to
  #      :system_color, it will set the colour to the result of the Window_Base
  #      system_color method.
  #    Integer - If you set the colour to an integer, then it will take its
  #      colour from the windowskin palette, just like using \c[x] in messages.
  #    Array - You can also set the rgba values directly with an array in the
  #      format: [red, green, blue, alpha]. alpha can be excluded, but you must
  #      have values for red, green, and blue.

2. Yes, but it has to be done manually. As you can see at line 363:

Code: [Select]
  #  CATEGORIES - This array allows you to set which categories are available
  # in the Quest scene. The default categories are :all, :active, :complete,
  # and :failed, and their names are self-explanatory. You can add custom
  # categories as well, but note that you will need to make sure that each new
  # category has an icon set in the ICONS hash, as well as a label set in the
  # CATEGORY_VOCAB hash (if you are using SHOW_CATEGORY_LABEL). It is also
  # advisable to give it a sort type, unless you are fine with it being sorted
  # by ID, as is default.
  CATEGORIES = [:all, :active, :complete, :failed]

Those will be the default categories. You can remove any of them, but if it is empty then the :all category will be forced into it. If you later want to add a category (for instance, :failed) in the course of a game, you would need to use the following code in a script call:

Code: [Select]
s = $game_system
s.quest_categories << :failed

You could also set it directly, but you might need to make space. Ie, like:

Code: [Select]
s = $game_system
a = [:active, :complete, :failed]
s.quest_categories = a

However, as should be apparent, there is currently no way for a quest to automatically be added only when the first quest which fits in it is. You would have to do it manually.

3. Yes, through a script call. See line 48:

Code: [Select]
#    You can activate and access a quest with this code in the Script event
#   command:
#
#        quest(quest_id)
#          quest_id : the integer ID of the quest you want to access
#
#   From that, you can access or alter any relevant data stored in the quest,
#   like name, description, objectives, etc... Example:
#         quest(1).name = "Rest in Pieces"

So, if you wanted to change the description of quest 2, you would just do something like this:

Code: [Select]
quest(2).description = "bla bla"

Due to the space restrictions in a script call, you may need to break it up into various parts. One way to do that would be:

Code: [Select]
d1 = "bla bla bla"
d2 = " bla2 bla2 bla2"
quest(2).description = d1 + d2
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: Yin on September 26, 2012, 03:15:53 AM
Thanks, this is proving to be exactly what I need! Sounds perfect, looks great, functions as I need it to!
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on September 27, 2012, 12:13:30 AM
@Yin - I am glad you are liking it so far!



@timedead - I took a look at your project. The scripts are working together, but the quest system is disabled until a quest is actually revealed. This, combined with the fact that you have the ring menu set to hide disabled icons, is why the Quest Journal is not showing up in the menu. In other words, just reveal a quest and it will show up. Alternatively, go into the ring menu and find the following around like 88:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Show Disabled Options
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  #  Set to false to exclude disabled options for the menu
  #--------------------------------------------------------------------------
    DISABLED_SHOW = false

Change it to true.

Or, in the further alternative, if you don't want the quests menu to be disabled when a quest hasn't been revealed, you could go to the second last line in the Quest Journal, where you see this:

Code: [Select]
"!$game_system.quest_access_disabled && !$game_party.quests.list.empty?",

And you can change it to:

Code: [Select]
"!$game_system.quest_access_disabled",
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: timedead on September 27, 2012, 04:54:14 AM
@Yin - I am glad you are liking it so far!



@timedead - I took a look at your project. The scripts are working together, but the quest system is disabled until a quest is actually revealed. This, combined with the fact that you have the ring menu set to hide disabled icons, is why the Quest Journal is not showing up in the menu. In other words, just reveal a quest and it will show up. Alternatively, go into the ring menu and find the following around like 88:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Show Disabled Options
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  #  Set to false to exclude disabled options for the menu
  #--------------------------------------------------------------------------
    DISABLED_SHOW = false

Change it to true.

Or, in the further alternative, if you don't want the quests menu to be disabled when a quest hasn't been revealed, you could go to the second last line in the Quest Journal, where you see this:

Code: [Select]
"!$game_system.quest_access_disabled && !$game_party.quests.list.empty?",

And you can change it to:

Code: [Select]
"!$game_system.quest_access_disabled",

That got it working, You're amazing! I can't believe I didn't catch that.... I feel kinda stupid! anywho thanks a lot! looking forward to taking advantage of this script!
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: mouser on September 29, 2012, 02:50:24 AM
Looks great.   :D

Can't wait to dig into the code and see what I can make it do.

Thanks for making this, RPG's just aren't complete without a journal (IMHO)
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: ThunderWolf on October 15, 2012, 08:46:24 PM
Hey MA I love the script and I have a suggestion if you want to make it or not, it's up to you.

With the quests, could you make it possible to have monsters that you need to defeat as one or more of the conditions? Claimh has it in their script, but I prefer yours as it is much easier to understand.

I was just wondering if
a) it was currently possible
else
b) would you be interested in making an add-on to this amazing script?

Other than that, Love the script to bits. Good work on it :)
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on October 16, 2012, 12:02:36 AM
I'm not really sure what you mean. You can certainly put it in as an objective like you would any other objective, but if you are asking whether the script can automatically detect when the monster is killed and auto-complete that objective, then the answer is no - you would have to do that manually. That said, it would not be hard to do it manually. If the monsters are not randomly encountered, than it's especially easy since all you need to do is add 1 to a variable each time you defeat that monster, but it's also not terribly hard to do the same in a battle event for randomly encountered enemies.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: Wiimeiser on October 16, 2012, 01:27:26 AM
Death Common Events (http://yanflychannel.wordpress.com/rmvxa/battle-scripts/death-common-event/) is probably a good idea.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: Bradoki2 on October 16, 2012, 08:32:38 AM
Great quest script, I love it. Cool, Modern Algebra.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: ThunderWolf on October 16, 2012, 11:14:46 AM
@MA ok, i'm not that good at trying to get things to work. I thought that there might have been something within the script I missed. That's alright :) I now understand how I can do it.
---- Now i realize it doesn't need an add-on for what I wanted as there are scripts that can work along-side this one to give the same outcome. Thank you for the help MA :)


@Wiimeister Thank you for the link, it's pretty much what I needed I guess to run the quest I wanted.
---- Script works like a charm thank you :)


Both of you thank you for your responces :)

---- before I was going to post this with a really annoying and very basic question, but I managed to figure the answer out myself.

*all happy now and can continue re-building my database*
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on October 16, 2012, 08:36:34 PM
I'm glad that you could resolve your issue. I hope you enjoy the script. Feel free to return if you have any other questions or feedback; I am always glad to have an opportunity to improve my scripts.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: Dark_Metamorphosis on November 22, 2012, 11:50:56 PM
This seems like a really cool script. Im very new to this, in fact I just joined the site today. Started making my first RPG like 3 days ago, and I got most of the basics covered.. like cut-scenes, switches, some variables etc. But I have an issue with this script.. It seems like I can make it run fine, and I get most of how the script works.. but.. when I shall releave my first Quest Objective with script command: reveal_objective(1,1) I get an error from the Game_Interpreter script on line 1411.. and the game terminates.. I dont get it.

Also, is there a nice way to make the player cautious about the new objective in the quest log? Like Open the quest menu and display the added objective? I guess I could do it the easy way and just add a Input text event saying the quest log has been updated :P

Edit: I resolved the first issue, it was a mistake on my part.. Simple mistake as using a high capital R in reveal.. sigh Im stupid ^^
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on November 23, 2012, 04:43:10 AM
Nah, that's not stupid. It could happen to anyone unfamiliar with scripting.

As for the second issue, you can open the quest journal to a specific quest with the following code in a script call:

Code: [Select]
call_quest_journal(quest_id)

Where, naturally, quest_id is replaced with the integer ID of the quest you want to open.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: Dark_Metamorphosis on November 23, 2012, 04:42:27 PM
Nah, that's not stupid. It could happen to anyone unfamiliar with scripting.

As for the second issue, you can open the quest journal to a specific quest with the following code in a script call:

Code: [Select]
call_quest_journal(quest_id)

Where, naturally, quest_id is replaced with the integer ID of the quest you want to open.

Thanks a bunch! Totally love this script! Now i just need to play around with it a bit more, and hopefully change the layout of the quest journal the way I want it :) Thanks again!
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: rubydragon44 on December 10, 2012, 01:42:06 AM
Is there any calls I can do that allow me to check if a quest is completed, in conditional branch style, say, if Quest 8: "Defeat the Boulder Queen" is completed, a boulder event blocking a path will dissappear, instead of wasting switches on each and every single quest?
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: Dark_Metamorphosis on December 10, 2012, 03:58:06 AM
Is there any calls I can do that allow me to check if a quest is completed, in conditional branch style, say, if Quest 8: "Defeat the Boulder Queen" is completed, a boulder event blocking a path will dissappear, instead of wasting switches on each and every single quest?

Not sure if you can.. but you are not really "wasting" switches are you? :D You can have many, many switches so shouldnt be a problem.. and if you use self-switches as much as possible you will def have enough of switches :)
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: SirVivor on December 10, 2012, 05:45:54 AM
I am very unfamiliar with scripting so when I looked through here I tried to make a test quest to see if I got it right. Everytime I try to launch though, I get this
Script 'Test' line 1: Syntax Error occured.
Unexpected keyword_when
when 1 # quest 1

How do I reslove this issue? I've never used a script before.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: rubydragon44 on December 10, 2012, 05:44:35 PM
Is there any calls I can do that allow me to check if a quest is completed, in conditional branch style, say, if Quest 8: "Defeat the Boulder Queen" is completed, a boulder event blocking a path will dissappear, instead of wasting switches on each and every single quest?

Not sure if you can.. but you are not really "wasting" switches are you? :D You can have many, many switches so shouldnt be a problem.. and if you use self-switches as much as possible you will def have enough of switches :)

You'd have to think, you're using up multiple switches per quest, ofter per criteria, as well. You make a switch that says the quest was accepted. You make a switch that says criteria was met. You make a switch that says the quest was completed. Because in my game, these switches are nessassary as your actions effect things. I would like to see if Modern Algebra has a script call for such, as the script registers that a quest and its criteria was met, so I should be able to use that data in a conditional branch script call. I can't use self switches as things in my game don't work in a streamline fashion. It's not this-to-this-to-that. So events read switches to determine what's the current situation through priority (Hero has saved the town from the dragon that had came as a result of saying the wrong thing to a witch--> the bartender congradulates you, then registers that you also delivered his crates to Town B--> He thanks you for that, as well, and gives you 1000 Gold.)
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: Dark_Metamorphosis on December 10, 2012, 07:47:19 PM
You'd have to think, you're using up multiple switches per quest, ofter per criteria, as well. You make a switch that says the quest was accepted. You make a switch that says criteria was met. You make a switch that says the quest was completed. Because in my game, these switches are nessassary as your actions effect things. I would like to see if Modern Algebra has a script call for such, as the script registers that a quest and its criteria was met, so I should be able to use that data in a conditional branch script call. I can't use self switches as things in my game don't work in a streamline fashion. It's not this-to-this-to-that. So events read switches to determine what's the current situation through priority (Hero has saved the town from the dragon that had came as a result of saying the wrong thing to a witch--> the bartender congradulates you, then registers that you also delivered his crates to Town B--> He thanks you for that, as well, and gives you 1000 Gold.)

I see what you mean. I have similar events that needs multiple switches. But you can still use that same switch for multiple actions.. Like if you complete a quest, you can use that switch on several events to have different actions happening to alot of events. And you could also ask yourself if recieving a quest, or completing a special criteria in that particular quest, really has a big impact. Do you really need a switch when you pick up those crates?, does that action really affect the world around you? Instead you could use a self switch right there, and save the switch for when you actually deliver the quest to the owner etc.

But Im not sure exactly how your system works so I could be wrong here.. But still you have 5000 switches to work with, should be enough? :D

And Im pretty sure you can use the script command in a conditional branch already. If you input the script call for your quest, like for example:
Code: [Select]
complete_objective?(0, 1).

If you use that same script call in a conditional branch Im pretty sure that you could use it instead of a switch. I havnt tried it out yet, but I sure will and see how it works.

Edit: Yep, the script-calls actually works inside the conditional brances. I put in the wrong code first, but MA directed you to the line with the script commands :)


I am very unfamiliar with scripting so when I looked through here I tried to make a test quest to see if I got it right. Everytime I try to launch though, I get this
Script 'Test' line 1: Syntax Error occured.
Unexpected keyword_when
when 1 # quest 1

How do I reslove this issue? I've never used a script before.

Are you sure that you are setting up the quest at the correct line? Since the message says that the error occurs at "line 1:" I assume that you are setting up the quest at the beggining of the script? To keep in mind, all the green text in the script is Instructions only, and shouldnt be edited. The Input for your quests starts around line 611: along with all the Instructions there.

The Input of your quest should start around line: 781.

Example of how it could look:

Spoiler for script:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg29.imageshack.us%2Fimg29%2F9347%2Fscriptquest.png&hash=d7df3b567cfc9e4d5325442c987ae3c25a2e9cef)
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on December 10, 2012, 09:05:04 PM
I am very unfamiliar with scripting so when I looked through here I tried to make a test quest to see if I got it right. Everytime I try to launch though, I get this
Script 'Test' line 1: Syntax Error occured.
Unexpected keyword_when
when 1 # quest 1

How do I reslove this issue? I've never used a script before.

Dizturb3d is correct. It sounds like you created a new slot in the Script Editor and put your configuration there. That is wrong. You need to do the configuration inside the script itself, at the place that Dizturb3d mentioned.

Thanks for fielding that one, Dizturb3d!

Is there any calls I can do that allow me to check if a quest is completed, in conditional branch style, say, if Quest 8: "Defeat the Boulder Queen" is completed, a boulder event blocking a path will dissappear, instead of wasting switches on each and every single quest?

I'll direct you to line 162 of the Instructions:

Quote from: Instructions
#    Also, there are a few codes that can be used in the Script command of a
#   conditional branch. I note here that all of these are optional. You could
#   use switch and variable checks and monitor quest progress solely through
#   events. However, these commands make it a little easier and they are:
#
#        quest_revealed?(quest_id)
#            quest_id : the integer ID of the quest you want to access.
#          This is satisfied if the quest has been activated.
#
#        quest_complete?(quest_id)
#          This is satisfied if all prime objectives of the quest are complete
#
#        quest_failed?(quest_id)
#          This is satisfied if any prime objective of the quest is failed
#
#        quest_rewarded?(quest_id)
#          This is satisfied if you have changed the reward status to true.
#
#        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.
#          This is satisfied if the listed objectives have been revealed
#
#        objective_active?(quest_id, objective_id_1, ... objective_id_n)
#          This is satisfied if all the listed objectives are revealed and
#          neither complete nor failed.
#
#        objective_complete?(quest_id, objective_id_1, ... objective_id_n)
#          This is satisfied if all the listed objectives have been completed
#
#        objective_failed?(quest_id, objective_id_1, ... objective_id_n)
#          This is satisfied if all the listed objectives have been failed

All of those will work inside the script call field of a conditional branch. So, if you wanted the condition to be whether Quest 8: Defeat the Boulder Queen is complete, you would just use the following code:

Code: [Select]
quest_complete?(8)

Unfortunately, there is no way currently to use them as conditions on an event page, but one idea I've had for an independent script would be a way to add conditions to an event through comments. If you're interested in that, I could maybe put it on my To Do list.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: MadamInsanity on December 12, 2012, 05:52:44 AM
I'm trying to set this up with the Neo Menu System and no matter which way I put it in the code it comes up with an error. It's currently installed under the Menu script as well.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: LoganF on December 12, 2012, 11:13:50 AM
I'm trying to set this up with the Neo Menu System and no matter which way I put it in the code it comes up with an error. It's currently installed under the Menu script as well.

And that error would be?

Without some particular details, it's a stab in the dark at best in understanding what the problem is.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: MadamInsanity on December 12, 2012, 03:35:27 PM
Script 'Menu' line 26: NameError occurred

uninitialized constant Vocab::Quests

This is my customization for the menu:

     
Code: [Select]
[Vocab::item,  "main_commands_enabled", false,   Scene_Item],
      [Vocab::skill, "main_commands_enabled", true,    Scene_Skill],
      [Vocab::equip, "main_commands_enabled", true,    Scene_Equip],
      [Vocab::status,"main_commands_enabled", true,    Scene_Status],
      [Vocab::Quests,"main_commands_enabled", true,    Scene_Quests],
      [Vocab::formation, "formation_enabled", false,   :command_formation],
      [Vocab::save,           "save_enabled", false,   Scene_Save],
      [Vocab::game_end,                 true, false,   Scene_End],
     

I made sure to match the vocab of the quest log but it doesn't look like it fixed it.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: LoganF on December 12, 2012, 03:56:36 PM
The error means that Vocab::Quests is a constant variable that doesn't exist, or it has no value if it does exist. I'm not entirely sure how to fix it, and would require me looking into things I'm not familiar with. You can try the following, though:

Change Vocab::Quests to

Code: [Select]
Vocab::quests

The difference is in the capital letter on "Quests". As it is, it's trying to find a constant variable called "Quests", but it can't. By changing it to "quests" it will try to find a variable or method called "quests" in "Vocab" which is more likely to exist.

In the event it doesn't exist, you can replace Vocab::Quests with a string that will used as the vocabulary name for Quests. So you could change it to:

Code: [Select]
["Quests", "main_commands_enabled", true, Scene_Quests],

And that should work. It does mean that you would have to change that string if you wanted to use a different name, which might be inconvenient.

Try the first suggestion, first, and let me know how that goes works. The second will work as a temporary fix until someone else can give you the correct answer (assuming mine is wrong).
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: MadamInsanity on December 12, 2012, 04:37:57 PM
Neither of these codes worked.

Vocab::quests gave me this error:

Script 'Menu' line 26: NoMethodError occurred.

underined method `quests' for Vocab:Module.


["Quests", "main_commands_enabled", true, Scene_Quests], gave me this one:

Script 'Menu' line 26: NameError occurred.
uninitialized constant Z01::Scene_Quests
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: LoganF on December 12, 2012, 04:52:23 PM
What other scripts are you using? I have no idea what Z01 is referring to, and it's not something that's in the Quest Journal. It sounds like some kind of CMS script seeing as the default Scenes aren't throwing up any errors, only Scene_Quests.

As a starting point, try changing Scene_Quests to Scene_Quest. In Quest Journal, the Quest isn't pluralised, so that might be the cause. If it's not that either, then there's something else that I'm not sure about without some info on what Z01 is.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: MadamInsanity on December 12, 2012, 06:05:22 PM
I did some fiddling around and it look like not entering the code line for the quest worked (and some trimming of scripts that I didn't didn't need). I feel so stupid now. Sorry.   :-[
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on December 12, 2012, 09:43:51 PM
Well, I am glad it all worked out.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: DoctorPsycho7 on January 05, 2013, 01:56:09 AM
Hey, I was wondering if anybody could help me.

I'm trying to use this script along with Pacman's Menu augmenter, found here: http://rmrk.net/index.php/topic,46355.0.html

Problem is, when I load his script into the game, I cannot get a Quest icon to pop back up inside the main menu (via esc.) I can still hit Q in the game to access the quest window, but I'm trying to figure out how to have it so that the new main menu will display the Quests as an option.

Any help with this matter would be much appreciated. I'm rather terrible with scripting, so I'm losing my mind trying to figure out how to make everything work.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 05, 2013, 04:16:16 AM
Hmm, this sounds familiar. I think you can find the solution here: http://rmrk.net/index.php/topic,45009.msg536382.html#msg536382

That was for adding the Monster Catalogue to Pacman's script, but these scripts both work the same for adding to the menu, so all you need to do is use a different method. See also: http://rmrk.net/index.php/topic,45009.msg536482.html#msg536482

If you need further assistance, I can try to provide more tailored guidance for this script specifically.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: DoctorPsycho7 on January 05, 2013, 04:31:32 AM
I looked around at your other responses within that thread, and custom tailored the issue myself. Thank you very much for all your assistance! The system works perfectly now! :D
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 10, 2013, 07:10:34 PM
I love your script.

I'm writing a custom shop script and I want certain items to be displayed only when a specific quest is met:
Code: [Select]
module Common
class Shop
def self.by_quest(shop_type, purchase_only = false)
      case shop_type
      when :items
        if quest_complete?(7) # <<<<<<<<<<<<<<<<< crash here: Script 'Game_interpreter' line 1411: NoMethodError occured.
          show(:general_all, purchase_only)
        elsif quest_complete?(4)
          show(:general_advanced, purchase_only)
        else
          show(:general_basic, purchase_only)
        end
....
"Script 'Game_interpreter' line 1411: NoMethodError occured."

It works in scripts in events as well as outside of my module. But not inside of it. I did a ctrl+f to search for your "quest_completed?" definition but it's not there at all. How do I call quest_complete?(x) and objective_complete?(x,y) and such from another module?

Thanks in advance.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 10, 2013, 09:16:33 PM
The following check would do it:

Code: [Select]
$game_party.quests.revealed?(7) && $game_party.quests[7].status?(:complete)
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 10, 2013, 09:37:53 PM
Thanks. Your 'support times' are incredibly fast. Keep up the good work!
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 12, 2013, 06:26:31 PM
No sorry this is no good.
Code: [Select]
$game_party.quests[7].status?(:complete)
will also reveal the quest (7,0) as an unwanted side-effect.

I tested it with a script in an event and indeed it does reveal the quest:
Code: [Select]
if $game_party.quests[7].status?(:complete)
 p 'complete'
else
 p 'not complete'
end

ofcourse i could manually hide it again after using that line in an if-statement but that is kind of bad imo.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 12, 2013, 06:37:14 PM
Yes, that is why the code I shared was:

Code: [Select]
$game_party.quests.revealed?(7) && $game_party.quests[7].status?(:complete)

Both parts of that expression are necessary in order to avoid the problem you have encountered. The first part checks whether the quest has been revealed, and if it hasn't been, then it won't check the second part and so it won't accidentally reveal the quest.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 12, 2013, 07:44:56 PM
Oh sorry I misunderstood.

Could I be a pain one more time and ask what the code is for checking it for an objective like (7,1) (for example) through a script?
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 12, 2013, 10:10:25 PM
No worries!  ;D

For checking an objective, you again need to have the revealed check, and the entire code is:

Code: [Select]
$game_party.quests.revealed?(x) && $game_party.quests[x].objective_status?(:complete, y)

Where x is the ID of the quest and y is the ID of the objective. So, for your example, it is:

Code: [Select]
$game_party.quests.revealed?(7) && $game_party.quests[7].objective_status?(:complete, 1)

(keeping in mind that 1 is the second objective, with 0 being the first).

Also, if you want to check if more than one objective is complete, you can just insert it immediately after the 1. So, if you wanted to check if objectives 0, 1, and 3 are complete, it would be:

Code: [Select]
$game_party.quests.revealed?(7) && $game_party.quests[7].objective_status?(:complete, 0, 1, 3)
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 12, 2013, 10:37:54 PM
And again many thanks. That works perfectly. In case anyone else would ever need it, add this to your custom class:
Code: [Select]
    def self.quest_complete?(q_id)
      return $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].status?(:complete)
    end
   
    def self.objective_complete?(q_id, *obj_id)
        $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:complete, *obj_id)
    end
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 15, 2013, 09:54:00 PM
I'm learning Ruby. I started like 2 weeks ago so my code might be 'noobish'. Today I felt brave and attempted to create an addon for your script to make it easier to debug my game.
It actually works  :o, but there were a few things that I couldn't figure out. (I'm sorry if I ask too many questions)

 Problems:
 - How do I retrieve a list of all objectives? The problem is that the user may
   have his objective id's as follow: 0,1,2,100,1000,434334,etc...
   For now I just used a placeholder "@@quests"
 - I also need to retrieve them without making them visible.
 - How do I retrieve the list of objectives that belong to a specific quest_id
   without revealing anything.

Code: [Select]
#==============================================================================
# Version 1.00
#
# About:
# A quick debug manager for turning on/off quests/objectives and/or revealing/
# concealing them.
#
# Instructions:
# Place below "Modern Algebra's Quest Journal" but above "? Main Process".
# Call like this: SceneManager.call(Scene_QJ_Debug).
# Or Press Q in the quest window to open the debug window
#
# Requires:
# - Modern Algebra's Quest Journal
# - RPG Maker VX Ace
#
# Written by Napoleon (My very first addon!).
#
# Version History:
# 1.00 (16-1-2013)
#   - First Release
#==============================================================================


#==============================================================================
# ? Quest Journal - Debug Addon - Singleton instance
#------------------------------------------------------------------------------
#  Singleton instance for the QJ debug scene
#==============================================================================
module Quest_Journal
  module Utility
################################################################################
# CONFIG START
################################################################################
    # When set to true (default) then you can Press [Q] (default) in the quest menu to open the debug menu.
    # When set to false this addon can only be manually called.       
    DEBUG_MENU_ENABLED = true
   
    # Key for opening the debug menu
    DEBUG_MENU_KEY = :L
   
    # The first quest id, usually 0
    FIRST_QUEST = 0
   
    # The maximum quest id to check. This must be equal or higher than your highest quest id
    MAX_QUEST = 1000

    # Quest text color when completed (in debug menu only)
    QUEST_COMPLETE_COLOR = 3 # 3 = lightgreen
################################################################################   
# CONFIG END
################################################################################
    # Samples:
      # Utility.quest_data(1,:objectives)
      # Utility.quest_data(1,:name)
    # Possible symbols: :line, :level, :name, :description, :objectives, :rewards
    def self.quest_data(q_id, symbol)   
      return QuestData.setup_quest(q_id)[symbol]
    end
   
    # Fills the @@quests variable with all used quest id's.
    def self.set_quest_data
      result = []
      array_idx = 0
      for i in FIRST_QUEST..MAX_QUEST
        if quest_data(i,:name) != nil
          result[array_idx] = i
          array_idx +=1
        end
      end
      return result
    end   
   
    #Utility.quests
    @@quests = set_quest_data
    # static getter
    def self.quests
      @@quests
    end 
   
    #Utility.quest_complete?()
    def self.quest_complete?(q_id)
      return $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].status?(:complete)
    end   

    #Utility.reset_quest()
    def self.reset_quest(q_id)
      $game_party.quests.delete_quest(q_id)
      $game_party.quests.setup_quest(q_id)
    end   
    #Utility.objective_complete?(,)
    def self.objective_complete?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:complete, *obj_id)
    end
    #Utility.objective_revealed?(,)
    def self.objective_revealed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:revealed, *obj_id)
    end
    #Utility.objective_concealed?(,)
    def self.objective_concealed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:concealed, *obj_id)
    end         
    #Utility.objective_failed?(,)
    def self.objective_failed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:failed, *obj_id)
    end   
    #Utility.complete_objective(,)
    def self.complete_objective(q_id, obj_id)
      $game_party.quests[q_id].complete_objective(obj_id)
    end
    #Utility.complete_quest(,)
    def self.complete_quest(q_id)
      obj_count = QuestData.setup_quest(q_id)[:objectives].length
      for i in 0..obj_count-1
          complete_objective(q_id,i)
      end
    end   
  end # Utility
 
  #==============================================================================
  # ? Quest Journal - Debug Addon - Quest window (left window)
  #------------------------------------------------------------------------------
  #  This window contains the list of all quests
  #==============================================================================
  class Window_Quests < Window_Selectable
    include Quest_Journal
    #--------------------------------------------------------------------------
    # * Class Variable
    #--------------------------------------------------------------------------
    @@last_top_row = 0                      # For saving first line
    @@last_index   = 0                      # For saving cursor position
    @@sel_quest_id = 1
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    attr_reader   :right_window             # Right window
    attr_reader   :sel_quest_id             #   
    #--------------------------------------------------------------------------
    # * Object Initialization
    #--------------------------------------------------------------------------
    def initialize(x, y)
      super(x, y, window_width, window_height)
      @sel_quest_id = Utility.quests[0]
      refresh
      self.top_row = @@last_top_row
      select(@@last_index)
      activate
    end
    #--------------------------------------------------------------------------
    # * Get Window Width
    #--------------------------------------------------------------------------
    def window_width
      return 164
    end
    #--------------------------------------------------------------------------
    # * Get Window Height
    #--------------------------------------------------------------------------
    def window_height
      Graphics.height
    end
    #--------------------------------------------------------------------------
    # * Get Number of Items
    #--------------------------------------------------------------------------
    def item_max
      Utility.quests.length || 0
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
      super     
      if active && Input.trigger?(:L)
        q_id = Utility.quests[index]
        if Utility.quest_complete?(q_id)
          Utility.reset_quest(q_id)
        else
          Utility.complete_quest(q_id)
        end
        Sound.play_ok
        redraw_current_item
        @right_window.refresh
      end
     
      return unless @right_window
      @sel_quest_id = Utility.quests[index]
      @right_window.refresh_me
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      create_contents
      draw_all_items
    end
    #--------------------------------------------------------------------------
    # * Draw Item
    #--------------------------------------------------------------------------
    def draw_item(index)
      quest_id = Utility.quests[index]
      if Utility.quest_complete?(quest_id)
        change_color(text_color(Utility::QUEST_COMPLETE_COLOR))
      end 

      text = sprintf("%02d: #{$game_party.quests[quest_id].name} ", quest_id )
      text_rect = item_rect_for_text(index)
      text_rect.x+=24
     
      draw_text(text_rect, text)
      change_color(normal_color)
      draw_icon($game_party.quests[quest_id].icon_index, text_rect.x-24, text_rect.y, true)       
    end
    #--------------------------------------------------------------------------
    # * Processing When Cancel Button Is Pressed
    #--------------------------------------------------------------------------
    def process_cancel
      super
      @@last_top_row = top_row
      @@last_index = index
    end
    #--------------------------------------------------------------------------
    # * Set Right Window
    #--------------------------------------------------------------------------
    def right_window=(right_window)
      @right_window = right_window
      update
    end
  end

  #==============================================================================
  # ? Quest Journal - Debug Addon - Objective window (right window)
  #------------------------------------------------------------------------------
  #  This window contains the list of all objectives for the selected quest
  #==============================================================================
  #==============================================================================
  # ** Objective Window
  #------------------------------------------------------------------------------
  #  Displays the objectives for the currently selected quest (if any)
  #==============================================================================
  class Window_Objectives < Window_Selectable
    include Quest_Journal
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    # None
    #--------------------------------------------------------------------------
    # * Private Instance Variables
    #--------------------------------------------------------------------------   
    # The previously selected quest id (in the left window)
    @previous_quest_id
   
    # The text colors for the objective status
    @@OBJ_COLORS = {
      'revealed' => 1, # blue
      'completed' => 3, # green
      'failed' => 18, # red
      'concealed' => 0 # white
    }
    #--------------------------------------------------------------------------
    # * Object Initialization
    #-------------------------------------------------------------------------
    def initialize(x, y, width, left_window)
      @left_window = left_window
      super(x, y, width, fitting_height(10))     
      refresh
    end
    #--------------------------------------------------------------------------
    # * Get Number of Items
    #--------------------------------------------------------------------------
    def item_max
      return QuestData.setup_quest(sel_q_id)[:objectives].length
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      contents.clear
      draw_all_items
    end
    #--------------------------------------------------------------------------
    # * Selected Quest ID
    #--------------------------------------------------------------------------
    def sel_q_id
      return @left_window.sel_quest_id
    end 
    #--------------------------------------------------------------------------
    # * Draw Item
    #-------------------------------------------------------------------------- 
    def draw_item(index)   
      if sel_q_id == nil then return end
     
      obj_id = index # store currently selected objective_id in a more meaningful variable name
      item_text = sprintf("Obj. %0d: #{$game_party.quests[sel_q_id].objectives[obj_id]}",obj_id)
      id_width = text_size(item_text).width
      status = Utility.objective_complete?(sel_q_id,obj_id) ? "[X]" : "[ ]"   
     
      # objective item color
      if Utility.objective_failed?(sel_q_id,index)
        change_color(text_color(@@OBJ_COLORS['failed']))
      elsif Utility.objective_concealed?(sel_q_id,index)
        change_color(text_color(@@OBJ_COLORS['concealed']))
      elsif Utility.objective_complete?(sel_q_id,index)             
        change_color(text_color(@@OBJ_COLORS['completed']))     
      elsif Utility.objective_revealed?(sel_q_id,index)
        change_color(text_color(@@OBJ_COLORS['revealed']))               
      end
     
      # draw text
      text_rect = item_rect_for_text(index)
      status_rect = item_rect_for_text(index)
      text_rect.width -= 30
      draw_text(text_rect, item_text)     
      # draw status
      status_rect.x+= 5
      draw_text(status_rect, status, 2)   
      change_color(normal_color) # reset text color
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh_me
      if sel_q_id != @previous_quest_id then refresh end
      @previous_quest_id = sel_q_id
    end
    #--------------------------------------------------------------------------
    # * redraw_current_items (redraws both windows current items)
    #--------------------------------------------------------------------------
    def redraw_current_items
      redraw_current_item
      @left_window.redraw_current_item
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
      super
     
      if Input.trigger?(:C)
        if Utility.objective_complete?(sel_q_id,index)
          $game_party.quests[sel_q_id].uncomplete_objective(index)
        else
          Utility.complete_objective(sel_q_id,index)
        end
        redraw_current_items
        Sound.play_ok
      end
     
      if Input.trigger?(:L)
        if Utility.objective_complete?(sel_q_id,index)
          $game_party.quests[sel_q_id].fail_objective(index)
          #p 'now failed'
        elsif Utility.objective_failed?(sel_q_id,index)
          $game_party.quests[sel_q_id].unfail_objective(index)
          $game_party.quests[sel_q_id].reveal_objective(index)
          #p 'now revealed'
        elsif Utility.objective_revealed?(sel_q_id,index)
          $game_party.quests[sel_q_id].conceal_objective(index)
          #p 'now concealed'
        else # it's ONLY revealed
          $game_party.quests[sel_q_id].complete_objective(index)
          #p 'now completed'
        end
        redraw_current_items
        Sound.play_cursor
      end     
    end
   
  end # end of right window class

end # end of module
#==============================================================================
# ? Quest Journal - Debug Addon - Scene
#------------------------------------------------------------------------------
#  The scene that contains the debug menu
#==============================================================================
class Scene_QJ_Debug < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_left_window
    create_right_window
    create_help_window
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
  end
  #--------------------------------------------------------------------------
  # * Create Left Window
  #--------------------------------------------------------------------------
  def create_left_window
    @left_window = Quest_Journal::Window_Quests.new(0, 0)
    @left_window.set_handler(:ok,     method(:on_left_ok))
    @left_window.set_handler(:cancel, method(:return_scene))
  end
  #--------------------------------------------------------------------------
  # * Create Right Window
  #--------------------------------------------------------------------------
  def create_right_window
    wx = @left_window.width
    ww = Graphics.width - wx
    @right_window = Quest_Journal::Window_Objectives.new(wx, 0, ww, @left_window)
    @right_window.set_handler(:cancel, method(:on_right_cancel))
    @left_window.right_window = @right_window
  end
  #--------------------------------------------------------------------------
  # * Create Help Window
  #--------------------------------------------------------------------------
  def create_help_window
    wx = @right_window.x
    wy = @right_window.height
    ww = @right_window.width
    wh = Graphics.height - wy
    @help_window = Window_Base.new(wx, wy, ww, wh)
    refresh_help_window(:left)
  end
  #--------------------------------------------------------------------------
  # * Left [OK]
  #--------------------------------------------------------------------------
  def on_left_ok
    refresh_help_window(:right)
    @right_window.activate
    @right_window.select(0)
  end
  #--------------------------------------------------------------------------
  # * Right [Cancel]
  #--------------------------------------------------------------------------
  def on_right_cancel
    @left_window.activate
    @right_window.unselect
    refresh_help_window(:left)
  end
  #--------------------------------------------------------------------------
  # * Refresh Help Window
  #--------------------------------------------------------------------------
  def refresh_help_window(window)
    if window == :left
      help_text = "C (Enter) : Select Quest.\n" +
                  "L (Q) : Complete / Reset"
    else
      help_text = "C (Enter) : Complete / Reset\n" +
                  "L (Q) : Completed [green]\nFailed [red]\nRevealed [blue]\nConcealed [white]"
    end
    @help_window.contents.clear
    @help_window.draw_text_ex(4, 0, help_text)
  end
end # Scene

#==============================================================================
# Overwrite Algebra's Window_QuestList update method so it can call this addon's scene
#==============================================================================
class Window_QuestList < Window_Selectable
  def update
    super
    if Quest_Journal::Utility::DEBUG_MENU_ENABLED && Input.trigger?(Quest_Journal::Utility::DEBUG_MENU_KEY)
      SceneManager.return
      SceneManager.call(Scene_QJ_Debug)
    end
  end
end
#==============================================================================
#
# ? End of File
#
#==============================================================================
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 15, 2013, 10:59:57 PM
I suppose you'd have to do the following:

Code: [Select]
QuestData.setup_quest(id)[:objectives].compact
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 16, 2013, 03:02:55 PM
Thanks. The hardest part is to access all these quests and objectives without revealing them. But I have it all solved now except this one little thing. The code below will reset and conceal the quest. But after it's concealed it can never be revealed anymore... Not even through your reveal_objective(x,y). It stays concealed permanently until I restart the game. I tried another 'dirty' work-around by concealing all objectives but that won't work either. I'm all out of idea's.
Code: [Select]
    # Do not use outcommented version below. It counts as manual conceal and thus is not automatically revealed when calling revea_objective(x,y) for this quest... I think..
    #Utility.conceal_quest()
    #def self.conceal_quest(q_id)
    #  $game_party.quests[q_id].concealed = true
    #end
   
    #Utility.reset_quest()
    # Note that objective ID's may not have gaps. They must be numbered starting from 0 without any gaps in between.
    def self.reset_quest(q_id)
      $game_party.quests.delete_quest(q_id)
      $game_party.quests.setup_quest(q_id)
     
      # ARGH doesn't work. The quest itself will remain revealed after all objectives have been concealed.
      obj_count = QuestData.setup_quest(q_id)[:objectives].length
      for obj_id in 0..obj_count-1
          $game_party.quests[q_id].conceal_objective(obj_id)
      end
    end

Full code in case it matters and any1 cares for going through that bulk:
Code: [Select]
#==============================================================================
# Version 1.00
#
# About:
# A quick debug manager for turning on/off quests/objectives and/or revealing/
# concealing them.
#
# Instructions:
# Place below "Modern Algebra's Quest Journal" but above "? Main Process".
# Call like this: SceneManager.call(Scene_QJ_Debug).
# Or Press Q in the quest window to open the debug window
#
# Requires:
# - Modern Algebra's Quest Journal
# - RPG Maker VX Ace
#
# Written by Napoleon (My very first addon!).
#
# Version History:
# 1.00 (16-1-2013)
#   - First Release
#==============================================================================


#==============================================================================
# ? Quest Journal - Debug Addon - Singleton instance
#------------------------------------------------------------------------------
#  Singleton instance for the QJ debug scene
#==============================================================================
module Quest_Journal
  module Utility
################################################################################
# CONFIG START
################################################################################
    # When set to true (default) then you can Press [Q] (default) in the quest menu to open the debug menu.
    # When set to false this addon can only be manually called.       
    DEBUG_MENU_ENABLED = true
   
    # Key for opening the debug menu
    DEBUG_MENU_KEY = :L
   
    # Key for completing/resetting an entire quest (left window)
    COMPLETE_RESET_QUEST_KEY = :R
   
    # The first quest id, usually 0
    FIRST_QUEST = 0
   
    # The maximum quest id to check. This must be equal or higher than your highest quest id
    MAX_QUEST = 1000

    # Quest text color when completed (in debug menu only)
    QUEST_COMPLETE_COLOR = 3 # 3 = lightgreen
   
    # The text status colors
    OBJ_COLORS = {
      'revealed' => 1, # blue
      'completed' => 3, # green
      'failed' => 18, # red
      'concealed' => 0 # white
    }   
################################################################################   
# CONFIG END
################################################################################
    # Samples:
      # Utility.quest_data(1,:objectives)
      # Utility.quest_data(1,:name)
    # Possible symbols: :line, :level, :name, :description, :objectives, :rewards
    def self.quest_data(q_id, symbol)   
      return QuestData.setup_quest(q_id)[symbol]
    end
   
    # Returns an array with all used (=non-empty) quest id's.
    def self.set_quest_data
      result = []
      array_idx = 0
      for i in FIRST_QUEST..MAX_QUEST
        if quest_data(i,:name) != nil
          result[array_idx] = i
          array_idx +=1
        end
      end
      return result
    end   
   
    #Utility.quests
    @@quests = set_quest_data
    # static getter
    def self.quests
      @@quests
    end 
   
    #Utility.quest_complete?()
    def self.quest_complete?(q_id)
      return $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].status?(:complete)
    end   
    #Utility.quest_revealed?()
    def self.quest_revealed?(q_id)
      return $game_party.quests.revealed?(q_id)
    end   
    #Utility.quest_failed?()
    def self.quest_failed?(q_id)
      return $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].status?(:failed)
    end   
    #Utility.quest_concealed?()
    def self.quest_concealed?(q_id)
      return !$game_party.quests.revealed?(q_id)
    end       
   
    #Utility.objective_complete?(,)
    def self.objective_complete?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:complete, *obj_id)
    end
    #Utility.objective_revealed?(,)
    def self.objective_revealed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:revealed, *obj_id)
    end
    #Utility.objective_concealed?(,)
    def self.objective_concealed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:concealed, *obj_id)
    end         
    #Utility.objective_failed?(,)
    def self.objective_failed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:failed, *obj_id)
    end   
    #Utility.complete_objective(,)
    def self.complete_objective(q_id, obj_id)
      $game_party.quests[q_id].complete_objective(obj_id)
    end
    #Utility.complete_quest(,)
    # Completes all objectives for the specified quest
    # Note that objective ID's may not have gaps. They must be numbered starting from 0 without any gaps in between.
    def self.complete_quest(q_id)
      obj_count = QuestData.setup_quest(q_id)[:objectives].length
      for i in 0..obj_count-1
          complete_objective(q_id,i)
      end
    end   
    #Utility.conceal_quest()
    def self.conceal_quest(q_id)
      $game_party.quests[q_id].concealed = true
    end
    #Utility.reset_quest()
    def self.reset_quest(q_id)
      $game_party.quests.delete_quest(q_id)
      $game_party.quests.setup_quest(q_id)
      conceal_quest(q_id)
    end
  end # Utility
 
  #==============================================================================
  # ? Quest Journal - Debug Addon - Quest window (left window)
  #------------------------------------------------------------------------------
  #  This window contains the list of all quests
  #==============================================================================
  class Window_Quests < Window_Selectable
    include Quest_Journal
    #--------------------------------------------------------------------------
    # * Class Variable
    #--------------------------------------------------------------------------
    @@last_top_row = 0                      # For saving first line
    @@last_index   = 0                      # For saving cursor position
    @@sel_quest_id = 1
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    attr_reader   :right_window             # Right window
    attr_reader   :sel_quest_id             #   
    #--------------------------------------------------------------------------
    # * Object Initialization
    #--------------------------------------------------------------------------
    def initialize(x, y)
      super(x, y, window_width, window_height)
      @sel_quest_id = Utility.quests[0]
      refresh
      self.top_row = @@last_top_row
      select(@@last_index)
      activate
    end
    #--------------------------------------------------------------------------
    # * Get Window Width
    #--------------------------------------------------------------------------
    def window_width
      return 164
    end
    #--------------------------------------------------------------------------
    # * Get Window Height
    #--------------------------------------------------------------------------
    def window_height
      Graphics.height
    end
    #--------------------------------------------------------------------------
    # * Get Number of Items
    #--------------------------------------------------------------------------
    def item_max
      Utility.quests.length || 0
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
      super
      if active && Input.trigger?(Utility::COMPLETE_RESET_QUEST_KEY)
        q_id = Utility.quests[index]
        if Utility.quest_complete?(q_id)
          Utility.reset_quest(q_id)
        else
          Utility.complete_quest(q_id)
        end
        Sound.play_ok
        redraw_current_item
        @right_window.refresh
      end
     
      return unless @right_window
      @sel_quest_id = Utility.quests[index]
      @right_window.refresh_me
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      create_contents
      draw_all_items
    end
    #--------------------------------------------------------------------------
    # * Draw Item
    #--------------------------------------------------------------------------
    def draw_item(index)
      quest_id = Utility.quests[index]
     
      # quest item color
      if Utility.quest_failed?(quest_id)
        change_color(text_color(Utility::OBJ_COLORS['failed']))
      elsif Utility.quest_concealed?(quest_id)
        change_color(text_color(Utility::OBJ_COLORS['concealed']))
      elsif Utility.quest_complete?(quest_id)             
        change_color(text_color(Utility::OBJ_COLORS['completed']))     
      elsif Utility.quest_revealed?(quest_id)
        change_color(text_color(Utility::OBJ_COLORS['revealed']))               
      end

      text = sprintf("%02d: #{QuestData.setup_quest(quest_id)[:name]} ", quest_id )
     
      text_rect = item_rect_for_text(index)
      text_rect.x+=24
     
      draw_text(text_rect, text)
      change_color(normal_color)
      draw_icon(QuestData.setup_quest(quest_id)[:icon_index], text_rect.x-24, text_rect.y, true)
    end
    #--------------------------------------------------------------------------
    # * Processing When Cancel Button Is Pressed
    #--------------------------------------------------------------------------
    def process_cancel
      super
      @@last_top_row = top_row
      @@last_index = index
    end
    #--------------------------------------------------------------------------
    # * Set Right Window
    #--------------------------------------------------------------------------
    def right_window=(right_window)
      @right_window = right_window
      update
    end
  end

  #==============================================================================
  # ? Quest Journal - Debug Addon - Objective window (right window)
  #------------------------------------------------------------------------------
  #  This window contains the list of all objectives for the selected quest
  #==============================================================================
  #==============================================================================
  # ** Objective Window
  #------------------------------------------------------------------------------
  #  Displays the objectives for the currently selected quest (if any)
  #==============================================================================
  class Window_Objectives < Window_Selectable
    include Quest_Journal
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    # None
    #--------------------------------------------------------------------------
    # * Private Instance Variables
    #--------------------------------------------------------------------------   
    # The previously selected quest id (in the left window)
    @previous_quest_id
   

    #--------------------------------------------------------------------------
    # * Object Initialization
    #-------------------------------------------------------------------------
    def initialize(x, y, width, left_window)
      @left_window = left_window
      super(x, y, width, fitting_height(10))     
      refresh
    end
    #--------------------------------------------------------------------------
    # * Get Number of Items
    #--------------------------------------------------------------------------
    def item_max
      return QuestData.setup_quest(sel_q_id)[:objectives].length
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      contents.clear
      draw_all_items
    end
    #--------------------------------------------------------------------------
    # * Selected Quest ID
    #--------------------------------------------------------------------------
    def sel_q_id
      return @left_window.sel_quest_id
    end 
    #--------------------------------------------------------------------------
    # * Draw Item
    #-------------------------------------------------------------------------- 
    def draw_item(index)   
      if sel_q_id == nil then return end
     
      obj_id = index # store currently selected objective_id in a more meaningful variable name
      item_text = sprintf("Obj. %0d: #{QuestData.setup_quest(sel_q_id)[:objectives][index]}",obj_id)
      id_width = text_size(item_text).width
      status = Utility.objective_complete?(sel_q_id,obj_id) ? "[X]" : "[ ]"   
     
      # objective item color
      if Utility.objective_failed?(sel_q_id,index)
        change_color(text_color(Utility::OBJ_COLORS['failed']))
      elsif Utility.objective_concealed?(sel_q_id,index)
        change_color(text_color(Utility::OBJ_COLORS['concealed']))
      elsif Utility.objective_complete?(sel_q_id,index)             
        change_color(text_color(Utility::OBJ_COLORS['completed']))     
      elsif Utility.objective_revealed?(sel_q_id,index)
        change_color(text_color(Utility::OBJ_COLORS['revealed']))               
      end
     
      # draw text
      text_rect = item_rect_for_text(index)
      status_rect = item_rect_for_text(index)
      text_rect.width -= 30
      draw_text(text_rect, item_text)     
      # draw status
      status_rect.x+= 5
      draw_text(status_rect, status, 2)   
      change_color(normal_color) # reset text color
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh_me
      if sel_q_id != @previous_quest_id then refresh end
      @previous_quest_id = sel_q_id
    end
    #--------------------------------------------------------------------------
    # * redraw_current_items (redraws both windows current items)
    #--------------------------------------------------------------------------
    def redraw_current_items
      redraw_current_item
      @left_window.redraw_current_item
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
      super
     
      if Input.trigger?(:C)
        if Utility.objective_complete?(sel_q_id,index)
          $game_party.quests[sel_q_id].uncomplete_objective(index)
        else
          Utility.complete_objective(sel_q_id,index)
        end
        redraw_current_items
        Sound.play_ok
      end
     
      if active && Input.trigger?(:L)
        if Utility.objective_complete?(sel_q_id,index)
          $game_party.quests[sel_q_id].fail_objective(index)
          #p 'now failed'
        elsif Utility.objective_failed?(sel_q_id,index)
          $game_party.quests[sel_q_id].unfail_objective(index)
          $game_party.quests[sel_q_id].reveal_objective(index)
          #p 'now revealed'
        elsif Utility.objective_revealed?(sel_q_id,index)
          $game_party.quests[sel_q_id].conceal_objective(index)
          #p 'now concealed'
        else # it's ONLY revealed
          $game_party.quests[sel_q_id].complete_objective(index)
          #p 'now completed'
        end
        redraw_current_items
        Sound.play_cursor
      end     
    end
   
  end # end of right window class

end # end of module
#==============================================================================
# ? Quest Journal - Debug Addon - Scene
#------------------------------------------------------------------------------
#  The scene that contains the debug menu
#==============================================================================
class Scene_QJ_Debug < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_left_window
    create_right_window
    create_help_window
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
  end
  #--------------------------------------------------------------------------
  # * Create Left Window
  #--------------------------------------------------------------------------
  def create_left_window
    @left_window = Quest_Journal::Window_Quests.new(0, 0)
    @left_window.set_handler(:ok,     method(:on_left_ok))
    @left_window.set_handler(:cancel, method(:return_scene))
  end
  #--------------------------------------------------------------------------
  # * Create Right Window
  #--------------------------------------------------------------------------
  def create_right_window
    wx = @left_window.width
    ww = Graphics.width - wx
    @right_window = Quest_Journal::Window_Objectives.new(wx, 0, ww, @left_window)
    @right_window.set_handler(:cancel, method(:on_right_cancel))
    @left_window.right_window = @right_window
  end
  #--------------------------------------------------------------------------
  # * Create Help Window
  #--------------------------------------------------------------------------
  def create_help_window
    wx = @right_window.x
    wy = @right_window.height
    ww = @right_window.width
    wh = Graphics.height - wy
    @help_window = Window_Base.new(wx, wy, ww, wh)
    refresh_help_window(:left)
  end
  #--------------------------------------------------------------------------
  # * Left [OK]
  #--------------------------------------------------------------------------
  def on_left_ok
    refresh_help_window(:right)
    @right_window.activate
    @right_window.select(0)
  end
  #--------------------------------------------------------------------------
  # * Right [Cancel]
  #--------------------------------------------------------------------------
  def on_right_cancel
    @left_window.activate
    @right_window.unselect
    refresh_help_window(:left)
  end
  #--------------------------------------------------------------------------
  # * Refresh Help Window
  #--------------------------------------------------------------------------
  def refresh_help_window(window)
    if window == :left
      help_text = "C (Enter) : Select Quest.\n" +
                  "R (W) : Complete / Reset+Conceal"
    else
      help_text = "C (Enter) : Complete / Reset\n" +
                  "L (Q) : Completed [green]\nFailed [red]\nRevealed [blue]\nConcealed [white]"
    end
    @help_window.contents.clear
    @help_window.draw_text_ex(4, 0, help_text)
  end
end # Scene

#==============================================================================
# Overwrite Algebra's Window_QuestList update method so it can call this addon's scene
#==============================================================================
class Window_QuestList < Window_Selectable
  def update
    super
    if Quest_Journal::Utility::DEBUG_MENU_ENABLED && Input.trigger?(Quest_Journal::Utility::DEBUG_MENU_KEY)
      SceneManager.return
      SceneManager.call(Scene_QJ_Debug)
    end
  end
end
#==============================================================================
#
# ? End of File
#
#==============================================================================
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 16, 2013, 11:03:31 PM
I'm not sure what you mean. You should be able to conceal and reveal quests with the code:

Code: [Select]
$game_party.quests[id].concealed = true/false

Setting it to true conceals the quest and setting it to false reveals it. I believe that when you do that, it will show up again.

Also that code:

Code: [Select]
QuestData.setup_quest(id)

will give you access to all of the quest data without revealing anything, not just objectives.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 16, 2013, 11:45:16 PM
I know I did a "p QuestData.setup_quest(q_id)" to check out what's inside of it. It does not contain objective id's. But as long as the user configures his objective id's in a sequential manner it should be fine.
In fact, I just noticed that your script crashes if the user does not use a sequential objective-id-list. for Example:
Code: [Select]
      q[:objectives][0]     = "Meet your colleague"
      q[:objectives][1]     = "Travel to Castle"
      q[:objectives][2]     = "Don't steal the panties"
      q[:objectives][3]     = "Pass your exam"
      q[:objectives][4]     = "Celebrate your new rank"
      #q[:objectives][5]     = "Steal the panties!" <<< removed because it does not fit in my game
      #q[:objectives][6]     = "Steal the panties! Part 2" <<< removed because it does not fit in my game
      q[:objectives][7]     = "Go ZzzzZzz" # <<<<< skipped id 5 and 6. Will cause crash at some point.
This will crash your application when objective 7 is revealed. My addon won't crash but will display 2 empty rows. However, your documentation did not read that this was not allowed (or did I miss that?).
Because my events on the map check for certain objective id's to be completed (like a rock that is not removed until you 'Passed your exam'). When I for some reason decide to remove objective 2 because stealing panties doesn't fit in my story then I have to fill in a dummy objective in order for your script not to crash. And if I would just shift the higher objective-id's one value lower then I would have to check ALL of my maps to make sure that they don't use any of those objective id's and if they do update those too.
It would have been nice if an objective would have another parameter (weight) or something for sorting them so that you never have any gaps.
I'm sorry if I'm totally wrong.


About the concealing:
Code: [Select]
$game_party.quests[id].concealed = true
Yes it does conceal the quest. But the problem is that when I complete/fail/update an objective after I concealed the quest then Quest Journal does not automatically reveal the quest anymore . It stays concealed no matter what until I manually call:
Code: [Select]
$game_party.quests[id].concealed = false

The quest should just return to it's concealed state like when the game started. The above code is some kind of hard-conceal that sticks on it. That's not what I need. I just need to reset the quest and conceal it again (as if it was never revealed/used at all during this game-run).
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 17, 2013, 04:22:23 AM
Well, the only way to do that is:

Code: [Select]
      $game_party.quests.delete_quest(q_id)

That should make it as if the quest was never revealed, without setting the hard conceal. But I guess I am asking why it's necessary to access the quest through the Game_Quests class when you can retrieve any relevant data from the QuestData.setup_quest(q_id)?



I'm unable to recreate the non-sequential IDs error in my test project. I could see that error occurring if the game tried to reveal an objective that was set to nil, but I'm not sure why it would happen otherwise if you tried to reveal an objective that was not set to nil but which was non-sequential. Could you maybe recreate the error in a demo and show it to me?


As for showing the blank spaces, you can prevent that by using the #compact method. Ie:

Code: [Select]
QuestData.setup_quest(id)[:objectives].compact

If you want to retrieve the IDs, then you'd need the non-compacted array of course, but the objectives array is arranged in such a way that the ID of the objective is its position in the array.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 17, 2013, 12:59:20 PM
You are right, it happened because objective_complete(x,y) was called on a nil objective.
No it wasn't revealed by me, I just needed to reset and conceal a quest even if it was revealed by the user or by some event or whatever reason.
I got it all working now :). Many thanks again.

Here is the new version:
Code: [Select]
#==============================================================================
# Version 1.00
#
# About:
# A quick debug manager for completing/failing/revealing/concealing quests and
# objectives.
#
# Instructions:
# Place below "Modern Algebra's Quest Journal" but above "? Main Process".
# Call like this: SceneManager.call(Scene_QJ_Debug).
# Or Press Q (default) in the quest window to open the debug window.
#
# Requires:
# - Modern Algebra's Quest Journal 1.0.3
# - RPG Maker VX Ace
#
# Written by Napoleon (My very first addon!).
# Special thanks to Modern Algebra for answering my questions.
#
# Terms of Use:
# Credits are appreciated but not required. You may repost this as well as long
# as you do not claim this as your own work.
#
# Version History:
# 1.00 (17-1-2013)
#   - First Release
#==============================================================================


#==============================================================================
# ? Quest Journal - Debug Addon - Singleton instance
#------------------------------------------------------------------------------
#  Singleton instance for the QJ debug scene
#==============================================================================
module Quest_Journal
  module Utility
################################################################################
# CONFIG START
################################################################################
    # When set to true (default) then you can Press [Q] (default) in the quest menu to open the debug menu.
    # When set to false this addon can only be manually called.       
    DEBUG_MENU_ENABLED = true
   
    # Key for opening the debug menu from the quest journal. Use a nil value to disable this.
    DEBUG_MENU_KEY = QuestData::MAP_BUTTON # Should be [Q] by default
   
    # Key for completing/resetting an entire quest (left window)
    COMPLETE_RESET_QUEST_KEY = QuestData::MAP_BUTTON # Should be [Q] by default
   
    # Key for opening the debug menu directly from the map. Use a nil value to disable this.
    MAP_KEY = nil
   
    # When set to true then the debug menu will be shown if the Quest Journal has no quests and would have otherwise just played a 'buzzer sound'.
    SHOW_WHEN_NO_QUESTS = true
   
    # The first quest id, usually 0
    FIRST_QUEST = 0
   
    # When set to false then the map is shown after closing the debug menu even if it was opened through the Quest Journal's menu.
    RETURN_TO_QUEST_MENU = true
   
    # The maximum quest id to check. This must be equal or higher than your highest quest id
    MAX_QUEST = 1000

    # Quest text color when completed (in debug menu only)
    QUEST_COMPLETE_COLOR = 3 # 3 = lightgreen
   
    # The text status colors
    COLORS = {
      'revealed' => 1, # blue
      'completed' => 3, # green
      'failed' => 18, # red
      'concealed' => 0 # white
    }   
################################################################################   
# CONFIG END
################################################################################
    # Samples:
      # Utility.quest_data(1,:objectives)
      # Utility.quest_data(1,:name)
    # Possible symbols: :line, :level, :name, :description, :objectives, :rewards
    def self.quest_data(q_id, symbol)   
      return QuestData.setup_quest(q_id)[symbol]
    end
   
    # Returns an array with all used (=non-empty) quest id's.
    def self.set_quest_data
      result = []
      array_idx = 0
      for i in FIRST_QUEST..MAX_QUEST
        if quest_data(i,:name) != nil
          result[array_idx] = i
          array_idx +=1
        end
      end
      return result
    end   
   
    #Utility.quests
    @@quests = set_quest_data
    # static getter
    def self.quests
      @@quests
    end 
   
    #Utility.quest_complete?()
    def self.quest_complete?(q_id)
      return $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].status?(:complete)
    end   
    #Utility.quest_revealed?()
    def self.quest_revealed?(q_id)
      return $game_party.quests.revealed?(q_id)
    end   
    #Utility.quest_failed?()
    def self.quest_failed?(q_id)
      return $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].status?(:failed)
    end   
    #Utility.quest_concealed?()
    def self.quest_concealed?(q_id)
      return !$game_party.quests.revealed?(q_id)
    end       
   
    #Utility.objective_complete?(,)
    def self.objective_complete?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:complete, *obj_id)
    end
    #Utility.objective_revealed?(,)
    def self.objective_revealed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:revealed, *obj_id)
    end
    #Utility.objective_concealed?(,)
    def self.objective_concealed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:concealed, *obj_id)
    end         
    #Utility.objective_failed?(,)
    def self.objective_failed?(q_id, *obj_id)
      $game_party.quests.revealed?(q_id) && $game_party.quests[q_id].objective_status?(:failed, *obj_id)
    end   
    #Utility.complete_objective(,)
    def self.complete_objective(q_id, obj_id)
      $game_party.quests[q_id].complete_objective(obj_id)
    end
    #Utility.complete_quest(,)
    # Completes all objectives for the specified quest
    # Note that objective ID's may not have gaps. They must be numbered starting from 0 without any gaps in between.
    def self.complete_quest(q_id)
      obj_count = QuestData.setup_quest(q_id)[:objectives].compact.length
      for i in 0..obj_count-1
          complete_objective(q_id,i)
      end
    end   
   
    #Utility.reset_quest()
    def self.reset_quest(q_id)
      $game_party.quests.delete_quest(q_id)
    end
  end # Utility
 
  #==============================================================================
  # ? Quest Journal - Debug Addon - Quest window (left window)
  #------------------------------------------------------------------------------
  #  This window contains the list of all quests
  #==============================================================================
  class Window_Quests < Window_Selectable
    include Quest_Journal
    #--------------------------------------------------------------------------
    # * Class Variable
    #--------------------------------------------------------------------------
    @@last_top_row = 0                      # For saving first line
    @@last_index   = 0                      # For saving cursor position
    @@sel_quest_id = 1                      # The current selected quest id
    @@is_first_update                       # Determines if this window had it's first update called.
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    attr_reader   :right_window             # Right window
    attr_reader   :sel_quest_id             #   
    #--------------------------------------------------------------------------
    # * Object Initialization
    #--------------------------------------------------------------------------
    def initialize(x, y)
      @@is_first_update = true
      super(x, y, window_width, window_height)
      @sel_quest_id = Utility.quests[0]
      refresh
      self.top_row = @@last_top_row
      select(@@last_index)
      activate
    end
    #--------------------------------------------------------------------------
    # * Get Window Width
    #--------------------------------------------------------------------------
    def window_width
      return 164
    end
    #--------------------------------------------------------------------------
    # * Get Window Height
    #--------------------------------------------------------------------------
    def window_height
      Graphics.height
    end
    #--------------------------------------------------------------------------
    # * Get Number of Items
    #--------------------------------------------------------------------------
    def item_max
      Utility.quests.length || 0
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update     
      super
      if active && Input.trigger?(Utility::COMPLETE_RESET_QUEST_KEY) && !@@is_first_update
        q_id = Utility.quests[index]
        if Utility.quest_complete?(q_id)
          Utility.reset_quest(q_id)
        else
          Utility.complete_quest(q_id)
        end
        Sound.play_ok
        redraw_current_item
        @right_window.refresh
      end
     
      if !Input.press?(:L) then @@is_first_update = false end

      return unless @right_window
      @sel_quest_id = Utility.quests[index]
      @right_window.refresh_me
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      create_contents
      draw_all_items
    end
    #--------------------------------------------------------------------------
    # * Draw Item
    #--------------------------------------------------------------------------
    def draw_item(index)
      quest_id = Utility.quests[index]
     
      # quest item color
      if Utility.quest_failed?(quest_id)
        change_color(text_color(Utility::COLORS['failed']))
      elsif Utility.quest_concealed?(quest_id)
        change_color(text_color(Utility::COLORS['concealed']))
      elsif Utility.quest_complete?(quest_id)             
        change_color(text_color(Utility::COLORS['completed']))     
      elsif Utility.quest_revealed?(quest_id)
        change_color(text_color(Utility::COLORS['revealed']))               
      end

      text = sprintf("%02d: #{QuestData.setup_quest(quest_id)[:name]} ", quest_id )
      text_rect = item_rect_for_text(index)
      text_rect.x+=24
     
      draw_text(text_rect, text)
      change_color(normal_color)
      draw_icon(QuestData.setup_quest(quest_id)[:icon_index], text_rect.x-24, text_rect.y, true)
    end
    #--------------------------------------------------------------------------
    # * Processing When Cancel Button Is Pressed
    #--------------------------------------------------------------------------
    def process_cancel
      super
      @@last_top_row = top_row
      @@last_index = index
    end
    #--------------------------------------------------------------------------
    # * Set Right Window
    #--------------------------------------------------------------------------
    def right_window=(right_window)
      @right_window = right_window
      update
    end
  end

  #==============================================================================
  # ? Quest Journal - Debug Addon - Objective window (right window)
  #------------------------------------------------------------------------------
  #  This window contains the list of all objectives for the selected quest
  #==============================================================================
  #==============================================================================
  # ** Objective Window
  #------------------------------------------------------------------------------
  #  Displays the objectives for the currently selected quest (if any)
  #==============================================================================
  class Window_Objectives < Window_Selectable
    include Quest_Journal
    #--------------------------------------------------------------------------
    # * Public Instance Variables
    #--------------------------------------------------------------------------
    # None
    #--------------------------------------------------------------------------
    # * Private Instance Variables
    #--------------------------------------------------------------------------   
    # The previously selected quest id (in the left window)
    @previous_quest_id
   

    #--------------------------------------------------------------------------
    # * Object Initialization
    #-------------------------------------------------------------------------
    def initialize(x, y, width, left_window)
      @left_window = left_window
      super(x, y, width, fitting_height(10))     
      refresh
    end
    #--------------------------------------------------------------------------
    # * Get Number of Items
    #--------------------------------------------------------------------------
    def item_max
      return QuestData.setup_quest(sel_q_id)[:objectives].length
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      contents.clear
      draw_all_items
    end
    #--------------------------------------------------------------------------
    # * Selected Quest ID
    #--------------------------------------------------------------------------
    def sel_q_id
      return @left_window.sel_quest_id
    end 
    #--------------------------------------------------------------------------
    # * Draw Item
    #-------------------------------------------------------------------------- 
    def draw_item(index)   
      if sel_q_id == nil then return end
     
      obj_id = index # store currently selected objective_id in a more meaningful variable name
      item_text = sprintf("Obj. %0d: #{QuestData.setup_quest(sel_q_id)[:objectives][index]}",obj_id)
      id_width = text_size(item_text).width
      status = Utility.objective_complete?(sel_q_id,obj_id) ? "[X]" : "[ ]"   
     
      # objective item color
      if Utility.objective_failed?(sel_q_id,index)
        change_color(text_color(Utility::COLORS['failed']))
      elsif Utility.objective_concealed?(sel_q_id,index)
        change_color(text_color(Utility::COLORS['concealed']))
      elsif Utility.objective_complete?(sel_q_id,index)             
        change_color(text_color(Utility::COLORS['completed']))     
      elsif Utility.objective_revealed?(sel_q_id,index)
        change_color(text_color(Utility::COLORS['revealed']))               
      end
     
      # draw text
      text_rect = item_rect_for_text(index)
      status_rect = item_rect_for_text(index)
      text_rect.width -= 30
      draw_text(text_rect, item_text)     
      # draw status
      status_rect.x+= 5
      draw_text(status_rect, status, 2)   
      change_color(normal_color) # reset text color
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh_me
      if sel_q_id != @previous_quest_id then refresh end
      @previous_quest_id = sel_q_id
    end
    #--------------------------------------------------------------------------
    # * redraw_current_items (redraws both windows current items)
    #--------------------------------------------------------------------------
    def redraw_current_items
      redraw_current_item
      @left_window.redraw_current_item
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
      super
     
      if Input.trigger?(:C)
        if Utility.objective_complete?(sel_q_id,index)
          $game_party.quests[sel_q_id].uncomplete_objective(index)
        else
          Utility.complete_objective(sel_q_id,index)
        end
        redraw_current_items
        Sound.play_ok
      end
     
      if active && Input.trigger?(:L)
        if Utility.objective_complete?(sel_q_id,index)
          $game_party.quests[sel_q_id].fail_objective(index)
          #p 'now failed'
        elsif Utility.objective_failed?(sel_q_id,index)
          $game_party.quests[sel_q_id].unfail_objective(index)
          $game_party.quests[sel_q_id].reveal_objective(index)
          #p 'now revealed'
        elsif Utility.objective_revealed?(sel_q_id,index)
          $game_party.quests[sel_q_id].conceal_objective(index)
          #p 'now concealed'
        else # it's ONLY revealed
          $game_party.quests[sel_q_id].complete_objective(index)
          #p 'now completed'
        end
        redraw_current_items
        Sound.play_cursor
      end     
    end
   
  end # end of right window class

end # end of module
#==============================================================================
# ? Quest Journal - Debug Addon - Scene
#------------------------------------------------------------------------------
#  The scene that contains the debug menu
#==============================================================================
class Scene_QJ_Debug < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_left_window
    create_right_window
    create_help_window
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
  end
  #--------------------------------------------------------------------------
  # * Create Left Window
  #--------------------------------------------------------------------------
  def create_left_window
    @left_window = Quest_Journal::Window_Quests.new(0, 0)
    @left_window.set_handler(:ok,     method(:on_left_ok))
    @left_window.set_handler(:cancel, method(:return_scene))
  end
  #--------------------------------------------------------------------------
  # * Create Right Window
  #--------------------------------------------------------------------------
  def create_right_window
    wx = @left_window.width
    ww = Graphics.width - wx
    @right_window = Quest_Journal::Window_Objectives.new(wx, 0, ww, @left_window)
    @right_window.set_handler(:cancel, method(:on_right_cancel))
    @left_window.right_window = @right_window
  end
  #--------------------------------------------------------------------------
  # * Create Help Window
  #--------------------------------------------------------------------------
  def create_help_window
    wx = @right_window.x
    wy = @right_window.height
    ww = @right_window.width
    wh = Graphics.height - wy
    @help_window = Window_Base.new(wx, wy, ww, wh)
    refresh_help_window(:left)
  end
  #--------------------------------------------------------------------------
  # * Left [OK]
  #--------------------------------------------------------------------------
  def on_left_ok
    refresh_help_window(:right)
    @right_window.activate
    @right_window.select(0)
  end
  #--------------------------------------------------------------------------
  # * Right [Cancel]
  #--------------------------------------------------------------------------
  def on_right_cancel
    @left_window.activate
    @right_window.unselect
    refresh_help_window(:left)
  end
  #--------------------------------------------------------------------------
  # * Refresh Help Window
  #--------------------------------------------------------------------------
  def refresh_help_window(window)
    if window == :left
      help_text = "C (Enter) : Select Quest.\n" +
                  "#{Quest_Journal::Utility::COMPLETE_RESET_QUEST_KEY} (Q) : Complete / Reset+Conceal."
    else
      help_text = "C (Enter) : Complete / Reset\n" +
                  "L (Q) : Completed [green]\nFailed [red]\nRevealed [blue]\nConcealed [white]"
    end
    @help_window.contents.clear
    @help_window.draw_text_ex(4, 0, help_text)
  end
end # Scene

#==============================================================================
# Overwrite Algebra's Window_QuestList update method so it can call this addon's scene
#==============================================================================
class Window_QuestList < Window_Selectable
  def update
    super
    if Quest_Journal::Utility::DEBUG_MENU_ENABLED && Quest_Journal::Utility::DEBUG_MENU_KEY != nil && Input.trigger?(Quest_Journal::Utility::DEBUG_MENU_KEY)
      SceneManager.return if !Quest_Journal::Utility::RETURN_TO_QUEST_MENU
      SceneManager.call(Scene_QJ_Debug)
    end
  end
end
#==============================================================================
# Call this addon directly from the worldmap
#==============================================================================
class Scene_Map 
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Call Quest Journal
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def update_call_quest_journal
    if $game_map.interpreter.running?
      @quest_journal_calling = false
    else     
      if Input.trigger?(QuestData::MAP_BUTTON)
        if $game_system.quest_access_disabled || $game_party.quests.list.empty?
          Quest_Journal::Utility::DEBUG_MENU_ENABLED && Quest_Journal::Utility::SHOW_WHEN_NO_QUESTS ?
            SceneManager.call(Scene_QJ_Debug) : Sound.play_buzzer
        else
          @quest_journal_calling = true
        end
      end 
      if !@quest_journal_calling && Quest_Journal::Utility::DEBUG_MENU_ENABLED && Quest_Journal::Utility::MAP_KEY != nil && Input.trigger?(Quest_Journal::Utility::MAP_KEY) && $game_system.quest_map_access && !scene_changing?
        SceneManager.call(Scene_QJ_Debug)
      else
        call_quest_journal if @quest_journal_calling && !$game_player.moving?
      end
    end
  end
end
#==============================================================================
#
# ? End of File
#
#==============================================================================
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 18, 2013, 01:12:08 AM
No problem! I am happy that I could assist you.

I haven't looked at the code itself in any detail, but I would recommend that you disable the ability to call the debug scene unless $TEST is true. $TEST is a global variable which is true in test play and false when playing the game ordinarily.

Anyway, the debug menu is a great idea and I am sure other people will find it very helpful. You should give it its own topic!
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: napoleon on January 18, 2013, 12:25:28 PM
Done and done :).
http://rmrk.net/index.php/topic,47539.0.html (http://rmrk.net/index.php/topic,47539.0.html)

My code probably isn't the best. Only been doing Ruby/RGSS for less than 3 weeks now and I'm sure that this code could be shortened by like 300%. But it works and doesn't conflict with other scripts.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: TimeLadyKatie on January 28, 2013, 08:49:41 AM
I'm having a bothersome issue. I called reveal_objective(1, 0) and get an interpreter error "string cannot be coerced into fixnum". Frustratingly, since it's pointing me to Game_Interpreter 1411 and not the quest script I'm having trouble locating whatever customization mistake I made. So I'm nowhere when it comes to fixing this myself.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 28, 2013, 11:23:03 AM
Can you screenshot the event in question for me? Just the page with the script command that is being bothersome.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: TimeLadyKatie on January 30, 2013, 05:14:43 AM
Here it is. I tested to see if it was the Gab command, or interaction of the two. The error always happens if the Reveal command is used.

Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 30, 2013, 12:48:34 PM
Hmm, that's strange. I think I will need to see a demo. Can you make a new project, recreate the error, and then share it with me? If that's inconvenient, I could take your current project, but I know some people aren't comfortable with sharing their projects and it will work just as well with a new project.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: TimeLadyKatie on January 30, 2013, 05:37:51 PM
I included all the scripts from my actual project so you can see what I'm using for any possible interactions.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 30, 2013, 09:13:26 PM
Alright, at line 789 of my the Quest Journal, you have the following:

Code: [Select]
      q[:banner_hue]        = 0**

The ** is what is causing the error. Just make it:

Code: [Select]
      q[:banner_hue]        = 0

Additionally, for any of those settings where you aren't actually changing the default value, you don't need to include the line (though it also doesn't hurt).

In other words, what you have is functionally equivalent to:

Code: [Select]
      q[:name]              = "Shipping and Handling"
      q[:level]             = 1
      q[:icon_index]        = 232
      q[:description]       = "Gault Settlement needs to get its goods to market.."
      q[:objectives][0]     = "Consult Windbloom's Merchants' Guild"
      q[:objectives][1]     = "Deliver the contract to Gault"
      q[:objectives][2]     = "File the contract with the Guild"
      q[:prime_objectives]  = [2]
      q[:client]            = "Gault"
      q[:location]          = "Gault Settlement"
      q[:rewards]           = [
        [:item, 101, 10],
        [:gold, 500],
      ]
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: TimeLadyKatie on January 31, 2013, 04:15:07 PM
You know that moment where you look at something a hundred times and then someone else catches what you were looking for?

Thanks, algebra.
Title: Re: Quest Journal 1.0.3 [VXA]
Post by: modern algebra on January 31, 2013, 05:06:34 PM
No problem! I am happy to help.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Dark_Metamorphosis on February 03, 2013, 01:07:11 PM
So I have been using your quest journal script for awhile now, and added tons of quests so far! I have to say I totally love this awesome script! There's just one thing I can't get around..
It's not that of a big deal anyway, but there might be a way to change the settings so it will work as I intend it to do. First off, is it possible to change the order of how the different tabs are being displayed?

I have the following tabs in the Journal window: Main/Side quests, Active quests, Completed quests, and Failed quests. The thing I want to do is, to change the order so that Main/Side Quests is displayed to the far right, while Active Quests is displayed to the far left. I also want the completed quests to move to the completed quests sections when you have completed it. As it is now the completed quests will also show up in the Main/Side quest section even when they are completed. Is it possible to set it up so they will only display in the completed quest section and not in the more of a 'all quests' section?

I'm also thinking that I might want to have a specific tab for Sidequests and Mainquests, so that Mainquests end up in one section and the sidequests in another, is this possible to implement aswell?

I have tried out changing the settings inside the script, but I just can't get it to work like I want it too, so thought I would ask if It's possible to implement what I have in mind?

Thanks  :)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 03, 2013, 02:19:22 PM
Yes, almost all of that is possible. The section you are looking for starts at line 363 and looks like this:

Code: [Select]
  #  CATEGORIES - This array allows you to set which categories are available
  # in the Quest scene. The default categories are :all, :active, :complete,
  # and :failed, and their names are self-explanatory. You can add custom
  # categories as well, but note that you will need to make sure that each new
  # category has an icon set in the ICONS hash, as well as a label set in the
  # CATEGORY_VOCAB hash (if you are using SHOW_CATEGORY_LABEL). It is also
  # advisable to give it a sort type, unless you are fine with it being sorted
  # by ID, as is default.
  CATEGORIES = [:all, :active, :complete, :failed]

That array determines both which categories are present and the order they are in. So, if you changed it to:

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

Then that would make it so active quests was at the left and the all quests category is at the far right.

The :all category will always show all quests, including active, complete, and failed ones. That is its purpose, so there is no way to remove completed quests from it. What you want to do is dispose of the :all category and have it replaced with Main and Side quests, so you could make the array look like this (adjusted for order):

Code: [Select]
[:active, :complete, :failed, :main, :side]

Now you are adding custom categories, so you need to do two additional things. First, go up to line 318, where you will see this:

Code: [Select]
  #  ICONS - This is where you setup many of the icons used in the script. The
  # purpose of each is listed next to it. Also, if you make any custom
  # categories, you NEED to give them an icon by placing a line like the
  # others. So, if the new custom category is :romance then you would need to
  # set it like this:
  #    romance:     107,
  ICONS = {
    all:         226, # The icon for the All Quests category
    active:      236, # The icon for the Active Quests category
    complete:    238, # The icon for the Complete Quests category
    failed:      227, # The icon for the Failed Quests category
    client:      121, # The icon for client data. If none wanted, set to 0
    location:    231, # The icon for location data. If none wanted, set to 0
    reward_gold: 262, # The icon for gold rewards. If none wanted, set to 0
    reward_exp:  117, # The icon for exp rewards. If none wanted, set to 0
  } # <= Do not touch.

You need to give an icon to your new :main and :side categories. So, right between :failed and client, make it look like this:

Code: [Select]
    failed:      227, # The icon for the Failed Quests category
    main:        0,
    side:        0,
    client:      121, # The icon for client data. If none wanted, set to 0

And replace the 0s with the Icon index you want to show up. Secondly, go to line 380, where you will see:

Code: [Select]
  #  CATEGORY_VOCAB - If SHOW_CATEGORY_LABEL is true, this hash lets you set the
  # label for each category. For any custom categories you create, you will
  # need to add a line for each below and in the same format:
  #    :category => "Label",
  # Don't forget to add the comma at the end of each line.
  CATEGORY_VOCAB = {
    :all =>      "All Quests",      # The label for the :all category
    :active =>   "Active Quests",   # The label for the :active category
    :complete => "Complete Quests", # The label for the :complete category
    :failed =>   "Failed Quests",   # The label for the :failed category
  } # <= Do not touch.

Do the same thing and add entries for your main and side categories, like so:

Code: [Select]
  CATEGORY_VOCAB = {
    :all =>      "All Quests",      # The label for the :all category
    :active =>   "Active Quests",   # The label for the :active category
    :complete => "Complete Quests", # The label for the :complete category
    :failed =>   "Failed Quests",   # The label for the :failed category
    :main =>       "Main Quests",
    :side =>       "Side Quests",
  } # <= Do not touch.

That's only strictly necessary if you are showing the category label, but you should do it now even if you aren't in case you change your mind.

Finally, this is optional, but you can change the way in which the quests in each category are sorted. At line 391, you'll see:

Code: [Select]
  #  SORT_TYPE - This hash allows you to choose how each category is sorted.
  # For each category, default or custom, you can set a different sort method
  # There are seven options to choose from:
  #    :id - The quests are sorted from lowest to highest ID
  #    :alphabet - The quests are sorted in alphabetical order
  #    :level - The quests are sorted from the lowest to highest level
  #    :reveal - The quests are sorted from most recently revealed on.
  #            Every time a new quest is revealed, it will be at the top.
  #    :change - The quests are sorted from the one whose status most recently
  #            changed on. So, every time an objective is modified, that quest
  #            will be thrown to the top.
  #    :complete - The quests are sorted from the most recently completed on.
  #            Every time a quest is completed, it will be thrown to the top.
  #    :failed - The quests are sorted from the most recently failed on.
  #            Every time a quest is failed, it will be thrown to the top.
  #
  # Additionally, you can put _r at the end of any of the sort options and it
  # will reverse the order. So, for instance, if the sort method for a category
  # is :alphabet_r, then the quests will show up from Z-A
  SORT_TYPE = {
    :all =>      :id,       # Sort type for the All Quests category
    :active =>   :change,   # Sort type for the Active Quests category
    :complete => :complete, # Sort type for the Complete Quests category
    :failed =>   :failed,   # Sort type for the Failed Quests category
  } # <= Do not touch.

The instructions are pretty clear I think, but basically it's the same idea as the others. Change it to:

Code: [Select]
  SORT_TYPE = {
    :all =>      :id,       # Sort type for the All Quests category
    :active =>   :change,   # Sort type for the Active Quests category
    :complete => :complete, # Sort type for the Complete Quests category
    :failed =>   :failed,   # Sort type for the Failed Quests category
    :main =>     :change,   
    :side =>     :change,   
  } # <= Do not touch.

Naturally, you can use whatever sort type you want, not just :change. They are all listed in the Instructions above.

Now those categories are set up, but there are no quests in them. To add those, you have to configure each quest individually. For each quest, you need to modify the custom categories array. To make a quest go into the :main category, add this line to the setup for it:

Code: [Select]
      q[:custom_categories] = [:main]

To make it so that a quest goes into the :side category, just put:

Code: [Select]
      q[:custom_categories] = [:side]

There, now your quests will be categorized according to main and side quests.

As for moving complete quests out of there, that won't be done automatically. However, if, when you complete the quest, you also add the following line in a script call:

Code: [Select]
quest(4).custom_categories.delete(:main)

Then you will remove Quest with ID 4 from the "Main Quests" category. Just replace the 4 with whatever quest it is, and replace :main with :side where appropriate.

If you ever want them to return to those categories, you need to do it manually.



Also, you can repeat this process for as many custom categories as you want, and quests can belong to as many of those custom categories as you want.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Dark_Metamorphosis on February 03, 2013, 04:16:24 PM
Spoiler for:
Yes, almost all of that is possible. The section you are looking for starts at line 363 and looks like this:

Code: [Select]
  #  CATEGORIES - This array allows you to set which categories are available
  # in the Quest scene. The default categories are :all, :active, :complete,
  # and :failed, and their names are self-explanatory. You can add custom
  # categories as well, but note that you will need to make sure that each new
  # category has an icon set in the ICONS hash, as well as a label set in the
  # CATEGORY_VOCAB hash (if you are using SHOW_CATEGORY_LABEL). It is also
  # advisable to give it a sort type, unless you are fine with it being sorted
  # by ID, as is default.
  CATEGORIES = [:all, :active, :complete, :failed]

That array determines both which categories are present and the order they are in. So, if you changed it to:

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

Then that would make it so active quests was at the left and the all quests category is at the far right.

The :all category will always show all quests, including active, complete, and failed ones. That is its purpose, so there is no way to remove completed quests from it. What you want to do is dispose of the :all category and have it replaced with Main and Side quests, so you could make the array look like this (adjusted for order):

Code: [Select]
[:active, :complete, :failed, :main, :side]

Now you are adding custom categories, so you need to do two additional things. First, go up to line 318, where you will see this:

Code: [Select]
  #  ICONS - This is where you setup many of the icons used in the script. The
  # purpose of each is listed next to it. Also, if you make any custom
  # categories, you NEED to give them an icon by placing a line like the
  # others. So, if the new custom category is :romance then you would need to
  # set it like this:
  #    romance:     107,
  ICONS = {
    all:         226, # The icon for the All Quests category
    active:      236, # The icon for the Active Quests category
    complete:    238, # The icon for the Complete Quests category
    failed:      227, # The icon for the Failed Quests category
    client:      121, # The icon for client data. If none wanted, set to 0
    location:    231, # The icon for location data. If none wanted, set to 0
    reward_gold: 262, # The icon for gold rewards. If none wanted, set to 0
    reward_exp:  117, # The icon for exp rewards. If none wanted, set to 0
  } # <= Do not touch.

You need to give an icon to your new :main and :side categories. So, right between :failed and client, make it look like this:

Code: [Select]
    failed:      227, # The icon for the Failed Quests category
    main:        0,
    side:        0,
    client:      121, # The icon for client data. If none wanted, set to 0

And replace the 0s with the Icon index you want to show up. Secondly, go to line 380, where you will see:

Code: [Select]
  #  CATEGORY_VOCAB - If SHOW_CATEGORY_LABEL is true, this hash lets you set the
  # label for each category. For any custom categories you create, you will
  # need to add a line for each below and in the same format:
  #    :category => "Label",
  # Don't forget to add the comma at the end of each line.
  CATEGORY_VOCAB = {
    :all =>      "All Quests",      # The label for the :all category
    :active =>   "Active Quests",   # The label for the :active category
    :complete => "Complete Quests", # The label for the :complete category
    :failed =>   "Failed Quests",   # The label for the :failed category
  } # <= Do not touch.

Do the same thing and add entries for your main and side categories, like so:

Code: [Select]
  CATEGORY_VOCAB = {
    :all =>      "All Quests",      # The label for the :all category
    :active =>   "Active Quests",   # The label for the :active category
    :complete => "Complete Quests", # The label for the :complete category
    :failed =>   "Failed Quests",   # The label for the :failed category
    :main =>       "Main Quests",
    :side =>       "Side Quests",
  } # <= Do not touch.

That's only strictly necessary if you are showing the category label, but you should do it now even if you aren't in case you change your mind.

Finally, this is optional, but you can change the way in which the quests in each category are sorted. At line 391, you'll see:

Code: [Select]
  #  SORT_TYPE - This hash allows you to choose how each category is sorted.
  # For each category, default or custom, you can set a different sort method
  # There are seven options to choose from:
  #    :id - The quests are sorted from lowest to highest ID
  #    :alphabet - The quests are sorted in alphabetical order
  #    :level - The quests are sorted from the lowest to highest level
  #    :reveal - The quests are sorted from most recently revealed on.
  #            Every time a new quest is revealed, it will be at the top.
  #    :change - The quests are sorted from the one whose status most recently
  #            changed on. So, every time an objective is modified, that quest
  #            will be thrown to the top.
  #    :complete - The quests are sorted from the most recently completed on.
  #            Every time a quest is completed, it will be thrown to the top.
  #    :failed - The quests are sorted from the most recently failed on.
  #            Every time a quest is failed, it will be thrown to the top.
  #
  # Additionally, you can put _r at the end of any of the sort options and it
  # will reverse the order. So, for instance, if the sort method for a category
  # is :alphabet_r, then the quests will show up from Z-A
  SORT_TYPE = {
    :all =>      :id,       # Sort type for the All Quests category
    :active =>   :change,   # Sort type for the Active Quests category
    :complete => :complete, # Sort type for the Complete Quests category
    :failed =>   :failed,   # Sort type for the Failed Quests category
  } # <= Do not touch.

The instructions are pretty clear I think, but basically it's the same idea as the others. Change it to:

Code: [Select]
  SORT_TYPE = {
    :all =>      :id,       # Sort type for the All Quests category
    :active =>   :change,   # Sort type for the Active Quests category
    :complete => :complete, # Sort type for the Complete Quests category
    :failed =>   :failed,   # Sort type for the Failed Quests category
    :main =>     :change,   
    :side =>     :change,   
  } # <= Do not touch.

Naturally, you can use whatever sort type you want, not just :change. They are all listed in the Instructions above.

Now those categories are set up, but there are no quests in them. To add those, you have to configure each quest individually. For each quest, you need to modify the custom categories array. To make a quest go into the :main category, add this line to the setup for it:

Code: [Select]
      q[:custom_categories] = [:main]

To make it so that a quest goes into the :side category, just put:

Code: [Select]
      q[:custom_categories] = [:side]

There, now your quests will be categorized according to main and side quests.

As for moving complete quests out of there, that won't be done automatically. However, if, when you complete the quest, you also add the following line in a script call:

Code: [Select]
quest(4).custom_categories.delete(:main)

Then you will remove Quest with ID 4 from the "Main Quests" category. Just replace the 4 with whatever quest it is, and replace :main with :side where appropriate.

If you ever want them to return to those categories, you need to do it manually.



Also, you can repeat this process for as many custom categories as you want, and quests can belong to as many of those custom categories as you want.

Well, I wasn't too far off.. but I can see now which mistakes that I have done. Thanks alot for that information, you describe the process insanely well! I will follow the instructions you have given me, and I'm sure I will make it to work like I want it too! I guess this will be second nature later on, when I know how to set it up properly.
Just one last question though, about the script call that will delete the quest from an array. Should I put this script call inside the event that will complete the quest? Like if I put in the script call, complete_objective(x,x) and this is the objective that is the main one, should I also include that script call below that one to make it disappear from the Main or Side quest array?

Once again, thanks alot for your instructions! Will help me tons!  ;D
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 03, 2013, 04:18:59 PM
Yes.

And it's no problem. I figure there's no point in releasing scripts if I don't tell people how to use them.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Dark_Metamorphosis on February 03, 2013, 04:29:54 PM
Yes.

And it's no problem. I figure there's no point in releasing scripts if I don't tell people how to use them.

Well, that's true. It might just be a little frustrating for you since everything is stated inside the instructions..
After staring at the script for a long time though, I happen too look past alot of things and because of that I end up making mistakes. I'm just glad you opened my eyes a bit so I could see excactly what I was doing wrong.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Bett0 on February 10, 2013, 06:12:08 PM
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FOhGQfsA.png&hash=afd8071e868847a3b9a82e2c1e443b44212ddeb7)

Please, any help?

This happens after i call the script "reveal_objective(0, 0, 1)" on an event.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 10, 2013, 06:25:15 PM
Well, vms_check_quest is not a method in my script, nor does it appear in Game_Interpreter by default. Have you ever modified any of the default scripts for any reason?

I will see what I can find out about this vms_check_quest method, but maybe you could upload your Scripts.rvdata2 so I can take a look?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Bett0 on February 10, 2013, 06:34:27 PM
Here it is.

I remember i tried  to put a quest script with "vms" in the name, but i deleted it already, i have no idea where it is...


EDIT: Oh, lord, the error was in the event, sorry!!

By the way, thank you so much for your help ;) and congratulations, the script is really awesome
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 10, 2013, 06:48:38 PM
Yeah, I just found Vms Simple Quest Book (http://www.mundorpgmaker.com/forum/index.php?topic=95341.0), and that is where the method was coming from.

I take it you were calling that method inside of a conditional branch? Anyway, I'm glad you resolved the issue and I hope you continue to enjoy the script. If you encounter any more problems, I will be happy to take another look.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Chaos17 on February 24, 2013, 10:20:56 PM
Hi,

Thank you for this script, I really like it.
I've two questions (if I missed the answers in the script, I am sorry).

1) Is possible to remove a quest from a category when it's completed ?
I would like it to only appear in the completed quests category because at the moment it appears also in subquests category.

2) Is possible to show unrevealed quest ?
I only wish the unrevealed quest to be shown by "????" and listed in the category of my choice.

Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 24, 2013, 10:29:10 PM
1) Yes, but you have to do it manually. When you complete the quest, you can use the following code:

Code: [Select]
quest(4).custom_categories.clear

That would remove Quest 4 from all custom categories. Just replace the 4 with the ID of whatever quest you're completing.

2) No, not built in. You'd either need to make a bunch of those dummy quests, reveal them, and then replace them whenever you get the real thing. Otherwise you'd need to do make every quest have the ???? name and description, and then change them manually.

So no, nothing that would be convenient.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Chaos17 on February 25, 2013, 07:00:09 PM
Ok, I think I will stay simple.
By the way, is it normal that the number of the item isn't displayed when I set it to 1 ?
(Example : 1 antidote)

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fuppix.net%2F4%2Ff%2Fe%2Fb683f9911530154d338c65be64300.gif&hash=efd4bf56fd4d1d40d73cda0d1c38afddbfe962b9) (http://uppix.net/4/f/e/b683f9911530154d338c65be64300.html)

And that the word : gold isn't displayed ?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 25, 2013, 10:48:18 PM
Yes, that's normal. If you want to change it, you can find the following method somewhere around line 2247 (changes depending on how much config you have, but just do CTRL+F):

Code: [Select]

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Item Reward
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_item_reward(y, item, amount = 1)
    w = contents_width
    w = QuestData::BASIC_DATA_WIDTH if QuestData::BASIC_DATA_WIDTH.between?(1, w)
    x = (contents_width - w) / 2
    draw_item_name(item, x, y, true, w - 40)
    if amount > 1
      change_color(text_color(QuestData::COLOURS[:reward_amount]))
      draw_text(x + w - 40, y, 40, line_height, sprintf(QuestData::VOCAB[:reward_amount], amount), 2)
    end
  end

Replace it with:

Code: [Select]

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Item Reward
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_item_reward(y, item, amount = 1)
    w = contents_width
    w = QuestData::BASIC_DATA_WIDTH if QuestData::BASIC_DATA_WIDTH.between?(1, w)
    x = (contents_width - w) / 2
    draw_item_name(item, x, y, true, w - 40)
    change_color(text_color(QuestData::COLOURS[:reward_amount]))
    draw_text(x + w - 40, y, 40, line_height, sprintf(QuestData::VOCAB[:reward_amount], amount), 2)
  end

As for text to indicate gold: that is normal, but you can change it by modifying a configuration setting. Around line 352, you'll see:

Code: [Select]
    # reward_gold: Text to identify gold rewards
    reward_gold:      "",

Just put whatever word you want to identify gold in betweeen the quotation marks. For instance:

Code: [Select]
    # reward_gold: Text to identify gold rewards
    reward_gold:      "Gold",
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Chaos17 on February 26, 2013, 02:12:32 AM
Thank you, it works.
One last thing : the word I used for gold is not white and there isn't any space between the icon and the word.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fuppix.net%2Fb%2Fc%2F8%2F5b6c3257ffb8202a1bff0199d22bb.gif&hash=d4f847415312f28fcf45d4d9325156b310fa1dc3) (http://uppix.net/b/c/8/5b6c3257ffb8202a1bff0199d22bb.html)

I am sorry if I missed something in the configuration setting.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Chaos17 on February 27, 2013, 04:14:25 PM
Sorry, to double post but it seems I've a conflict with another of your script (ATS advanced choices) or is it because I didn't setup right my quest ?
I don't have that bug with my other quest...

Demo (I used the demo that you linked in the first page) : LINK (https://www.dropbox.com/s/r1bk459l59qy8d7/Unofficial%20Quest%20Journal%20Demo.exe)
The bug happen when I try to open the quest menu.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fuppix.net%2F0%2F4%2F6%2F535a6f3bb757a1587a28c075edecct.jpg&hash=a2b7b56243f0a093555cc597acc58bf3c54c7c6c) (http://uppix.net/0/4/6/535a6f3bb757a1587a28c075edecc.html)

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fuppix.net%2Fc%2F9%2Fe%2F17917448bfb1c8f7339322b58d031t.jpg&hash=f2edb00cf67b2537474e8b93d0e591e91c70a738) (http://uppix.net/c/9/e/17917448bfb1c8f7339322b58d031.html)

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fuppix.net%2F6%2F4%2F0%2F9bbb35863f1c989b1fd4fa014ebe3t.jpg&hash=65d5abfc6b2368f63ed2f9375f2d26e364864ee7) (http://uppix.net/6/4/0/9bbb35863f1c989b1fd4fa014ebe3.html)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 27, 2013, 11:17:55 PM
Umm, well it looks like the problem is your description line. You have:

Code: [Select]
q[:description] = :"bla bla bla"

You need to remove the :

Just try:

Code: [Select]
q[:description] = "bla bla bla"


As for the other stuff, I guess you're right that it looks weird. You could fix the spacing problem by just adding a few blank spaces, but you wouldn't be able to change the colour of the gold label without changing the colour of all basic data labels (like client, location, etc.). I suppose I will have to fix that.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Chaos17 on February 27, 2013, 11:37:23 PM
Someone already said :

Quote
You know that moment where you look at something a hundred times and then someone else catches what you were looking for?

You were right about the description, I feel so embarassed now. (https://rmrk.net/proxy.php?request=http%3A%2F%2Ffc05.deviantart.net%2Ffs13%2Ff%2F2007%2F003%2Ff%2F2%2F_HOMGblush__by_cindre.gif&hash=fa2e8e87bf10ba00f6a58458d7477dd4e3d6dbda)
Thank you for your help.
I look foward for your update.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: shadowfox43 on March 11, 2013, 05:53:50 AM
It's been over 6 months since I last touched the program and since I have finished my course, I am slowly getting back in the swing of things.
So if this question seems noobish then I apologize.

I am trying to make a repeatable quest. I have done everything required to get the quest repeatable however the rewards are not working.
I am using "distribute_quest_rewards(id)" as the method of gaining rewards.
Can anyone tell me how to make the repeatable quest continue distributing rewards via that script call every time it is completed?

The quest has one objective and that is fight a wolf for training purposes, and this is the setup I have.

Battle processing: Wolf
if win
@> Script: complete_objective(id, id)
@> script: distribute_quest_rewards(id)
@> wait: 5 frames
@> Script: uncomplete_objective(id, id)
@>
if loose
@> text : 'actor1', 1, normal bottom
:           : \n<Lisa>"I can't believe I lost to this wolf"
Branch end

And on another note I am currently using Yanfly Engine Ace - Ace Message System v1.04
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 12, 2013, 01:01:06 AM
I think you can do it with the change_reward_status code:

Code: [Select]
#        change_reward_status(quest_id, value)
#            value : either true or false. If excluded, defaults to true.
#          Totally optional, but this is just a personal switch which you can
#          turn on when the reward is given. You can then make it a condition
#          so you don't reward the players more than once. (see line 180)

For what you want, it would be:

Code: [Select]
change_reward_status(n, false)

where n is the ID of the quest
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Draconis Kenjishiya on March 12, 2013, 02:03:18 AM
Hello. I am a huge fan of this script. It's really helped me organize all my various side-missions and main story changes into a cohesive and understandable form. I have no issues or questions; I merely wanted to congratulate your work.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 12, 2013, 07:59:34 PM
Thank you! That's really nice to hear.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: shadowfox43 on March 18, 2013, 02:50:12 PM
I think you can do it with the change_reward_status code:

Code: [Select]
#        change_reward_status(quest_id, value)
#            value : either true or false. If excluded, defaults to true.
#          Totally optional, but this is just a personal switch which you can
#          turn on when the reward is given. You can then make it a condition
#          so you don't reward the players more than once. (see line 180)

For what you want, it would be:

Code: [Select]
change_reward_status(n, false)

where n is the ID of the quest


That worked. Thanks.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 18, 2013, 08:34:32 PM
No problem.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: amicable on May 19, 2013, 02:21:34 AM
Hello! I'd just like to say thank you for the very, very handy script.
However, I'm wondering if there's a way that when you open the script page, it's already selected the first quest and you can scroll up and down it directly, rather than having to hit enter to select it first. I've hidden the two bars on the side as best I can, and I want to remove their use as much as possible. Attached is a screenshot of what I've done so far, to understand what I mean.

Title: Re: [VXA] Quest Journal 1.0.3
Post by: RockyAmyx on May 24, 2013, 12:23:02 PM
out of curiosity.. would it be possible to edit this in a way that this could also manage a system like star ocean  til the end of time knowledge base, by using the objectives as a "when you find out more about something(people, places, item, spells).

and maybe add a custom category tab for the listed "somethings" above.

and making the IDs like this
Quests = 1XX1 (then next would be 1XX2.. the amount of Xs depends on how many quests you would have
People = 2XX1
Places = 3XX1
Items = 4XX1
Spells = 5XX1

for example.

when 2001

     q[:name]              = "Ryou"
      q[:level]             = 3
      q[:icon_index]        = 7
      q[:description]       = "He woke up in a strange place with only a note in his pocket saying "Live"."
      q[:objectives][0]     = Realizing that he had the power of a god, he felt betrayed by his father who never told him of this power"
      q[:objectives][1]     = "Upon arrival of his Homeland he noticed everything had changed. the land had become dark, and the houses were in rumble. "
      q[:objectives][2]     = "When he approached what he use to call home, he had a vision of a war happening. and the gods told him. "He was dead." confused he set out to discover what really happened."

[MORE QUEST OBJECTIVES TELLING THE ENTIRE STORY OF A "SOMETHING"]

      q[:prime_objectives]  = []
      q[:custom_categories] = [:people]
      q[:banner]            = ""
      q[:banner_hue]        = 0
      q[:client]            = ""
      q[:location]          = ""
      q[:common_event_id]   = 0

of course.. its a bad example story...but its just something i thought of on the top of my head..

But as story would unfold it would tell more about the "something" if necessary.. would that be possible?
       
Title: Re: [VXA] Quest Journal 1.0.3
Post by: RockyAmyx on May 25, 2013, 03:19:26 AM
?anybody
Title: Re: [VXA] Quest Journal 1.0.3
Post by: RockyAmyx on May 25, 2013, 11:45:36 AM
^^ well .. i decided to do something else.. i thought maybe it would work .. but ehh.. kept getting stack overflow errors
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on June 08, 2013, 05:49:00 PM
It would have been possible, but I think you are probably better off to have found a different way.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: doctachav on June 13, 2013, 01:34:58 PM
I love this script but there are two things that I would like to be able to do with it.

The first is that I would like a window to appear when a new quest is added with the quest name, description and rewards.
Also, would it be possible to make the objectives of a quest appear with the uncompleted objectives above the completed ones as some quests in my game have a lot of objectives and it is a pain to scroll through all of the completed objectives just to check what I have to do next.

Other than these two small problems I think the script is great and looks brilliant.

Thanks a lot,

Docta Chav
Title: Re: [VXA] Quest Journal 1.0.3
Post by: rubydragon44 on June 24, 2013, 06:37:58 PM
So, would it be possible for me to make categories manually invisible vs visible then switching them to be visible?
My reason for asking/requesting is, like, say I wanted to categorize quests of different places, like, you've got your Village 2 Quests and your Fire Mountain Quests, etc., but you don't want the Category of Fire Mountain to be visible until Fire Mountain is discovered by the player in the first place.
I tried to use like
if $game_switches[1]
conditions but that didn't work.
So would you be willing to implement this or would you happen to know some IF functions I could add with switches to make this happen?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: rellimetep on June 25, 2013, 01:19:26 PM
Modern Algebra you really nailed it on this one mate! Messed around with a few of your scripts now and they've all got the job done perfectly but the level of control offered here is out of this world! I can't imagine how much effort went into the script itself but it's massively appreciated man - thanks a LOT dude!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on June 26, 2013, 02:39:53 PM
Thanks, I'm pleased that you like it!

@rubydragon - it is possible, though not particularly convenient. Firstly, you'd have to set up each category as you would normally. However, in the CATEGORIES array, just put the initial categories.

Then, when you want to reveal new categories, you would need to do something like this in a script call:

Code: [Select]
gs = $game_system
gs.quest_categories.push(:all)

Replace :all with the symbol for the category you want to add. To remove categories, you would do this:

Code: [Select]
gs = $game_system
gs.quest_categories.delete(:all)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Kalacious on July 12, 2013, 05:39:12 PM
I found something we could use, or least I could use

Here is a scenario: You walk into an INN, he, the innkeeper, has a series of jobs posted. a, b, c, d (quest id 1-4 respectively). You do all the quests, you collect all the rewards. The jobs are still there, you click on one, say a, he states "thanks again."

What would be awesome is:

Code: [Select]
is_quests_complete?(id, id, id, id, id ,...) This way we could say if(is_quests_complete?(id, id, id ,...)){ Say something } else { do something }

Now I looked at your quest methods, your creating them on the fly, genius, how ever - is there a way to implement my idea with or with out altering your script?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on July 12, 2013, 10:44:05 PM
Well, I suppose you could just change quest_complete? to permit checking more than one quest at the time.

You could do it by adding the following into a new slot, somewhere below the Quest Journal but still above Main:

Code: [Select]
class Game_Interpreter
  alias maqj_vpedit_checkquest_8ik3 quest_complete?
  def quest_complete?(*args)
    args.each { |id| return false unless maqj_vpedit_checkquest_8ik3(id) }
    return true
  end
end

The code to use it would just be:

Code: [Select]
quest_complete?(id_1, id_2, id_3, ..., id_n)

Title: Re: [VXA] Quest Journal 1.0.3
Post by: Kalacious on July 13, 2013, 03:19:55 PM
thank you, that does exactly what I want!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Kalacious on July 24, 2013, 11:52:53 PM
Sorry for the double post, I tried to manipulate your function to do the same thing for multiple quests when check if they are revealed. how ever I got a game interpreter stack level to deep. Is there a way to say - if multiple quests are revealed, do this? else do that?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Mewgull on July 30, 2013, 09:33:36 PM
I am getting a weird/annoying error when I exit out of the quest journal scene:

Script 'SceneManager' line 66: SecurityError occurred.

Insecure: can't modify array


It's weird because it happens only sometimes (though more often than not to be a concern), and it happens only when I exit out of the quest journal scene. I'm a scripter myself, but I have no idea how to fix this lol any suggestions?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on July 31, 2013, 12:31:44 AM
That does sound strange. If you could upload a demo with the error recreated I will take a look. If you're nervous about sharing your main project, then feel free to just recreate the error in a new project and upload that.


@Kalacious - Sorry I missed your post. It should be possible to do the same thing for each of those methods. The error you received sounds like you just did not change the name of the alias. However, the following should work:

Code: [Select]
class Game_Interpreter
  alias maqj_vpedit_questrevel_7oc4 quest_revealed?
  def quest_revealed?(*args)
    args.each { |id| return false unless maqj_vpedit_questrevel_7oc4(id) }
    return true
  end
end
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Mewgull on August 01, 2013, 05:00:22 PM
I thank you for the willing to help, but I seemed to have solved it myself.
The error was caused by the arrangement of my scripts in the script editor. I fiddled around with their positions and it worked. The error hasn't shown up since! Thanks lol :P
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Kalacious on August 07, 2013, 11:32:37 PM
That does sound strange. If you could upload a demo with the error recreated I will take a look. If you're nervous about sharing your main project, then feel free to just recreate the error in a new project and upload that.


@Kalacious - Sorry I missed your post. It should be possible to do the same thing for each of those methods. The error you received sounds like you just did not change the name of the alias. However, the following should work:

Code: [Select]
class Game_Interpreter
  alias maqj_vpedit_questrevel_7oc4 quest_revealed?
  def quest_revealed?(*args)
    args.each { |id| return false unless maqj_vpedit_questrevel_7oc4(id) }
    return true
  end
end

Yay Thanks! Question, isnt quest(1).name suppose to give me the name of said quest? if so then you message options of \#{code}, where I do: \#{quest(1).name} doesnt work
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Necrofenser on September 01, 2013, 09:13:29 PM
How can i use variables in quest objectives?
I wan't to make something like this:
Quest objective: Kill 5 monsters;
And with every kill, quest objective should update (Kills 1/5, Kills 2/5... Kills 5/5). And when variable KILLS is 5 i will mark this objective as complete (with common event probably).
Right now I don't know how to show variable in quest objectives. So please add this feature, or explain me how to use variables, because I didn't saw anything about this in script comments.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Rogueworld on September 25, 2013, 02:43:03 PM
I just wanted to thank you modern algebra, for this great script. It is by far better than any alternatives I have come across.

Edit: Question removed: Stupid mistakes.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on October 01, 2013, 11:42:13 PM
Yay Thanks! Question, isnt quest(1).name suppose to give me the name of said quest? if so then you message options of \#{code}, where I do: \#{quest(1).name} doesnt work

Sorry to take so long to respond. I've been absent. Anyway, that method will only work in a regular Script call because the method is defined in Game_Interpreter, not Window_Message. If you want to access the name of a quest from inside a message, you will need to use:

Code: [Select]
$game_party.quests[1]

@Necrofenser -

You can show the value of a variable in an objective with the code:

Code: [Select]
\\v[n]

Where n is the ID of the variable. So, if you are recording Kills in variable 4, then you would use:

Code: [Select]
q[:objectives][0] = "Kills: \\v[4]/5"

As for marking the objective complete, you would have to do that manually by, for instance, checking whenever you update the kills variable and completing it when it equals 5.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Nosleinad on October 19, 2013, 01:59:21 AM
First of all, thanks a lot for sharing this script (again). Inm y humble opinion it's the best of it's kind.

I have found 01 bug and 01 incompability issue (while using a different font type). Here they are:

Bug:

  The :gold and :exp are having it's texts exchanged between each other. The icon and values are working allright, but when i set a reward to be :gold, it writes "XP" in the quest scene, and vice-versa.

Incompability:

I am using a script from zalerinian that allows the exchange of fonts. Everything is working fine (now) in other scenes, but in the quest scene the text is being cutted at the rewards section, even if the text line is small. I will post the zalerinian script and images of this section with the default VLGothic font and my alt Gabrielle font:

Zalerinian Font changer script
Code: [Select]
module Fonts
Original_Fonts = [ "VL Gothic", "Verdana", "Arial", "Courier New"]

def self.add_font(font_name, bold = false)
return if Font.default_name[0] == font_name
if font_name == "ORIGINAL_FONTS" then
Font.default_name = Original_Fonts
return
end
Font.default_bold = bold
puts "Bold set to " + Font.default_bold.to_s + "!"
Font.default_name.unshift(font_name)
puts "New Font System: " + Font.default_name.to_s + "\n\n"
end

def self.set_size(size)
Font.default_size = size
puts "Font size set to: " + Font.default_size.to_s
end

def self.set_bold(value)
if value == true || value == false
Font.default_bold = value
end
end

def self.remove_first
if Font.default_name.size == 1 then
puts "You should save at least one font, you know."
else
Font.default_name.shift
end
end
end

class Window_Base < Window
def line_height
return Font.default_size
end
end

class Window_Base < Window
alias convert_e_chars convert_escape_characters
def convert_escape_characters(text)
result = text.to_s.clone
result.gsub!(/\\F\[(\w+)\]/i) { Fonts.add_font($1) }
convert_e_chars(result)
end
end

Quest scene with default font
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg11.imageshack.us%2Fimg11%2F8528%2Fxe23.jpg&hash=98a9000163778e60c9e332beff84e4049a97cab5) (http://imageshack.us/photo/my-images/11/xe23.jpg/)

Quest scene with alt font
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg62.imageshack.us%2Fimg62%2F9456%2Flvg8.jpg&hash=086dac6c6bb5e0d90ace79161f1eef274199765b) (http://imageshack.us/photo/my-images/62/lvg8.jpg/)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: vindaca on October 19, 2013, 02:12:47 AM
Edit line 2257 to expand the text width
Code: [Select]
draw_text(x + w - 40, y, this_space, line_height, sprintf(QuestData::VOCAB[:reward_amount], amount), 2)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Nosleinad on October 19, 2013, 03:14:56 AM
I've changed it to this:

Code: [Select]
draw_text(x + w - 40, y, 80, line_height, sprintf(QuestData::VOCAB[:reward_amount], amount), 2)

But nothing happened. It's weird because if you notice the screens i've posted, you will noitice that the gold word, apart from being small, is also cutted.
Thanks a lot for the help so far. Maybe i did something wrong too. And this line in my script is the line 2434, and i am using version 1.0.3  :).
Title: Re: [VXA] Quest Journal 1.0.3
Post by: vindaca on October 19, 2013, 03:51:16 AM
This line is the third line above that one. 20 should do it.
Code: [Select]
draw_item_name(item, x, y, true, w - change_this_number)

That was actually the code for the values. Sorry  ;D
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Nosleinad on October 19, 2013, 04:20:35 AM
Really weird...i tryed a lot of values (Starting from 20), but the cut in the words is exactly at the same place from my screens. It didnt change a thing at all :o.
It's like both "Reward" and "gold" words are being cut only in the reward section, but if it was a width problem, why is the gold word also being cutted since it's a very small word?
 
 And thanks for the help so far Vindaca, i really appreciate.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: vindaca on October 19, 2013, 04:31:05 AM
It has to do with the text's width vs the font's width. That font is Italic so the text letters are a little bit wider. I will keep working on it for you though.

** Do you think you can set up a demo. It would make things a lot easier.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on October 19, 2013, 01:09:01 PM
Thanks for helping out vindaca. The line you identified is engaged only when drawing item rewards though, not string rewards or gold rewards.

For those, the draw_basic_data method is engaged, and the problem is because the text_size method does not accurately calculate the size of words for the font Nosleinad is using.

To "fix" it, you need to find this method:

Code: [Select]

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Basic Data
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_basic_data(y, icon_index, vocab, value)
    w = contents_width
    w = QuestData::BASIC_DATA_WIDTH if QuestData::BASIC_DATA_WIDTH.between?(1, w)
    x = (contents_width - w) / 2
    unless icon_index == 0
      draw_icon(icon_index, x, y)
      x += 24
      w -= 24
    end
    tw = text_size(vocab).width
    change_color(text_color(QuestData::COLOURS[:basic_label]))
    draw_text(x, y, tw, line_height, vocab)
    change_color(text_color(QuestData::COLOURS[:basic_value]))
    draw_text(x + tw, y, w - tw, line_height, value, 2)
  end

You can try changing this line:

Code: [Select]
    tw = text_size(vocab).width

to something like:

Code: [Select]
    tw = w - 40

But no guarantee that that's enough. And, more problematically, whatever width you choose, the width in which the value will be drawn will also be changed. Feel free to play around with it though.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Nosleinad on October 19, 2013, 02:11:15 PM
  Seems like no matter what value i set, it messes the rewards text or the [:client] and [:location] texts. The catch is that i added an option for the player to change the fonts at the system options, so the player can choose which font he likes best (it changes a switch that activates a commom event) and stick with it. Here's the commom event and the zalerinian font changer script:

http://imageshack.us/photo/my-images/822/3avn.jpg/

Code: [Select]
module Fonts
Original_Fonts = [ "VL Gothic", "Verdana", "Arial", "Courier New"]

def self.add_font(font_name, bold = false)
return if Font.default_name[0] == font_name
if font_name == "ORIGINAL_FONTS" then
Font.default_name = Original_Fonts
return
end
Font.default_bold = bold
puts "Bold set to " + Font.default_bold.to_s + "!"
Font.default_name.unshift(font_name)
puts "New Font System: " + Font.default_name.to_s + "\n\n"
end

def self.set_size(size)
Font.default_size = size
puts "Font size set to: " + Font.default_size.to_s
end

def self.set_bold(value)
if value == true || value == false
Font.default_bold = value
end
end

def self.remove_first
if Font.default_name.size == 1 then
puts "You should save at least one font, you know."
else
Font.default_name.shift
end
end
end

class Window_Base < Window
def line_height
return Font.default_size
end
end

class Window_Base < Window
alias convert_e_chars convert_escape_characters
def convert_escape_characters(text)
result = text.to_s.clone
result.gsub!(/\\F\[(\w+)\]/i) { Fonts.add_font($1) }
convert_e_chars(result)
end
end

  Would it be doable (not much work) to make the quest scene stay fixed at the default font? From my undersandings of the possible solution, this seems to be the most straightforward. I can make a demo with all my scripts if it helps this different solution to be made easier.
   

And lastly, i found this bug with the 1.0.3 version of the quest scene. I think this one shall be much easier to solve than that font incompability.

Bug:

  The :gold and :exp are having it's texts exchanged between each other in the reward section of the quest scene. The icon and values are working allright, but when i set a reward to be :gold, it writes "XP" in the quest scene, and vice-versa.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: vindaca on October 19, 2013, 10:11:42 PM
@MA~ No problem. I know you have been in and out, so, I figured I'd help out.

@Nosleinad~
To answer your question about the font not being affected with that script try switching the order of the scripts on the list. Most of the time that will fix it otherwise it might take a small bit of coding.

As far as the words being switched make sure that you have them named right inside of the module first. It should be around line 355. I'm not sure thought that is in the newest update.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Nosleinad on October 20, 2013, 12:27:40 AM
Hi again Vindaca ;).

 You're right about the module part, my bad. I really changed the words, stopped a bit with my project and when i came back i didnt remember this part of the script  :o.
 About the new font not being applied to the quest scene, unfortunatelly it's not a simple matter of order (I tryed it b4 rsrs). I will try to do somethings here, and if i can't solve it, i will be willing to make a comissioned work if you guys accept (i will negotiate via PM).
 Thanks a lot for the amazing help guys.

Off topic: Vindaca, for some odd reason your forum avatar resembles the face of a colossus of the game "Shadow of Colossus".  :P
Title: Re: [VXA] Quest Journal 1.0.3
Post by: vindaca on October 20, 2013, 02:03:31 AM
lol, Yeah I guess it does, I never noticed that. I loved that game too. It's actually a couple waterfalls and a river. I wont be using that title any more though now that I wrote my animated title script.

I glad I could help with that, we all make mistakes. I know I've made my fair share.
If MA doesn't take the commission PM me and I can help you out.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Nosleinad on October 20, 2013, 02:57:43 AM
Thanks Vindaca, i sure will. This is the last scene to be fixed as i want to mantain this 02 font options to the player.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Pinky on March 08, 2014, 08:11:17 PM
I'm sorry if this is a necro but I can't get the quests to complete and give me the rewards for some reason.  I cannot figure out what I am doing wrong and my computer isn't letting me in the site with the demo.  Please help I am extremely confused and I really want to use this script in my game.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: TheMaddHatter on March 09, 2014, 08:14:06 AM
Is there a way to  sort the quests in the order you received them? No matter if it was updated or not, newest quests received on top.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 09, 2014, 02:58:00 PM
@Pinky - Well, quests are completed once all objectives listed as prime objectives are completed. If you don't set prime specifically then all objectives must be completed. Have you completed all the objectives?

@TheMaddHatter - Yes, go to the SORT_TYPE array, where you will see this or something like this:

Code: [Select]
  #  SORT_TYPE - This hash allows you to choose how each category is sorted.
  # For each category, default or custom, you can set a different sort method
  # There are seven options to choose from:
  #    :id - The quests are sorted from lowest to highest ID
  #    :alphabet - The quests are sorted in alphabetical order
  #    :level - The quests are sorted from the lowest to highest level
  #    :reveal - The quests are sorted from most recently revealed on.
  #            Every time a new quest is revealed, it will be at the top.
  #    :change - The quests are sorted from the one whose status most recently
  #            changed on. So, every time an objective is modified, that quest
  #            will be thrown to the top.
  #    :complete - The quests are sorted from the most recently completed on.
  #            Every time a quest is completed, it will be thrown to the top.
  #    :failed - The quests are sorted from the most recently failed on.
  #            Every time a quest is failed, it will be thrown to the top.
  #
  # Additionally, you can put _r at the end of any of the sort options and it
  # will reverse the order. So, for instance, if the sort method for a category
  # is :alphabet_r, then the quests will show up from Z-A
  SORT_TYPE = {
    :all =>      :id,       # Sort type for the All Quests category
    :active =>   :change,   # Sort type for the Active Quests category
    :complete => :complete, # Sort type for the Complete Quests category
    :failed =>   :failed,   # Sort type for the Failed Quests category
  } # <= Do not touch.

Change the sort type for whichever category you want to :reveal.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: TheMaddHatter on March 09, 2014, 06:14:57 PM
ok cool. I saw that section earlier, i must of just over looked the :reveal part. thanks.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: TheMaddHatter on March 10, 2014, 07:09:58 AM
I feel like a noob considering my previous question, how easy and dumb it was, to me at least,  so let me rectify that by asking this, how can I set it so completed quests show a check mark graphic(which i added to my iconset) or at least a 'X' instead of a color change?

fyi: I'm using the font entitled Blackadder ITC (http://www.freefontsdb.com/detail/4580/Blackadder-ITC) as my default and a square is drawn as opposed to a diamond, which is perfectly fine with me.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 10, 2014, 10:24:31 PM
Oh, easy questions are better than hard questions, since they don't require me to do any work.

To get rid of the colour change, you should see this around line 461:

Code: [Select]

  #  COLOURS - This lets you change the colour for various aspects of the
  # quest scene. Each can be set in one of three ways:
  #    :symbol - If you use a symbol, the colour will be the result of calling
  #      the method of the same name. For instance, if you set something to
  #      :system_color, it will set the colour to the result of the Window_Base
  #      system_color method.
  #    Integer - If you set the colour to an integer, then it will take its
  #      colour from the windowskin palette, just like using \c[x] in messages.
  #    Array - You can also set the rgba values directly with an array in the
  #      format: [red, green, blue, alpha]. alpha can be excluded, but you must
  #      have values for red, green, and blue.
  COLOURS = {
    # active: This sets the colour for active quests in the list and the name
    #  of the active quest when shown in the data window.
    active:           :normal_color,
    # complete: This sets the colour for complete quests in the list and the
    #  name of the complete quest when shown in the data window.
    complete:         3,
    # failed: This sets the colour for failed quests in the list and the name
    #  of the failed quest when shown in the data window.
    failed:           10,
    # line:  This sets the colour for lines or boxes drawn in the quest scene
    line:             :system_color,
    # line_shadow:  This sets the colour of the shadow for lines or boxes drawn
    #  in the quest scene
    line_shadow: [0, 0, 0, 128],
    # scene_label: This sets the colour for the scene label, if shown
    scene_label:      :system_color,
    # category_label: This sets the colour for the category label, if shown
    category_label:   :normal_color,
    # level_signal: This sets the colour for the level signal, if shown
    level_signal:     :normal_color,
    # objective_bullet: This sets the colour for objectives; if set to
    #  :maqj_objective_color, it will reflect the completion status of the
    #  objective, but you can change it to something else if you prefer
    objective_bullet: :maqj_objective_color,
    # reward_amount: The colour of the item amount, when shown
    reward_amount:    :normal_color,
    # heading: The colour of any headings in the script, like "Description"
    heading:          :system_color,
    # basic_label: For basic data, like client, the colour of the label
    basic_label:      :system_color,
    # basic_value: For basic data, like client, the colour of the value
    basic_value:      :normal_color,
  } # <= Do not touch.

Replace

Code: [Select]
    complete:         3,

with:

Code: [Select]
    complete:         :normal_color,

As for the icon, I am not sure what you mean. If you mean you want to change the icon of the Completed Quests category, then you can find this around line 318:

Code: [Select]
  #  ICONS - This is where you setup many of the icons used in the script. The
  # purpose of each is listed next to it. Also, if you make any custom
  # categories, you NEED to give them an icon by placing a line like the
  # others. So, if the new custom category is :romance then you would need to
  # set it like this:
  #    romance:     107,
  ICONS = {
    all:         226, # The icon for the All Quests category
    active:      236, # The icon for the Active Quests category
    complete:    238, # The icon for the Complete Quests category
    failed:      227, # The icon for the Failed Quests category
    client:      121, # The icon for client data. If none wanted, set to 0
    location:    231, # The icon for location data. If none wanted, set to 0
    reward_gold: 262, # The icon for gold rewards. If none wanted, set to 0
    reward_exp:  117, # The icon for exp rewards. If none wanted, set to 0
  } # <= Do not touch.


At this line:

Code: [Select]
    complete:    238, # The icon for the Complete Quests category

Replace 238 with the ID of your checkmark icon, which is the number that shows up in the bottom left corner when you select an icon in the database.

However, if you meant you want to change the icon of the specific quest (the one that shows up to the left of it in the list), then that cannot be done automatically. Rather, you will need to use the Script event command when you finish your quest, and use the following code:

Code: [Select]
quest(id).icon_index = num

Where you replace id with the ID of the quest and num with the ID of the icon. So, if your checkmark icon is 144 and the quest you just completed is 17, then the code would be:

Code: [Select]
quest(17).icon_index = 144
Title: Re: [VXA] Quest Journal 1.0.3
Post by: TheMaddHatter on March 11, 2014, 01:56:19 AM
for the icon I want to have it change for each objective completed. On the right.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 11, 2014, 03:43:06 AM
By "on the right", do you mean you want it after the text? Or did you mean on the left, to replace the bullet?

Either way, there's no good way to do it without editing the script itself. You could perhaps change the objective when you complete it to add an icon at the end with a \\i[n] code, but it would be easier to edit the script once you clarify what you mean.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: TheMaddHatter on March 11, 2014, 03:58:49 AM
Changing the bullet itself to an icon in the iconset.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Crazy960 on March 11, 2014, 06:01:44 AM
Hey guys, a bit of a noob, being using RPG Maker for a bit now, so decided to step it up and look at something like this..
But... few questions, the quest thing in my menu is grayed out, is this because there is no quests active?
I just can't get it working, I have tried follow the instructions to the letter..
Can anyone give a link to a video? or anything such so I can SEE what to do?
I've tried clicking on the demo om the page, but the link just sends me to a lot of different forum posts..
Really sorry in advance guys.. Like I said I am a bit of a noob when it comes to all of this.. :/
Title: Re: [VXA] Quest Journal 1.0.3
Post by: hcmjmagic on March 11, 2014, 09:02:26 AM
Hello!  First post here, I have to say thank you modern algebra for this... it's truly a dream come true - so easy to integrate and use and so easy to customize.

I'm hitting a little snag though.  I've set everything up and attempted to integrate the system into a quest.  Everything works fine, the triggers, the gui, and the objective completion scripts.  The only problem comes when the final objective is marked as complete (thus completing the quest).  The player is crashing and giving the following error:

Code: [Select]
Script 'Game_Interpreter' line 1411: NameError occurred.

undefined local variable or method 'complete' for
#<Game_Interpreter:0x8f97c40>

It seems as if the program is having trouble moving the quest from active to complete.  Any thoughts?

Edit: @Crazy960 there is a reaaaally long tutorial video here : https://www.youtube.com/watch?v=Py8bWcTnq5A (https://www.youtube.com/watch?v=Py8bWcTnq5A) - the pace is ruthlessly slow, but it really does go through step by step how to set up a quest and use the system.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 11, 2014, 10:41:02 PM
@TheMaddHatter - Try inserting the following code into its own slot in the Script Editor, below the Quest Journal but still above Main:

Code: [Select]
#==============================================================================
#  MaddHatter Icon Bullets when Complete
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Insert this script into its own slot in the Script Editor, below the
#   Quest Journal but still above Main. Next, go to line 27 and change the
#   number (125 by default) to the index of whatever icon you want to show when
#   the objective is complete.
#==============================================================================

class Window_QuestData
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Objective
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_objective(obj_id, y)
    bullet = QuestData::VOCAB[:objective_bullet]
    bullet_tw = [text_size(bullet).width + 2, 26].max
    buff = (objective_x*2) + bullet_tw
    paragraph = mapf_format_paragraph(@quest.objectives[obj_id], contents_width - buff)
    line_num = 1 + paragraph.scan(/\n/).size
    # Since draw_text_ex resets the font, set colour here
    @maqj_objective_color = quest_objective_colour(@quest, obj_id)
    change_color(text_color(QuestData::COLOURS[:objective_bullet]))
    if @quest.objective_status?(:complete, obj_id)
      # Change the number below to the index of the icon you want to show
      draw_icon(125, objective_x, y)
    else
      draw_text(objective_x, y, bullet_tw, line_height, sprintf(bullet, obj_id + 1))
    end
    draw_text_ex(objective_x + bullet_tw, y, paragraph)
    @maqj_objective_color = false
    y += (line_num*line_height)
  end
end

Replace 125 at line 27 with the index of the checkmark icon you want to use.

@Crazy960 - Yes, the quest menu is greyed out until the player receives his or her first quest. Brady's demo is at http://www.mediafire.com/?sy17loho2mofc02. Other than that, you could try the video hcmjmagic has shared. I don't have any official video tutorials or demos out. Sorry!

@hcmjmagic - Welcome to RMRK, and I am happy that you like the script. Judging by that error message, the error is in the script call of the event in which the final objective is completed. Can you screenshot what you have for that for me?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: hcmjmagic on March 12, 2014, 03:35:59 AM
Doh, sure enough - I had typed complete.objective instead of complete_objective.  Works beautifully now, thanks for pointing me in the right direction!!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: TheMaddHatter on March 12, 2014, 05:01:08 AM
@TheMaddHatter - Try inserting the following code into its own slot in the Script Editor, below the Quest Journal but still above Main:

Yeah that worked, thanks a lot. And my bad for that bit of confusion, to be honest I was a little bit drunk when I posted some of those (i.e."On the right."). I shall refrain from doing so in the future.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: TheMaddHatter on March 12, 2014, 05:49:17 AM
ok, so the diamond(or rectangle in my case, since the font I'm using does not have a diamond and a missing glyph square appears instead) to check mark didn't look as good as i would have hoped, so i added an empty check box to the icon set and now want to use two pictures, 1: uncompleted objectives(empty check box) 2: completed objectives(filled check box). The completed objectives looks good, thanks to you, however, when I use "/i[534]" in the objective_bullet field I don't get the desired graphic, instead it returns "i[534]". How can this be fixed?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Crazy960 on March 12, 2014, 10:51:26 AM
Thank you so much! Like I said, kinda a noob when it comes to editing script and such really appreciate it XD

Edit: @Crazy960 there is a reaaaally long tutorial video here : https://www.youtube.com/watch?v=Py8bWcTnq5A (https://www.youtube.com/watch?v=Py8bWcTnq5A) - the pace is ruthlessly slow, but it really does go through step by step how to set up a quest and use the system.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 12, 2014, 10:40:26 PM
@MaddHatter - Alright, replace that last snippet I gave you with the following one:

Code: [Select]
#==============================================================================
#  MaddHatter Icons Replace Bullets
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Insert this script into its own slot in the Script Editor, below the
#   Quest Journal but still above Main. Next, go to lines 26, 29, and 32, and
#   change the numbers (125, 127, and 126 by default) to the index of whatever
#   icon you want to show when the objective is complete, failed, and active,
#   respectfully.
#==============================================================================

class Window_QuestData
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Objective
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_objective(obj_id, y)
    buff = (objective_x*2) + 26
    paragraph = mapf_format_paragraph(@quest.objectives[obj_id], contents_width - buff)
    line_num = 1 + paragraph.scan(/\n/).size
    # Since draw_text_ex resets the font, set colour here
    @maqj_objective_color = quest_objective_colour(@quest, obj_id)
    change_color(text_color(QuestData::COLOURS[:objective_bullet]))
    if @quest.objective_status?(:complete, obj_id)
      # Change the number below to the index of the bullet icon when complete
      draw_icon(125, objective_x, y)
    elsif @quest.objective_status?(:failed, obj_id)
      # Change the number below to the index of the bullet icon when failed
      draw_icon(127, objective_x, y)
    else
      # Change the number below to the index of the bullet icon when active
      draw_icon(126, objective_x, y)
    end
    draw_text_ex(objective_x + 26, y, paragraph)
    @maqj_objective_color = false
    y += (line_num*line_height)
  end
end

I also made it so that you could use another icon for failed objectives as well (like an X).

Also, I know I recommended changing the colour for completion earlier, but you might be better off just changing the colour for :objective_bullet if you still wanted the colour of the titles of the quest to change depending on completion status.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: TheMaddHatter on March 13, 2014, 04:12:44 AM
Thanks, works wonderfully and looks great. Hopefully this might even help/inspire others.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: azathoth on March 14, 2014, 01:40:40 PM
First, great script!
Now, I am having a small problem. I changed two default categories to Main (from All) and Sub-Quest (from Active).
When I completed a main quest it was moved from Main to Completed just fine. However, when I complete or fail sub-quests they remain in the Sub-Quest category as well as showing in Completed or Failed. The only thing I've change in the script is these two names...I think.
Any idea what might be wrong?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on March 31, 2014, 11:52:39 PM
Well, it sounds like you did the opposite actually, and changed All to Sub-Quest and Active to Main. Anyway, those categories have default mechanisms. Whatever it is called, the active quests category includes in it only active quests, and the all category includes in it every quest no matter the status. Thus, you can't just rename the all category and expect it to lose quests when they're failed or completed. To do it, you would need to make a custom category and move them around manually. See this post (http://rmrk.net/index.php/topic,45127.msg541216.html#msg541216) for details.

Really, I ought to have made an option for custom categories to include status requirements, but I didn't.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: xXBioSXx on April 03, 2014, 06:30:31 PM
So I tried to download the demo provided here but with no luck :\ is it possible to reupload it somewhere or provide another direct link? :'(
Title: Re: [VXA] Quest Journal 1.0.3
Post by: mouser on April 21, 2014, 11:10:44 PM
Using the script - it's working well for the most part :)

The one issue I'm having is the window for description (and objectives). I've changed the default font. I finally got all the text width issues smoothed over, but I can't find where to fix the height.

I've got the font size set to 20 for both description and objectives: so far, so good, but the fixed line spacing (at 24) leaves way too much leading between the lines of text (and the drawn box is too large). I've tried mapf_format_paragraph, the case in data_height in Window_QuestData, and just about anyplace else I can think of.

The only thing I've been able to successfully change is the size of the drawn box. Haven't been able to get anything going with the actual lines of text though. If you could point me in the right direction, I'd greatly appreciate it :)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: rubydragon44 on April 22, 2014, 11:37:09 PM
It says that you can separate the quest log from the settings, but, I don't know how to do that.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Kiyoshi on May 09, 2014, 04:38:20 PM
Nice Script!
For my usage I'd like to know if there is a possibility for these two things:
I'd like to have a minimum Level shown for each quest (maybe on the right of the quest's name?). Is this possible? The quests will be available when one of my characters hit the particular level. At the moment my idea for this is a common parallel event because I don't know anything about RGSS :D But an info for the player is missing.
It would also be cool to make a teleport function for each quest somehow. I plan to make a mission board where you can teleport directly to the quest's area.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on May 09, 2014, 11:50:09 PM
Well, the teleport stuff and the level restrictions would have to be done manually right now, but if you just want to show the level you need to be then that could just be done with the :level option. Just show a number instead of icons.

Alternately, if you wanted to keep that as something different and also include a separate line for character level, you can create new data types along the same line as :client and :location. Read the instructions starting at line 255 and let me know if you have any questions:

Code: [Select]
#  BASIC_DATA_TYPES  - This lets you set up additional types of data. Just
  # include an identifying signal in the Array. Then, you will need to give
  # each signal an icon (in the ICONS hash at line 322) and a signal text (in
  # the VOCAB array at line 333, though it can be an empty string). Then, you
  # can set the data itself when setting up quests by simply adding a:
  #    q[:symbol] = ""
  # line to the quest. You will also need to include the data type somewhere in
  # the DATA_LAYOUT at line 306. As an example of this, I have included :client
  # and :location by default. You can CTRL+F for anything in this section with
  # one of those symbols (excluding :) and you will there need to add something
  # for any new data types you add.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Kiyoshi on May 10, 2014, 11:22:49 AM
Thanks a lot! I'm satisfied with the level thing now :)

Is there any chance to get you motivated implementing the teleport function?
Like I said I have no idea how RGSS works, but I can imagine that you have to create a new array with map number, x and y coordinates and a teleport command with these information right?

It would be really cool if you could something like this when you hit the enter-button on a quest:
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi61.tinypic.com%2F2075o9u.jpg&hash=3fa2c2d6417b1797a22f8576ac80606e4af2bd13)

I hope to get a positive answer :)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on May 10, 2014, 12:33:27 PM
I like your idea, and it sounds a bit like Monster Hunter. However, I haven't had a lot of time for scripting lately, so I wouldn't count on me if I were you.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Kiyoshi on May 10, 2014, 08:02:40 PM
I like your idea, and it sounds a bit like Monster Hunter. However, I haven't had a lot of time for scripting lately, so I wouldn't count on me if I were you.
Yeah, you're right, same principle as Monster Hunter :)
I plan a tactics game like Final Fantasy Tactics and a system like this would be the coolest for side missions.
When you look at your whole scripts I don't think you can unlearn scripting :V
As said it would be really cool and you'd become special credits if I finish the game :P
XS Teleport (http://pastebin.com/sTYMgaZm) is a good script to take ideas from isn't it?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Chaos17 on August 09, 2014, 09:46:17 AM
Hello,

I would like to let people know that someone from the french community, iVarlix, made a "tool" for this lovely script.
If anyone is interested by it, you can find it over there : Quest manager (http://2d-gamers.activebb.net/t6-vx-ace-quest-manager)
Mirror site : LINK 1 (http://sourceforge.net/projects/logixgamix/files/Logiciels/VX%20Ace%20Quest/VXAceQuestManager%20V.2.7z/download)- LINK 2 (http://www.rpgmakervx-fr.com/t15812-vx-ace-quest-manager)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg4.hostingpics.net%2Fpics%2F530172VXAceQuestV2.png&hash=f98862d28ba6cfef4f28972fd846f67ebe005700)

The author is open to suggestions/corrections so don't hesitate to tell him ;)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on August 09, 2014, 12:10:23 PM
That's very cool. I didn't know about that.

I'm having trouble running it though since it says "No .dll for language", but I don't see where to download that .dll.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Euphoria on August 09, 2014, 05:00:17 PM
I'm having the same problem here. The .dll is missing apparently. I used mirror 1 if that helps at all. Will try 2, and I can't see a link on the main page probably due to me not being registered.

Well... The second mirror needs registration too I think.. And I don't exactly want to register just to download something.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Altimos on August 11, 2014, 05:38:31 AM
Question, at the bottom of my quests, it shows my item slot number 1 (which is default to potion) but I've got it labeled *consumables*

Problem in Game
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs27.postimg.org%2F9zi8bm4qr%2FWhat_it_looks_ingame.png&hash=6b41d656ba006a71b189d1011b24c0717e0b2347)
http://s27.postimg.org/9zi8bm4qr/What_it_looks_ingame.png (http://s27.postimg.org/9zi8bm4qr/What_it_looks_ingame.png)

What my item database looks like
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs30.postimg.org%2Fc6mxja93l%2FMy_Database.png&hash=62920124e6e5e59583e44e3bbcdd79c041614d11)
http://s30.postimg.org/c6mxja93l/My_Database.png (http://s30.postimg.org/c6mxja93l/My_Database.png)

The two script portions below are the only things I changed within Modern Algerbra's script.

Code: [Select]
  ICONS = {
    all:         97, # The icon for the All Quests category
    active:      96, # The icon for the Active Quests category
    complete:    101, # The icon for the Complete Quests category
    failed:      99, # The icon for the Failed Quests category
    client:      7895, # The icon for client data. If none wanted, set to 0
    location:    2413, # The icon for location data. If none wanted, set to 0
    reward_gold: 2771, # The icon for gold rewards. If none wanted, set to 0
    reward_exp:  10044, # The icon for exp rewards. If none wanted, set to 0
  } # <= Do not touch.

Code: [Select]
when 1 # Quest 1 - Fairy Enough
      q[:name]              = "Fairy Enough"
      q[:level]             = 2
      q[:icon_index]        = 7
      q[:description]       = "You met a grieving hunter in the Dense Forest, and he's asked you to avenge his son; who was lost in the woods a few days ago. He started to search for his son yesterday, which isn't very fatherly like, but none the less you've agreed to track down the one responsible for his untimely demise. But before you can take on the Fairy Queen, you've got to lure her out... maybe find an kill her daughters, if you can."
      q[:objectives][0]     = "Find one of the Fairy Queen's daughters."
      q[:objectives][1]     = "Almost there, find another one of the Fairy Gueen's daughters."
      q[:objectives][2]     = "That's it, the Fairy Queen has shown herself, and she's pissed!"
      q[:objectives][3]     = "Return to the Grieving Hunter."
      q[:prime_objectives]  = [0, 1, 2, 3]
      q[:custom_categories] = []
      q[:banner]            = ""
      q[:banner_hue]        = 0
      q[:client]            = "A Grieving Hunter"
      q[:location]          = "Dense Forest"
      q[:common_event_id]   = 0
      q[:rewards]           = [
        [:gold, 500],
      ]
      q[:layout]            = false
 
      when 2 # Quest 2 - Blood Alchemy
      q[:name]              = "Blood Alchemy"
      q[:level]             = 3
      q[:icon_index]        = 7
      q[:description]       = "The aspiring alchemist as requested for you to locate a total of ten Blood Rubies in order to further her experiments in the alchemy field. She has not been able to find any inside the ruins, though she has documentation stating that the Blood Rubies were located within the ruins."
      q[:objectives][0]     = "Find ten Blood Rubies."
      q[:objectives][1]     = "Return to the Aspiring Alchemist."
      q[:objectives][2]     = ""
      q[:objectives][3]     = ""
      q[:prime_objectives]  = [0, 1]
      q[:custom_categories] = []
      q[:banner]            = ""
      q[:banner_hue]        = 0
      q[:client]            = "Aspiring Alchemist"
      q[:location]          = "Plundered Ruin Entrance"
      q[:common_event_id]   = 0
      q[:rewards]           = [
        [:gold, 500],
      ]
      q[:layout]            = false

Looking for help from the creator, or anybody else. Don't know why it's doing that...


Thanks,
Altimos
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Altimos on August 11, 2014, 05:52:30 AM
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs30.postimg.org%2Folvt13y4x%2FUpper_Quest_Log.png&hash=a2911290703e4f01d1466afd86e2a3cfcdc84b92)

Also found one more thing... don't know why it's doing all those DEF[down] images circled in yellow...

Any help appreciated.

Thanks,
Altimos
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Chaos17 on August 11, 2014, 12:00:40 PM
That's very cool. I didn't know about that.

I'm having trouble running it though since it says "No .dll for language", but I don't see where to download that .dll.

Sorry for the late reply.
Put this file ("en") in the directory (with the "EXE") => LINK (http://sourceforge.net/projects/logixgamix/files/Logiciels/VX%20Ace%20Quest/en.7z/download)

It won't work if you just take the .dll, you need the file "en" itself.
Version 3 won't have that problem.
The auhtor support english and french translation.


Edit : either you generate the script through the tool option and copy paste new things or you replace Morden ALgebra original script with a tweaked version made by the tools'author, so the tool will "automaticly update" the script (I didn't quite understood that part). Unfortunally, the comments of the script is in french.

Spoiler for:
Code: [Select]
    ################################################################################
    ##### QUEST DATABASE
    ####################
    ################################################################################
    ##### Pour ajouter une nouvelle quête dans la QuestDatabase :
    #
    # /!\ Il faut faire tout ça avant de faire quest(id) /!\
    #
    # Pour ajouter une quête par le .txt, il faut ajouter une ligne comme ceci :
    # ID|NAME|LEVEL|ICONE_INDEX|DESCRIPTION|OBJECTIF1#OBJECTIF2#OBJECTIF3#OBJECTIF4|OBJPRIME1#OBJPRIME2|CATEGORIE|BANNIERE|TEINTE|GIVER|LOCATION|EVENTCOMMUN|TYPE/ID/NUMBER#TYPE/NUMBER|LAYOUT
    #
    # Suivez l'exemple de la démo !
    #
    # /!\ Il faut faire tout ça avant de faire quest(id) /!\
    #
    ################################################################################
    ##### Début du Script
    #####################
    #####################
    # DataManager
    # - Création et sauvegarde du fichier Quests.rvdata2
    #####################
    module DataManager 
      class << self
        alias lnd_quest load_normal_database
        def load_normal_database
          lnd_quest
          load_data_quest # Chargement
        end   
        def load_data_quest
          name = "Data/Quests.rvdata2"
          if FileTest.exist?(name)
            $data_quests = load_data(name)
          else
            initialize_data_quests(name) # Si le fichier n'existe pas, on le crée
          end
          update_quest if $quests
        end
       
        alias sgwr_quest save_game_without_rescue
        def save_game_without_rescue(index)
          save_data_quests
          sgwr_quest(index)
        end
       
        def initialize_data_quests(name)
          File.open(name.to_s, "a+")
         $data_quests = Hash.new   # il faut que $data_quests contienne au moins une ligne, sinon ça plante
          save_data_quests          # on le sauvegarde
        end
       
        def save_data_quests
          name = "Data/Quests.rvdata2"
          File.open(name, "w") do |file|
            Marshal.dump($data_quests, file)
          end
        end
        # Lecture des Quêtes contenues dans Quest.txt
        def update_quest
          $quests.each do |quest|
            $data_quests[quest[0]] = Quest.new
            $data_quests[quest[0]].name                 = quest[1]
            $data_quests[quest[0]].level                = quest[2]
            $data_quests[quest[0]].iconindex            = quest[3]
            $data_quests[quest[0]].description          = quest[4]
            $data_quests[quest[0]].objectives.mission   = quest[5]
            $data_quests[quest[0]].objectives.prime     = quest[6]
            $data_quests[quest[0]].categorie            = quest[7]
            $data_quests[quest[0]].banniere             = quest[8]
            $data_quests[quest[0]].teinte               = quest[9]
            $data_quests[quest[0]].giver                = quest[10]
            $data_quests[quest[0]].location             = quest[11]
            $data_quests[quest[0]].evcommun             = quest[12]
            $data_quests[quest[0]].rewards              = quest[13]
            $data_quests[quest[0]].layout               = quest[14]
          end
          $quests.clear
          save_data_quests          # on le sauvegarde
        end
      end
    end

    #####################
    # Quest
    # - Object qui correspond aux quêtes
    #####################
    class Quest
      attr_accessor :name, :giver, :description, :questnote, :location, :level, :iconindex, :teinte, :evcommun, :categorie, :banniere,
      :objectives, :rewards, :layout
     
      def initialize(*args) # Même ordre qu'au-dessus
        @name = args[0] ? args[0] : ""
       @giver = args[1] ? args[1] : ""
       @description = args[2] ? args[2] : ""
       @questnote = args[3] ? args[3] : ""
       @location = args[4] ? args[4] : ""
        @level = args[5] ? args[5] : 0
       @iconindex = args[6] ? args[6] : 0
        @teinte = args[7] ? args[7] : 0
        @evcommun = args[8] ? args[8] : 0
        @categorie = args[9] ? args[9] : 0
        @banniere = args[10] ? args[10] : ""
        @objectives = args[11] ? args[11] : Quest_Objectives.new
        @rewards = args[12] ? args[12] : Quest_Rewards.new
        @layout = args[13] ? args[13] : false
      end
    end

    #####################
    # Quest Rewards
    # - Object qui correspond aux primes des quêtes
    #####################
    class Quest_Rewards
      def initialize(*args) # Même ordre qu'au-dessus
        @rewards = args
      end
      def []=(id, a)
        @rewards[id] = a
      end
      def tb
        @rewards
      end
    end

    #####################
    # Quest Rewards
    # - Object qui correspond aux objectifs des quêtes (et le numéro des objectifs qui ont des primes)
    #####################
    class Quest_Objectives
      attr_accessor :mission, :prime
      def initialize(*args) # Même ordre qu'au-dessus
        @mission = args[0] ? args[0] : []
        @prime = args[1] ? args[1] : []
      end
    end

    #####################
    # QuestData
    # - Ajout de notre $data_quests au script de ModernAlgebra
    #####################
    module QuestData
      class << self
        def setup_quest(quest_id)
          if $data_quests.keys.include?(quest_id)
            q = { :objectives => [], :prime_objectives => [] }
            q[:name]          = $data_quests[quest_id].name
            q[:level]         = $data_quests[quest_id].level
            q[:iconindex]     = $data_quests[quest_id].iconindex
            q[:description]   = $data_quests[quest_id].description
            q[:client]        = $data_quests[quest_id].giver
            q[:location]      = $data_quests[quest_id].location
            $data_quests[quest_id].objectives.mission.each do |obj|
              q[:objectives] << obj
            end
            q[:prime_objectives]  = $data_quests[quest_id].objectives.prime
            q[:custom_categories] = $data_quests[quest_id].categorie
            q[:banner]            = $data_quests[quest_id].banniere
            q[:banner_hue]        = $data_quests[quest_id].teinte
            q[:common_event_id]   = $data_quests[quest_id].evcommun
            q[:rewards]           = $data_quests[quest_id].rewards
            q[:layout]            = false
            return q
          else
            print "Quête non configurée !\n"
            return {}
          end
        end
      end
    end




    module Quest_Text
      extend self
     
      def open_file
        name = "Quest.txt"
       @file = File.open(name.to_s, "a+")# if FileTest.exist?(name)   
      end
     
      def close_file
        return unless @file
        @file.close
      end
     
      def read
        return unless @file
        quests = Array.new
        @file.each_line { |line| quests << line.split("|") }
        return quests
      end
    end

    ################################################################################
    ##### Lecture du .txt
    # > se lance avant main
    #####################
    begin 
      Quest_Text.open_file
      $quests = []
      quests = Quest_Text.read
      Quest_Text.close_file 
      quests.each do |quest|
        quest[0] = quest[0].to_i # ID
        quest[2] = quest[2].to_i # Level
        quest[3] = quest[3].to_i # IconIndex
        quest[5] = quest[5].split("#")
        quest[6] = quest[6].split("#")
        quest[6].size.times { |i| quest[6][i] = quest[6][i].to_i }
        quest[9] = quest[9].to_i # Teinte
        quest[12] = quest[12].to_i # Event Commun
        quest[13] = quest[13].split("#")
        quest[13].size.times do |i|
          quest[13][i] = quest[13][i].split("/")
          quest[13][i].size.times do |i2|
            quest[13][i][i2] = :item if i2 == 0 && quest[13][i][i2] == ":item"
            quest[13][i][i2] = :gold if i2 == 0 && quest[13][i][i2] == ":gold"
            quest[13][i][i2] = quest[13][i][i2].to_i if i2 > 0
          end
        end
        quest[14] = false if quest[14] == "false" || quest[14] == "nil"
        $quests << quest
      end
    end
    ###################
    ##### Fin du Script
    ################################################################################
I'm sorry for my bad english and for my poor explanation.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on August 12, 2014, 12:38:15 AM
Thanks Chaos17, I'll check it out when I have time.

@Altimos: For the first problem, I am not totally sure since it looks like you have it set up properly. Was it ever set up to show item 1? If so, are you loading from a save game where the quest was initialized before you changed it to show gold instead? Because that might do it. You can remove and reinitialize the quest to fix it.

For the second problem, that probably means you have the LEVEL_ICON option set to the ID of that icon. Around line 443, you should see this:

Code: [Select]
  #  LEVEL_ICON - This sets how levels are shown. If set to an integer, then it
  # will draw the same icon numerous times up to the level of the quest. Ie. If
  # the level's quest is 1, then the icon will only be drawn once, but if the
  # level's quest is 4, it will be drawn 4 times. LEVEL_ICONS_SPACE determines
  # the space between them. If you set LEVEL_ICON to 0, however, then it will
  # instead draw a signal for the level, corresponding to that index in the
  # LEVEL_SIGNALS array. If the LEVEL_SIGNALS array is empty, then it will just
  # draw the integer for the level. Finally, LEVEL_ICON can also be an array of
  # integers, in which case the level will be represented only by the icon set
  # which corresponds to it in the array.
  LEVEL_ICON = 125
  #  LEVEL_ICONS_SPACE - If LEVEL_ICON is an integer, this is the amount of
  # space between each time the icon is drawn.
  LEVEL_ICONS_SPACE = 16
  #  LEVEL_SIGNALS - If LEVEL_ICON is 0, this allows you to set what string
  # should be the signal for each level. If this array is empty, then it will
  # just draw the level integer. Ie. if the Quest is Level 4, it will draw 4.
  LEVEL_SIGNALS = ["F", "E", "D", "C", "B", "A", "S"]

You can modify those things to change how level shows up.

Title: Re: [VXA] Quest Journal 1.0.3
Post by: Altimos on August 12, 2014, 06:15:11 AM
Thank for the help Modern Algebra.

After doing some editing of other components in my game, I had to start a new character to see the changes versus a saved file. When I looked at the quest log, I noticed that they were back to the bag of coins I had initially set it as. So it fixed itself because I stopped using that one saved file.

What got me was that it was saying *consumable* which was the name of the first slot item, instead of showing the icon symbol like it was suppose to. I never had [:ITEM] in the reward section. So for that consumable's tag to be display wigged me out a bit.

On the second point, I smell what your cook'n there. You see, I switched out my iconset.png to bigset.png which gave me over 9000 (pun intended) icons in my resource folder. So I've been changing icons for like everything (downside to changing your icon file).

I don't want an icon for it, and when I switch it to 0, it comes up saying Rank   E(the rest is cut off). How do I make it so it will put in whatever level I put it in when I create the quest, e.g. 1,2,3, 500 :)

Thanks again,
Altimos
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Altimos on August 12, 2014, 06:23:10 AM
Nevermind, figured it out. Just played with it a bit in the level signals (totally missed that, duh). Finally realized that the [] had to stay there (which is considered blank versus nothing there).

Once again, thanks again. Love the script, makes managing quests very easily. If only I can mindflyer your brain, I'd be better at the whole scripting aspect. But I wouldn't do that to you.

Again, thanks...
Altimos
Title: Re: [VXA] Quest Journal 1.0.3
Post by: iVarlix on August 12, 2014, 07:37:28 PM
Hello!
I will do my best to get out of the V3 software Chaos17 a present!
This software is created by me, I would keep you informed of the software, to make you wait, here's the screenshot:
Spoiler for "Language Selection:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi39.servimg.com%2Fu%2Ff39%2F16%2F05%2F23%2F10%2Faceque10.png&hash=da5540a781b90a0b79fd101640ced2fbf4635151) (http://servimg.com/image_preview.php?i=218&u=16052310)
Spoiler for "Current Software":
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi39.servimg.com%2Fu%2Ff39%2F16%2F05%2F23%2F10%2Fvxaceq10.png&hash=c663b4707972b13060476c70226eae3667b84006) (http://www.servimg.com/image_preview.php?i=215&u=16052310)
Well, if you have suggestions or criticisms, made ​​me know! ;)
Sorry for the mistakes, I use google translation! :)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: yuyu! on August 12, 2014, 08:26:18 PM
Hey, iVarlix! :-) It's nice to see you around here! Thanks for the awesome tool!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: iVarlix on August 12, 2014, 08:52:41 PM
Nothing!
If you see one or spelling mistakes, given the knowledge! :)
Spoiler for "Window: Add a reward":
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi39.servimg.com%2Fu%2Ff39%2F16%2F05%2F23%2F10%2Faceque11.png&hash=3521ba966ad55547ca3c02a24119941175223efc) (http://servimg.com/image_preview.php?i=219&u=16052310)
Still under development, must have patience because a lot of improvement and planned for the V3! ;)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: yuyu! on August 12, 2014, 09:20:41 PM
Just a couple spelling errors or things that I'm confused about. ;9

"Quete" should be "Quest",  "Proprietes" should be "Properties", "Lieu" should be "Location", I think. ^_^ Hope that helps!

Not sure what "Teinte" means, though. ;_; Maybe "Hue" ?

Otherwise, it looks pretty good! ^_^
Title: Re: [VXA] Quest Journal 1.0.3
Post by: iVarlix on August 12, 2014, 09:32:48 PM
I just finished the translation of the main window and rewards!
Spoiler for "Software translates to 25%":
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi39.servimg.com%2Fu%2Ff39%2F16%2F05%2F23%2F10%2Faceque12.png&hash=1d045e81a4d3d161f7ff2a005909a7b7e25e8766) (http://servimg.com/image_preview.php?i=220&u=16052310)
If all goes well, he shall go out next week! ;)
For Properties, I have to modify codes for taking into account the language select! :)
The teinte signifies the color of the picture, I think! :D
Google translate tells me it's color or hue!
Word I put?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: yuyu! on August 12, 2014, 10:21:54 PM
"Tint" works great! :)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Goofygooberbro on August 13, 2014, 05:34:53 AM
This is a great script you have here. It is the last one that I am going to incorporate. (At least at the moment.) But I am recieving the below error everytime I try to call the sample quest. I didn't want to make any changes and break things further and you seem very responsive in the forum. So I figured I would give it a shot.

---Error---
Script'Quest Log' line 1977: NoMethodError occurred.
undefined method 'each' for true:TrueClass
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on August 13, 2014, 06:11:27 AM
Hmm, well your line 1977 and my line 1977 might be very different depending on what your customization looks like. Could you show me your lines 1972-1982?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Goofygooberbro on August 13, 2014, 06:30:03 AM
Sure thing. I just went ahead and grabbed that whole section that deals with height. You can see it in the spoiler below.
My line 1977 that it says is generating the error is:  @layout.each { |dt| @q_contents_height += data_height(dt) } if @quest

I am also calling the sample quest by using quest(1). It seems to be adding the quest because the link in the menu works, but it errors when opening.

Spoiler for:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Calculate Contents Height
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def calc_contents_height
    @q_contents_height = 0
    @layout.each { |dt| @q_contents_height += data_height(dt) } if @quest
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Data?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_data?(data_type)
    case data_type
    when :line then true
    when :level then @quest.level > 0
    when :objectives then !@quest.revealed_objectives.empty?
    when Array then (data_type - [:line]).any? { |dt| draw_data?(dt) }
    else !@quest.send(data_type).empty? # :description, :name, etc...
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Data Height
  #    This method calculates the height required for a specified element of
  #   the current quest. This is to calculate the needed space in contents,
  #   as well as advance the @draw_y variable.
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def data_height(data_type)
    return 0 unless draw_data?(data_type)
    return line_height if QuestData::BASIC_DATA_TYPES.include?(data_type)
    @maqj_font_data_type = data_type
    reset_font_settings
    return case data_type
    when :line, :level, :name then line_height
    when :banner
      bmp = Cache.picture(@quest.banner)
      hght = bmp.rect.height
      bmp.dispose
      hght
    when :description
      buff = description_x*2
      paragraph = mapf_format_paragraph(@quest.description, contents_width - buff)
      line_num = paragraph.scan(/\n/).size + 1
      line_num += (QuestData::DESCRIPTION_IN_BOX ? 2 :
        !QuestData::VOCAB[:description].empty? ? 1 : 0)
      line_num*line_height
    when :objectives
      objectives = @quest.revealed_objectives.collect { |obj_id|
        @quest.objectives[obj_id] }
      line_num = QuestData::VOCAB[:objectives].empty? ? 0 : 1
      buff = (objective_x*2) + text_size(QuestData::VOCAB[:objective_bullet]).width
      objectives.each { |obj|
        paragraph = mapf_format_paragraph(obj, contents_width - buff)
        line_num += paragraph.scan(/\n/).size + 1 }
      line_num*line_height
    when :rewards
      line_num = QuestData::VOCAB[:rewards].empty? ? 0 : 1
      (line_num + @quest.rewards.size)*line_height
    when Array then data_height(data_type.max_by { |dt| data_height(dt) })
    else 0
    end
  end
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on August 14, 2014, 05:05:05 AM
By any chance, did you set the q[:layout] of any quest to true?

Really, the script should have been flexible enough to accomodate for that, but it would cause a problem.

If that isn't it, could you recreate the error in a new project and show it to me?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Goofygooberbro on August 14, 2014, 12:38:44 PM
Thanks modern algebra. You nailed it. I'm not quite sure why I changed that, and the answer was in your script. I'm sorry to have bothered you. I do appreciate the help though.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Chaos17 on August 26, 2014, 02:35:08 PM
I've a suggestion : can you make an option like in mmorpg ? Where we see the goal of the quests ?

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fatate.org%2Fmscel%2Fgbl%2FWoW%2F2012-03-13-WoW-IDGBL-1.jpg&hash=1114b6e1a1a6d5f554118f35fb69e33c1a7173fa)

But the problem will be the number to display on the screen... In World of Warfract, they let player choose wich quests to display.
This is just an idea...
Title: Re: [VXA] Quest Journal 1.0.3
Post by: iVarlix on September 02, 2014, 05:02:16 PM
Good for V3, will take time!
What for?
Quite simply, I prefer to make sure we can use the software on multiple operating system!
So I had to go in another programming language!

I'll let you guess! ;)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: DownScale on September 03, 2014, 03:58:54 PM
Hey firstly thanks for this awesome script, secondly my question!

Whenever I try to put a \v[x] i get a strange icon and the [x] is displayed, not the actual variable I'm trying to show. Is it possible to display variables within an Objective? 

Thanks!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on September 09, 2014, 11:46:35 PM
Hey firstly thanks for this awesome script, secondly my question!

Whenever I try to put a \v[x] i get a strange icon and the [x] is displayed, not the actual variable I'm trying to show. Is it possible to display variables within an Objective? 

Thanks!

Hey, it should be. But you might need to use a double backslash. In other words, \\v[x] and not \v[x]..

Good for V3, will take time!
What for?
Quite simply, I prefer to make sure we can use the software on multiple operating system!
So I had to go in another programming language!

I'll let you guess! ;)

I am looking forward to seeing it. I'm not a good guesser though :'(

I've a suggestion : can you make an option like in mmorpg ? Where we see the goal of the quests ?

It wouldn't necessarily be hard, but VX Ace has such a small default resolution that any implementation would take up a lot of screen. I don't think it is something I am willing to do, but if you find someone else willing to do it, they are more than welcome to make the addon.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: iVarlix on September 13, 2014, 09:56:47 AM
I try to learn more about the Java language!
So I recode everything in java, its may take some time to convert the C # language in Java!
If someone knows more about the language of java, I would like to help me convert!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: mikablu on September 26, 2014, 01:40:23 PM
Hey.

Firstly, this is an awesome script and I absolutely LOVE it!~

Secondly, is there a way to implement a "Quest Board" kind of thing where the MC could see a list of available quests and choose which ones to take?  (I'm sure there's a way to do this with events, but I can't figure it out and was wondering if it's something that you might be able to add in.)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: LordTimotheus on October 01, 2014, 03:00:40 PM
Hey modern algebra,
I just discovered this awesome script!  :) I love its customizability; I'm using it as a datalog.
There's only one thing: I'd like to be able to arrange my entries (quests) in three different categories (characters, story, world)
AND sort them by their IDs within those categories. So basically, I dont want the new entries to appear on the top, but in an order that
I can control.
Is there a way to do that?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on October 03, 2014, 03:40:42 AM
Yes to both. You just need to create and use custom categories. See this post (http://rmrk.net/index.php?topic=45127.msg541216#msg541216) for more details.

That also describes the SORT_TYPE hash, which is how you set the order in which entries appear. The sorting mechanism you want is :id
Title: Re: [VXA] Quest Journal 1.0.3
Post by: BCj on October 03, 2014, 08:22:06 PM
How can I create a notice/quest board where the player can read quests and accept them?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on October 04, 2014, 12:18:34 AM
That is not currently a feature in this script. Sorry.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: paulskie2433 on October 23, 2014, 03:03:54 AM
Is this free for commercial games?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: UnendingEmpire on November 09, 2014, 06:02:23 PM
Sorry in advance if this is a necropost (the time threshold for necroposting seems to vary from one forum to the next, in my experience), but I'm getting a consistent error with the script.  Every time I try to turn in this quest, I get this same error.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs29.postimg.org%2Fp1f4qy2vr%2FThe_Error.png&hash=d51bd231994458c15d723d74a367084bc49da09f)
It's weird, since this is the only quest that gives me this problem, and only when I set it to have a gold reward.  I've put the quest in question below, since I already suspect know I just put something in wrong.
Code: [Select]
      when 2
          q[:name]              = "Road Closed"
          q[:level]             = 2
          q[:icon_index]        = 262
          q[:description]       = "Some bandits have set up a toll north of Azrim.  Don't let them have their way."
          q[:objectives][0]     = "Get rid of the bandits"
          q[:objectives][1]     = "Report back"
          q[:prime_objectives]  = [1]
          q[:custom_categories] = []
          q[:banner]            = ""
          q[:banner_hue]        =
          q[:client]            = "Woman"
          q[:location]          = "Azrim Gates"
          q[:common_event_id]   =
          q[:rewards]           = [
          [:gold, 500],
          ]
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on November 09, 2014, 11:59:08 PM
It's because of the lien right above it:

Code: [Select]
          q[:common_event_id]   =

You need to either delete that line (if you don't want to associate a common event) or else set it to something. As it is, what is happening is that the line is being interpreted as:

Code: [Select]
          q[:common_event_id] = q[:rewards] = [[:gold, 500]]

and q[:common_event_id] has to be set to an integer, not an array.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: UnendingEmpire on November 10, 2014, 01:03:19 AM
Ah, I see.  Thanks a bunch :)
Awesome script by the way.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: H2SJaeger on November 10, 2014, 06:31:49 AM
Dunno if it's been asked, but does the script automatically give out the quest rewards when completed, or is it just for display?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: DEAD KARL on November 10, 2014, 09:52:13 PM
Every time I try run the game this error appears, I have tried deleting the comments but that never worked so I just inputted the whole thing back into the script editor and error still appears. Any ideas?

Thanks
DEAD KARL
Title: Re: [VXA] Quest Journal 1.0.3
Post by: &&&&&&&&&&&&& on November 11, 2014, 12:02:05 AM
Please post your quests.

Copy and paste them, using the code tags -

Code: [Select]
It will look like this.

[code] Code in here [/code]
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on November 11, 2014, 01:52:53 AM
Every time I try run the game this error appears, I have tried deleting the comments but that never worked so I just inputted the whole thing back into the script editor and error still appears. Any ideas?

Thanks
DEAD KARL

It looks like you're copying it in such a way as to also copy the line numbers. If you're copying the script from Pastebin, just click the brown clipboard icon at the top. It's the third one over. See the picture below. The button has a red rectangle around it.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: DEAD KARL on November 11, 2014, 06:32:33 PM
Every time I try run the game this error appears, I have tried deleting the comments but that never worked so I just inputted the whole thing back into the script editor and error still appears. Any ideas?

Thanks
DEAD KARL

It looks like you're copying it in such a way as to also copy the line numbers. If you're copying the script from Pastebin, just click the brown clipboard icon at the top. It's the third one over. See the picture below. The button has a red rectangle around it.

Thanks that worked, how is it we open the quest menu?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on November 12, 2014, 01:19:32 AM
Well, it is embedded into the menu by default, so you can access it from there. See lines 137-144, 196-201, and 236-246 for alternative ways to access it.

However, the quest journal is inaccessible until the player actually has a quest to look at. So you need to reveal the objective of at least one quest before it can be opened.

If you don't like that restriction, then you can go to the 2nd last line of the script. It currently shows:

Code: [Select]
  "!$game_system.quest_access_disabled && !$game_party.quests.list.empty?",

If you want the quest menu to be accessible before there are any quests, you can change it to:

Code: [Select]
  "!$game_system.quest_access_disabled",
Title: Re: [VXA] Quest Journal 1.0.3
Post by: iVarlix on December 07, 2014, 08:30:22 PM
FYI, the software does not'll java and will remain in C #, and also, I know if I continue to develop the log ', I have a design idea, but impossible to do so, then that is possible, but I have not yet figured out how.

And a side, I have a game project and software level, I was not too head that.
If I have something I not happen, and I found nothing on the net, I give up, on one side you have the same as a stable version and bug free.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: DEAD KARL on December 14, 2014, 03:28:16 PM
I am slightly confused, where about in my game would I put this code:

"q[:name]              = "Runaway Bride"


      q[:level]             = 3


      q[:icon_index]        = 7


      q[:description]       = "A local woman was abducted by bandits on the night of her wedding."


      q[:objectives][0]     = "Talk to Boris"


      q[:objectives][1]     = "Search the Haunted Woods for Boris' wife, Ladia"


      q[:objectives][2]     = "Slay the Bandits"


      q[:objectives][3]     = "Escort Ladia back to Boris"


      q[:prime_objectives]  = [1, 2]


      q[:custom_categories] = []


      q[:banner]            = ""


      q[:banner_hue]        = 0


      q[:client]            = "Boris"


      q[:location]          = "The Haunted Woods"


      q[:common_event_id]   = 0


      q[:rewards]           = [


        [:item, 1, 3],


        [:gold, 500],


      ]


      q[:layout]            = false"
Title: Re: [VXA] Quest Journal 1.0.3
Post by: yuyu! on December 14, 2014, 11:56:28 PM
I believe it all stays in the script. Starting after the sample quest, you make one of those for each quest you intend to have in the game, under the editable region. Be sure to change the number in "when #" at the top, so the game knows to distinguish which quest you are on.

You then should activate the quest by script call command, using the ID # you set for it after "when".

*edit*

It should end up looking something like this (taken from the script):

Spoiler for:
Code: [Select]
    when 1 # Quest 1 - SAMPLE QUEST
      q[:name]              = "Runaway Bride"
      q[:level]             = 3
      q[:icon_index]        = 7
      q[:description]       = "A local woman was abducted by bandits on the night of her wedding."
      q[:objectives][0]     = "Talk to Boris"
      q[:objectives][1]     = "Search the Haunted Woods for Boris' wife, Ladia"
      q[:objectives][2]     = "Slay the Bandits"
      q[:objectives][3]     = "Escort Ladia back to Boris"
      q[:prime_objectives]  = [1, 2]
      q[:custom_categories] = []
      q[:banner]            = ""
      q[:banner_hue]        = 0
      q[:client]            = "Boris"
      q[:location]          = "The Haunted Woods"
      q[:common_event_id]   = 0
      q[:rewards]           = [
        [:item, 1, 3],
        [:gold, 500],
      ]
      q[:layout]            = false
     
    when 2 # Quest 2 - yuyu's Sample
      q[:name]              = "Uncle Boe's Cabin"
      q[:level]             = 5
      q[:icon_index]        = 25
      q[:description]       = "boe demands repremands from the pale folk."
      q[:objectives][0]     = "Bring boe a peace offering."
      q[:objectives][1]     = "Locate a human sacrifice."
      q[:objectives][2]     = "Give boe all your monies."
      q[:objectives][3]     = "Make boe a key lime, cherry-topped pie for his birthday."
      q[:prime_objectives]  = [1, 2]
      q[:custom_categories] = []
      q[:banner]            = ""
      q[:banner_hue]        = 0
      q[:client]            = "boe"
      q[:location]          = "boe's cabin"
      q[:common_event_id]   = 0
      q[:rewards]           = [
        [:item, 2, 5],
        [:gold, 1],
      ]
      q[:layout]            = false

You can just copy/paste the sample, and edit it to create a new quest. ;]
Title: Re: [VXA] Quest Journal 1.0.3
Post by: DEAD KARL on December 15, 2014, 11:09:56 PM
I believe it all stays in the script. Starting after the sample quest, you make one of those for each quest you intend to have in the game, under the editable region. Be sure to change the number in "when #" at the top, so the game knows to distinguish which quest you are on.

You then should activate the quest by script call command, using the ID # you set for it after "when".

*edit*

It should end up looking something like this (taken from the script):

Spoiler for:
Code: [Select]
    when 1 # Quest 1 - SAMPLE QUEST
      q[:name]              = "Runaway Bride"
      q[:level]             = 3
      q[:icon_index]        = 7
      q[:description]       = "A local woman was abducted by bandits on the night of her wedding."
      q[:objectives][0]     = "Talk to Boris"
      q[:objectives][1]     = "Search the Haunted Woods for Boris' wife, Ladia"
      q[:objectives][2]     = "Slay the Bandits"
      q[:objectives][3]     = "Escort Ladia back to Boris"
      q[:prime_objectives]  = [1, 2]
      q[:custom_categories] = []
      q[:banner]            = ""
      q[:banner_hue]        = 0
      q[:client]            = "Boris"
      q[:location]          = "The Haunted Woods"
      q[:common_event_id]   = 0
      q[:rewards]           = [
        [:item, 1, 3],
        [:gold, 500],
      ]
      q[:layout]            = false
     
    when 2 # Quest 2 - yuyu's Sample
      q[:name]              = "Uncle Boe's Cabin"
      q[:level]             = 5
      q[:icon_index]        = 25
      q[:description]       = "boe demands repremands from the pale folk."
      q[:objectives][0]     = "Bring boe a peace offering."
      q[:objectives][1]     = "Locate a human sacrifice."
      q[:objectives][2]     = "Give boe all your monies."
      q[:objectives][3]     = "Make boe a key lime, cherry-topped pie for his birthday."
      q[:prime_objectives]  = [1, 2]
      q[:custom_categories] = []
      q[:banner]            = ""
      q[:banner_hue]        = 0
      q[:client]            = "boe"
      q[:location]          = "boe's cabin"
      q[:common_event_id]   = 0
      q[:rewards]           = [
        [:item, 2, 5],
        [:gold, 1],
      ]
      q[:layout]            = false

You can just copy/paste the sample, and edit it to create a new quest. ;]

Thanks for the help, but minutes after posting that I found a video explaining it. Bu thank you anyway for taking time out of your day to explain it. Means a lot :)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: yuyu! on December 16, 2014, 05:35:39 AM
No prob :) it was worth getting to make my stupid sample quest :V I hope boe-san rikes it
Title: Re: [VXA] Quest Journal 1.0.3
Post by: &&&&&&&&&&&&& on December 16, 2014, 06:14:48 AM
yes >:)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Japhasca on January 05, 2015, 12:35:47 AM
(Sorry, had this posted in the VX forum by mistake. I'm using Ace)

I'm having an issue with the most recent quest I coded in. The "Rewards" line is appearing overlapping the last line of the objectives. None of the other few I have do this. Here is a side-by-side comparison:

http://imgur.com/zSbMvIi
http://imgur.com/cr1cOp1

I have the screen set to 640 x 480 through Yanfly's Core Engine, and am using Taurus' Fullscreen++. I don't believe anything else I'm using should affect the screen layout.

Here is the script for the quest that shows up wrong:

when 1004 #Apartment Side Quest
   q[:name] = "Laundry 'Adventure'"
   q[:level] = 1
   q[:icon_index] = 154
   q[:description] = "Get the laundry from the dryer!"
   q[:objectives][0] = "Get the laundry from the laundry room."
   q[:objectives][1] = "Bring them to apartment 2B."
   q[:prime_objectives] = [0,1]
   q[:client] = "Man in apartment 2B"
   q[:location] = "Your apartment building"
   q[:rewards] = [
      [:exp, 150],
      [:gold, 60],
      [:item, 8, 1] #tentative
   ]
   q[:layout] = false

Edit: I think I know what's going on. When I changed the screen resolution, I neglected to change the column widths in the quest journal script. I think it's drawing the rewards line where it thinks it should be based on the resolution, rather than where the text actually would place it based on the column widths. I'll try this when I get home and post.

New Edit: I changed Basic_Data_Width by adding the difference between the default resolution width (544) and the one I was using (640) assuming this would make the right column bigger and hopefully fix this issue. It didn't; the words still wrap at the same places and the Rewards line still overlaps the text in that one quest. Someone please help, this is really bumming me out!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: stringcraftgaming on January 19, 2015, 01:30:41 PM
Having some problems with this.

Get this error
Code: [Select]
Can't convert true into integer

The only script I've used is this in one event:
Code: [Select]
reveal_objective(1, 0)

Nothing else has been altered. It's a fresh install of the script.

Any help appreciated, thanks.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: &&&&&&&&&&&&& on January 21, 2015, 09:08:36 PM
Maybe try

Code: [Select]
reveal_objective(1, 0, 0, 0)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: smeros on February 13, 2015, 12:27:10 PM
The best script I've ever seen on VXA.

Great job.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: iVarlix on February 13, 2015, 09:12:04 PM
Hellos, I would like to know how to customize a category?
Ha is the Ace Quest Project Manager, is no longer updated, I grieve, but lack of time.
Someone told me that there was a forgets '[' when the script generates.
Just that, but I would have in the quest menu, this: "Main", "Secondary" "Finish"," Fail ", I had trouble to use the custom category.
The main quest in "Main", secondary quest in "Secondary", etc ...
Thank you in advance!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on February 14, 2015, 04:16:10 AM
Thanks smeros.

Hellos, I would like to know how to customize a category?
Ha is the Ace Quest Project Manager, is no longer updated, I grieve, but lack of time.
Someone told me that there was a forgets '[' when the script generates.
Just that, but I would have in the quest menu, this: "Main", "Secondary" "Finish"," Fail ", I had trouble to use the custom category.
The main quest in "Main", secondary quest in "Secondary", etc ...
Thank you in advance!

Try following the steps that I outline here: http://rmrk.net/index.php?topic=45127.msg541216#msg541216

Let me know if there is anything you don't understand.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: iVarlix on February 14, 2015, 07:34:57 AM
Thank you, I just trick here:
Code: [Select]
      SORT_TYPE = {
        :all =>      :id,       # Sort type for the All Quests category
        :active =>   :change,   # Sort type for the Active Quests category
        :complete => :complete, # Sort type for the Complete Quests category
        :failed =>   :failed,   # Sort type for the Failed Quests category
        :secondaire => :change,
        :principal => :change,
      } # <= Do not touch.
I put this:
Code: [Select]
        :secondaire => :secondaire,
        :principal => :principal,
Thank you Modern Algebra, if I find my Ace Manager Quest project, I will add this feature!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: CyndaBytes on March 13, 2015, 08:52:46 PM
Hi, Modern Algebra! Thanks for the wonderful journal, I think this is the best quest script.  ;)

I hava an answer:
1) Yes, but you have to do it manually. When you complete the quest, you can use the following code:

Code: [Select]
quest(4).custom_categories.clear

That would remove Quest 4 from all custom categories. Just replace the 4 with the ID of whatever quest you're completing.

Can i use this script call to remove a quest from :all and :active quest to put in a custom category?
The quest is already in the custum category. I suppose to change "custom_categories" with another code.

I'm sorry for my bad english.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: MoonStar on April 17, 2015, 07:35:07 PM
 HI first thing love your script. Design and all is very well thought and done!

I'm using mog's monogatari menu system (from moghunter/atelier-rgss) but when im going to the quest button and try to enter i get this error

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.prntscr.com%2Fimg%3Furl%3Dhttp%3A%2F%2Fi.imgur.com%2FKXUcCKL.png&hash=2f370a0e19889638a9062b173e31bc711420ec7b)

Code: [Select]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Category OK
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      def on_category_ok; @quest_list_window.activate; end

Can you tell me what im doing wrong or how can i make it work with this menu system i attached menu script also.

EDIT: managed to get it to work had to delete .active and works now. NEW PROBLEM when the quest journal shows it has the default skin. (https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.prntscr.com%2Fimg%3Furl%3Dhttp%3A%2F%2Fi.imgur.com%2Fds5Kjm9.png&hash=0a45aab83d2281a3ae7a903a9f726dd7f7775a57)

how can i make it so it blends in and looks nice like then the whole menu?

Thank you

EDIT 2: attached the images that go in to graphics folder to make the whole menu work sry just  only now remembered
Title: Re: [VXA] Quest Journal 1.0.3
Post by: MoonStar on April 19, 2015, 08:56:59 PM

 BUMP!

 Can anyone tell me how to put the same skin from the menu system or at least how can i remove the quest category and quest list window?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: &&&&&&&&&&&&& on April 19, 2015, 09:18:48 PM
Code: [Select]
#  WINDOWSKIN - The windowskin for each window in the Quest scene. It must
  # refer to a graphic in the System folder of Graphics. If set to false, then
  # it will use whatever windowskin is default. If you are using a script which
  # lets the player choose the windowskin, false is the recommended value.
  WINDOWSKIN = false
  #  WINDOW_TONE - The tone for each window. It must be an array in the form:
  #      WINDOW_TONE = [red, green, blue, gray]
  # gray can be excluded, but the other three must be present. If you set this
  # value to false, then the windows will have whatever tone is default.
  WINDOW_TONE = false
  #  WINDOW_OPACITY - The opacity of the windows in the Quest scene. If set to
  # false, it will use the default opacity for windows.
  WINDOW_OPACITY = false
  #  BG_PICTURE - This is a string referring to a picture in the Picture folder
  # of Graphics. If set to "", then there will be no picture. Otherwise, it
  # will display the selected picture below the windows but above the map in
  # the Quest scene.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: MoonStar on April 19, 2015, 09:26:52 PM
 
 boe

 Yes its already like this and i still cant make it look like the menu or remove the 2 windows
Title: Re: [VXA] Quest Journal 1.0.3
Post by: &&&&&&&&&&&&& on April 19, 2015, 10:12:33 PM
I guess try replacing that with

Code: [Select]
self.windowskin = Cache.system("Window")
Replace Window with the name of your windowskin.
So if your windowskin is named Fartbabby it would be
Code: [Select]
self.windowskin = Cache.system("Fartbabby")

If that doesn't work then try

Code: [Select]
windowskin = Cache.system("Window")
Again, replacing Window with the name of your windowskin.
Like I said before, if your windowskin is named Fartbabby it would be
Code: [Select]
windowskin = Cache.system("Fartbabby")
Title: Re: [VXA] Quest Journal 1.0.3
Post by: MoonStar on April 19, 2015, 11:07:13 PM
I guess try replacing that with

Code: [Select]
self.windowskin = Cache.system("Window")
Replace Window with the name of your windowskin.
So if your windowskin is named Fartbabby it would be
Code: [Select]
self.windowskin = Cache.system("Fartbabby")

If that doesn't work then try

Code: [Select]
windowskin = Cache.system("Window")
Again, replacing Window with the name of your windowskin.
Like I said before, if your windowskin is named Fartbabby it would be
Code: [Select]
windowskin = Cache.system("Fartbabby")

Ok that worked but now all the text suppose to be there is gone

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.prntscr.com%2Fimg%3Furl%3Dhttp%3A%2F%2Fi.imgur.com%2F1wGXJRR.png&hash=a375e90d09cc92735a6dda6ec9d866edd1d17742)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: MoonStar on April 20, 2015, 12:34:04 PM

 Bump!

 How do i make the text appear or how do i make the 2 windows (quest category and quest list) in the default normal view.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: vinnyvince on April 20, 2015, 03:33:29 PM
Hello, Modern Algebra.

While I was testing my game, I discovered that when you set the objective to about more than 5 objectives, the game will crash.
It has something to do with the game interpreter, somewhere in line 1411.

The image is in the attachment.

Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on April 25, 2015, 12:08:13 PM
I can set more than 5 objectives without there being any error.

The error you are receiving sounds like an error in whatever code you are using in the Script event command. Please post a screenshot of whatever you have in that command and I will take a look.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Fatalys93 on May 18, 2015, 06:26:01 PM
EDIT: It seems to work, now! Solved! :D

Awesome script Modern.
It works perfectly, but from a moment to another it gives me this error.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FeUQmAFh.png&hash=8d295ae3af30f737a7e70063768987745775b9f9)
It's strange because i don't modify nothing and i don't use any type of picture (icons are correct ;) ).
My script is also under my Galv menù themes engine, but i repeat that until one hour ago it works perfectly and now i didn't change nothing! XD
For you where is the problem? Thanks :D
Title: Re: [VXA] Quest Journal 1.0.3
Post by: ksjp17 on May 24, 2015, 09:32:13 AM
I have two queries.

Up until now in my game I have had 2 totally separate parties, using Tsukihime's Party Manager script (found here  http://himeworks.com/redirect.php?type=script&name=Party_Manager (http://himeworks.com/redirect.php?type=script&name=Party_Manager)).  They have had their own inventories and gold, and - without me having to do anything - their own separate list of quests.  This was fine because all side quests could only be discovered and completed by a specific party, they were not shared in any way.

I have just merged the two parties, and their inventories and gold have combined without a hitch.  However, the quests of the second party which has been merged into the first party, did not add themselves to the quest list.  In one sense this is not the end of the world, because if they haven't completed them I can put blocks on so that they can't go back and finish them as a joint team.  However, it would be nice if they did show up.  Is this at all possible?

For your convenience I am posting the short script which does the merging because it is not part of Tsukihime's original script.
Spoiler for:
Code: [Select]
#written by Tsukihime 29/12/2014 with gold fix by Source.
#script call to merge Party 2 with Party 1
#merge_parties(1, 2)

class Game_Parties
 
  # Merges party2 into party1
  def merge(id1, id2)
    party1 = @data[id1]
    party2 = @data[id2]
   
    # merge actors
    party2.members.each do |mem|
      party1.add_actor(mem.id)
    end
   
    # merge inventories
    party2.items.each {|item| party1.gain_item(item, party2.item_number(item)) }
    party2.weapons.each {|item| party1.gain_item(item, party2.item_number(item)) }
    party2.armors.each {|item| party1.gain_item(item, party2.item_number(item)) }
   
    party1.gain_gold(party2.gold)


    # Make first party the active party
    switch_party(id1)
   
    # Delete the second party, as it has been merged
    delete_party(id2)
  end
end

class Game_Interpreter
  def merge_parties(id1, id2)
    $game_parties.merge(id1, id2)
  end
end

My second query is more easily shown in a screen shot
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1323.photobucket.com%2Falbums%2Fu589%2Fksjp17%2FQuest%2520journal_zpsswjd2qcy.png&hash=cdefffdfc3e134f2ad580415d9c2c98f4674dd31)

As you can see, the last objective is overlaid by the line which separates the objectives section from the rewards section.  I also cannot scroll down to see the rewards.  It's as if I've used up all the available space for this.  Is it possible to extend the length of this down to allow for more objectives (there will be 3 more) and still be able to see the rewards?

Oh, and btw, I have no idea what that line of question marks at the top of the list of quests is all about.

Thank you.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: ksjp17 on May 28, 2015, 07:51:21 PM
I've been able to get it fixed on another site.  If anyone is interested in either of the solutions, you can find them in this thread http://forums.rpgmakerweb.com/index.php?/topic/40467-urgent-help-with-modern-algebras-quest-journal-needed/ (http://forums.rpgmakerweb.com/index.php?/topic/40467-urgent-help-with-modern-algebras-quest-journal-needed/)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: yuyu! on May 28, 2015, 09:10:05 PM
Glad you got it sorted out. Thanks for sharing! :)
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on June 27, 2015, 12:09:48 PM
I am sorry that I wasn't around to help with those problems ksjp17. Thanks for sharing the solution. If I get around to updating this script, I will fix the error.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Necrofenser on July 28, 2015, 11:39:52 PM
Hi modern algebra!
I really like your script, but i have few requests.
Can you make possible to change quest location and client via script calls?
I am making one huge quest with different quest givers and locations. When one part of quest is completed i will set objective as completed and then i will reveal next objective for next part. For the most of time, quest givers and their locations are different, so i would like to change it via script calls. Can you please consider adding this feature in your script soon?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on July 29, 2015, 04:18:06 PM
Hi Necrofenser. That is already possible. Just use the following code in a script call:

Code: [Select]
quest(14).client = "New client"
quest(14).location = "New location"

Replace 14 with the ID of the quest you are changing, and of course replace "New client" and "New location" with the names of the new client and location.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Necrofenser on August 16, 2015, 10:51:54 PM
One more question.
I can't seem to find this on first page of this script, so i have to ask you here.
What kind of licence this script have? Free for private use only or it's also free for commercial use too?
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on August 17, 2015, 01:03:29 PM
It is free for use in commercial projects.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: SoraMMK on August 25, 2015, 11:28:36 PM
hello modern algebra.

i hope, you can help me for my problem^^''

I use the script for quest and also for achievements.
At this point, some informations are only visible, when you get it.
So i change it with the commands [quest().name = ""] and [quest().location = ""]. The last, i will change is the objective. But how is the command for this, because it can have more than one. I testet this:

quest().objective = ""
quest().objective1 = ""
quest().objective_1 = ""
quest().objective_id_1 = ""

I hope you can help me^^

gratz
Sora-MMK

PS. sorry for my bad english, i'm german^^
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on October 24, 2015, 02:48:39 PM
Hi SoraMMK. Sorry for the delay. You can change the contents of an objective with the code:

Code: [Select]
quest(x).objectives[y] = ""

Where x is the quest ID and y is the objective ID (starts at 0). However, if all you are looking to do is reveal information sequentially, you could just set it all up in the script itself and use the reveal_objective and conceal_objective codes.



I also received a request from Ziemanin1 to make it so that some quests did not show up in the all, active, complete, or failed categories, and instead only showed up in whatever custom categories they were assigned.

I wrote the following patch for anyone with a similar desire:

Code: [Select]
#==============================================================================
#    Remove Quest from Default Categories [Patch for Quest Journal v. 1.0.3]
#    Version: 1.0.0
#    Author: modern algebra (rmrk.net)
#    Date: October 24, 2015
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This patch allows you to specify that some quests should ONLY show up in
#   the custom categories to which they belong, and not in the default :all,
#   :active, :complete, and :failed categories.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Paste this script into the Script Editor below the Quest Journal but above
#  Main.
#
#    To specify that a quest should only show up in custom categories, include
#  :only in its custom categories array. For example, if you have a custom
#  :towns category and you only want the quest to show up in that and not in
#  the :active and :all categories, then you would put the following when
#  setting the quest up:
#
#      q[:custom_categories] = [:only, :towns]
#
#  You can set more than one custom category as well. Please note that if you
#  do not set at least one custom category though, then putting :only in a
#  quest's custom categories array will make it invisible and inaccessible.
#==============================================================================

#==============================================================================
# ** Game_Quests
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    overwritten method - include?
#==============================================================================

class Game_Quests
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Include?
  #    determines whether to include a particular quest depending on list type
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def include?(quest_id, list_type = :all)
    return false if !revealed?(quest_id)
    return @data[quest_id].custom_categories.include?(list_type) if @data[quest_id].custom_categories.include?(:only)
    case list_type
    when :all then true
    when :complete, :failed, :active then @data[quest_id].status?(list_type)
    else
      @data[quest_id].custom_categories.include?(list_type)
    end
  end
end
Title: Re: [VXA] Quest Journal 1.0.3
Post by: bluntsword on October 24, 2015, 05:59:47 PM
You are awesome MA. If I were to request any of your scripts to be made for MV first, it would be this one for sure.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: bluntsword on October 29, 2015, 04:10:46 PM
Double post cause bragging.

I was on another forum talking with a guy about his Quest plugin for MV.

When I asked if they planned on allowing for a certain feature they replied:
"This isn't going to do everything for you!"

Then I realized how awesome this script is.

Thanks for such a contribution MA!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: modern algebra on October 30, 2015, 12:27:10 AM
Thanks bluntsword. To be fair though, this script doesn't do all that much in the grand scheme of things. It just lets you display stuff. All the hard work of setting up the quests and progressing them through the game is done by you guys.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: bluntsword on October 30, 2015, 03:08:01 AM
Still, this guy only allowed for quests to be modified by variables. Very bare bones in comparison to yours.

Edit - and +1 for using notes in the event instead of call scripts.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: bigcalsworld on January 14, 2016, 05:38:52 PM
Sorry to bump such an old thread, but I've just recently discovered this script and love it, however I am wanting to use a custom menu script with my game as well, and I was wondering how I would add this Quest Journal to the custom menu script. Sorry if this is the wrong place to ask about it (also asking the maker of the menu script as well, wasn't sure which one to ask so figured I'd do both and cover everyone lol).

The script in question is:

http://niclas-thornqvist.se/rpg/scripts/ace/xs-menu-delux.txt

with the core scrip http://niclas-thornqvist.se/rpg/scripts/ace/xs-core.txt
Title: Re: [VXA] Quest Journal 1.0.3
Post by: Phoexix223 on January 21, 2016, 02:45:50 AM
Sorry to bump such an old thread, but I've just recently discovered this script and love it, however I am wanting to use a custom menu script with my game as well, and I was wondering how I would add this Quest Journal to the custom menu script. Sorry if this is the wrong place to ask about it (also asking the maker of the menu script as well, wasn't sure which one to ask so figured I'd do both and cover everyone lol).

The script in question is:

http://niclas-thornqvist.se/rpg/scripts/ace/xs-menu-delux.txt

with the core scrip http://niclas-thornqvist.se/rpg/scripts/ace/xs-core.txt

Put this under Menu_List:
Code: [Select]
:quest     => ["Quests", "View all current quests.", nil, true, false, 4],

The '4' is the same number as MENU_INDEX and your common event, which should be just a script call:

Code: [Select]
SceneManager.call(Scene_Quest)

With trigger set as none.

Sorry for double bumping an old thread :P
Title: Scroll wheel or scroll bar
Post by: mariannagr1 on March 28, 2016, 01:32:01 AM
Hi modern algebra
I am trying to figure out if there is a way to use the mouse wheel to scroll down the quest info that exceeds the height of the screen, or make a scroll bar appear at the right part of the screen. I can use the arrows on my keyboard but it is not convenient for me since everything on my game will be mouse-able XD.
Thank you for the good work!
Title: Re: [VXA] Quest Journal 1.0.3
Post by: ElizaGloom on November 08, 2017, 05:38:18 AM
I love your script. It is super easy for me to use (and I'm a beginner), but I am stuck on how to make it so if you have a running total, it will come up in your quest journal.

By the way, I'm using RPG Maker VX Ace.

Thanks.
Title: Re: [VXA] Quest Journal 1.0.3
Post by: ElizaGloom on November 15, 2017, 09:59:32 AM
I have figured it out. Don't worry!  ;D
Title: Re: [VXA] Quest Journal 1.0.3
Post by: blackberry-chan on March 04, 2018, 05:11:05 AM
This script is fantastic and I love it.  No problems with it at all, but I am wondering about a possible feature.  Is there any way to hide some of the categories (or even all of them, displaying only the "All" quests) until those categories become relevant?  I have custom categories relating to different areas, and I'd like them not to show up in the log until the character has actually visited those areas.  Even if this is not possible, thanks already for making such an amazing, useful, versatile script!