Mimi's Battleback Changer
#1
Mimi's Battleback Changer
Version: 5.0


Introduction
Based on Mimi's Music System, this script is able to change the battle background using events and scripted values.


Features
  • Able to turn the system on/off, re-enabling the default system.
  • Enable battleback changes based on terrain tags (an old RM2K feature)
  • Enable battleback changes based on event values
  • Enable battleback changes using the field map itself
  • Animated Battleback support
  • Error checking feature in case the original image file is lost or missing


Screenshots
Well, you wouldn't really see anything in s screenshot, eh? Just another battleback.


Demo
HERE.



Instructions
Lots of instructions were built into the code, but it's pretty simple. Within the script itself, there are two hash arrays.

One hash array allows you to set the terrain-based background based on the terrain ids you entered into your tileset database. By changing the hash values, you can change the terrain battle backgrounds.

The other hash array allows you to set the 'battle backgrounds' for key events in your game, typically changed in a regular map event script.

Thus, with the new Map-As-Battleback feature, there are four types of battlebacks that can be shown using this system:
* Standard backgrounds
* Terrain-based backgrounds
* Event-chosen backgrounds
* Field map backgrounds (not including field map panoramas)
* Animated backgrounds (not compatible with 'battle camera' systems like Cogwheel's or XRXS's

Also note that all of the above battlebacks (except for the Field Map backgrounds) may be animated.

Other instructions, such as the manner to change the battlebacks through accessing their hashes and manner to use/create animated backgrounds are located within their scripts.


FAQ
Like I said this was based on Mimi's Battle Music, so it didn't take long at all.


Compatibility
Aliased most everything, so it'll be compatible with most any Battle System, except Zelda-Like Action Battle systems. Probably be very useful with RPG Advocate's RM2K Defined Areas or Sephiroth Spawn's Encounter Control script.

The Animated Battleback feature is 'not' compatible with 'Battlesystem Camera' systems such as the ones by XRXS or Cogwheel. Either the 'Camera' system needs to be disabled or removed, or that the use of Animated Battlebacks be disregarded.


Credits and Thanks
Thanks goes out to Me™ and Mr.Mo for their assistance in RGSS Support forum: Detecting files in the RTP itself in... detecting the files in the RTP.


Author's 'Notes'
b-flat
[Image: piano.gif]
Reply }
#2
This script works ,but desactive the H-mode7 effect. You can do something about this?
Reply }
#3
Hello again,

My main interest here is the animated battleback feature, but I can't seem to get past the initial default battleback when I test my game. I have sliced up a .gif into some .png image files, named them correctly, and put them into the Hashes used for event lists & terrain tag arrays in the configuration system, but only the default battleback displays. I also noticed that the in the Mimi & Dalissa demo, the battle background changer script has a "Initial values called via script/map events to change battlebacks" section that the link to the script itself did not. therefore, I am trying to use the script right out of the demo.

thanks,
bswi

EDIT: I'm using the global version of this script
Reply }
#4
what kind of animated battlebacks does this support? are there any in the demo link? how complex can they be without slowing causing slowdown?
Reply }
#5
The animated battlebacks can only go up to 9 frames of animation. The system looks for the last two characters in any filename (expecing them to be digits. So you may have a filename called StarPattern50 saved in your Tileset's 'Battleback' setting. The first number (5) would indicate how many animation frames while the second is the initial index. You would then have the next four battlebacks: StarPattern51 , StarPattern52 , StarPattern53 and StarPattern54.

In essence, the filename structure is FILENAMEXY where X is the qty and Y is the index. And you could create a battleback like KasperStars90, which includes 90, 91, 92, 93, 94, 95.... 98.

The initial layout of the battleback terrain changing hash appears as such:
Code:
@bback_terrain  = { 1 => "001-Grassland01",
                        2 => "006-Desert01",
                        3 => "005-Beach01",
                        4 => "007-Swamp01" }
or
Code:
$bback_terrain = { 1 => "001-Grassland01",
                       2 => "006-Desert01",
                       3 => "005-Beach01",
                       4 => "007-Swamp01" }

It could very well be changed to this:
Code:
$bback_terrain = { 1 => "001-Grassland01",
                       2 => "Grassland30",
                       3 => "005-Beach01",
                       4 => "007-Swamp01" }
So terrain ID #2 (normally Desert) would use an animated Grass Land battleback.

Oh, and I haven't seen any noticeable lag, even with Animated Battles.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#6
does the animated battlebacks script require any other scripts to be imported to function - or any special placing other than the standard for an added script? I still can't seem to get off the default battle background.
Reply }
#7
can you adjust the animation speed as well?
Reply }
#8
No, this system can be used as a stand alone.

If you see in the demo, I was able to replace the battle background for the Gralslands Tileset with an animated battleback of 'Grasslands30' ... thus 3 frames. But the code I showed above allows me to set the animated battle back to the #2 terrain tile.



Yep, the speed can be set and adjusted.

Depending on whether you use the global or instance versions of the system, you would be changing the following value to set the speed rate:
Code:
# Delay between animated battlebacks (in frames)
    $bbg_delay      = 20
Code:
Still, you can change them in-game.  Change $game_system.bbg_delay whenever you want to change the speed in the instance version.  Afraid the global version is clumsy and you would be changing the global $bbg_delay global itself.

    # Delay between animated battlebacks (in frames)
    @bbg_delay      = 20
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#9
hmm...still no dice. My image files are named & sized correctly, and to mimic the demo I have inserted both the global and instance versions of the scripts. I am trying to set an animated battleback for the the woods terrain, but even with the @bback_terrain hash correctly set, and the # Initial battlebackground type ( 0=default / 1=terrain / 2=event ) hash set to @bbg_type = 1, I can't seem to get off the default woods battleback. I believe you said this works with .png files correct?


Attached Files
.zip   Battlebacks.zip (Size: 4.28 MB / Downloads: 3)
.zip   RGBL98.zip (Size: 402.16 KB / Downloads: 1)
Reply }
#10
Holy heck. I guess you're wanting a fast refresh rate by setting the @bbg_delay / $bbg_delay value to 2 ??? That's what I did.

What you may be missing are two things.

The left-most ghost is set to use terrain tag battlebacks. This is forced upon the battle by the code in the script call of:
Code:
$game_system.bbg_type = 1
The valid codes, again are 0 (for the default non-animatedstyle), 1 (for animated systems), and 2 (for field map), and the system assumes a default value of 0 if it isn't set. And since the middle ghost does not have a bbg_type value in the event, it 'assumes' whatever the last battleback style was set. If you run the middle ghost first, it assumes a non-animated battleback. If you run the leftmost ghost and return to the middle ghost, it will assume an animated battleback just like the left-most ghost. Get it?

Meanwhile, you may not have noticed that my Terrain Tag hash currently points to terrain tags 1 to 4. I didn't include a terrain tag of 0, which is the normal setting. Most of the terrain in the demo is grass with a '0' terrain tag. Only when you get to the desert/sand area do you step on a terrain with a terrain tag of '2'. You COULD add a 0 => "Static90" line, but you could just set the default battleback to be that like I added Grassland90 into the tileset for 001 - Gralsslands.

GEEZ, you gotta really speed it up to '2'.. And '1' is OFF THE CHAIN!! Pity it won't animate until the transition is complete.... the only problem it has. So you have 'frozen' static for half a second. :/
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Mimi's Battle Music DerVVulfman 2 8,811 11-19-2018, 04:18 AM
Last Post: DerVVulfman
Photo  Map Tileset Changer during the game Narzew 1 6,385 05-06-2013, 09:18 PM
Last Post: Narzew
   Party Changer Dargor 7 19,281 06-10-2010, 05:02 AM
Last Post: Meegz0
   XRXS's Full-View Battleback & Movable Camera XRXS 0 5,751 06-10-2009, 03:30 AM
Last Post: XRXS
   Mog Battleback XP 1.0 moghunter 0 5,420 12-07-2008, 04:40 PM
Last Post: moghunter
   Party Changer by Leon Westbrooke earthboy 0 5,549 03-06-2008, 06:42 AM
Last Post: earthboy
   Disc Changer Zeriab 0 4,434 03-06-2008, 05:39 AM
Last Post: Zeriab



Users browsing this thread: 15 Guest(s)