Changing random battles during gameplay.

Status
Not open for further replies.

DarkSeraph

Villager
Member
Joined
Oct 25, 2019
Messages
12
Reaction score
0
First Language
english
Primarily Uses
RMMV
So I was wondering if there was a way to change what monsters occurred, during gameplay? I know how to set them up in ranges for the game, but I was thinking of a situation where in the game an event would cause the random battles to disappear in certain ranges. Basically, you defeated them all :)

Maybe a switch that would change a troops weight?

Or is this something I'll need a plugin for?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,226
Reaction score
13,779
First Language
English
Primarily Uses
RMVXA
I think this will require a plug-in, though, you might be able to use a common event which triggers every so many steps, and calls the fight for you.

@Oddball ? You think that will work?
 

DarkSeraph

Villager
Member
Joined
Oct 25, 2019
Messages
12
Reaction score
0
First Language
english
Primarily Uses
RMMV
I was thinking of creating an event for each "range" that would only activate if the player hadn't defeated the boss for the area, but would do nothing if you had. But I'm afraid it would create massive slowdown...

So the idea for my game is: in each 'range' there is a monster type, once you defeat enough of them (clues from townsfolk or quests would jump the counter ahead) you unlock a dungeon. Once you defeat the boss in the dungeon the monster go away. Sort of like clearing an area of monsters. But it doesn't look like the options for random battles allows for that.
 

woop

Freelance Illustrator
Veteran
Joined
Apr 13, 2016
Messages
42
Reaction score
80
First Language
English
Primarily Uses
RMMV
This would be kinda convoluted, but I think you can accomplish what you want using this plugin:
RED_SetRegionId
In a nutshell, this plugin changes region ids to whatever id you'd like.
You would basically assign troops to certain region ids in the map properties, and when you defeat the boss, trigger a switch to change the region id where there are no troops assigned. You could even mimic a 'clearing an area of monsters' by assigning a variable to battles won, and when the player has won a certain number of battles, change the region id to a different number that has troops with lower weight.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,673
Reaction score
13,298
First Language
English
Primarily Uses
RMMV
"massive slowdown" is created by poorly designed events. You can have an event running on parallel process that checks and changes things, and as long as it's designed well, and has a wait on every iteration, it'll be fine. A parallel process event that does only a few things, but doesn't include a wait on every iteration, will slow things down.

Generally though, if you want to use random encounters (true random encounters, set up via map properties), and you want to change something that can't be done within map properties, you'll need to use a plugin. Unless the other method suggested above will work.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,226
Reaction score
13,779
First Language
English
Primarily Uses
RMVXA
I think it can be evented as you can call precise battles via events. You'd have to have the event handle the selection logic and keep track how many you defeat though.

But if you would prefer a plug-in just say so and I'll move it to plug-in requests.
 

Raths Rants

Veteran
Veteran
Joined
Mar 9, 2014
Messages
100
Reaction score
18
First Language
English
Primarily Uses
RMMV
Wouldn't you just need to set and track a variable? Each time an event is run it increases/decreases by a specific amount. The control variable event would be set on the "win" condition.

This is an event I wrote for one of my beginner quests. It checks to see if the quest has been accepted before it is enabled. The first page handles all the heavy lifting. It handles checking to see if the quest switch is on, a minor random encounter to break it up a bit and adjusting the tracked variable along with calling a common event I use for loot tables.

The second page is a parallel process to check to see if the quest switch is on, handles the wait command and turns the self switch off. This allows the event to respawn if the player doesn't get the boss. Once the boss is defeated the encounter is disabled.

Not sure if something like this will work for you. This event could easily be stripped down just to handle tracking kills.

◆Comment:Curate Class beginning quest use only.
◆If:bq1_curate_on is ON
◆Set Movement Route:Player
: :◇Move toward Player
◆Control Variables:#0087 d100 = Random 1..100
◆If:d100 ≥ 75
◆Shake Screen:5, 5, 60 frames
◆Battle Processing:Scarecrow
◆Jump to Label:battle-end

:Else
◆If:d100 ≥ 50
◆Battle Processing:Scarecrow*2
:If Win
◆Jump to Label:battle-end

:If Lose
◆Text:None, Dim, Middle
: :You have been defeated!
: :This is NOT the end!
: :Rest up and try again!

:End
◆Jump to Label:battle-end

:Else
◆If:d100 ≥ 1
◆Battle Processing:Scarecrow*2, Enraged Scarecrow
:If Win
◆Text:None, Dim, Middle
: :The enraged scarecrow has been banished.
: :The other scarecrows resume their
: :normal duties. Return to Maxwell
◆Common Event:LT Common
◆Control Switches:#0126 bq1_curate_on = OFF
◆Control Switches:#0127 bq1_curate_end = ON
◆Erase Event

:If Escape
◆Text:None, Dim, Middle
: :You barely escape with
: :your life. Rest up and
: :try again!

:If Lose
◆Text:None, Dim, Middle
: :You have been defeated!
: :This is NOT the end!
: :Rest up and try again!

:End
◆Jump to Label:battle-end

:Else
◆Label:battle-end
◆Control Self Switch:A = ON

:End

:End

:End

:Else
◆Text:None, Dim, Bottom
: :rabble, rabble, rabble...

:End
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,866
Reaction score
520
First Language
English
Primarily Uses
N/A
I think this will require a plug-in, though, you might be able to use a common event which triggers every so many steps, and calls the fight for you.

@Oddball ? You think that will work?
Variables increasing in troop event on turn 0. Parrelel process that activates when a variable is a certain number. Thats how i would do it
 

DarkSeraph

Villager
Member
Joined
Oct 25, 2019
Messages
12
Reaction score
0
First Language
english
Primarily Uses
RMMV
This would be kinda convoluted, but I think you can accomplish what you want using this plugin:
RED_SetRegionId
In a nutshell, this plugin changes region ids to whatever id you'd like.
You would basically assign troops to certain region ids in the map properties, and when you defeat the boss, trigger a switch to change the region id where there are no troops assigned. You could even mimic a 'clearing an area of monsters' by assigning a variable to battles won, and when the player has won a certain number of battles, change the region id to a different number that has troops with lower weight.
This sounds great! I tried it and unfortunately I'm not sure how to do the script. What I'm currently trying to do is have a battle in one map change the ID of a region on another map. Basically, Defeat a boss in a dungeon, and then on the overworld map have an area convert to region 1 (a region with no random battles.

I'm using the script $gameMap.setTileSquareId(x, x2, y, y2, r)
but I don't know how to specify which map to change the regions in. Is it possible with this plugin?
 

woop

Freelance Illustrator
Veteran
Joined
Apr 13, 2016
Messages
42
Reaction score
80
First Language
English
Primarily Uses
RMMV
I'm using the script $gameMap.setTileSquareId(x, x2, y, y2, r)
but I don't know how to specify which map to change the regions in. Is it possible with this plugin?
As far as I know, I don't believe the plugin can specify another map's region id simultaneously while on another map (maybe a script call function calling a specific map id could work, but I'm no expert on that). I think you can achieve what you want by assigning a switch/variable to turn on when the boss is defeated, and when the player goes to the overworld map, have an event run on the overworld map to convert the region ids.
 

DarkSeraph

Villager
Member
Joined
Oct 25, 2019
Messages
12
Reaction score
0
First Language
english
Primarily Uses
RMMV
As far as I know, I don't believe the plugin can specify another map's region id simultaneously while on another map (maybe a script call function calling a specific map id could work, but I'm no expert on that). I think you can achieve what you want by assigning a switch/variable to turn on when the boss is defeated, and when the player goes to the overworld map, have an event run on the overworld map to convert the region ids.
I'm mad because I didn't think of that. Thank you woop. I'll tell you if it works!
 

DarkSeraph

Villager
Member
Joined
Oct 25, 2019
Messages
12
Reaction score
0
First Language
english
Primarily Uses
RMMV
So I changed my map so that I could use a rectangle to swap out the regions. it's not idea but it works. This allows me to "clear" areas of monsters. Thank you for the help everyone.
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,432
Reaction score
5,177
First Language
english
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Did some animated message faces. But why not animate menu faces too?

Confession: I don't know how to make a custom intro screen. I've tried a plugin, but I want...something more. Something dynamic!
Ksi
Looking forward to messing around with MZ when it comes out in little over a week. Anyone else amped? What's the first thing you're gonna look at/try to do?
by now, I think most people know that I hate misanthropic bad guys, but I realize one more reason I hate them so much is because the motive is easy and takes no thought to come up with. It's actually more challenging to create a villain that doesn't have that motive.

Forum statistics

Threads
100,749
Messages
979,101
Members
132,380
Latest member
LADletsdoit
Top