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.

hexgame

Quote from: Helladen on May 15, 2011, 01:14:15 PM
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.

I don't have that problem at all. Are you using a different font or font size?

Jensen

#426
Yo, Modern, I´m here to annoy some more.

Quote from: Helladen on May 15, 2011, 12:41:05 PM
Looks nice - the shop part of the quest system's borders are very thin around the text, but the rest looks perfect.

Happens in the regular quest scene aswell, not just in the shop:



=======================================================================

I´m using give_quest_reward (quest_id) to hand out quest rewards
for the player. All my quests reward honor. The thing is, I´m using a
system of common events to notify the player when he levels up or
learn new skills.

I don´t want the script to give a level up message. When you give
the player experience via eventing you can choose not to show level
up message, but I didn´t find that option in the script.

Is there a way to turn off that message?

===========================EDIT========================================

Just a small request:

Would love it if you could - instead of icons - show quest levels in text
form.
Like: Lvl 1, Lvl 2, Lvl 3... and so on.
Maybe the text could be customizable?

modern algebra

1.
Since the paragraph formatter relies on the text_size method of Bitmap, it sometimes runs into trouble with some fonts, or more regularly, non-English characters like the ones you have in your example. Though, in that case, it might be a problem with the script itself since it should have been cut off if that were the problem, not overlap the border. I will look into it.

2.
For using text for the level, all you need to do is set the icon for level to 0. That will just show the number though, ie. "X" not "Level X". If you wanted to add some text to it, find these lines in the script:


    else
      set_font (1)
      self.contents.draw_text (0, y, contents.width, WLH, @quest.level.to_s, 2)
    end


Change the self.contents.draw_text line to:

      self.contents.draw_text (0, y, contents.width, WLH, "Lvl #{@quest.level}", 2)


(You could replace Lvl with whatever you want that text to be.

3.
For the give_quest_reward, find these lines in the script:


      when 4 # Experience
        @params = [0, 0, 0, reward[1], true]
        command_315


Change the @params line to:


        @params = [0, 0, 0, reward[1], false]


Jensen

1. No sweat. It´s not a big deal.

2. Tried it. Works

3. Tried it. Works.

Thank you!

Japur

I can't believe how briliant this script is. It seems like you said to yourself: okay, this one is going to be BIG. And it is. There's so much effort in this script and it really shows. I love it and I'm using it in a little game I'm making, and I have to say: this script almost defines the game. It wouldn't contain the fewest bit of awesomeness without this script.

Very, very well done.
  - 

modern algebra

#430
I am glad you like it!

I guess the script did get a bit bulky, but I had seen the previous version in quite a few games and it always looked the exact same, so I figured I should redo it and give the user options to customize it and really make it their own.

Anyway, thanks for the kind words! It means a lot coming from a game designer with your skill (dying for a demo of Nora's Dragon Stories, btw)

Pinky

Hi, is there away to use this without the paragraph formatter? I am using the Neo Message Script by wortana.

modern algebra

No, there isn't. But the paragraph formatter shouldn't interfere with NMS - it shouldn't interact with it at all I don't think.

Pinky

Okay I guess I need to test it to be sure.

kawagiri

i'm no real scripter, but can this script omit any quests belonging to a custom catagory from all, active and complete, i wanted a challenges category seperate from standard quests.

The Frontera

I Have a problem with the script.
I use Neo Save System V and since I added Quest Journal v2.1a and the new Paraghraph Formatter every time I try to open the save scene I get this error:

Script 'Neo Save System V' line 504: ArgumentError occurred.
undefined class/module Pharagrapher::Formatter_2

When I used the old Quest Journal v1.1 and the old paragraph formatter it worked, but now it doesn't.
Can someone help me ?
I really need theese two scripts !
Visit my official website for resources, games, and informations.
Download for free my (great) videogames and resources.
Link:
http://thefrontera.knossus.net

Watch also my great videos !
Link: Awesome videos here

The VX Project I'm working on: (Click to see the Description)


ALL MY AWESOME COMPLETED GAMES [OPEN THE SPOILER!!!]
[spoiler]
My Completed VX Games:
The Frontera Legends (Click to Download)


My Completed XP Games:
The Frontera 2 (Click to Download)


The Frontera 1
Unfortunatly I can't have more than three pictures in my signature...
However, download it HERE (without the cool image)
[/spoiler]

modern algebra

#436
@kawagiri - no, I'm afraid not. I can write an addon for that though, but give me some time.

@Frontera - I don't know why anything requires it, but the Formatter_2 is one of the additional paragrapher classes and is located under that heading in the Paragraph Formatter topic. So you can just copy this into its own slot below the other Formatter slots:


#==============================================================================
# ** Paragrapher::Formatter 2 (Using Zeriab's Algorithm)
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  This algorithm was written by Zeriab for fonts which have characters of
# the same width. This is like Courier New, UMEGothic and fonts of that sort.
# This algorithm attaches a cost to each line based on the amount of white
# space at the end of that line. It will display the way of writing the text
# with the lowest total cost. In prcatice, this will mean that it will, as
# much as possible, reduce the spacing between letters in a line and make
# the spacing more consistent for each line of the paragraph
#==============================================================================

module Paragrapher
  class Formatter_2
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Format
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def format (string, specifications)
      f = Formatted_Text.new
      f.lines, f.blank_width, word_lengths, words = [], [], [], []
      tracker = 0
      for i in 0...string.size
        if string[i,1] == " " || i == string.size - 1
          if i == string.size - 1
            i += 1
          end
          word_lengths.push (i - tracker)
          words.push (string[tracker, i - tracker])
          tracker = i + 1
        end
      end
      if specifications.class == Bitmap
        max_width = specifications.width
        f.bitmap = specifications
      elsif specifications.class == Fixnum || specifications.class == Float
        max_width = specifications
        f.bitmap = Bitmap.new (1,1)
      else
        # Error Catching: Bad specification
        bitmap = Bitmap.new (200, 64)
        f = format ('Specifications Error', bitmap)
        p 'Specifications Error: Please Pass Fixnum, Float or Bitmap'
        return f
      end
      tw = f.bitmap.text_size('a').width
      max_width = [max_width / tw, 180].min
      # Error Catching: Word too long
      if word_lengths.max > max_width
        f = format ('Too long' , specifications)
        p 'One or more words is too long for specified width'
        return f
      end
      position = line_break (word_lengths, max_width)
      lines = give_lines (position, position.size - 1, words)
      max_width *= tw
      for i in 0...lines.size
        line = lines[i]
        f.lines.push (line.scan (/./))
        if i == lines.size - 1
          f.blank_width.push (0)
        else
          text_width = line.size * tw
          extra_space = max_width - text_width
          f.blank_width.push (extra_space.to_f / (line.size.to_f - 1.0))
        end
      end
      if f.bitmap != specifications
        f.bitmap = Bitmap.new (max_width, f.lines.size*32)
      end
      return f
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Line Break (written by Zeriab)
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def line_break(word_lengths, max_length)
    return false  if max_length > 180
    word_lengths.unshift(nil)
    extra_spaces = Table.new(word_lengths.size,word_lengths.size)
    line_prices = Table.new(word_lengths.size,word_lengths.size)
    word_price = []
    position = []
    inf = max_length*max_length + 1
    for i in 1...word_lengths.size
      extra_spaces[i,i] = max_length - word_lengths[i]
      for j in (i+1)..[word_lengths.size-1, max_length/2+i+1].min
      extra_spaces[i,j] = extra_spaces[i,j-1] - word_lengths[j]-1
      end
    end
    for i in 1...word_lengths.size
      for j in i..[word_lengths.size-1, max_length/2+i+1].min
      if extra_spaces[i,j] < 0
        line_prices[i,j] = inf
      elsif j == word_lengths.size-1 and extra_spaces[i,j] >= 0
        line_prices[i,j] = 0
      else
        line_prices[i,j] = extra_spaces[i,j]*extra_spaces[i,j]
      end
        end
    end
    word_price[0] = 0
    for j in 1...word_lengths.size
      word_price[j] = inf
      for ik in 1..j
      i = j - ik + 1
      break  if line_prices[i,j] == inf
      if word_price[i-1] + line_prices[i,j] < word_price[j]
        word_price[j] = word_price[i-1] + line_prices[i,j]
        position[j] = i
      end
      end
    end
    return position
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Give_Lines (written by Zeriab)
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def give_lines(position,last_index,words)
    first_index = position[last_index]
    word_array = []
    if first_index != 1
      word_array = give_lines(position, first_index - 1,words)
    end
    str = ""
    for x in first_index..last_index
      str += ' '  if x != first_index
      str += words[x-1]
    end
    word_array << str
    return word_array
    end
  end
end


I'm still curious though, as to why it is calling the Formatter_2 at all. Have you removed the old Quest Journal 1.1?

kawagiri

Thanks i really appreciate it :)

i didn't want challenges cluttering up the main quest line when challenges are going to be large lists of challenging tasks and puzzles to complete for extra items with specific benefits ^^

(you can't "fail" them, but you may see the tasks too difficult and decide to move on, with different tiers of challenges for each area/continent and different tiers of challenges to complete it would get cluttered quite quick... e.g. "area a - easy challenges", "area a - medium challenges", "area a - hard challenges", "area a - extreme challenges", "area b - easy challenges" etc. etc. etc.  :lol: )

The Frontera

#438
Ok, now with the "Pharagrapher::Formatter_2" I can open the save scene, but when I scroll down to save slot 4, exactly when the cursor reaches this save slot,  I get this error:

Script 'Neo Save System V' line 510: ArgumentError occurred.
undefined class/module ModAlg_QuestData::

The strange thing is that this error cames up only on save slot 4, all others (1,2,3,5,6,7,8...) work fine.
Can you help me and fix it ?
ah, yes, I removed the Quest Journal v1.1
Visit my official website for resources, games, and informations.
Download for free my (great) videogames and resources.
Link:
http://thefrontera.knossus.net

Watch also my great videos !
Link: Awesome videos here

The VX Project I'm working on: (Click to see the Description)


ALL MY AWESOME COMPLETED GAMES [OPEN THE SPOILER!!!]
[spoiler]
My Completed VX Games:
The Frontera Legends (Click to Download)


My Completed XP Games:
The Frontera 2 (Click to Download)


The Frontera 1
Unfortunatly I can't have more than three pictures in my signature...
However, download it HERE (without the cool image)
[/spoiler]

modern algebra

OK... well there is no ModAlg_QuestData in this script - the module's name is simply QuestData. So I have to guess that maybe the Neo-Save System V that you're using has some kind of patch designed for the Quest Journal 1.1 and that is what is causing the problems. To fix it, I will need to see the save script you're using, since my script isn't the source of the error.

The Frontera

#440
Problem solved !
I think it was caused by a corrupted savefile, because I deleted all of them and now it works without any problems
I took the Neo Save System V script I'm using from the topic on this website, so you probably have the same I have, and I haven't got any patches, so that ModAlg_QuestData error is really strange...
However, now everything is ok !
Thanks a lot modern algebra !
You are always the best !
This script is Awesome !
Continue creating such great scripts !

Visit my official website for resources, games, and informations.
Download for free my (great) videogames and resources.
Link:
http://thefrontera.knossus.net

Watch also my great videos !
Link: Awesome videos here

The VX Project I'm working on: (Click to see the Description)


ALL MY AWESOME COMPLETED GAMES [OPEN THE SPOILER!!!]
[spoiler]
My Completed VX Games:
The Frontera Legends (Click to Download)


My Completed XP Games:
The Frontera 2 (Click to Download)


The Frontera 1
Unfortunatly I can't have more than three pictures in my signature...
However, download it HERE (without the cool image)
[/spoiler]

Adrien

Hey, I was wondering how you would do:

if monster id of 4 was encountered in a random battle  set quest id of 2 to complete. is that possible with this script?

pacdiggity

Have a battle event do that. Have an event set to the battle span and trigger on the earliest possible opportunity. Make it set the id to complete.
it's like a metaphor or something i don't know

Adrien

this quest complete can only trigger once even if you manage to kill the same monster id again in a random battle. Could you please provide a sample of how to do this?

pacdiggity

In the battle event, have a variable raised whenever you kill the monster or just encounter it. Have the event check if that variable is the number of monsters killed you desire, then if it is set the quest to complete.
it's like a metaphor or something i don't know

Adrien

that sounds like it would happen every time i killed that creature - like If i encounter monster id 4 slaughter it then AFTER the battle - quest complete. every time i encounter monster id 4 the quest will complete...I dont follow could you post a screen shotted example please?

Redpants

Hello i really need help with this. Basically I've  copied the quest journal script bellow materials and above main, and i don't know what else to put there is another script, but i don't know what it is. So i downloaded the demo and copied the scripts out of that and a load of errors come up so i don't know what to do. I really badly want to use this rpg maker vx program to make a good rpg, but in struggling at the moment. Can someone please post what the second script is i need and any other tips i need.

modern algebra

Umm, well it's the Paragraph Formatter, but if you copied all the scripts from the demo than you should have it.

The "load of errors" is not very specific. It might be that you have more than one copy of the same script (if you copied out of the demo without first deleting the ones you had already gotten.

It might also be incompatibility with some other script that you have.

Does the demo work for you?

Redpants

#448
dont worry i have it and will try and paste it in under materials and above main and let you know if it works


Redpants

OK now i get this error

????????NoMethodError???????????
undefined method 'reveal_quest' for # <Game_Interpreter:0x37e8d38>

I have wrote "reveal_quest (1)"   And the "1" being the id of a quest i wrote.

Don't know what the problem is?