Specifying BattleBack for different regions. How?

Status
Not open for further replies.

LootHunter

Veteran
Veteran
Joined
Mar 18, 2015
Messages
79
Reaction score
18
First Language
Russian
Primarily Uses
Hello.

How do I specify different battle background for various regions on a map? Looks like only on field-tileset maps it depends on tile by default, but after just one boss fight (which I added recently) with explicitly specified battleback I can't return to that default background.

And on interior tileset maps there is only one battleback specified in the map properties.

So how do I specify different battle background for different regions (or tiles) of the map?
 

LootHunter

Veteran
Veteran
Joined
Mar 18, 2015
Messages
79
Reaction score
18
First Language
Russian
Primarily Uses
Thanks, that worked.

Though I'm somewhat frustrated that even such basic and obvious features like lunge attacks or changing background according to region can't be made without additional scripting.

P.S. Btw, the game is almost finished. Where should I publish it?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
There is a Completed Games forum.


You don't NEED a script to do that. You could have a common event set to parallel process (conditioned by a switch, which you turn on at the very start of the game), that does a Wait 10 Frames (so it's not polling 60 times per second and contributing to lag), then getting the player's region ID into a variable (Control Variables), then doing a series of Conditional Branches to determine what battleback to use.


To make it more efficient, use two variables - get the current region into the first variable, and compare that to the second variable. If they're the same, just skip to the end of the event. Otherwise set the second variable to the first variable, then do the conditional branches. This will make it only change the battleback when necessary - ie, when you step onto a new region. If you're on the same region that you were last time it ran, it won't bother doing all the checks, as you already have the correct battleback.
 

LootHunter

Veteran
Veteran
Joined
Mar 18, 2015
Messages
79
Reaction score
18
First Language
Russian
Primarily Uses
There is a Completed Games forum.

You don't NEED a script to do that. You could have a common event set to parallel process (conditioned by a switch, which you turn on at the very start of the game), that does a Wait 10 Frames (so it's not polling 60 times per second and contributing to lag), then getting the player's region ID into a variable (Control Variables), then doing a series of Conditional Branches to determine what battleback to use.

To make it more efficient, use two variables - get the current region into the first variable, and compare that to the second variable. If they're the same, just skip to the end of the event. Otherwise set the second variable to the first variable, then do the conditional branches. This will make it only change the battleback when necessary - ie, when you step onto a new region. If you're on the same region that you were last time it ran, it won't bother doing all the checks, as you already have the correct battleback.
Looks like the last option has one problem. When I load save game Battleback resets to default. While region/old region variables remain equal. So until I change the region on the map it draws defaul background.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Oh ... the Change Battleback command changes the battleback on the Game_Map. That means even if you left the map and returned, without saving or loading a save file, the battleback would be reset. So you would have the same problem even with my region common events script.


Are you using regions to determine the battle background throughout the entire game? Do you have ANY use for the map properties where battle background is specified?


Are you using a single image for the battle background, or will you be using the foreground/background split image arrangement?


I'll write you another script snippet that will save the details for you, but need to know, once you change the background, if you go to a new map, will it stay as you've set it, or will it look up the one specified in the properties of the new map?
 

LootHunter

Veteran
Veteran
Joined
Mar 18, 2015
Messages
79
Reaction score
18
First Language
Russian
Primarily Uses
The thing is, that I'm trying to determine, how far can I go without scripts. Actually, I just switched battleback off  on the world map properties, so I think if reset - it wil just again be determined by tile.

And in Fire Cave there are only two different battlebacks (with the same walls and different floor). So I think I'll publish the game as it is tomorrow (i want to add couple of books with hints into the "library".

P.S. Of course the most easy and logical way would be to call an event just before any encounter battle starts, but unfortunately there is no such option here.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Because you're using random encounters?
 

LootHunter

Veteran
Veteran
Joined
Mar 18, 2015
Messages
79
Reaction score
18
First Language
Russian
Primarily Uses
For ordinary battles - yes.
 

Krakaz

Forever Krakaz
Veteran
Joined
Jan 16, 2018
Messages
79
Reaction score
12
First Language
English
Primarily Uses
RMMV
I've tried seting up a region ID batleback Common Event but i guess I'm missing something I'm using control variable X,of Player,Y of Player,MapID and RegionID on a random 1~10 (as i have 10 regions on my world map) followed by location info Region ID=Region ID ({x},{y}) and the assorted if regionID = 1 set batle back to for e.i grassland,grassland yet its still loading the base background for all regions.
any clue's where I've gone wrong?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
[necro]Krakaz[/necro]
In fact, this thread has been dead for nearly 3 years.

Please post a new thread with your query. If you are doing this by eventing, then post in RPGMaker VX Ace, where this thread is. If, however, you are using a script, then post in RGSSx Script Support, and give a link to the web page where you got the script.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top