So recently I have been starting to use PH Quest Book plugin in my project. Item collect quests are easy enough. However, I am having trouble with Kill quests. I do know that this was next to impossible without long complex scrips and/or events in past RPG Makers. I was more wondering if anyone has found an easier way to accomplish this. I already tried experimenting with the "Win Count" option in the editor, however this keeps counting for all the wins. Which means that even if the player doesn't kill the required quest mob, the quest still counts it as a kill. Is there a way to make it only increase for a specific monster, or maybe a plugin that would allow this to work? I looked for a plugin to solve this, but haven't found anything that works.
Variable Checks For X Amount of Monsters Killed
JS Plugin RequestsIt's quite easy actually, as long as you don't allow the player to escape battles.
Add a troop event page that runs right at the beginning of the battle, to increment the variable by however many of that enemy is in the troop. If the player wins, the variable reflects the number of enemies killed. If they lose, they have to resume a saved game, where the variable did not include the enemies in that troop.
An alternative is to make the enemies give a particular item as battle spoils, and then for your event that checks how many you've killed to see how many of that item you have in inventory. "Slime corpse", for example.
If neither of those options are suitable, you would need a plugin to do it, but it certainly doesn't need to be either long or complex.
Add a troop event page that runs right at the beginning of the battle, to increment the variable by however many of that enemy is in the troop. If the player wins, the variable reflects the number of enemies killed. If they lose, they have to resume a saved game, where the variable did not include the enemies in that troop.
An alternative is to make the enemies give a particular item as battle spoils, and then for your event that checks how many you've killed to see how many of that item you have in inventory. "Slime corpse", for example.
If neither of those options are suitable, you would need a plugin to do it, but it certainly doesn't need to be either long or complex.
First, thank you for the quick and detailed reply. It's a lot of help. I will keep searching for a plugin first, as I would prefer to avoid adding in a ton of extra items that list in the inventory but have no use. However, that is a very viable solution, and if I cannot come up with something, I will most likely end up using that.
If anyone else has suggestions or knows of a plugin, I would love to hear it. Thanks in advance.
I will move this to plugin requests
Can you state what the conditions are? Do you only want this variable to be incremented after a certain quest is given, so if you fight the same enemies beforehand, the variable isn't incremented? Will you have different quests like this, that involve different enemies? Will they all use the same variable, or will they need to be different variables?
I've actually got something like this working in my own game, but it's in Ace. It's really not hard to implement as a script, but you need to define the 'rules' first.
Can you state what the conditions are? Do you only want this variable to be incremented after a certain quest is given, so if you fight the same enemies beforehand, the variable isn't incremented? Will you have different quests like this, that involve different enemies? Will they all use the same variable, or will they need to be different variables?
I've actually got something like this working in my own game, but it's in Ace. It's really not hard to implement as a script, but you need to define the 'rules' first.
Since my quests are added in using PH Quest Book plugin, the plugin I am wanting would need to somehow be able to work along side his plugin. I don't know much about making plugins, I would assume this is possible however.
As for the mechanics of the plugin, I do want the count to only start after the quest has been given, and stop when it is complete. I don't plan on having a kill quest for every monster in my game, but I do want to create multiple kill quests throughout my game. There would need to be multiple variables, in the case that a player has 4-5 kill quests unfinished in the quest book. Since the player will only be doing a quest per mob once, it would need to stop counting as soon as the quest was complete, and then not increase the count anymore from that point on. If possible, I would like the plugin variables to be editable and controllable so that I can choose which variables are assigned to which quest.
For the settings of the plugin, an option to change the max number of variables that can be in the game.
That's basically what I am looking for, if I think of something else I will be sure to add it to this post.
Thanks in advance
I assume you would have an event that would add/activate the quest and an event that would remove/complete the quest, so maybe not necessary for it to work with that plugin at all?
Is a quest "complete" after you get the required number of kills, or after you go back to the NPC who gave you the quest and report that you've done it? How do you plan to state how many kills are required if it is just linked with the other plugin, rather than using a plugin call when the quest is given?
What if it wasn't linked to a variable at all, but to a switch that would be turned on when you hit the appropriate number of kills? Then the plugin could do all the tests for you, and your event would simply have to check a switch to see if it was on or off.
Is a quest "complete" after you get the required number of kills, or after you go back to the NPC who gave you the quest and report that you've done it? How do you plan to state how many kills are required if it is just linked with the other plugin, rather than using a plugin call when the quest is given?
What if it wasn't linked to a variable at all, but to a switch that would be turned on when you hit the appropriate number of kills? Then the plugin could do all the tests for you, and your event would simply have to check a switch to see if it was on or off.
For this, the quest would be complete upon returning to the NPC to receive your reward. I also see how you're talking about using a switch that turned on at a certain number of kills, but wouldn't that basically be a complete separate plugin from PH Quest Book? If so, I would like a nice interface on this plugin as well. The interface used in PH Quest Book is something I would like as well.
whatever you do, it's going to be a complete, separate plugin. I don't see how it could possibly interface with a quest system.
How would a script know that the words "Kill 10 slimes" actually means you need to kill 10 of the enemy with the name Slime? It's just words.
It doesn't matter whether it increments a variable or turns a switch on. Either approach requires some way of identifying that a particular enemy (and which one) needs to be counted when killed.
How would a script know that the words "Kill 10 slimes" actually means you need to kill 10 of the enemy with the name Slime? It's just words.
It doesn't matter whether it increments a variable or turns a switch on. Either approach requires some way of identifying that a particular enemy (and which one) needs to be counted when killed.
I see. I might end up going with the first idea you posted about the items to count for kills, as I want to keep PH Quest plugin. I appreciate the help though.
You are misinterpreting what I'm saying. I didn't say you have to get rid of the PH Quest plugin. I said it would be difficult to make a second plugin to do what you want, that interacts with the PH Quest plugin, because "kill 10 slimes" is just words and the kill count plugin has no way of knowing which quests require you to kill, or what monsters or how many need to be killed. You would have to do a plugin call to set that up, at the time you need to start counting, which means the two plugins will not interact in any way.
You can have two completely independent plugins, and do a plugin call from the same event for each plugin.
You can have two completely independent plugins, and do a plugin call from the same event for each plugin.
I apologize for not being able to fully understand what you are saying. What I am getting out of it, is I set up the quest using PH Quest plugin, and then use the other plugin to keep track of the count, and turn on a switch when the kill count is reached. Then, I go back to that NPC, and check if the switch is on, and from there use the PH plugin to complete the quest?
If that is also what you mean, that would work wonders. I was hoping I could use variables though, because in the PH quest I am able to use the built in features of RMMV to show visual tracking of the quest. For example \V[1] / 25 Where "1" is the variable assigned to the quest mob.
yes 🙂 That is what I mean.
Using variables is fine. Would you want it to count up, or count down?
Edit: I see, count up.
Using variables is fine. Would you want it to count up, or count down?
Edit: I see, count up.
Glad we could get it worked out 🙂 If you are able to do this, I would appreciate it immensely.
you can reply to me without quoting ... you and I are the only people in this conversation 😉
Sorry lol. Force of habit as I usually mostly post in forums quoting others first. Also, I wanted to know what the terms of use for this plugin would be. I planned on using it in my commercial project.
all my plugins are free for commercial use.
That's perfect. 🙂 I will be sure to give credit where credit is due however.
Here you go. Have a play around, let me know if there are any issues.
May I PLEASE PLEASE have a copy of this as well because I'm sitting here trying to do this with hidden items which clearly aren't that hidden since my Battle Spoils plugin lists my counter item to the player anyway *facepalm*
Have you checked the Plugin Repository (see the pinned topic on this section of the forum) as Shaz usually puts all her plugins there?
Original thread: https://forums.rpgmakerweb.com/threads/variable-checks-for-x-amount-of-monsters-killed.56913/