RPG Maker MV

RPG Maker MV

KillerKrieg May 21, 2022 @ 6:44pm
Quest to kill x number of any monster type?
So I am trying to make a quest where you kill 100 monsters. The type does not have to be specific and I would like any kills made to count towards the quest. So far I have only seen quests to kill a specific monster type. Can you make a quest to kill any?
< >
Showing 1-7 of 7 comments
Phrasmotic May 24, 2022 @ 3:16pm 
Been a while since I've used this, but iirc it shouldn;t be too difficult.

The easiest way to do it is to make that particular enemy drop an item, then have the quest check for a certain number of that item for completion. This would be a simple Conditional function (If item = 100 flip switch 'quest end')

Another way to do it would be to create a variable and have it increase by 1 for every enemy killed. Been a while since I;ve used this so can;t quite remember how to do it off the top of my head, but you basically want to create an event that increases the variable by 1 for each enemy killed, then do as above with the Conditional switch, but have it check for the variable instead.

If you want the variable to only be active during the quest, I'd imagine you could set it as a switch that activates and deactivates on beginning/completing the quest.
Last edited by Phrasmotic; May 24, 2022 @ 3:20pm
KillerKrieg May 26, 2022 @ 10:29pm 
I can't find a way to make the variable increase by 1 every time an enemy is killed at all. Conditional branch doesn't seem to want to let me count items dropped by enemies, either.
Phrasmotic May 27, 2022 @ 8:58am 
Originally posted by KillerKrieg:
I can't find a way to make the variable increase by 1 every time an enemy is killed at all. Conditional branch doesn't seem to want to let me count items dropped by enemies, either.

I can't quite remember how to make them count items for the conditional branch, but if you make the monster encounter an event instead of a random encounter then you could simply make that event increase the variable by 1, then have the quest look for that variable to be completed. A fun way I like to do enemy encounters is to make them events that chase you and initiate an enemy encounter on touch, so I would just need to make that event also increase the variable, for example. This would be the easiest way.

If you want it to increase the variable in a random encounter then you'd need to do some scripting on the enemy page, should be easy enough to find via a google search.
Last edited by Phrasmotic; May 27, 2022 @ 9:03am
MartyrmanX May 27, 2022 @ 5:50pm 
Here is a plugin that allows you to use Common Events at the end of battles. Make sure to change the settings in the plugin. Number corresponds to Common Event Number from the Database.

Plugin:
http://sumrndm.site/battle-end-events/


Approach:

The plugin calls Common Events, but a common event will not know which specific troop you battled. Below is what I put into the first Common Event of my Database.

----------------------------------------------------------------------------------------------
◆If:Script:$gameTroop._troopId === 1
◆Control Variables:#0001 += 2
◆Play ME:Musical2 (90, 100, 0)

:End
----------------------------------------------------------------------------------------------

Explanation:
I put in a Scripted Conditional Branch [Last page of Conditional Branch].
$gameTroop._troopId === 1

I defeated two bats from Troop #1, so I added 2 onto my Variable.

Rinse and repeat the Script Condition until all desired instances of a specific enemy are accounted.

$gameTroop._troopId === 1 | Add 2 to Variable
$gameTroop._troopId === 2 | Add 1 to Variable
$gameTroop._troopId === 7 | Add etc...
Faytless Jun 3, 2022 @ 12:50am 
you dont really need a plugin for this. I'm going to assume you're staying within a certain region so this wouldnt apply to ALL of your monster groups. But basically, set a variable, call it Var01: MonsterKill = 0

in battle events
. condition = Actor 1 HP < 100% ,

body,
Condition branch Monster 1 state = dead
MonsterKill + 1
end condition
Condition Branch Monster 2 state = dead
Monsterkill +1
end condition

You would need to do this for each battle group.
MartyrmanX Jun 3, 2022 @ 5:06pm 
Originally posted by Faytless:
you dont really need a plugin for this. I'm going to assume you're staying within a certain region so this wouldnt apply to ALL of your monster groups. But basically, set a variable, call it Var01: MonsterKill = 0

in battle events
. condition = Actor 1 HP < 100% ,

body,
Condition branch Monster 1 state = dead
MonsterKill + 1
end condition
Condition Branch Monster 2 state = dead
Monsterkill +1
end condition

You would need to do this for each battle group.
What happens when the player defeats all enemies in one turn before a battle event can be triggered? Even if a battle event triggers at "End of Turn", it does not execute if it happens on Victory.
Last edited by MartyrmanX; Jun 3, 2022 @ 5:07pm
nagolli May 25, 2023 @ 12:05pm 
Hi, a bit late, but i'll share what i've done.
With a little coding, it could be archivied anything which fires on any dead enemy (or ally).

Usign Yanfly Buffs and states core i added this notetag to the Death State:
<Custom Apply Effect>
hasDead(target)
</Custom Apply Effect>

After you create a function as if it was a script, which would look like:

hasDead = function(target){
if(!target._enemyId) {
//In this case, is a Character
return;
}
//Place any condition you use to know if the quest is active
if($gameSystem.isQuestInitiated(4)&&!$gameSystem.isQuestCompleted(4)){
//questCountdown could be a var or a property in any object
questCountdown=1+missionCountdown
if(questCountdown>=100){
//Process quest complete
$gameSystem.questObjectivesCompleteRange(4, [1]);
$gameSystem.questObjectivesShowRange(4, [2]);
$gameMessage.setFaceImage('character', 0);
$gameMessage.setBackground(0);
$gameMessage.setPositionType(2);
$gameMessage.add("YEAH!");
$gameTroop._interpreter.setWaitMode('message');
}
}
return;
}
< >
Showing 1-7 of 7 comments
Per page: 1530 50