The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => Topic started by: greyden on February 25, 2012, 03:54:17 PM

Title: [VX] Help with making a quest
Post by: greyden on February 25, 2012, 03:54:17 PM
I need help making a quest where you kill x number of monsters and then turn in the quest. I have tried using variables, conditonals, switches and nothing I do is working. Please if you know how to make this type of quest leave detailed instructions. I have looked and searched everywhere and all I find are vague instructions as to how to make this kind of quest. Thank you for helping me if you can.
Title: Re: Help with making a quest
Post by: IAMFORTE on February 25, 2012, 04:52:25 PM
I recall seeing something like this, but the location of it escapes me atm, the best way i could figure to do this off the top of my head would be to have evented encounters with said monsters, and having the player do a bunch of those. (increasing a monster killed variable eachtime)
Title: Re: Help with making a quest
Post by: greyden on February 25, 2012, 05:35:00 PM
Thx for the reply. I did find a small bit on it but nothing detailed.
If this is posted on the wrong forum spot my apologies, I'm new and this is my first time here. I'll learn my way around :D
 I'm using rpg  gamemaker vx btw.
Title: Re: Help with making a quest
Post by: AbsoluteIce on February 26, 2012, 01:23:44 AM
Well.. depending on what battle system you're using, all you would have to do is go into your data base and move over to troops. In the battle event area at the bottom, put in a conditional branch, and make the condition "QuestStart" or whatever you switch is on. Now put control variable +1 for your kill count. And in the quest giver's event, put another conditional branch and make the condition; If "KillCount" is greater than or equal to how many you have to kill..
Or you could just script it like so ;

Code: [Select]
Class Game_Party < Game_Unit
 
  alias ekc_initialize initialize
  def initialize
    ekc_initialize
    @enemy_kill_count = 0
  end
 
  def increase_kill_count
    @enemy_kill_count += 1
  end
 
  def kill_count
    return @enemy_kill_count
  end
 
end

class Game_Enemy < Game_Battler
 
  alias ekc_perform_collapse perform_collapse
  def perform_collapse
    ekc_perform_collapse
    $game_party.increase_kill_count
  end
 
end
$game_party.kill_count return the value of kills..
I don't take any credit for this, I found the script at Rpgmakervx.net..
I also found how to do this at Rpgmakervx.net, so props to them. x3
Title: Re: Help with making a quest
Post by: pacdiggity on February 26, 2012, 01:36:44 AM
There's a faster way to do that.
Code: [Select]
class Game_Party < Game_Unit
  attr_accessor :enemy_kill_count
  alias ekc_initialize initialize
  def initialize(*a)
    ekc_initialize(*a)
    @enemy_kill_count = 0
  end
end

class Game_Enemy < Game_Battler
  alias ekc_perform_collapse perform_collapse
  def perform_collapse(*a)
    ekc_perform_collapse(*a)
    $game_party.enemy_kill_count += 1
  end
end
Instead of $game_party.kill_count, now use $game_party.enemy_kill_count
Sorry for stealing this AbsoluteIce, I just saw an opportunity to make a code more efficient. Also, the first line of your code would cause a syntax error, because 'class' and all other keywords are case sensitive.
Title: Re: Help with making a quest
Post by: greyden on February 26, 2012, 02:30:45 AM
Thanks for the replies. I will definitely give this a try. I appreciate everyone's help. :D

I appreciate both of you trying to help. :D Apparently I'm not skilled enough to make either of these 2 methods work. But hopefully it will help others who may be interested in creating this type of quest.

Update: After about a week of trial and error I finally found what I was looking for in a tutorial so it seems as though this problem is solved. Thanks again to those who helped.
Title: Re: Help with making a quest
Post by: Drositor on March 25, 2012, 06:28:19 PM
If you have visible enemies, then it's just a variable tied to the event. Event of enemy, with variable attached, enter combat, if you win; erase event have variable +1. Tie the variables to a visible counter or to the event offering the quest. such as: go up to king who told you to kill 10 skeletons.  "Sorry, you've only killed two out of ten skeletons"