Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VXA] Quest Journal 1.0.3

Started by modern algebra, February 19, 2012, 08:01:42 PM

0 Members and 1 Guest are viewing this topic.

TimeLadyKatie

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.


modern algebra

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.

TimeLadyKatie

I included all the scripts from my actual project so you can see what I'm using for any possible interactions.

modern algebra

Alright, at line 789 of my the Quest Journal, you have the following:


      q[:banner_hue]        = 0**


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


      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:


      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],
      ]

TimeLadyKatie

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

Thanks, algebra.

modern algebra

No problem! I am happy to help.

Dark_Metamorphosis

#156
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  :)
Can you feel that?..

                                    My Current Project:


I support:


Fade

modern algebra

#157
Yes, almost all of that is possible. The section you are looking for starts at line 363 and looks like this:


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

[: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):

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


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


    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:


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


  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:


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


  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:


      q[:custom_categories] = [:main]


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


      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:


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.

Dark_Metamorphosis

#158
Quote from: modern algebra on February 03, 2013, 02:19:22 PM
[spoiler]Yes, almost all of that is possible. The section you are looking for starts at line 363 and looks like this:


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

[: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):

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


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


    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:


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


  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:


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


  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:


      q[:custom_categories] = [:main]


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


      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:


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
Can you feel that?..

                                    My Current Project:


I support:


Fade

modern algebra

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.

Dark_Metamorphosis

Quote from: 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.

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.
Can you feel that?..

                                    My Current Project:


I support:


Fade

Bett0



Please, any help?

This happens after i call the script "reveal_objective(0, 0, 1)" on an event.

modern algebra

#162
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?

Bett0

#163
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

modern algebra

Yeah, I just found Vms Simple Quest Book, 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.

Chaos17

#165
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.


modern algebra

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

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.

Chaos17

#167
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)



And that the word : gold isn't displayed ?

modern algebra

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



  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * 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:



  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * 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:


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


    # reward_gold: Text to identify gold rewards
    reward_gold:      "Gold",

Chaos17

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.



I am sorry if I missed something in the configuration setting.

Chaos17

#170
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
The bug happen when I try to open the quest menu.






modern algebra

#171
Umm, well it looks like the problem is your description line. You have:

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

You need to remove the :

Just try:

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.

Chaos17

#172
Someone already said :

QuoteYou 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.
Thank you for your help.
I look foward for your update.

shadowfox43

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

modern algebra

I think you can do it with the change_reward_status code:


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

change_reward_status(n, false)

where n is the ID of the quest