Doubt: How to stop a troop from reaparing after once

singappura

Warper
Member
Joined
Apr 23, 2020
Messages
3
Reaction score
0
First Language
Español
Primarily Uses
RMMV
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! ^^
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,228
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to MV Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
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.
 

singappura

Warper
Member
Joined
Apr 23, 2020
Messages
3
Reaction score
0
First Language
Español
Primarily Uses
RMMV
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!
 

Ailius

Veteran
Veteran
Joined
Nov 3, 2017
Messages
71
Reaction score
34
First Language
English
Primarily Uses
RMMV
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.
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
112
Reaction score
15
First Language
french
Primarily Uses
RMMV
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
 

Attachments

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
603
First Language
English
Primarily Uses
RMMV
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.
 

singappura

Warper
Member
Joined
Apr 23, 2020
Messages
3
Reaction score
0
First Language
Español
Primarily Uses
RMMV
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)
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
112
Reaction score
15
First Language
french
Primarily Uses
RMMV
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)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,243
Members
137,609
Latest member
shododdydoddy
Top