Hi there, I've had RPG Maker VX Ace for about a week now. I have an infinitely generating dungeon courtesy of KiloZapit's modification of Saba Kan's Random Dungeon generator. I want to use random encounters in the dungeon, but I want each floor to have different monsters, the problem is it's technically all on the same map. So, say I have slimes, bats, and vampires for mobs, you'd be just as likely to run into a slime on the tenth floor as a vampire on the first. I've looked through the options for events to see if I can find one that changes the encounter data, but I've been out of luck so far. Does anyone know how to best accomplish this? Any help would be appreciated.
Changing random encounters with events
RPG Maker VXAce SupportRegions?
I don't think it can be done with events, as the random encounters are hard-coded to the map. However, you might be able to pull it off with a script. Vlue has a script that lets you specify conditions for when encounters can occur, you can find it here: http://www.rpgmakervxace.net/topic/18658-enhanced-encounter-conditions/
The way the dungeon generator is set up, You place the floor tiles, wall tiles, etc. and it generates them. The problem is, it uses the same tiles each time it generates, so it will have the same region ID each time.
This should work without using any extra scripts:
Edit: This can be further expanded to only have certain monsters show up on certain floors by using more conditional statements.
Make a parallel event with the following.
Edit: This can be further expanded to only have certain monsters show up on certain floors by using more conditional statements.
Make a parallel event with the following.
Code:
Control Variables[0001:Steps] = StepsConditional Branch: Variable[0001:Steps] >= 40#Change the 40 above and below to a number of steps you want#The rand(2) can be changed to any number to add some randomness to the number of steps Conditional Branch: Script: ($game_variables[1] + rand(2)) % 40 === 0 #random number 1...30 the 30 you need to change to how many troops you have Control Variables[0002:Random_Monster] = Random No. (1...30) Battle Processing: Variable[0002] if Win Script: $game_party.increase_steps if Escape Script: $game_party.increase_steps Branch End Else Branch End ElseBranch End
Yours would work Sarlec, but I don't want it to change with the steps, or to be a different monster each time. I'm looking for a way to make it change each time you go to the next floor. Bigilisp, The script you showed me looks like it will work. I'll post back once I get it working / have any problems. Thank you!
Edit: I am running into a bit of a problem, I'm getting an error message whenever I try it. I changed the > sign to an = because I wanted It to be equal to the variable, not greater than, because I don't want more than one type of mob to appear. do you know enough about that script to help me out with it?
Edit: I am running into a bit of a problem, I'm getting an error message whenever I try it. I changed the > sign to an = because I wanted It to be equal to the variable, not greater than, because I don't want more than one type of mob to appear. do you know enough about that script to help me out with it?
The steps counter is there because this event would simulate the random encounter setup (if it wasn't then you would instantly encounter a monster without having to walk) but it can be changed to include floors into the mix. i.e add a conditional statement that says if Floor == 1 have troops 1...3 if Floor % 4 === 0 have troops 4...8 etc. You would have to have a variable that increased every time you finished a floor and went on to the next one. Granted the script may be an easier solution as you would not need to possibly setup up as many things to get this to work how you want.
Edit: Actually found a bug with my evented method when escaping just keeps going to the next monster.And fixed it above. Works the for first battle then it bugs out again...
Edit: Actually found a bug with my evented method when escaping just keeps going to the next monster.
I've actually never used it (yet), sorry. Maybe someone on script support can help you? I know Vlue is on these forums sometimes.
Tsukihime once wrote a script that allowed a developer to add new entries to the map's encounter table. Unfortunately that is one of the scripts she removed from her blog when reorganising it a while ago.
I suggest you ask her if you could get that old script - with it you would simply leave the basic encounter table of the random map empty and use a common event to set all entries for the current level based on whatever you want it.
It's a lot of work to do it this way, but it would allow you to set the random encounters however you want them.
I suggest you ask her if you could get that old script - with it you would simply leave the basic encounter table of the random map empty and use a common event to set all entries for the current level based on whatever you want it.
It's a lot of work to do it this way, but it would allow you to set the random encounters however you want them.
With a lot of work, I was have the same event that moves you from floor to floor run a random variable and turn on a switch based on the variable to activate it. So now it's working great! Thanks for your help everyone!
Original thread: https://forums.rpgmakerweb.com/threads/changing-random-encounters-with-events.35880/