[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,268
Reaction score
8,722
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 Profile Posts

I'm listening to iiluminaughtii talking about the secrets behind shady businesses and scams. Meanwhile I'm writing a fanfic about Sephiroth from FF7, one specifically for my stepmom. I'll get to give it to her, too, because my boss said I could take the holidays off! Dec. 22-27 I will be in Orlando, and maybe Fort Myers too, visiting my dad and stepmom!
Of course, I bought a handful of games on the Steam Black Friday sale. Will I try them? Will I complete any? Who knows...
I don't really have any neat updates today about how I screwed up programming... But if you want to observe the intensenes of me programming, then you can check out my stream :)
New Weapons.gif
No more spam from me today, I promise! Just wanted to upload this, people have been giving me feedback that my weapon sprites (which were RTP) clashed badly with my battlers for ages, so today I finally took the plunge and updated them! Really happy with how they came out :D :D
So Facebook fraudulently took money from me. They even went through my PayPal accounts to find a card that had the money on it. Thinking about deleting my Facebook account because this doesn't happen on twitter, not even close.

Forum statistics

Threads
117,001
Messages
1,103,712
Members
152,895
Latest member
tmsvan
Top