Welcome to my Football Manager Blog, the main purpose of this blog is to provide updates on the status of my Football Manager Skins & Guides Website

Friday, 26 February 2016

FM16 Guide - How to Enable Rotating Default Backgrounds


First of all credit for this goes to ArtDekDok, he's just asked me to type up this guide as he isn't a native English Speaker.

This may be of interest to some people, ArtDekDok has found an interesting way to get the game to rotate through a list of default backgrounds instead of you being stuck with the same background.

Easiest way to show this is with a quick video:


Before you Start

Creating the Mod is fairly simple the only file you need to edit is the 'client object browser.xml' file found in the panels folder for your skin.

If the Skin you are using doesn't include this file then you'll need to extract it from this location; \skins\fm\panels

If you don't know how to extract the default files then read this:
How to Extract Default Files & Understand File Structure

If you are using one of the default skins you'll also need to download and switch to the relevant Base Skin.


Also note that if the skin you are editing (such as the default or base skins) doesn't natively support backgrounds you will need to edit the files in the following locations to actually see the backgrounds:

\graphics\boxes\custom\background\
\graphics\boxes\custom\match\background\

And edit the paper.png file from each folder in an image editing program to increase the transparency of the image. The level of transparency depends on your preference as it is a balance between seeing the background and making the skin readable.

If you need further help on editing the transparency of the images then have a look at this guide - its for FM2015 but the editing of the graphics is the same.


How To Create The Mod

Now that you have prepared your skin you can now create the mod.

First in the 'client object browser.xml' file locate this section of code:

  <!-- background picture - covers entire screen -->
  <widget class="background" file="backgrounds/default" id="bgnd">
    <record id="object_property">
      <integer id="get_property" value="bgnd" />
      <integer id="set_property" value="file" />
    </record>
  </widget>

And replace it with this bit of code:

<container class="animated_wipe_cycle_fade_container" id="bgan" interval="10">
        <!-- bg1-->   
        <widget class="background" file="backgrounds/bg1" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg2-->           
        <widget class="background" file="backgrounds/bg2" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg3-->           
        <widget class="background" file="backgrounds/bg3" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg4-->           
        <widget class="background" file="backgrounds/bg4" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg5-->           
        <widget class="background" file="backgrounds/bg5" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg6-->           
        <widget class="background" file="backgrounds/bg6" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg7-->           
        <widget class="background" file="backgrounds/bg7" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg8-->           
        <widget class="background" file="backgrounds/bg8" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg9-->           
        <widget class="background" file="backgrounds/bg9" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>       
        <!-- bg10-->           
        <widget class="background" file="backgrounds/bg10" scale_picture="true">
            <boolean id="keep_aspect_ratio" value="false" />
        </widget>               
    </container>

Next you need to place the background files you want to use in the graphics\backgrounds folder for your skin, if these folders don't exist create them.

In the above code we have 10 backgrounds that the game rotates through called bg1 through to bg10. If your background files have different names then just change the address in the file bit of each line, for example if you had a file called red instead of bg10 in the backgrounds folder you'd change that bottom widget line to read:

<widget class="background" file="backgrounds/red" scale_picture="true">

Further if you have less than 10 backgrounds you want to use you can delete the lines for the extra backgrounds and if you have more than 10 you can add extra lines, just ensure you add/remove the full three lines for each item and when adding new items add them above the </container> tag.


There are also a couple of other edits you can make to the first line of code:

<container class="animated_wipe_cycle_fade_container" id="bgan" interval="10">

The interval value determines how quickly the game switches images and is set in seconds, the default value tells the game to change the background every 10 seconds, if you want the backgrounds to rotate more slowly then just increase this value.

The class value determines what kind of animation plays when switching backgrounds and there are a couple of different values you can use;

animated_wipe_cycle_fade_container - Default value will see the background just fade out to the next one.
animated_wipe_cycle_container - Background switches to the next with no animation or fade.
animated_wipe_cycle_left_container - New Background swipes in from the side.
animated_wipe_cycle_fade_left_container - New Background swipes in from the side, but the old background also fades away.
animated_wipe_cycle_up_container - New Background slides in from the top.

Examples of the different animations can be seen in the below video:


I haven't tested it but it might also be possible to use this code to get other graphics in the game to rotate through a couple of different images, though it won't be possible to use this code to rotate between different kits or logos for a team.

This mod also won't work if you have assigned custom backgrounds to a team as those will be static and will override these rotating default backgrounds, however the rotating backgrounds will still show on screens that you don't have custom backgrounds assigned to.


 ---
Redistribution Terms
You are free to post this content to your website provided:
1. It is not sold or behind a paywall.
2. You don't advertise it as being exclusive to your website.
3. My username and blog address are included: http://michaeltmurrayuk.blogspot.co.uk/
4. Credit is also given to ArkDekDok