[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,257
Reaction score
8,712
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,112
Reaction score
5,963
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 Posts

Latest Profile Posts

Sizzle sizzle sizzle...
zbf1dCZ.gif
Sharing my past was a mistake. Will delete the post when I get access to a working internet connection again.
TFW you get a plugin working correctly with your other plugins ♡\( ̄▽ ̄)/♡

(CW for minor gore - Einar's Y incision is gone for his test portrait)

Cs5kAbZ.png
Doing some winter related edits for a cozy cottage!
I think it's the third time I am changing my skill info plugin, but as I get better at programming, I want to fix the trash I made earlier :p

Streaming while I am programming the plugin. Join in if you wish :)

Forum statistics

Threads
116,981
Messages
1,103,496
Members
152,845
Latest member
Zynarith2
Top