[VX] Quest Journal

Started by modern algebra, March 25, 2008, 03:45:04 pm

Previous topic - Next topic

modern algebra

March 25, 2008, 03:45:04 pm Last Edit: February 21, 2009, 06:33:19 am by Blizzard
Quest Journal
Authors: modern algebra
Version: 1.1
Type: Quest Log/Mission System
Key Term: Misc System



Introduction

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 fail 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.


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 player to write notes on each quest if he/she chooses to.




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



Screenshots

Spoiler: ShowHide



Demo

Download Link. To retrieve the script, take it directly from the demo. It is located below the (materials) slot and is titled Quest Journal. If you do not already have the Paragraph Formatter, you will also need that.


Script

This script also REQUIRES the Paragraph Formatter. Get it here: http://forum.chaos-project.com/index.php?topic=838.0

This script is too long to post here. Please retrieve it from the demo.



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 class Quest for further instructions

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

$game_party.quests[quest_id]


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


$game_party.quests[quest_id].reveal_objective (objective_id)
$game_party.quests[quest_id].conceal_objective (objective_id)
$game_party.quests[quest_id].complete_objective (objective_id)
$game_party.quests[quest_id].fail_objective (objective_id)
$game_party.quests[quest_id].complete?
$game_party.quests[quest_id].failed?
$game_party.quests[quest_id].reward_given


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


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


Later versions of this script will have an auto-reward system and also a Journal to which the player can write notes.

  You can also disable access to the Quest Log at any time with the code:

$game_system.quest_disabled = true


And you can change how it is accessed with the codes:
   

$game_system.quest_keyaccess = true / false  # ON MAP
$game_system.quest_menuaccess = true / false # IN MENU


  Also, in a message, \nq[quest_id] will retrieve the name of a quest and print it in a message


Compatibility

There may be problems with other scripts that add features to the menu.


Credits and Thanks


  • modern algebra





Author's Notes

Just post here if you are having problems. Please include any error messages and describe your problem in detail.

Nothing too much to say, though I did try a couple of new things. Namely, I wrote some methods for drawing ellipses and stuff - thus we get the rounded rectangle - a lot of code for a small, poorly done graphical effect, but whatever. I also tried making the Quests option slide into the menu flawlessly, but it was not as simple as I thought it would be. It appears to work now, but problems still might arise. I hope they don't. The other thing I did that was kind of fun was that I made the scene fit no matter what you have the resolution as. So, if you resize your screen, my scene still ought to look like it belongs. With all of that, my script became obscenely long, but it's worth it, I promise :P

Nortos

Ahh gj Modern looks nice i dnt use VX but *powers up* this looks good

Sally

aww i wish this could be in RMXP =(

Juan

Nice script. @Susys I'm working on a different  journal script for you.
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

Sally


Znikomek

But they have a problem:
when i go battle with quest jurnal i have this:

Phasedscar

heh, porings from RO

I remember working on smoothing those out for a friend when he was making his own rpg a LONG time ago
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

modern algebra

March 26, 2008, 10:11:07 am #7 Last Edit: March 26, 2008, 01:11:07 pm by modern algebra
Oh. I'll fix that right after I get back from class

That was a dumb mistake. Go to line 582 and find this line:


modalg_quest_jrnl_intlz (width, commands, column_max = 1, row_max = 0, spacing = 32)


Replace it with:


modalg_quest_jrnl_intlz (width, commands, column_max, row_max, spacing)


I uploaded the script with this problem fixed.

Znikomek

No all its ok ;)
thx for fast reply

Crunus

the demo download link don't works  :uhm:

Blizzard

You should contact modern algebra and ask him. Or you can try at rmrk.net.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

mxland

Can not download how to do......

There are other addresses to download it?? :O.o:

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

mxland


modern algebra

January 09, 2009, 07:33:58 pm #14 Last Edit: January 09, 2009, 07:35:26 pm by modern algebra
Whoa, I haven't been here for a long time. Thanks for doing that Blizzard. :) I didn't know I could link to attached files like that.

Vein Pyroclasm

February 25, 2009, 02:52:30 pm #15 Last Edit: February 25, 2009, 02:55:35 pm by Vein Pyroclasm
So how do I make a certain part of the quest check to see if a certain objective was complete before it initiates the next part of the quest?


I.E.

1. Check Chair

2. Check Barrel (how would I set it to see if the first objective is complete before it initiates the condition for this one....)


Something like a script to put in the first conditional branch that checks to see if the previous objective was completed before it allows the player to continue.

Also, how would I make it show a full list of objectives at once that are checked off as you complete them?


modern algebra

I did not make a simple method to do that, namely because this was intended as a visual way to represent quests, and the original intention was  that quest progress would be created and tracked through eventing means, such as turning a switch on when that matters. That may have been an oversight on my part. Anyway, there is a code that can be used, but it's long:
$game_party.quests[quest_id].complete_objectives.include? (objective_id)



For revealing all of the objectives, and just checking them off, when they are complete, yeah. All you need to do is use the code:

$game_party.quests[quest_id].reveal_objective (objective_id)


And that wil reveal the objective in the quest menu.

$game_party.quests[quest_id].complete_objective (objective_id)


completes it. So just use reveal_objective on all objectives at the start of the quest and then complete them one by one.

G_G

In case anyones interested I made a config app for 1.1.

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

EDIT: 2.1 has been released for this script, however, the config app has not been updated. it won't be til summer.

MajorDerp

First off: Awesome script! Working with it for some time now...

I did encounter an error:
At the moment where the script in the script call, doesn't fit in the box (making a 2nd line)
Like this:

$game_party.quests[20].complete_objective
(0)


It doesn't recognize the (0) as being an argument, generating an error...

Basically this means you can't complete objective of quests with an index of 10+ :(

Thanx in advance!

modern algebra

Sorry for not responding earlier, but I haven't been around. Anyway, the problem can be fixed by doing something like this:


q = $game_party.quests[20]
q.complete_objective(0)


Hopefully that helps.