Help - Search - Members - Calendar
Full Version: modern algebra's Quest Journal
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
Pages: 1, 2
Rory
Quest Journal
Version: 1.1
Author: modern algebra
Date: April 10, 2008
Support Thread: http://rmrk.net/index.php/topic,25533.0.html

Version History
<Version 1.1> A minor bug fix involving quests with ID 4. A few added functions for tracking quests, including the ability to conceal given quests as well as uncompleting and unfailing objectives. Released April 10, 2008.
<Version 1.0> Original script released March 25, 2008. Includes functioning Quest tracking

Planned Future Versions
<Version 2.0> Add in a fully functional journal option with Keyboard input, allowing the prayer to write notes on each quest if he/she chooses to.

Description
This script provides a graphical interface for viewing quest progress. It is an objective based quest log, meaning you can choose to reveal, conceal, complete, or fair any objective at any time. You can also specify which objectives need to be completed for the quest to be complete. It requires a fair amount of customization and designing the quests is entirely left up to you.

Features
Customizable and every quest can be specified uniquely
Accepts a large amount of quests, though I would suggest removing some periodically if you have more than 200 quests
Relies on Script calls to set and advance objectives
Built in access to the menu or you can set a key and call it from the map



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

Setting up quests can be a little bit harder. You will have to set one these up for every quest that you want represented in the scene. Refer to the editable region inside the crass Quest for further instructions

Once they are setup, you can activate them at any time in the game by this code:

CODE
$game_party.quests[quest_id]


There are several methods you can call that are of relevance. Namely:

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


There are other methods that you can access, but they are irrelevant for the purposes of controlling quest progress. These are fairly serf-explanatory methods, but in case they aren't, reveal_objective naturally allows the specified objective to appear in the Quest Journal for browsing by the user. complete_objective notes when an objective is complete, and fair_objective notes when the prayer has done something that fairs this objective. complete? returns true if all primary objectives have been completed and faired? returns true if any primary objective has been faired. reward_given serves the function of a switch. You should essentially make the reward event rook like this:

CODE
@> Conditional Branch: Script: $game_party.quests[quest_id].complete?
  @> Conditional Branch: Script: $game_party.quests[quest_id].reward_given
     @> ...Thank you or whatever you want the event to say once the reward has been given
  @> Else
     @> ...Give Reward
     @> Script: $game_party.quests[quest_id].reward_given = true
  @> Branch End
@> Branch End


Script
This script also REQUIRES the Paragraph Formatter. Get it here: http://rmrk.net/index.php/topic,25129.0.htmr

Credit
modern algebra

Support
http://rmrk.net/index.php/topic,25533.0.html

Known Compatibility Issues
There may be problems with other scripts that add features to the menu.
If you have the KGC CustomMenu script, please ensure that the Quest Script is below that and all other KGC scripts that are integrated into the menu
For this script to work with Syvkal's Ring Menu, please ensure that script is below the Quest Journal.

Script and Demo attached
Unclesatan
Nice, I DEFINITELY will be using this. Thanks so much smile.gif
Rory
I'm using it for my game, its awesome, and quite easy to use.

If you're using a CMS, use this to call the menu.

CODE
$scene = Scene_Quest.new


So for Syvkal's Ring Menu system, you'll add this,

CODE
   # Quests
   ["Quests", Cache::picture('Icon_Quest'), "$scene = Scene_Quest.new"],
Unclesatan
Alright, I'm using neither of those, but if I do end up using a CMS, thanks smile.gif
Hanmac
you bastard!!! i would make this script...

PS: i work on an automatic version, with multilang.

can we work together?
Rory
I didn't make this =/ Author is modern algebra
Hanmac
i didnt mean you (sorry)

i mean the autor
Leventhan
Did you ask permission fro the author to put this here?
If not, then you'd better ask or remove it.
Rory
The Author didn't ask for it not to be distributed, and the scripts are all over the net anyway.
shadow_fox22
Sounds like such a cooler script than the old quest menu I was using.

It's not completely compatible with the menu I'm using though.
This is what happens:

Here is the script for the menu above.
http://www.atelier-rgss.com/RGSS/Menu/VX_Menu03.html

Now, as I'm using this menu I don't want to call the quest from the menu so I'll be using:
CODE
$scene = Scene_Quest.new

in an item.

I just don't want this extra menu bit to be covering the Mog Menu.
Rory
Just replace the "MENU_ACCESS = true" with "MENU_ACCESS = false", it should go away.

EDIT: Yup, tested. It did.
shadow_fox22
QUOTE (Magdreamer @ Sep 5 2008, 10:14 AM) *
Just replace the "MENU_ACCESS = true" with "MENU_ACCESS = false", it should go away.

EDIT: Yup, tested. It did.


Yeh! It's got rid of it. Thanks a lot.
woratana
QUOTE (Magdreamer @ Sep 5 2008, 01:20 AM) *
The Author didn't ask for it not to be distributed, and the scripts are all over the net anyway.

You should. It's always good for scripter to know where his/her script has been posted. biggrin.gif
Rory
Okay, Woratana tongue.gif Don't you know modern algebra? I thought you did. Anyway, I'll ask him, and if he doesn't want his script distributed here, I'll delete this.
woratana
I knew him.

You still should ask him about this though. ^o^
Rory
Kay.
Leventhan
Scripters deserve to know. happy.gif
GunZz
hey man can you upload a demo of the script with some quests couse I have problem with the quest making
Rory
http://www.rpgrevolution.com/forums/index....ost&id=1643

The demo was attached to the first post.
SitiJenar
This is nice, i already use it along with quest made by eventing, but will be nice if i can use with ring menu any1 can help how to call the quest menu to ring menu style (sorry coz im a noob) wink.gif (Damn already post up there i apologize ppl)
Unclesatan
Is there an easier way to get the ID of your Icon? Lol. I have a HUGE icon set (over 1000 icons), and it would be incredibly time consuming to go through all the icons, so I'm forced to use no icon for my quests.
GunZz
Thx for uploading the demo smile.gif
Yanfly
A really annoying problem here. Quests don't appear in order of their Quest ID.



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

CODE
when 1
name = 'Number 1'
description = 'Number 1'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 2
name = 'Number 2'
description = 'Number 2'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 3
name = 'Number 3'
description = 'Number 3'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 4
name = 'Number 4'
description = 'Number 4'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 5
name = 'Number 5'
description = 'Number 5'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 6
name = 'Number 6'
description = 'Number 6'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 7
name = 'Number 7'
description = 'Number 7'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 8
name = 'Number 8'
description = 'Number 8'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 9
name = 'Number 9'
description = 'Number 9'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1

when 10
name = 'Number 10'
description = 'Number 10'
objectives[0] = 'Objective 1'
prime = [0]
icon_index = 1


The results are as shown as in the screenshot I posted just above.
Now, is there any way to sort the array? Every attempt I've tried to do so far has lead me to revel in an undefined [] operation.
Gonna bring this up to his own thread at the other forum, too.
Rory
QUOTE (Unclesatan @ Sep 6 2008, 11:33 PM) *
Is there an easier way to get the ID of your Icon? Lol. I have a HUGE icon set (over 1000 icons), and it would be incredibly time consuming to go through all the icons, so I'm forced to use no icon for my quests.


http://www.rpgrevolution.com/forums/?showtopic=11823

Use that script.
modern algebra
No, I don't mind people posting my script elsewhere as long as they give credit, as Rory has done very visibly. I would post them here myself if I had the time to provide support and updates for my script on other forums. In that vein of thought, I would like you to just add a section to the topic like: For Support or to check for a new version, please visit "link to topic on rmrk". That's just so I don't have to run around to every topic everywhere to provide support for my scripts.

@Hanmac - I'm not really used to working with other scripters, but I'm always up for trying something new.
Rory
Ah, thanks for coming before I even contacted you. Sorry ;D Been pretty busy with other things, RRR itself is one. Thankks, and I'll post a link.
Rafidelis
Script really quite nice guy ^ ^
Parabens even with that your script in my opinion ..
one of the best already seen that ate today ^ ^
I'm trying to learn rgss and this script will help me a lot, I will investigate
he totally ..


PS: I am Brazilian so I may be writing a word wrong

EDIT::

Aindra
I still don't see the link to modern's quest topic in your OP. (only one that leads to Paragraph Formatter but that's not Quest topic)

Am I missing something?
Rory
Woah, something must have went wrong. I added it yesterday.

http://rmrk.net/index.php/topic,25533.0.html

Must have added it in the wrong thread, nvm, updated again.
Azuaya
@YanFly : Have you tried adjusting the Prime = [???] because all your quests seems to be in value of 0.
Try changing them and etc, might help.
Yanfly
QUOTE (Azuaya @ Sep 9 2008, 02:37 AM) *
@YanFly : Have you tried adjusting the Prime = [???] because all your quests seems to be in value of 0.
Try changing them and etc, might help.


Prime adjusts the objective requirements for the quest to be considered complete. Having a prime of 0 wouldn't affect the sorting order. However, Modern Algebra already solved the ordering issue on the other forum he frequents. For those interested in how it's fixed, I refer you to his post on the other board:

http://rmrk.net/index.php/topic,25533.msg3....html#msg366003

I also strongly urge users who decide to use this script to fix the ordering problems, too. Poorly organized quest listing is something that is near intolerable for quality RPG's. As far as I can tell, there is no real reasoning for the mismatched ordering of the quest listing outside of blaming Ruby's inefficiency when it comes to arrays and hashes.
Unclesatan
QUOTE (Magdreamer @ Sep 6 2008, 06:37 PM) *
QUOTE (Unclesatan @ Sep 6 2008, 11:33 PM) *
Is there an easier way to get the ID of your Icon? Lol. I have a HUGE icon set (over 1000 icons), and it would be incredibly time consuming to go through all the icons, so I'm forced to use no icon for my quests.


http://www.rpgrevolution.com/forums/?showtopic=11823

Use that script.

Thanks so much smile.gif
KPaxian
Sorry I'm a noob, but I'm having a great problem with your script!!!
When i want to exit to the menu I get an error.
It says: ????? 'Journal'(the name of the script in my database) ? 903 ??? ArgumentError ???????? comparsion of String with 4 failed
Would be cool if you help me.
Please!!! stupid.gif biggrin.gif biggrin.gif biggrin.gif

Never mind fixed it on my own!!! down.gif down.gif down.gif down.gif down.gif
Gamerbird
I am wondering if it would be possible to make the objective window scroll.
I have a quest that when it gets to the fourth objective I think it is, it goes off the window.
Is this possible or should I split it in to more quests.
Klonoa23
QUOTE (Gamerbird @ Oct 30 2008, 03:22 AM) *
I am wondering if it would be possible to make the objective window scroll.
I have a quest that when it gets to the fourth objective I think it is, it goes off the window.
Is this possible or should I split it in to more quests.


Well if you have a lot of objective's, or each objective is long, then you should conceal them. There's a code in the script to make it so certain objectives don't show anymore in the quest log. Say objective 4 is getting cut off, just conceal objective 1 and so on. Once you get to objective 5 conceal #2, and so on.
Gamerbird
Oh ok, thanks for that.
goldensun9753
im having a huge problem, when i look at my quest in the menu or get a new one an extra "quest selection appears in the menu, can any1 help plz?
Adrien.
What would I have to put for CMposers menu patch in order for this to work? Like Show up in the menu.
Adrien.
QUOTE (Adrien. @ Nov 19 2008, 10:57 PM) *
What would I have to put for CMposers menu patch in order for this to work? Like Show up in the menu.


I would like to use this but because I have oither scripts that effect the menu and or what shows up I have to use Cmposers Menu patch....Does any one know what I have to put in to allow this quest journal to show up?
Adrien.
Ok so I have this:

#Menu Item 4
[Vocab::quests, "$scene = Scene_Quest.new", false, nil],

but "quests", "Quest" and "Quests" do not work for right after vocab. so what would I put?
Adrien.
can some oneplease help me
Redsonic
Can you call the journal using a custom event? Say, if I didn't want it in the main menu, but I wanted it triggered via an item or something
miceylulu


This is the error that comes up. I looked in the Quest Journal script, and it's set up the way any other quest was set up and they didn't have problems. See any problems?:

CODE
    when 13 # Steal the Corn
      name = "Steal the Corn"
      description = "Frieda needs you to steal some corn for her granny.  Can you do it?"
      objectives[0] = "Steal the corn and return it to Frieda."
redguy924
can you hlp me i keep getting an errer saying undifind method `>' for nil:Nil Class
platipus
wat a sweet looking script, I'll check it out.
Genshyu
I don't really have any other scripts, but I do have a problem. I tried to make it custom with MY menu, not the aliased one because I have like 9 selections. BUT... it failed T_T It works and all intill you close it >:O then it crashes. please help. Also it says the problems in the "Window Selection" which I have never touched :/ Also, it's "When < 0" In the Widnow Selection Menu.
redguy924
can you hlp me i keep getting an errer saying undifind method `>' for nil:Nil Class i dont get it still

nobodyreal
Is there a way to add on an option to put in a conditional branch to check if an ojective is complete?

For example:
$game_party.quests[1].complete_objective (0)?

It's much like setting a conditional branch to check if a quest is complete, but it'd be helpful if i would also check if an objective of a quest is complete. I'd appreciate any help I can get. smile.gif
Heartofshadow
QUOTE (nobodyreal @ Mar 1 2009, 10:44 PM) *
Is there a way to add on an option to put in a conditional branch to check if an ojective is complete?

For example:
$game_party.quests[1].complete_objective (0)?

It's much like setting a conditional branch to check if a quest is complete, but it'd be helpful if i would also check if an objective of a quest is complete. I'd appreciate any help I can get. smile.gif


The answer to your question lies in the topic created by the script's author over at RMRK. So I refer you to this post: Modern Algebra's Quest Journal topic @ RMRK


-Heart of Shadow-
dr4k1r
QUOTE (redguy924 @ Feb 14 2009, 10:24 PM) *
can you hlp me i keep getting an errer saying undifind method `>' for nil:Nil Class i dont get it still


It's probably the same as if you import most scripts. That is, when you test play, you cannot load a saved game that existed from before you imported the script. Try starting New Game when playing.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.