Main Menu
  • Welcome to The RPG Maker Resource Kit.

Quest Journal v. 2.1

Started by modern algebra, March 25, 2008, 08:05:14 PM

0 Members and 3 Guests are viewing this topic.

Mitsarugi

Quote from: LoganForrests on May 07, 2011, 01:05:01 PM
I wrote up such an add-on for the previous version, though unreleased anywhere as it is unfinished. It added a few features:

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

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

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

Some screenshots of said extras:
[spoiler]

First page: client details and quest summary


Second page: quest objectives


Third page: For the rewards, the icons mean (in order): exp, money, items.
[/spoiler]

Also happy to make it any specific requirements too.



O.O that is exactly what i ment

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

could you share your add-on plz?

modern algebra

Well a couple of those features were added in 2.0. Categories are customizable, you can specify rewards to show, and you can call a scene to purchase quests with the call_quest_shop feature (you could even not show a price by making the cost -1 if you wanted it to just be a select feature, rather than costing money - I think that would give you the gold for getting it though).

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

Anyway, it certainly wouldn't be hard to add a client/location or level feature either if you want them Mitsarugi. Where in the info window would you want it to show up? Would you want them to be together on the same line or one above the other?

LoganF

Well, I'd probably restart from an original version of 1.1 since, as I noted before, I kinda butchered the version I have what with the Quest Journal being by first dive into RGSS2 (though I'll probably still do a v2 add-on first).

I'll keep a post updated with progress though, for feedback sake.
(Why do I always feel like it's the end of the world and I'm the last man standing?)

Mitsarugi

Quote from: LoganForrests on May 08, 2011, 12:08:24 AM
Well, I'd probably restart from an original version of 1.1 since, as I noted before, I kinda butchered the version I have what with the Quest Journal being by first dive into RGSS2 (though I'll probably still do a v2 add-on first).

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

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

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


example Quest board:

                                    QUEST TITLE
                                                     Difficulty/Level:****
Quest fee:..............Client:..............
........................................................(IMAGE)
Reward:.................Location:...........
...................................................
Quest Description:
................................................
................................................
................................................
................................................
Goal:
1........................................................
2........................................................
etc...
Accept ?
Yes.........No

lauronpegason

#404
I've been waiting a long time for this!!! I'm so happy the new version is finally out! I like it even more than the previous one!
Unfortunately I have to report a compatibility issue with Dargor's Custom Commands... Quest Journal v. 1.1 caused the same bug before you solved it. You know I'm really bad at scripting, so I'll need your skills once more to fix this. If you can't remember, the thing is that whenever you opened the menu or went back to it, for some reason the label for Quests kept multiplying - which is kind of spooky :) Thanks very much in advance! Here's the Script that causes the incompatibility.
Current Project:


modern algebra

#405
Well, you could always just turn MENU_ACCESS off and add it manually to Dargor's Custom Commands.

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

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

@Mitsarugi -

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

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

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

Mitsarugi

Quote from: modern algebra on May 08, 2011, 03:44:32 PM
Well, you could always just turn MENU_ACCESS off and add it manually to Dargor's Custom Commands.

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

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

@Mitsarugi -

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

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

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

thank you Modern Algebra ^^

Jensen

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

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

Quote from: modern algebra on May 05, 2011, 10:42:18 PM2. To be compatible with Main Menu Melody, it needs to be underneath Main Menu Melody in the order.

Roger. I works now.

lauronpegason

#408
While I wasn't able to resolve that compatibility issue by myself so far, I encountered a much smaller problem. I don't know if anybody else encountered this, but here's what I did.

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

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

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

EDIT: Mh, I guess I was doing it wrong: it works fine even omitting the "prime [0, 1, 2...]" completely. I thought that leaving it blank would be the same as omitting it, silly me :P So, in order to make it that all objectives need to be satisfied I have to rather omit the "prime [ ]" completely or to specify which objectives are to be met. Got it now :)
Current Project:


modern algebra

#409
Yeah, sorry for not making that clear. I guess that is a change from 1.1.

Anyway, I have now released 2.1. You can get it at Pastebin or from the demo.

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

An ugly screenshot to show it:



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

hexgame

#410
Nice, a new version! I love this script :)


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


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

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



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


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

undefined method 'cost' for nil:NilClass




Also, how would I go about adding little quest icons, such as "!"s and "?"s like in world of warcraft?

lauronpegason

OK, if I'm not mistaken... instead of "give_reward (5)" it ought to be either "change_reward_status (5)" or "change_reward_status (5, true)", I think Modern Algebra just forgot to update that command between the various Demo releases. There's no such command as "give_reward (quest_ID)" anymore.

About the little quest icons, like in WoW, the Quest Journal only provides a graphic interface to keep track of quests. The feature you refer to has to be achieved through single Events (Quest-givers). You can use Modern Algebra's Character Hover Graphics.
Current Project:


hexgame

#412
Yup, that was the error, I already figured it out and came here to edit my post and tell him about it. But you beat me to it.

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


One more thing. Is it possible to have the quest price in the shop show the text "Free" when the price is set to 0?

modern algebra

#413
Sorry about that, the command was supposed to be give_quest_reward, not give_reward. It was a new feature added in 2.1 which automatically distributes the specified awards. I'm not sure how useful it is though - it is generally better, in my opinion, to just do everything by events and only update quest progress as a supplementary thing.

Anyway, I have fixed both the demo error and the script error and uploaded Version 2.1a

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


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


Change it to:


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

Mitsarugi

Quote from: modern algebra on May 09, 2011, 05:36:57 PM
Yeah, sorry for not making that clear. I guess that is a change from 1.1.

Anyway, I have now released 2.1. You can get it at Pastebin or from the demo.

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

An ugly screenshot to show it:



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


WOW O.O thats pretty ,thanks a lot Modern Algebra
Love your scripting talents ^^

hexgame

Thanks MA, you've been very helpful. I have one more question though. You stated we are now able to  reorder the quest tabs. Where exactly is this located? I want to move the "all quests" tab to the last spot.

modern algebra

It's the very first option at line 255. You'd change:


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


to:


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


(assuming you aren't using custom categories of course). But the order you put them in that array determines the order they show up in the journal. You can also remove categories altogether if you so desire.

hexgame

Such a small line, no wonder I didn't see it. Thanks again :)

Lunarea

I have a question about using the new quest journal with your scene tutorial. I would have posted in the scene tutorial thread, but I wasn't sure if it was okay to bump it since it's a few pages back now and I was the last to post in it.

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


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

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

I appreciate any help  :D
My current project:

modern algebra

Err, try changing it to:


class Scene_Quest
  def refresh
    index = @list_window.index
    @list_window.change_list (QuestData::CATEGORIES[@category_index])
    @list_window.index = index
    @info_window.refresh (@list_window.quest)
  end
end

Lunarea

It worked like a charm!

Thank you  ;D
My current project:

modern algebra

No problem! It's always nice to see my scripts used by really talented game designers like you and derkunstler :)

Helladen

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

modern algebra

I don't really know what it means for the border to be thin, but if you mean the text doesn't fit, then you can always adjust the value of PURCHASE_LIST_WIDTH at line 362 to make it bigger or smaller.

Helladen

Yeah that will work. At its current state the borders around the text are too close together, meaning it looks like some of the text is on top of the outer border if that makes sense.