(Solved) [RMMZ] Kill Quest problems with Events/Variables

Okay! So my issue was solved thanks to @rpgLord69 so props to him. To everyone else that wants to use event commands/variables to make a Kill 'X' quest here's how to do it.

  1. Create whatever enemy you want for your quest as normal
  2. Create a troop with that enemy.
  3. In the troop screen, under battle event, first set conditions to Turn 0.
  4. First line of the event should be 'Change enemy state: Entire Troop, + Immortal'
  5. Create page 2
  6. First line: Set your control variable to add however many of the enemies are in the troop
  7. Second line: Change Enemy State: Entire Troop, - Immortal
  8. Done!
You can use F9 while in game (but not in battle) to check your variable count to make sure it's correct.



Another day, another question for you fine folks of the forums.

As the title suggests, I'm attempting to make a kill quest. Essentially kill 10 'enemy' and you get a reward. I've consulted the oracles (Google) and came up with a few older posts both here, and on reddit, and I've found how my ideas haven't been working.

  • Events in battle events under troops don't actually stick once the battle is over. (Attempted to have a add item command in the battle event to track number of killed wolves via hidden items)
  • Same for using battle event to change a variable, it doesn't stay changed out of the battle and reverts back to 0.
Now, while I could make a event visible on the map where I could battle process a event and if the players win, it can change the variable, but for likely obvious reasons, that doesn't work for me because I want this to be part of the random battles encountered on the map.

So, here is where I ask for help and suggestions.

Is there a way to have items rewarded to the player without the end of battle 'Item' found when you get your EXP and money?
Is there a way I'm not aware of or missed to edit battle events where the changes DO stay after the battle?
Am I over complicating this and there is a simpler way to do what I'm attempting?

Once again, thank you kindly for your help and patience.

~MrE

Spoiler: Links I've found related to my search for answers


Postscript:
While I'm not AGAINST using plugins/scripts, I'm attempting to learn more about the event commands, variables and so forth already built into the game. So I would like to prioritize that first. However, if what I'm after simply isn't possible, then by all means, feel free to suggest a plugin/script.
Give enemies immortal state and make troop event to add to the variable / give item and remove immortal state when their hp is 0. (Btw didn't understand what you meant with variables revert to 0.)
Alright, so in the Battle event I have:

  • Change enemy state: entire troop, + Immortal
  • Control Variables: #0007 Wolves killed +=2

How do you remove the immortal state when their hp is 0? I'm probably missing something obvious so apologies.



Give enemies immortal state and make troop event to add to the variable / give item and remove immortal state when their hp is 0. (Btw didn't understand what you meant with variables revert to 0.)
Sorry for being unclear. For this I was using a variable for when wolves are killed, I had written in the event command for the wolf troops to add to the variable. However after the battle, the variable would still be 0.
Normally items, switches, variables and so on changed via battle command stay this way after the battle. If they don't I'd guess there something wrong with your event commands. Could you take a few screen shots to show us?
@MrEon The troop event to give all enemies immortal is set to run at turn 0.

Then you make a troop event page for every enemy that has a condition that a certain enemy is at 0%hp and make that page give item / add to variable and then remove the immortal state from the specific enemy.
Normally items, switches, variables and so on changed via battle command stay this way after the battle. If they don't I'd guess there something wrong with your event commands. Could you take a few screen shots to show us?
Sure can, images in spoilers.

However, I've read on this thread :
1) make a counting troop event on enemy death. That is a bit more problematical because the battle ends before the troop event of the last enemy death, so you would have to trick with an immortal state.

It suggests the immortal state 'trick' as well, as @rpgLord69 already mentioned in my thread here. However, not sure how to remove the immortal state when enemy hp is 0%, still looking into that.

Also, side note: as with the variable I mentioned and showed in the images, I also tried using a 'add item' command in the battle event, and the items were not in the player inventory after battle.

Spoiler: Images
01 Battle Event Screen.PNG

02 Debug screen with variable at 0.PNG
03 battle.PNG
post battle.PNG
post battle debug.PNG
I replied above how to remove the state. Also, your troop event pic above says "don't run". That's why nothing happens.
I replied above how to remove the state. Also, your troop event pic above says "don't run". That's why nothing happens.
I got it to work! Sorry, I didn't quiet understand your instructions before about the immortal state trick, but I figured it out.

And it's going to sound silly, but I figured 'Don't run' meant 'Don't escape from battle' XD. Oh well, live and learn.

Thank you very much for your help everyone.
This thread is closed due to being marked solved. Report the next one so we can find it easily! If you need this one reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/solved-rmmz-kill-quest-problems-with-events-variables.175782/