lordvalinar

Lord of the Damned
Regular
Joined
Mar 31, 2013
Messages
343
Reaction score
210
First Language
English
Primarily Uses
RMMZ
Kill Quest Assistant (v1.0)
LordValinar

Introduction
This plugin was designed to assist "kill quests" in mind. Basically you get a quest to kill 10 bandits, and you want a variable to increase for each bandit you kill, but doing so with vanilla RPG Maker is difficult since "if enemyHP % <= 0" condition in the troop page doesn't account for the last enemy killed! With this plugin, that issue is resolved! Each enemy with the proper tag that dies in combat will run the appropriately assigned common event (where you can design to your heart's content the conditions and features that happen when it happens).

Features
Runs a common event when an enemy with the <kqs: eventId> tag dies.

Screenshots
<< see attachments >>

How to Use
Place this plugin in your plugins folder, add it to your plugin manager within the RPG Maker MZ engine. Then create an (or select an already made) enemy in the database. Place the <kqs: eventId> tag within the note field. "eventId" will be the numerical value of the Common Event ID you wish to run when this enemy type dies. For example (like in the screenshots) if you want a variable to increase when a zombie dies, you would set that up in the common event.

Download(Github) - Kill Quest Assistant

Terms and Credits
* Free to use and modify for commercial and noncommercial games, with credit.
* Do NOT remove my name from the Author of this plugin
* Do NOT reupload this plugin (modified or otherwise) anywhere other than on these forums (RPGMakerWeb).
 

Attachments

  • kqs_commEv.png
    kqs_commEv.png
    73.8 KB · Views: 94
  • kqs_enemy.png
    kqs_enemy.png
    62.1 KB · Views: 100
  • kqs_killed1.png
    kqs_killed1.png
    881.6 KB · Views: 96
  • kqs_killed2.png
    kqs_killed2.png
    336.6 KB · Views: 97
  • LvMZ_KillQuests.js
    2.2 KB · Views: 20
Last edited:

boutterson

Villager
Member
Joined
Sep 16, 2021
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVX
So I tried this plugin, followed the instructions but it was not working. Not sure why.
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,960
First Language
English
Primarily Uses
RMMV
That isn't much to go on. Show us how you set up your enemy and your common event.
 

boutterson

Villager
Member
Joined
Sep 16, 2021
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVX
So, after playinng around with it, i'm having the same issue I had prior to installing the plugin. If I have 1 enemy in my troop, it does not count the death; however, if I have 2 or more it counts all others except the last one to die. But the point of the plugin was to count all deaths, including last/only.
 

Attachments

  • Screenshot 2023-03-25 003522.png
    Screenshot 2023-03-25 003522.png
    342 KB · Views: 9
  • Screenshot 2023-03-25 003508.png
    Screenshot 2023-03-25 003508.png
    337.5 KB · Views: 9
  • Screenshot 2023-03-25 003444.png
    Screenshot 2023-03-25 003444.png
    177.3 KB · Views: 9
  • Screenshot 2023-03-25 003423.png
    Screenshot 2023-03-25 003423.png
    104.4 KB · Views: 9

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,782
Reaction score
3,176
First Language
Dutch
Primarily Uses
RMMV
its <kqs: x> NOT LEADING 000000 (zeroes) as zeroes will cause trouble.
 

boutterson

Villager
Member
Joined
Sep 16, 2021
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVX
I have the same issue without the leading zeros.
 

boutterson

Villager
Member
Joined
Sep 16, 2021
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVX
I had thought maybe if I had set the variable to 0 initially in the quest, with the +1 for the kills, it would solve the issue. But no such luck.
 

Ayu_Raven

Villager
Member
Joined
Feb 26, 2023
Messages
7
Reaction score
11
First Language
german
Primarily Uses
N/A
The variable I see in the event is #7 and in the enemies note tag common event #4. what if you both set to the same number like in the exampel?
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,032
Reaction score
4,374
First Language
EN
Primarily Uses
RMMZ
The core BattleManager:
  1. Does not update events during the victory phase;
  2. Checks for victory before events;
  3. Clears the common event reservation queue when the battle ends.
I just quickly checked the plugin's code on Github and found no special handling for running events at the end of battle. So for the last enemy, the plugin will reserve its event, if any, but by default that event does not get a chance to run in battle (due to the victory phase) or on the map (due to getting cleared).

The usual, non-plugin workaround for this uses an "Immortal" state (Resist State: Death). You can use a troop event with condition Enemy HP <= 0%: that event does stuff (e.g. +1 to variable) and then removes the Immortal state.
 

boutterson

Villager
Member
Joined
Sep 16, 2021
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVX
The variable I see in the event is #7 and in the enemies note tag common event #4. what if you both set to the same number like in the exampel?
7 is the varible number. 4 is the common event. The plugin references common events, the common event then effects the varible. However, the varible only if effected if I have two or more enemies; and only changes after the first dies. Not affected by the last battle.
 

boutterson

Villager
Member
Joined
Sep 16, 2021
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVX
That
The core BattleManager:
  1. Does not update events during the victory phase;
  2. Checks for victory before events;
  3. Clears the common event reservation queue when the battle ends.
I just quickly checked the plugin's code on Github and found no special handling for running events at the end of battle. So for the last enemy, the plugin will reserve its event, if any, but by default that event does not get a chance to run in battle (due to the victory phase) or on the map (due to getting cleared).

The usual, non-plugin workaround for this uses an "Immortal" state (Resist State: Death). You can use a troop event with condition Enemy HP <= 0%: that event does stuff (e.g. +1 to variable) and then removes the Immortal state.
This defeats the purpose of the purposed plugin. As shown in the plugin setup, none of that was needed for the varible to change.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,032
Reaction score
4,374
First Language
EN
Primarily Uses
RMMZ
@boutterson - yes. I just checked the author's profile and it looks like they haven't logged in for a month, so you may want to find or request an alternative:
I have a couple of ideas, but I feel like it'd be impolite to post them in someone else's thread. :kaoswt2:
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,782
Reaction score
3,176
First Language
Dutch
Primarily Uses
RMMV
can you target a clean common event without visustella plugin commands?
as I convert it to MV for a test and it does work on my end.
 

lordvalinar

Lord of the Damned
Regular
Joined
Mar 31, 2013
Messages
343
Reaction score
210
First Language
English
Primarily Uses
RMMZ
That

This defeats the purpose of the purposed plugin. As shown in the plugin setup, none of that was needed for the varible to change.
Okay sorry for the long hiatus; Tested the code again with some regex and the number (even with leading zeroes) comes out to be "4" (without quotes), so in theory it should run common event 4. The only things I can think of that's stopping it is:
Game_BattlerBase.prototype.die

Meaning if you have my plugin before any VisuStella plugins that modify the battle system, it won't work properly. Try moving the plugin AFTER VisuStella plugins?
 

Latest Threads

Latest Profile Posts

I'm just gonna remove the Dark Spells from my game. They wouldn't be fighting Gods or Angels. So why have it?
Every day I'm getting rough-outs of another sprite sheet or two. Getting real close to just needing to make new original stuff and editing my tables and chairs to look correct for the taller sprites is among the top of the revisions list.
Eye_Guys.gif
Some eyew guys! One is absent for... reasons of taste
Eeee! X3 Ever since I started doing 3d Art ,my Pixel Art got sooo much better! I cant wait till im done with the tileset!
Crystal Shock Devlog #5 yay!



This week was super fun as I got to work on my favorite thing: Combat! A new boss has been added and some new mechanics on top of that. I also made some improvements to the first town.

Forum statistics

Threads
134,918
Messages
1,251,909
Members
177,755
Latest member
Sprk_3D
Top