Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - firevenge007

1
So with winter break here, I decided I wanted to spend a little more time further developing my game. But recently, when I try to kill a monster successfully, and after pressing enter once the loot screen appears, I get an error:
Script 'LevelNotifier' line 307: NoMethodError occured.
undefined method 'size' for nil:NilClass


It redirects me to the script I've used which is "Easy LvlUp Notifier by Blizzard". The script can be found here: http://downloads.chaos-project.com/scripts/Easy%20LvlUp%20Notifier.txt.

The line it points to is:
    if @skill_texts.size > 0

I'm not very familiar with ruby, but after looking through the code, the only other instance I see of texts is on line 274 through 284:
def start_phase5
    start_phase5_lvlup_later
    @skill_texts = []
    $game_party.actors.each {|actor|
        actor.remove_states_battle
        if @lvlup_data[actor][0, 7] != [actor.level, actor.maxhp, actor.maxsp,
            actor.str, actor.dex, actor.agi, actor.int]
          @pending_windows.push(Window_LevelUp.new(actor, @lvlup_data[actor]))
          @skill_texts.push('')
          new_skills = actor.skills - @lvlup_data[actor][8]
          if new_skills.size > 0
            new_skills.each {|id|
                @skill_texts.push("#{actor.name} learned #{$data_skills[id].name}!")}
          end
        elsif @lvlup_data[actor][7] != actor.exp && !NO_EXP_DISPLAY
          @moving_windows.push(Window_LevelUp.new(actor, @lvlup_data[actor]))
        end}
  end


I'd really appreciate if anyone had the time to tell me what the problem is exactly. I'm thinking that it has to do with other scripts interfering, but even if I place the class higher up in the list of classes, nothing seems to change.

Thanks for your time.
2
Script Requests / Key binds for items/spells?
August 31, 2014, 06:16:28 pm
I'm using RpgMaker XP to make my game.

Since there are a lot of items in my game, many say that it becomes tedious to scroll to the bottom of the list every time, which is why I am looking for help. I was wondering if there would be a way to make it so that a player could bind certain keys (that are not in use) to specific items or spells?

This would mean that when pressing a key, the item would automatically be selected without having to go through the menu, and through the items list. The ideal situation would be to have four white boxes drawn with transparent filling at the top right corner of the screen. Two for item binding and two for spell binding. When the item/spell is correctly bound to a key, one of the boxes will inherit the item or spell's icon graphic and the key used to bind that item/spell would be shown in the bottom right hand corner of the box.

I'd be very grateful if anyone were to help me with this. Thank you for your time.
3
Troubleshooting / Help / Psikey.dll missing?
May 12, 2014, 01:36:46 pm
So I was keylogged not too long ago by an old "friend", and I have recently gotten rid of the malicious data on my computer - but when I go to open my game project now, it tells me that psikey.dll is missing. I have looked all over and it seems like there are no similar cases.

What do you think I should do in this situation?
4
Script Requests / Database and Prices
November 24, 2013, 12:49:18 pm
Hey!

So for a while now, I haven't been using shops to put good items for sale anymore, because in the database, it caps at 99,999 coins.
If you scroll with a mouse, you can bypass this by simpling scrolling up to the desired number you want, but it takes a long time to get to even 200,000 coins.

Is there any way where I could input the id of an item, weapon, or armor along with the pricetag next to it, so that in the shop it sells for a much higher price?

Thank you.
5
Script Requests / Editing Quest Log
November 20, 2013, 03:36:28 pm
Using game_guy's code from his Quest Logger, I was wondering if it was possible to have the color of the name of the quest in the quest list to be colored based on completion.

#===============================================================================
# Quest Log System
# Author game_guy
# Version 3.0
#-------------------------------------------------------------------------------
# Intro:
# A script that keeps track of quests you obtain and complete.
#
# Features:
# Marks quest names with a yellow color if they're completed
# Easy to setup one quest
# Be able to use a fairly long description
# Be able to display a picture
# Easy to add and complete a quest
# More compatible than earlier versions
#
# Instructions:
# Scroll down a bit until you see # Being Config. Follow the instructions there.
# Scroll below that and you'll see Begin Quest Setup. Follow the steps there.
#
# Script Calls:
# Quest.add(id) ~ Adds the quest(id) to the parties quests.
# Quest.take(id) ~ Takes the quest(id) from the party.
# Quest.complete(id) ~ Makes the quest(id) completed.
# Quest.completed?(id) ~ Returns true if the quest(id) is completed.
# Quest.has?(id) ~ Returns true if the party has quest(id).
#
# Credits:
# game_guy ~ for making it
# Beta Testers ~ Sally and Landith
# Blizzard ~ Small piece of code I borrowed from his bestiary
#===============================================================================
module GameGuy
 #==================================================
 # Begin Config
 # UsePicture ~ true means it'll show pictures in
 #              the quests, false it wont.
 #==================================================
 UsePicture   = false
 
 def self.qreward(id)
   case id
   #==================================================
   # Quest Reward
   # Use when x then return "Reward"
   # x = id, Reward = reward in quotes
   #==================================================
   when 1 then return "100 Gold"
   when 2 then return "3 Potions"
   when 3 then return "Strength Ring"
   end
   return "????"
 end
 
 def self.qpicture(id)
   case id
   #==================================================
   # Quest Picture
   # Use when x then return "picture"
   # x = id, picture = picutre name in quotes
   #==================================================
   when 1 then return "ghost"
   end
   return nil
 end
 
 def self.qname(id)
   case id
   #==================================================
   # Quest Name
   # Use when x then return "name"
   # x = id, name = quest name in quotes
   #==================================================
   when 1 then return "Bob's Chicken"
   when 2 then return "Lost My Weapon"
   when 3 then return "Finding The Letter"
   when 4 then return "Do You Believe in Magic"
   when 5 then return "Quest For A Bowl"
   when 6 then return "Quest For Quest"
   when 7 then return "Rat Catcher"
   when 8 then return "Baby Trouble"
   when 9 then return "Monster Mother"
   when 10 then return "Purity of Water"
   when 11 then return "Sailor's Quest"
   when 12 then return "Dangerous Passage"
   when 13 then return "The Search For Hidden Treasure"
   when 14 then return "Pricilla's Possession"
   when 15 then return "Agilequest"
   when 16 then return "Quest of the Musaph"
   when 17 then return "The Urothmyte Trials"
   when 18 then return "Bar Fight!"
   when 19 then return "Abandoned Village"
   when 20 then return "Milk Quest Part 1"
   when 21 then return "Milk Quest Part 2"
   when 22 then return "Milk Quest Part 3"
   when 23 then return "Herbalist Dungeon"
   when 24 then return "Expidition To The Danger Zone"
   when 25 then return "Angel Flight"
   when 26 then return "Combat Guild"
   when 27 then return "Leothon's Mini-Quest"
   when 28 then return "Warped Diamond"
   when 29 then return "Fortune"
   when 30 then return "The Mysterious Source"
   end
   return ""
 end
 
 def self.qlocation(id)
   case id
   #==================================================
   # Quest Location
   # Use when x then return "location"
   # x = id, location = location in quotes
   #==================================================
   when 1 then return "Tutorial"
   when 2 then return "Kirkwood Forest"
   when 3 then return "Ridgeville Woods"
   when 4 then return "Ridgeville Woods"
   when 5 then return "Creekside"
   when 6 then return "Emporia"
   when 7 then return "Emporia Harbor"
   when 8 then return "East Lakiki Island"
   when 9 then return "East Lakiki Island"
   when 10 then return "East Lakiki Island"
   when 11 then return "East Lakiki Island"
   when 12 then return "Lakiki Desert Dungeon"
   when 13 then return "Saharan Village"
   when 14 then return "Saharan Village"
   when 15 then return "Swampy Marshes"
   when 16 then return "Swamp"
   when 17 then return "Ruins of Urothmus"
   when 18 then return "Quanzfalls Tavern"
   when 19 then return "Abandoned Village"
   when 20 then return "Peaceful Wood"
   when 21 then return "Jungle Crossover"
   when 22 then return "Jungle Village"
   when 23 then return "Herbalist's Realm"
   when 24 then return "Paladin City"
   when 25 then return "West Lakiki Island"
   when 26 then return "Fairie's Woods"
   when 27 then return "Combat Guild"
   when 28 then return "Combat Guild"
   when 29 then return "Poisonous Woods Tree Hollow"
   when 30 then return "Legends Area"
   end
   return "????"
 end
 
 def self.qdescription(id)
   case id
   #==================================================
   # Quest Description
   # Use when x then return "description"
   # x = id, description = quest description in quotes
   #==================================================
   when 1 then return "Kill a chicken and bring back a feather to Farmer Bob."
   when 2 then return "Give the wounded adventurer his weapon back by defeating the monster who took it."
   when 3 then return "Go find a letter that this man lost and give it back to him."
   when 4 then return "Bring the sick girl a magic potion to heal her."
   when 5 then return "Get the man a bowl by following these steps. \n\ Go North to Emporia. Go to the shop that sells blowing pipes and molten glass. Make him a bowl out of the glass."
   when 6 then return "Solve the puzzle that the woman gives you. Turn the right switches to unlock the barrier to the treasure!"
   when 7 then return "Get the sailor his rat that he lost somewhere in Kirkwood forest."
   when 8 then return "Get the woman her baby. \n\ She lost it somewhere on Lakiki Island."
   when 9 then return "Slay the beast within the woman to rid her of her angry spirit."
   when 10 then return "Bring Acquatica back a bottle of pure water by killing water salamanders."
   when 11 then return "Go on an adventure with the little sailor boy to unexplored lands."
   when 12 then return "Try to find your way through the Desert tunnels. /n/ Watch out for boulders!"
   end
   return ""
 end
 
end

module Quest
 
 def self.add(id)
   $game_party.add_quest(id)
 end
 
 def self.take(id)
   $game_party.take_quest(id)
 end
 
 def self.complete(id)
   $game_party.complete(id)
 end
 
 def self.completed?(id)
   return $game_party.completed?(id)
 end
 
 def self.has?(id)
   return $game_party.has_quest?(id)
 end
 
end
 
class Game_Party
 
 attr_accessor :quests
 attr_accessor :completed
 
 alias gg_quests_lat initialize
 def initialize
   @quests = []
   @completed = []
   gg_quests_lat
 end
 
 def add_quest(id)
   unless @quests.include?(id)
     @quests.push(id)
   end
 end
 
 def completed?(id)
   return @completed.include?(id)
 end
 
 def complete(id)
   unless @completed.include?(id)
     if @quests.include?(id)
       @completed.push(id)
     end
   end
 end
 
 def has_quest?(id)
   return @quests.include?(id)
 end
 
 def take_quest(id)
   @quests.delete(id)
   @completed.delete(id)
 end
 
end
class Scene_Quest
 def main
   @quests = []
   for i in $game_party.quests
     @quests.push(GameGuy.qname(i))
   end
   @map = Spriteset_Map.new
   @quests2 = []
   for i in $game_party.quests
     @quests2.push(i)
   end
   @quests.push("No Quests") if @quests.size < 1
   @quests_window = Window_Command.new(160, @quests)
   @quests_window.height = 480
   @quests_window.back_opacity = 110
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   @quests_window.dispose
   @quest_info.dispose if @quest_info != nil
   @map.dispose
 end
 def update
   @quests_window.update
   if @quests_window.active
     update_quests
     return
   end
   if @quest_info != nil
     update_info
     return
   end
 end
 def update_quests
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Menu.new
     return
   end
   if Input.trigger?(Input::C)
     $game_system.se_play($data_system.decision_se)
     @quest_info = Window_QuestInfo.new(@quests2[@quests_window.index])
     @quest_info.back_opacity = 110
     @quests_window.active = false
     return
   end
 end
 def update_info
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @quests_window.active = true
     @quest_info.dispose
     @quest_info = nil
     return
   end
 end
end
class Window_QuestInfo < Window_Base
 def initialize(quest)
   super(160, 0, 480, 480)
   self.contents = Bitmap.new(width - 32, height - 32)
   @quest = quest
   refresh
 end
 def refresh
   self.contents.clear
   if GameGuy::UsePicture
     pic = GameGuy.qpicture(@quest)
     bitmap = RPG::Cache.picture(GameGuy.qpicture(@quest)) if pic != nil
     rect = Rect.new(0, 0, bitmap.width, bitmap.height) if pic != nil
     self.contents.blt(480-bitmap.width-32, 0, bitmap, rect) if pic != nil
   end
   self.contents.font.color = system_color
   self.contents.draw_text(0, 0, 480, 32, "Quest:")
   self.contents.font.color = normal_color
   self.contents.draw_text(0, 32, 480, 32, GameGuy.qname(@quest))
   self.contents.font.color = system_color
   self.contents.draw_text(0, 64, 480, 32, "Reward:")
   self.contents.font.color = normal_color
   self.contents.draw_text(0, 96, 480, 32, GameGuy.qreward(@quest))
   self.contents.font.color = system_color
   self.contents.draw_text(0, 128, 480, 32, "Location:")
   self.contents.font.color = normal_color
   self.contents.draw_text(0, 160, 480, 32, GameGuy.qlocation(@quest))
   self.contents.font.color = system_color
   self.contents.draw_text(0, 192, 480, 32, "Completion:")
   self.contents.font.color = normal_color
   if $game_party.completed.include?(@quest)
     self.contents.font.color = crisis_color
     self.contents.draw_text(0, 224, 480, 32, "Completed")
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(0, 224, 480, 32, "Not Started")
   end
   self.contents.font.color = system_color
   self.contents.draw_text(0, 256, 480, 32, "Description:")
   self.contents.font.color = normal_color
   text = self.contents.slice_text(GameGuy.qdescription(@quest), 480)
   text.each_index {|i|
       self.contents.draw_text(0, 288 + i*32, 480, 32, text[i])}
 end
end
class Bitmap
 
 def slice_text(text, width)
   words = text.split(' ')
   return words if words.size == 1
   result, current_text = [], words.shift
   words.each_index {|i|
       if self.text_size("#{current_text} #{words[i]}").width > width
         result.push(current_text)
         current_text = words[i]
       else
         current_text = "#{current_text} #{words[i]}"
       end
       result.push(current_text) if i >= words.size - 1}
   return result
 end
 
end
class Scene_Load < Scene_File

 alias load_party_variables on_decision
 def on_decision(filename)
   load_party_variables(filename)
   # Initializes quest variables to empty arrays UNLESS they are not nil to begin with
   $game_party.quests ||= []
   $game_party.completed ||= []
 end

end


Not started would be colored red, In progression would be colored yellow, and Completed would be colored green.

When the Quest would be marked red, it would not show what the description of the quest is until a seperate command is called, "Quest.progress(id)", which would put the quest into progression and color the name yellow, as well as showing the description.

The reason I want to try this out is so that players see the whole quest list and can decide if they could start the quest or not. They can keep track of which quests they have done from the color of the names in the quest list as well.

Any help would be fantastic!

Thank you for your time.
6
Event Systems / Assigned Monster Task
November 19, 2013, 06:48:19 pm
So this is something I made for my game that included going to a mentor who would assign you tasks and would have you complete them in order to gain experience.

Spoiler: ShowHide


This image is the first page of the mentor. It is simple and includes basic speech. The "\N[1]" you see in front of the player's sentences is meant to display the name of the actor used from the database. I was using the first actor, so I put a 1 in the brackets. If you were to use the 3rd actor in your database, you would use "\N[3]".

Near the bottom, you can see that the player obtains a "rogue book". This book is meant to keep track of what task the player has (including the required amount of kills of the certain monster is necessary to complete the task), and how many points the player has from completing tasks.

The Rogue book will be shown shortly.


Spoiler: ShowHide


This is the mentor's second page. It is notably longer than the first.

As you can see, once you talk to the mentor again, you have three options to choose from:

-Nevermind
-New task
-Spend points

Nevermind was made first in order to prevent players from accidentally asking for a new task.

Under the choice, new task, a conditional branch, [RogueHi] can be spotted. Because my game has multiple mentors varying by the player's level, this was put into place so that if a player already has a task asigned by another mentor, there could not be a possibility of receiving another task from another master.

Under the coniditonal branch [RogueHi], a Variable is called, with a 'random' number generated from 1 to 14.

Under this, there are 14 different conditional branches for [randomtask], only 3 of which can be seen due to the length of this page. But they are pretty much the same.

When variable [randomtask] falls on a number X, the conditional branch for the variable [randomtask] X will be selected.

Under this conditional branch, a certain switch will be turned on and a variable with a certain number will be declared respectively.

These switches, when activated, allow the player to be able to kill a monster in order to progress in his/her task.
The variable underneath, shows how many kills of that certain monster is needed to be able to finish the assigned task.

Spoiler: ShowHide


Now, we are on to the rewards portion.

The spending points section is the last of the three choices given to the player.

In my game, I gave the player the ability to choose his/her points to go either towards experience or money.

With no scripting knowledge, I used conditional branches to check if a certain player in my party had learned a spell.

R stands for Rogue, which is what I called this skill in my game.
In the database, for player 'Rogue', I assigned the skill 5R to be learned at level 5, 10R to be assigned at level 10, etc.

Based on these levels, the player is granted experience or money.
(Eg: Conditional Branch: [Rogue] is [50R] learned
@>Text: [You earn 700 Experience.]
@>Change EXP: [Rogue], +700)


Spoiler: ShowHide


Now, to introduce the rogue book.

The rogue book is quite simple, and like I said previously, it can either check your assigned task, or check how many points you have amassed through tasks.

When checking tasks, it is REQUIRED for a player to have already chosen a task. This is the reason for these conditional branches.

As I mentioned earlier, when the random variable falls on a number and chooses a task, that task's switch is turned on and a variable of X amount is set for that task.

If the random number landed on Warped Treasure, shown in the picture above, it would check that the switch warped treasure would be turned on. Once it has confirmed that the switch Warped Treasure is INDEED turned on, it will go to the text below.

Like "\N[X]", "\V[X]" is a shortcut to showing certain things in your text.

"\V[X]" shows the number for the variable X, based on the number in the database. So if you have just started a new game, and your first variable is 1, you would have to write "\V[1]" for it to show the remaining monsters left.

In-game, it would simply show as, "You have X Warped Treasures remaining."

Spoiler: ShowHide


The second choice in the rogue book is to check your points.

This follow the method above for checking the remaining amount of creatures you have left to kill, but instead, it counts how many points you have.

My variable for Points was set as 90. Yours may not be the same. Do not fear, just check what variable you set your points as in your database, or set it if you haven't.

Then once you figure it out, just write your sentence to display how many points the player has, without forgetting to include "\V[X]" where X represents the variable for your rogue points!

Spoiler: ShowHide


Now onto the actual monster!

This monster is a task assigned by the mentor in-game.

This monster WILL be able to be killed even though it may not be your task, but in this case, you will not be able to tick off some tasks to earn rogue points.

The conditional branch here for the Blue Dragon is ON, but ONLY if the player has this monster as his/her task. If the switch is turned on, it will go through another conditional branch.

This branch is a little different. It will check if the player has the variable for the Blue Dragon to be greater than 0. This is so if you check your rogue book, you will not receive negative numbers for your task.

(Eg: You have -3 Blue Dragons remaining.)

Also, it will remind you if you keep killing Blue Dragons once your task is done that you have actually completed your task and that you should go back to your mentor to receive your reward!

Spoiler: ShowHide


This is not needed, but I definitely recommend it.

This is a little respawn system I made so that a player would not be able to smash their keyboard trying to automatically get into combat again with the monster they just killed.
(If you were to permanently delete the monster after combat, this whole thing wouldn't work since if you ran out of monsters to kill, it would make completing tasks impossible!)

I put this page on a parallel process, and made the movement random and put the speed on fast and frequency on highest so that the monster would be able to re-appear in a different location when spawned again. When the switch A is finally turned off after 400 frames, which is 400/20 = 20 seconds, it will finally re-appear.

Spoiler: ShowHide


This is the last picture I have to show.

This is the mentor's final page. It rewards you based on what your rogue level is and includes many, many conditional branches.

I would say this is the largest page of them all, due to all the conditional branches piled up on top of each other.

But using the prior methods shown, you can easily whip up something like this, giving the player a reward.



Thank you for reading, I hope my 'little' guide helped!

Made by Firevenge007
7
Script Troubleshooting / QuestLog error
November 19, 2013, 03:43:51 pm

So i've been trying to use game_guy's Quest log, but I keep on coming up with an error. If anyone knows what's going on, I'm all ears!

#===============================================================================
# Quest Log System
# Author game_guy
# Version 3.0
#-------------------------------------------------------------------------------
# Intro:
# A script that keeps track of quests you obtain and complete.
#
# Features:
# Marks quest names with a yellow color if they're completed
# Easy to setup one quest
# Be able to use a fairly long description
# Be able to display a picture
# Easy to add and complete a quest
# More compatible than earlier versions
#
# Instructions:
# Scroll down a bit until you see # Being Config. Follow the instructions there.
# Scroll below that and you'll see Begin Quest Setup. Follow the steps there.
#
# Script Calls:
# Quest.add(id) ~ Adds the quest(id) to the parties quests.
# Quest.take(id) ~ Takes the quest(id) from the party.
# Quest.complete(id) ~ Makes the quest(id) completed.
# Quest.completed?(id) ~ Returns true if the quest(id) is completed.
# Quest.has?(id) ~ Returns true if the party has quest(id).
#
# Credits:
# game_guy ~ for making it
# Beta Testers ~ Sally and Landith
# Blizzard ~ Small piece of code I borrowed from his bestiary
#===============================================================================
module GameGuy
 #==================================================
 # Begin Config
 # UsePicture ~ true means it'll show pictures in
 #              the quests, false it wont.
 #==================================================
 UsePicture   = false
 
 def self.qreward(id)
   case id
   #==================================================
   # Quest Reward
   # Use when x then return "Reward"
   # x = id, Reward = reward in quotes
   #==================================================
   when 1 then return "100 Gold"
   when 2 then return "3 Potions"
   when 3 then return "Strength Ring"
   end
   return "????"
 end
 
 def self.qpicture(id)
   case id
   #==================================================
   # Quest Picture
   # Use when x then return "picture"
   # x = id, picture = picutre name in quotes
   #==================================================
   when 1 then return "ghost"
   end
   return nil
 end
 
 def self.qname(id)
   case id
   #==================================================
   # Quest Name
   # Use when x then return "name"
   # x = id, name = quest name in quotes
   #==================================================
   when 1 then return "Bob's Chicken"
   when 2 then return "Lost My Weapon"
   when 3 then return "Finding The Letter"
   when 4 then return "Do You Believe in Magic"
   when 5 then return "Quest For A Bowl"
   when 6 then return "Quest For Quest"
   when 7 then return "Rat Catcher"
   when 8 then return "Baby Trouble"
   when 9 then return "Monster Mother"
   when 10 then return "Purity of Water"
   when 11 then return "Sailor's Quest"
   when 12 then return "Dangerous Passage"
   when 13 then return "The Search For Hidden Treasure"
   when 14 then return "Pricilla's Possession"
   when 15 then return "Agilequest"
   when 16 then return "Quest of the Musaph"
   when 17 then return "The Urothmyte Trials"
   when 18 then return "Bar Fight!"
   when 19 then return "Abandoned Village"
   when 20 then return "Milk Quest Part 1"
   when 21 then return "Milk Quest Part 2"
   when 22 then return "Milk Quest Part 3"
   when 23 then return "Herbalist Dungeon"
   when 24 then return "Expidition To The Danger Zone"
   when 25 then return "Angel Flight"
   when 26 then return "Combat Guild"
   when 27 then return "Leothon's Mini-Quest"
   when 28 then return "Warped Diamond"
   when 29 then return "Fortune"
   when 30 then return "The Mysterious Source"
   end
   return ""
 end
 
 def self.qlocation(id)
   case id
   #==================================================
   # Quest Location
   # Use when x then return "location"
   # x = id, location = location in quotes
   #==================================================
   when 1 then return "Arton Woods"
   when 2 then return "Eeka"
   when 3 then return "Eeka"
   end
   return "????"
 end
 
 def self.qdescription(id)
   case id
   #==================================================
   # Quest Description
   # Use when x then return "description"
   # x = id, description = quest description in quotes
   #==================================================
   when 1 then return "Capture 10 animals and bring back the meat."
   when 2 then return "Bring gold to Jarns Defense to pay her tab."
   when 3 then return "Go get Kip a hunting knife from Eeka."
   end
   return ""
 end
 
end

module Quest
 
 def self.add(id)
   $game_party.add_quest(id)
 end
 
 def self.take(id)
   $game_party.take_quest(id)
 end
 
 def self.complete(id)
   $game_party.complete(id)
 end
 
 def self.completed?(id)
   return $game_party.completed?(id)
 end
 
 def self.has?(id)
   return $game_party.has_quest?(id)
 end
 
end
 
class Game_Party
 
 attr_accessor :quests
 attr_accessor :completed
 
 alias gg_quests_lat initialize
 def initialize
   @quests = []
   @completed = []
   gg_quests_lat
 end
 
 def add_quest(id)
   unless @quests.include?(id)
     @quests.push(id)
   end
 end
 
 def completed?(id)
   return @completed.include?(id)
 end
 
 def complete(id)
   unless @completed.include?(id)
     if @quests.include?(id)
       @completed.push(id)
     end
   end
 end
 
 def has_quest?(id)
   return @quests.include?(id)
 end
 
 def take_quest(id)
   @quests.delete(id)
   @completed.delete(id)
 end
 
end
class Scene_Quest
 def main
   @quests = []
   for i in $game_party.quests
     @quests.push(GameGuy.qname(i))
   end
   @map = Spriteset_Map.new
   @quests2 = []
   for i in $game_party.quests
     @quests2.push(i)
   end
   @quests.push("No Quests") if @quests.size < 1
   @quests_window = Window_Command.new(160, @quests)
   @quests_window.height = 480
   @quests_window.back_opacity = 110
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   @quests_window.dispose
   @quest_info.dispose if @quest_info != nil
   @map.dispose
 end
 def update
   @quests_window.update
   if @quests_window.active
     update_quests
     return
   end
   if @quest_info != nil
     update_info
     return
   end
 end
 def update_quests
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Menu.new
     return
   end
   if Input.trigger?(Input::C)
     $game_system.se_play($data_system.decision_se)
     @quest_info = Window_QuestInfo.new(@quests2[@quests_window.index])
     @quest_info.back_opacity = 110
     @quests_window.active = false
     return
   end
 end
 def update_info
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @quests_window.active = true
     @quest_info.dispose
     @quest_info = nil
     return
   end
 end
end
class Window_QuestInfo < Window_Base
 def initialize(quest)
   super(160, 0, 480, 480)
   self.contents = Bitmap.new(width - 32, height - 32)
   @quest = quest
   refresh
 end
 def refresh
   self.contents.clear
   if GameGuy::UsePicture
     pic = GameGuy.qpicture(@quest)
     bitmap = RPG::Cache.picture(GameGuy.qpicture(@quest)) if pic != nil
     rect = Rect.new(0, 0, bitmap.width, bitmap.height) if pic != nil
     self.contents.blt(480-bitmap.width-32, 0, bitmap, rect) if pic != nil
   end
   self.contents.font.color = system_color
   self.contents.draw_text(0, 0, 480, 32, "Quest:")
   self.contents.font.color = normal_color
   self.contents.draw_text(0, 32, 480, 32, GameGuy.qname(@quest))
   self.contents.font.color = system_color
   self.contents.draw_text(0, 64, 480, 32, "Reward:")
   self.contents.font.color = normal_color
   self.contents.draw_text(0, 96, 480, 32, GameGuy.qreward(@quest))
   self.contents.font.color = system_color
   self.contents.draw_text(0, 128, 480, 32, "Location:")
   self.contents.font.color = normal_color
   self.contents.draw_text(0, 160, 480, 32, GameGuy.qlocation(@quest))
   self.contents.font.color = system_color
   self.contents.draw_text(0, 192, 480, 32, "Completion:")
   self.contents.font.color = normal_color
   if $game_party.completed.include?(@quest)
     self.contents.font.color = crisis_color
     self.contents.draw_text(0, 224, 480, 32, "Completed")
   else
     self.contents.font.color = normal_color
     self.contents.draw_text(0, 224, 480, 32, "In Progress")
   end
   self.contents.font.color = system_color
   self.contents.draw_text(0, 256, 480, 32, "Description:")
   self.contents.font.color = normal_color
   text = self.contents.slice_text(GameGuy.qdescription(@quest), 480)
   text.each_index {|i|
       self.contents.draw_text(0, 288 + i*32, 480, 32, text[i])}
 end
end
class Bitmap
 
 def slice_text(text, width)
   words = text.split(' ')
   return words if words.size == 1
   result, current_text = [], words.shift
   words.each_index {|i|
       if self.text_size("#{current_text} #{words[i]}").width > width
         result.push(current_text)
         current_text = words[i]
       else
         current_text = "#{current_text} #{words[i]}"
       end
       result.push(current_text) if i >= words.size - 1}
   return result
 end
 
end

Script 'QuestLog' line 205: NoMethodError occured. undefined method 'each' for nil:NilClass



class Scene_Quest
 def main
   @quests = []
   for i in $game_party.quests <---- this is line 205
     @quests.push(GameGuy.qname(i))
   end
   @map = Spriteset_Map.new
   @quests2 = []
   for i in $game_party.quests
     @quests2.push(i)
   end



Thanks for your time.
8
General Discussion / H mode 7 + Babs?
November 11, 2013, 10:06:20 pm
I was just wondering if it is even possible to make such a thing. It would seem very hard to make.
9
So in my game, there are 4 characters in a party. Though, I wish to have only the first one be able to use items, heal, etc.

Also, I want to have it so that the other 3 characters' HP and MP do not show.

I was able to do this somehow with someone's help on the menu, but when I use a potion it shows the HP/Mp of other characters, which can be confusing, as these characters never use HP/MP.

If someone could help me out with this issue, that would be wonderful.

Thank you for your time.
10
Troubleshooting / Help / Multiple timers?
October 04, 2013, 12:07:53 am
So I have a farming skill in my game, and whenever you plant a seed, you must wait a certain amount of time before you can harvest it.

Due to the limited resources I am given in Rpgmaker XP (1 timer) I can only let players plant 1 type of crop at a time.

Is there any possible way of having additional timers that count alongside the 1st timer as a separate timer and display the time next to the 1st one?

Thank you.
11
So recently, I was roaming around these forums, and I saw a pretty nice script made by Blizzard where it was possible to bypass the level 99 cap.

It works perfectly and I am in love with it and the maker, but I've been wondering how I could add on level requirements for skills above level 99.

In the database, one is not allowed to make a skill require a higher level than 99, but in the script, it doesn't seem to support skill requirements.

Is there is something I am missing?

Thank you very much.

Edit: Here is the link to the thread I am referring to: http://forum.chaos-project.com/index.php/topic,5563.0.html