Doubt: How to stop a troop from reaparing after once

Good morning everybody! ^^ First of all, i need to apologize for my english and to the administrators if it isn't the right place for the post.
I want to say that google couldn't answer me the reason why i'm asking this. And i don't know if i am asking for a pluging or for a switch thing or a condition solution.
My doubt is how to stop a troop from appear after it appears once from the region encounter. I mean... i want to encounter a troop randomly once and after that make the appearance of that troop not possible.
Again... sorry if i'm not clear in my explanation or if I am redundant .
Thanks and have a nice day! ^^

I've moved this thread to MV Support. Thank you.

not possible by default, you'll either have to use a plugin or to trick the engine.
The default random encounter table is static and can't be changed.

If you want to trick the engine, you would have to make a different troop as a placeholder, and have a troop event on turn zero check if the unique enemy has appeared already and if not transform one of the regular enemies to the unique enemy and then control a switch on to remember that the enemy appeared.

But this is difficult if you want to do it for a lot of unique enemies, so you might have to request a plugin if you would need this many times.
Thanks both for answers and suggestions and sorry for the incovenient Mod!
That's sad to read, i guess i should place those troops randomly on the map.
Thanks again!
You could get creative with your battle events.

Let A be the set of enemies you intended to have in your one-time troop, and B be the set of enemies in a random encounter in the same area.

Create a troop with *both* A and B appearing halfway, then create a Battle Event set to run on turn 0. It does a conditional check on some switch, I'll name it Bob. If Bob is off, have it do Enemy Appear on A and turn Bob on. If Bob is on, Enemy Appear B.

That will *almost* work, except it would result in immediate victory since there's no enemy initially on the field. The player would win before the Battle Event was called. You'll have to add a placeholder for the zeroth round. I'd have to know your artistic intentions but I can make an example.

For example, say A is a boss ogre and B is three mob goblins.

Your troop has 1 ogre, 2 goblins appearing halfway, 1 goblin the full way.

If Bob is on, Enemy Appear the other two goblins, and it'll look like a random encounter. If Bob is off, you can do a little cinematic where first the player sees the goblin, then the ogre introduces himself by killing the goblin before the first round, establishing himself as a big scary boss. Behind the scenes, that's Enemy Appear ogre, Change Enemy State Add 1 to the goblin, and a few text boxes and animations.

I know this isn't the most coherent solution, but it should get you close enough to where you need to be.
Hmm


Actually it's easy to re-code battle encounter with events.
I made a quick implementation in a parallel process, with configurable variables. It's not perfect but it does what you're looking for : Triggering random encounter when in a certain Region ID, and removing a troop from the encounter pool when defeated once.

If you want the monster to be defeated more than once to remove them, it needs a little tweaking on the code, but nothing complicated.

I configured it so you even can reduce the troop population when defeating them (like in Undertale) or reducing/increasing dynamically the step counter

I added comments because the event for debugging/understanding purposes

Put the contents of the archive attached to this post in the data folder of a new MV project

Hope this wil help you
This plugin from himeworks may help. Also, the other day I saw a plugin in the masterlist on this site that mentioned something about erasing troops from the encounter list based on switches, I just can't remember where exactly it was. You may try perusing the plugin master list.
Thanks to all for the replies!! You're awesome!:LZSgrin:
Thanks for the idea Ailius but i don't think that's what i'm looking for. And thanks HumanNinja, i'm gonna use that plugin but i don't know how to use that plugins for what i'm looking. Also i couldn't found the plugin you mentioned :esad:
i think belatucardus you are a genius! But i don't know anything about scripting and couldn't understand how your script works :eswt2: I mean... what I could understand is that the script causes the weight of one enemy to be passed to another but not to be converted to zero. It should be easy but i'm so dumb that i couldn't. Anyway thanks for the sugestion and if i can't find the way i think i'm gonna use it (if that doesn't bother you)
Thanks to all for the replies!! You're awesome!:LZSgrin:
Thanks for the idea Ailius but i don't think that's what i'm looking for. And thanks HumanNinja, i'm gonna use that plugin but i don't know how to use that plugins for what i'm looking. Also i couldn't found the plugin you mentioned :esad:
i think belatucardus you are a genius! But i don't know anything about scripting and couldn't understand how your script works :eswt2: I mean... what I could understand is that the script causes the weight of one enemy to be passed to another but not to be converted to zero. It should be easy but i'm so dumb that i couldn't. Anyway thanks for the sugestion and if i can't find the way i think i'm gonna use it (if that doesn't bother you)

If it's the weight part you don't understand I can explain quickly to you :

The total of your monster weights is 100 (you don't have to, but it's easier bc you can talk in percentage)

I've set two monsters with 25% chances of appearing and one monster with 50% chances of appearing.

If you defeat the monster with 50% chances of appearing and just removing its weight, it would mean after the fight, you will have 50% chances to fight... nothing

This is why after defeating the monster, it's weight is transfered to another. So one of the 25% monster has now 75% chances and the second one is still 25% so it's back to a total of 100%

A more realistic outcome would be dividing equally the weight but This works for what you've asked

Just remove the weight transfer if you want to preserve the spawning rate though. I made this so a fight ALWAYS happen after the step count expires. But if you want fights to be rarer the more monster you're killing, you can erase the weight transfer part (erase everything in the "If win" except the activation of the local switch)

Original thread: https://forums.rpgmakerweb.com/threads/doubt-how-to-stop-a-troop-from-reaparing-after-once.120544/