Hello!
I am fairly new to RPGMAKER Mv and I had a question that google didnt seem to be able to answer for me. Any information you can provide is extremely appreciated as it currently has me stuck until I get past it. My question is:
I have created 100 "troops" each consisting of one enemy to fight. I want to make it ask you if you would like to fight, then if you respond yes it will start a fight. This fight needs to be one of the 100 created troops however I want it to be completely random which one you end up fighting. I currently know how to set up everything and cause it to open a fight however it only opens the same enemy each time. So basically you fight 1 random boss from that pool of 100 each time you go and accept the fight. is this possible?
Random enemy encounters?
● ARCHIVED · READ-ONLY
-
-
Only with scripting I'm afraid, as you will need to change how the battle start command works to have it randomly select from your troops.
Though, if you don't mind redoing your setup a little, I think there might be a plug-in which lets you specify one enemy as a placeholder for other enemy types. I used a script like that when I wanted random undead for a zone in my game in ACE, and I'm sure there is a similar one for MV.
I've moved this thread to Plug_in Requests. Thank you.
-
-
That's false though if they are using random battles, as there's no way to call a save to variable command the same time the random battle is called. You might be able to get cute with parallel process to have a variable change every 60 frames or so, and then use that, but that's about the only way.
-
Thank you for the help! Any idea what plugin ill need? Im relatively new so im still figuring things outOnly with scripting I'm afraid, as you will need to change how the battle start command works to have it randomly select from your troops.
Though, if you don't mind redoing your setup a little, I think there might be a plug-in which lets you specify one enemy as a placeholder for other enemy types. I used a script like that when I wanted random undead for a zone in my game in ACE, and I'm sure there is a similar one for MV.
[move]Plug_in Requests[/move] -
@xTrentx
It might not need a plugin at all, but that depends on the difference discussed above:
Do you want a randomly started fight that then chooses a random enemy (note the two times random here), or do you want to start a fight at a specific moment and just have the enemy selected at random? Because you mention selecting a boss...
if it's the first case (you don't know when the fight will happen) then you'll need a plugin, if it is the second one (you start the fight at a specific moment) you can use the evented solution described above. -
@Andar@xTrentx
It might not need a plugin at all, but that depends on the difference discussed above:
Do you want a randomly started fight that then chooses a random enemy (note the two times random here), or do you want to start a fight at a specific moment and just have the enemy selected at random? Because you mention selecting a boss...
if it's the first case (you don't know when the fight will happen) then you'll need a plugin, if it is the second one (you start the fight at a specific moment) you can use the evented solution described above.
My goal is to basically create a button on the screen then when you hit it, it will say "yes, or no" Once you select yes, I want a random fight to begin. -
@xTrentx But is this happening on the map when interacting with an event or is this in battle?
-
My goal is to basically create a button on the screen then when you hit it, it will say "yes, or no" Once you select yes, I want a random fight to begin.
Then this is not a random encounter. Random encounters are ones that are set up on map properties and are not related to events on the map. You want a fixed encounter, but a random troop.
@Uzuki has given the correct instructions - set a variable to a random number between 1 and 100, then use Battle Processing and use that variable to determine the troop. -
@Shaz exactly. How exactly do I do that though?Then this is not a random encounter. Random encounters are ones that are set up on map properties and are not related to events on the map. You want a fixed encounter, but a random troop.
@Uzuki has given the correct instructions - set a variable to a random number between 1 and 100, then use Battle Processing and use that variable to determine the troop. -
@Uzuki how would I go about that exactly? Sorry im still new and coding isnt something im very familiar with. -
Two people have now given you the instructions.
Use Control Variables to set a variable to a random number between 1 and 100.
Use Battle Processing and choose the Variable option rather than the specific troop option, and enter the variable that you just set to a random number.
There is no coding. It is all done with event commands. -
@xTrentx
I strongly suggest that you follow the link to the starting point in my signature and take a few weeks to work through the basic tutorials there, because you don't even have the basics of using the makers if you didn't understand the instructions so far.
Here is a more detailed solution:
1) make an event on the map, name it "arena" or "trainer" or whatever - your battle will start when you interact with that event.
2) make sure the priority is "same as" and the trigger is "action button" and give it whatever sprite you want to be able to find it on the map.
3) doubleclick on the content area, select control variable, give it the name "random 1-100" or so and set the command to give a random number between 1 and 100 in that variable
4) doubleclick again, go to the third page, select battle processing. Then select "by variable" and set the variable as the one you made in the previous command.
5) confirm everything with OK
Finished.
Whenever you go to that event on the map and trigger it with action button, it will start a fight with a randomly selected troop between the two limits you set as the ID. -
Although, if you want to ask the player first if they want to battle, and only battle if they say yes, you will want to add a Text command first, followed by a Show Choices command. Then put all the commands for the variable and the battle into the "yes" branch.
Your event will end up looking something like this:
Code:Text: Do you want to fight? Show Choices: Yes, No When [Yes] Control Variables [0001: Random Number] = Random Number 1 .. 100 Battle Processing: Variable [0001: Random Number] When [No] End
If you want the game to continue if the player battles and loses, in the Battle Processing command, check the Continue When Lose box (or something similar to that wording). -
I misunderstood. My apologies.Two people have now given you the instructions.
Use Control Variables to set a variable to a random number between 1 and 100.
Use Battle Processing and choose the Variable option rather than the specific troop option, and enter the variable that you just set to a random number.
There is no coding. It is all done with event commands.
Im going to try and incorporate it now. -
@xTrentx
I strongly suggest that you follow the link to the starting point in my signature and take a few weeks to work through the basic tutorials there, because you don't even have the basics of using the makers if you didn't understand the instructions so far.
Here is a more detailed solution:
1) make an event on the map, name it "arena" or "trainer" or whatever - your battle will start when you interact with that event.
2) make sure the priority is "same as" and the trigger is "action button" and give it whatever sprite you want to be able to find it on the map.
3) doubleclick on the content area, select control variable, give it the name "random 1-100" or so and set the command to give a random number between 1 and 100 in that variable
4) doubleclick again, go to the third page, select battle processing. Then select "by variable" and set the variable as the one you made in the previous command.
5) confirm everything with OK
Finished.
Whenever you go to that event on the map and trigger it with action button, it will start a fight with a randomly selected troop between the two limits you set as the ID.
Thank you for all the information. I will be completing those tutorials this morning. It should give me a better understanding of some of the programs features. -
That brought a smile, because you obviously have no idea of how many and how expansive the tutorials I linked are.I will be completing those tutorials this morning.
NO ONE can learn the engine in one day. It would be a problem to just read those tutorials in a single days (most people would need several days to read through all of that), and you can't learn the engine by reading.
You need to work through those tutorials, recreating your own tutorial game while following their instructions step for step.
On average, most people (investing a few hours only each day because they need time for school or work) will need a month on average to work through all those tutorials... -
@Andar 's right. I only skimmed them then attempted to make a game. 4 days later I started over, as what I had was grade A garbage. Though did I go back to them? Nope. I shoveled out something for the 2014 IGMC instead, then started THAT over again once the IGMC was done.
In the end I think I started my project over 4 times, the 5th time I got it finished. Took 8 months to get to that point though. -
That brought a smile, because you obviously have no idea of how many and how expansive the tutorials I linked are.
NO ONE can learn the engine in one day. It would be a problem to just read those tutorials in a single days (most people would need several days to read through all of that), and you can't learn the engine by reading.
You need to work through those tutorials, recreating your own tutorial game while following their instructions step for step.
On average, most people (investing a few hours only each day because they need time for school or work) will need a month on average to work through all those tutorials...
I understand. I didnt mean all in one day. I will be doing tutorials periodically as I have the free time. I appreciate the advice and tips so far. -
@Andar 's right. I only skimmed them then attempted to make a game. 4 days later I started over, as what I had was grade A garbage. Though did I go back to them? Nope. I shoveled out something for the 2014 IGMC instead, then started THAT over again once the IGMC was done.
In the end I think I started my project over 4 times, the 5th time I got it finished. Took 8 months to get to that point though.
wow, Yeah i certainly dont want to do that.