Split View Mod Coding

Following on from the Split View Mods this is the coding that will allow you to customize the split views further to your tastes - you'll be able to add extra panels or resize the panels futher:

First we need to extract the match.xml file from the screens.fmf  file using the Resource Tool (if the skin you are editing already has this file you can skip this step) - the screens.fmf file is located in the data folder of where you installed FM2010 and the Resource Tool is located in the tools folder of where you installed FM2010 with instructions on how to use it.

Now you've extracted the screens.fmf file locate the extracted match.xml file and copy it into the screens folder for your skin (if your skin doesn't have a screens folder just create it).

Now we are ready to edit the match.xml file (if the skin you are using already has it's own match.xml file I suggest you back it up first) I recommend using Notepad++ to edit the xml files, though any webpage editor or even notepad is fine - use what you are comfortable with.

Now editing the file itself is fairly simple, there are just two bits of code we need to mess around, the first tells the game how many panels we want and what sizes we want them:
<container title="Dual Panel" id="mpdl" late_loading="true">
<layout class="arrange_horizontal_attachment" layout="-1,-1" offset="0" gap="10"/>
<layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" inset="2"/>
The above code should be on lines 85-87 and what we are interested in is the layout="-1,-1" code - this tells the game how many panels to create and what size to make them.

A minus number tells the game to fill the space with the panel, whilst the ratio of the numbers tells the game how big to make each panel, so -1,-1 tells the game to create two panels and fill the space equally with them, -2,-1 tells the game to create two panels but to make the left panel twice the size of the right panel, -3,-1 will tell the game to make the left panel three times the size of the right and -3,-2 will split the screen into five parts with the left panel taking up 3/5 of the screen and the right panel taking up 2/5 of the screen.

If you want the game to display three panels then you add another number - -1,-1,-1 or -2,-1,-1 or -1,-2,-1 etc...

The only limit on the amount of panels and their size is the size of your screen. For best results full panels (as shown in the non-split view) need 1024 pixel width, and half panels (such as the ones shown in the split-views by default) need half of that. So if your screen is 1680 pixels wide you could fit either three half panels or one full panel and one half panel (like the default files I've made) and if you are running 1920 pixels wide then you should be able to fit in four half panels or two full panels for example.

You can also make a panel a certain size regardless of your screen size, so if you wanted the left panel to always be 1000 pixels wide you use the code: 1000,-1 or 1000,-1,-1 etc...

So now you have decided how many panels you want and what sizes you want them, now you need to tell the game what screens you want to show in each panel.

In the default file ines 89-134 control what appears in the left panel and lines 136-180 control what appears in the right panel, the coding for the left panel is shown below (the coding for the right panel is pretty much the same):
<container class="multi_box" id="mpll" contents_kind="bordered_box" top_kind="subtle_popup" default_item="hilp" save_current_state="true" >
<!-- incase default item is replaced by human preference, we need to store the original view -->

<integer id="orig" value="hilp"/>

<integer id="right_embed_inset" value="5"/>
<integer id="top_embed_inset" value="5"/>
<record id="top_properties" auto_size="horizontal">
<boolean id="fixed" value="false"/>
<flags id="spec" value="title,small"/>
<flags id="size" value="9"/>
<colour name="title"/>
<flags id="view_kind" value="embedded_view_popup_button"/>

<widget class="both_match_incidents_panels" title="Overview[COMMENT: match screen; match overview panel title]" id="bmin" file="match overview small" small_version="true"/>
<widget class="match_stats_panel" title="Match Stats" id="mtst"/>
<widget class="match_action_zones_panel" title="Action Zones" id="mazp" file="match action zones small">
<colour id="ptlc" name="white"/>
<widget class="match_home_team_motivation_short_panel" title="Home Player Motivation" id="htms"/>
<widget class="match_away_team_motivation_short_panel" title="Away Player Motivation" id="atms"/>
<widget class="match_highlights_panel" title="Match" id="hilg" file="match highlights small" pitch_use_3d="true" pitch_unique_id="left" pitch_full_window="false"/>
<widget class="match_report_panel" title="Report" id="mtrp" file="match report small"/>
<widget class="match_home_analysis_panel" title="Home Analysis" id="mhan" file="match analysis small"/>
<widget class="match_away_analysis_panel" title="Away Analysis" id="maan" file="match analysis small"/>

<container class="scrolling_box" title="Home Team Ratings" id="hfms">
<layout class="stick_to_sides_attachment" alignment="all" inset="0"/>
<widget class="home_match_team_stats_panel"/>

<container class="scrolling_box" title="Away Team Ratings" id="afms">
<layout class="stick_to_sides_attachment" alignment="all" inset="0"/>
<widget class="away_match_team_stats_panel"/>
<widget class="match_latest_scores_panel" title="Latest Scores" id="mlsp" MLSs="true" file="match latest scores small" save_current_state="true"/>
<widget class="match_goal_update_panel" title="Goal Updates" id="mgup" MGUs="true" file="match goal update small"/>
<widget class="match_league_table_panel" title="League Table" id="mltp" MLTs="true"/>
<widget class="match_formation_panel" id="hmtt" team_index="0" read_only="true" title="Tactics"/>
<!-- read only match tactics -->
<widget class="match_formation_panel" id="amtt" team_index="1" read_only="true" title="Tactics"/>
<!-- read only match tactics -->
<widget class="match_debug_panel" id="mtdb" title="Debug"/>
<widget class="match_controller_panel" id="mctr" title="Controller[COMMENT - debug only]"/>
On the first line the id="mpll" tells the game this is the left panel, you'll notice the coding for the right panel changes the id to mplr.

The next bit of code we are interested in is this code also on the first line: default_item="hilp" - this tells the game what screen to default to you'll notice again that the left and right panels differ - the left panel defaults to hilp (highlights) and the right panel to mtst (match stats) if you want to change what the default screen is for each panel you just need to change the ids to match those of the screen you want - you may also need to change the id in the next line (<integer id="orig" value="hilp"/>) to match your changed id and also change the original_item="mtst" code in the right panel if you're changing that one.

The last bit of code we are interested in are the ones that look like this:
<widget class="match_home_analysis_panel" title="Home Analysis" id="mhan" file="match analysis small"/>
These basically tell the game what screens you want to be shown - you'll notice some of these lines point to a small file this is because some screens have two versions - a normal one that displays in the normal match tabs and a small view that displays in the split views. If you are enlarging the panel back to full size you can replace these small files and codes with the full codes - the full codes are listed further up the file (lines 27-83), so for example the full panel Home Analysis code is this:
<widget class="match_home_analysis_panel" title="Home Analysis" id="mhan"/>
So if you change the first bit of code to match that the game will display the full version rather than the small version of the Home Anaylsis screen.

So to Recap:

To Resize the panels

- Change the "-1,-1" code to the sizes you want i.e. "-2,-1"
- If you have increased the panel width from a half panel to a full panel, update the screen coding to point to the full versions of the screens rather than the small ones.

To Add a panel

- Add extra numbers to the "-1,-1" code so for three panels change to "-1,-1,-1" and four "-1,-1,-1,-1" etc...

When adding a panel there are a couple more steps we need to take first you need to copy the code from above that is in the code tags and paste it into the file between the code for the existing left and right panels (you need to paste the code into the line 135 which should be blank) if you are creating more than one extra panel you need to paste the code again for the exta panel(s)

Next we need to change the id for the panel from the first line locate the code id="mpll" or id="mplr" (depending on which panel you are editing) and change it to something else "mplm" or "mpln" work with no trouble, if you have create more panels you need to rename them aswell - basically each block of coding above should have a different id.

Next I recommend you delete the match highlights and Home and Away Analysis coding from any extra panels you add as they don't show correctly in added panels.

Finally if you've enlarged the space so the full panels fit then you can also replace the small screen codes with their full screen versions.