Event/Encounter Help

I have a event setup, so when the player touches it he enters combat. Once it's over, it becomes inactive.

What I am tring to do, or would like to do. Is set it up, so that it randomly picks between 1-5 different battles. Once it's over, it becomes inactive, and will become reactive after lets say between 100 and 150 steps taken.

Could someone offer some assistance in achieving this?
What you do is, on you map add the 5 different troops (battles) to the troops list.  Make sure at the bottom where it says "steps" you set that number to the max 999, I think.  Then, in the battle event select "same as random encounters".  (I'm not sure on the actual wording, but it's something like that).

I don't know really how you would make it respawn randomly.  If you use "erase event" instead of a self switch, they will reappear if the player leaves the map and comes back in.  I think there are scripts out there...I think Galv has one.

Hope that helps!
There are two ways to make an evented battle random. Described above is the option to use the same random table as the map properties (in that case you should disable random encounters, the battleprocessing will still use it).

The other option is to use a variable to generate a random number and use the variable ID in the battle processing.

Reactivating the event after a number of steps is not as easy - it's easier to reactivate it based on time, not steps.

If you're willing to work with time - make the second page you switched to a parallel process that has a number of waits to the time you want, then switch back to first event page after those waits.

To switch back after a number of steps would require you to keep count of those steps and use conditional branches on parallel processes to switch back - that will cause a lot more lag than waiting parallel processes, and you will probably need a script for self-variables as you can't use up hundreds of variables for enemy events.
Used one of yanfly's scripts to call random encounters based on region ID. I'll keep tring to get it setup to turn itself back on so there can be an encounter again. Steps seems to be a bit much, so i'll go with turning it back on after a while. I rather it be a random time between this and that, so if there are multi ones waiting to come back on they all don't do it at the same time. I'll keep playing and see if I can get this to happen. 
I would put this before the battle processing part on page 1 of the event:

control variables[1]:set game data steps

control variables[2]:set random 100-150

control variables[3]:set variable [2]

control variables[3]:add variable [1]

At the end of page 1 make sure you turn self switch [a] on.

Page 2 is going to be parallel process, condition self switch [a] on (1st edit)

control variables[1]:set game data steps

conditional branch:variable[1]=variable[2] then self switch [a] off.

(2nd edit)

If you would prefer it to be a random time, just change both steps to play time.  Both options are under game data other.
Thank you @Dalamar, but you might want to explain that better. I did what you said but it didn't work. Never went to the second page, and turned itself off. Maybe I didn't do it right but I am sure I did.
@dayhjawk:


Then you probably confused the two parts of using a switch: control switch command and condition switch setting.


You need the control command on the page that is switched off, but the condition (NOT conditional branch) of the switch on the page that needed to be switched to.


And that second page needs to be the second page (or a higher page number than the page that is supposed to be switched off)
Think I got it, but I think the steps on the recharge part isn't working right. Seems to recharge quicker than 100-150 steps
then show us screenshots of your event pages and we can check them.
here you go, combined the images so I wouldn't have to post 2.

Spoiler
[IMG]http://i255.photobucket.com/albums/hh135/dayhjawk/Image2_1.png[/IMG]
Of course it's faster - you calculate what you want into variable 5, but you check for variable 4 in your process...


Also I suggest setting a wait 10 on your parallel process to prevent lag


Edit: and you should check for "greater than", not equal, in case a step is miscounted.


Edit2: and using a general variable means that you need different variables for each monster, or all monsters would reappear at the same time
1. Of course it's faster - you calculate what you want into variable 5, but you check for variable 4 in your process...

2. Also I suggest setting a wait 10 on your parallel process to prevent lag

3. Edit: and you should check for "greater than", not equal, in case a step is miscounted.

4. Edit2: and using a general variable means that you need different variables for each monster, or all monsters would reappear at the same time
1. I did what was said above, just the #s are different because I already have some variables in place for something else.

2. Added the 10 seconds.

3. Changed to greater than.

4. Uh, there are different spots on the map that when the player touches them, it's picks a random battle from a list. So far, I have tested things and things are working fine, just the respawn timer seems to be a bit faster than I'd like. Seems to not wait the full 100-150 steps. Other than that things are working just fine. One encounter might be against a slime, the next location would give 2 slimes, as an example.
On page 2 you need to change =variable 4 to =variable 5.  To make sure each enemy is respawning in the right amount of steps you would need a separate variable 5 for each event.
Changed the variable from 4 to 5. Uh the script I am using for random battles seems to work. They don't repeat the same battle/enemies often, looks random. But I have noticed from time to time, if two locations are waiting to respawn, when one respawns the other respawns with it. 

Incase you are wondering, it's glowing locations on the ground when player touchs it's a random battle from a list. After walking around for a while it's recharges and another battle will happen if you touch it. 
Each of the events is going to need a new variable where variable 5 is if you don't want them respawning at the same time.
But I have noticed from time to time, if two locations are waiting to respawn, when one respawns the other respawns with it.
 
Edit2: and using a general variable means that you need different variables for each monster, or all monsters would reappear at the same time
That is what I meant - if you're using the same variable for the result, then the enemies will spawn at the same time.


You need to use different variables to store the result you compare, NOT using variable 5 for every enemy.

1. I did what was said above, just the #s are different because I already have some variables in place for something else.
Unfortunately for you, Dalamar mistyped with that description - one of the many reasons we always ask for screenshot of the events, not describing (and mistyping that description)
a new variable for each encounter.. that might be a bit rough. but thanks for the help. Will see if it's possible as time goes on, to use the same ones over, if they are out of sight or something.
You could re-use them in a different dungeon, but I would not recommend simply if they are out of sight, because if the player's position changes, then they could come back into sight.  Neither would I recommend simply a different map within the same dungeon because the player may return to an earlier map and you've got the same problem again.  Unless you have a phenomenally large number of encounters per dungeon, it should be fairly straightforward. 
Or you can use a script to create self-variables for your events. But again, that will increase complexity compared to simple solutions.


Only go the script route if you have dozens of enemies on each map.


http://forums.rpgmakerweb.com/index.php?/topic/40589-how-to-use-a-script/


http://forums.rpgmakerweb.com/index.php?/topic/38349-updated-link-to-pk8s-self-data-suite/
well the world map isn't going to have encounters/monsters like a normal map. i'ts more like mystic quest, where you have locations where you enter combat. So there are random battles, but only when you touch certain locations. Inside areas, encounters are normal. Its just the world map where you have these. 

Going the script route would probably not be good because I do not understand coding. I have a very long list of post here asking for script help. Coding is one of the biggest roadblocks for game design for me over the years. This is the closest that I have EVERY came to completing a game, and I am really pushing to complete it, even despite the IRL issues going on. 

Coding and Sound/Music is probably the two areas of game design that I can't do along. Everything else, so far I am done it. From tileset making to monster drawing. Its been fun! Just not hte coding part.

Original thread: https://forums.rpgmakerweb.com/threads/event-encounter-help.42382/