Auto buff in battle based on map terrain?

Is there a way to have some characters gain a buff when they enter battle when they are on a specific terrain or map?


Like let's say you a have an archer in your party that's knowledgeable about forests and you're exploring X forest map and enter


battle whit a random mob, This is when the archer in question would gain the auto buff because he is battling on a terrain he knows best.


Any tips?
You'll need a combination of two parts.


One part is a troop event set to be executed on turn 0 that checks for conditions and applies the effects when the conditions are met - usually numbers of variables.


The other part is to fill those variables with the correct numbers before the battle starts. In the case of evented battles, you simply place the correct numbers there before the battle processing event - for example use "get location info" to load the region ID of the player position into a variable.


If you're working with random battles, that might be a bit more complex depending on how you set your troops up. you either need a script, or you need to setup different troops for different regions (and then the troop event would be simplified as well, but at the cost of a lot of different troops)
Mmm... I'll keep that in mind and see how I can work out this, I got a rough idea of what to do now!


I'll do some tests now, Thanks a lot!

Original thread: https://forums.rpgmakerweb.com/threads/auto-buff-in-battle-based-on-map-terrain.62561/