[SOLVED] Customized battleback with numbered zone (RMMZ)

Status
Not open for further replies.

Timmy77

Villager
Member
Joined
Oct 6, 2021
Messages
29
Reaction score
20
First Language
French
Primarily Uses
RMMZ
Hello,

I would like my battleback against encounters to be modified according to the framing, after trying several methods I have not been able to do it properly.

99ccf4e87af8acee8de9c4434ea5be50.png


For example here I can be attacked in zone 2 or zone 1, and I would like a specific battleback in each.

I tried to add "modify battleback" in troop event, but it's not instantaneous, even at the beginning of the fight after one second you see the battleback change, which makes it ugly in game :/

If you have any ideas (without adding plugins if possible) I am interested!

Thanks in advance !
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,341
Reaction score
8,767
First Language
German
Primarily Uses
RMMV
The event command "change battleback" changes the map property "battleback" and as such this is usually loaded for the next battle, not the current one.

If you have evented battles, you can use that command without problems before the battle processing and the battleback will be changed correctly.
If you use random battles, you have to go one of two possible other ways:

1) change the battleback with a regular event on entering the region ID.
either by a plugin that runs a common event on event ID, or with a parallel process using get location info to detect a change in region ID and react accordingly (place a wait(10) in that parallel process)

2) force a background update on the troop event
you'll need two commands in the troop event in this case, first the one you are already using to change the map property battleback.
and then followed by a script command that forces an update on the battleback to load it with the new setting.
this script command exists, but I don't have the reference ready and can't tell you how it is for MZ
 

Timmy77

Villager
Member
Joined
Oct 6, 2021
Messages
29
Reaction score
20
First Language
French
Primarily Uses
RMMZ
Thanks to your help I succeeded, here is how I did it (my game is in French so I translated on the screen) :)

7b3417e0e2663821295e8a7264f583ab.png
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,116
Reaction score
5,970
First Language
Dutch
Primarily Uses
RMXP

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.

Latest Threads

Latest Profile Posts

My new 49" monitor has been dispatched from the warehouse. Will it arrive tomorrow? The day after? I love that we can track packages now, even if it does only tell me when it's left that end and when it's arrived at the local centre. As long as it doesn't end up in Melbourne again, which has happened before ...
My friend's doing a surprise stream of my game Origin Hunt on Twitch here ! Feel free to stop by :yhappy:
Me, designing it a long time ago: Having an optional boss fight as a random chance to trigger when you fish in a certain spot with a certain type of bait is fun! Cool idea!
Me, trying to playtest everything again: oh god just let me see the boss, my bag is so full of fish!
both love and pain have no boundaries

Forum statistics

Threads
117,229
Messages
1,105,686
Members
153,384
Latest member
mfilez
Top