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

If you have any questions or queries then I can generally be found in the Skinning Forum at the Official Sports Interactive Forums, though I'd ask you to open a new thread rather than sending me a message.

To help with navigation I have included indexes of my content for the last few versions of Football Manager in the tabs below.

Monday 24 November 2014

FM2015 Guide: How To Edit the League Table



This is a simple guide that covers some of the changes made to the code that displays the league table in Football Manager 2015, the changes to the coding in FM2015 mean we can now actually change the columns that are displayed on the league table in different views, unfortantly the changes have made it a bit more difficult to resize the column widths.


Before you start you will need a couple of things;

- If you are using the Default skins, then first download the Base Skins as any changes you make will need to be applied to them rather than the default skins, if you are using a downloaded skin then you should be able to edit that skin directly.

- You will need to make sure the following files are located in the panels folder of the skin you are editing:

league stage.xml and league stage panel views.xml
If not present extract from the panels.fmf file and copy into the panels folder for your skin, if your skin doesn't have a panels folder create it.

If you don't know how to extract the fmf files then read this first: [FM2015 Guide] How to Extract Default Files & Understanding File Structure


The League Stage Panel is now controlled by two xml files obtained from the panels.fmf file:

league stage.xml - now just controls the general settings of the table, mainly what graphics are assigned to the various rows and the height of the rows. (there is also 'league stage auto sized vertical.xml' which is the same but has shorter row heights so this file might be used on certain screens).

league stage panel views.xml - this file now controls what appears on the league table and how the items are arranaged, the way it is coded is similar to how the columns on the squad screen are coded, so editing the file is similar to how you used to have to edit the squad screen to get custom views before they were changable in game.

So for each view there will be code like this:

<!-- Overall stats -->
<record id="over">
<translation id="text" translation_id="359652" type="use" value="Overall[COMMENT: league_table; use top 10 matches; category for stats relating to performance at home or away]" />
<record id="view">
<!-- Main league position -->
<flags id="Lpos" />
<!-- Cup qualification info -->
<flags id="Lqin" />
<!-- Team name -->
<flags id="Ttea" />
<!-- Team's nation. Will be hidden if not an international club comp -->
<flags id="Dnat" />
<!-- Overall played -->
<flags id="LOpl" />
<!-- Overall won -->
<flags id="LOwo" />
<!-- Overall drawn -->
<flags id="LOdr" />
<!-- Overall lost -->
<flags id="LOlo" />
<!-- Overall for -->
<flags id="LOfo" />
<!-- Overall against -->
<flags id="LOag" />
<!-- Overall goal difference -->
<flags id="LOgd" />
<!-- Overall points -->
<flags id="LOpo" />
</record>
</record>


The file is commented so it should be easy to work out what id corresponds to what, each of the flags lines above corresponds to a column on the league table, the above example is for the Overall view and the line <flags id="Ttea" /> is for the team name.

If you wish to change the order of the columns you just need to change the order of the lines, the top line is the first item to display on the left in game, so for the Overall view League Position is first, followed by Qualification status and then Team Name. So if you wish for the Qualification place column to appear last you change the above code to read:


<!-- Overall stats -->
<record id="over">
<translation id="text" translation_id="359652" type="use" value="Overall[COMMENT: league_table; use top 10 matches; category for stats relating to performance at home or away]" />
<record id="view">
<!-- Main league position -->
<flags id="Lpos" />
<!-- Team name -->
<flags id="Ttea" />
<!-- Team's nation. Will be hidden if not an international club comp -->
<flags id="Dnat" />
<!-- Overall played -->
<flags id="LOpl" />
<!-- Overall won -->
<flags id="LOwo" />
<!-- Overall drawn -->
<flags id="LOdr" />
<!-- Overall lost -->
<flags id="LOlo" />
<!-- Overall for -->
<flags id="LOfo" />
<!-- Overall against -->
<flags id="LOag" />
<!-- Overall goal difference -->
<flags id="LOgd" />
<!-- Overall points -->
<flags id="LOpo" />
<!-- Cup qualification info -->
<flags id="Lqin" />

</record>
</record>


If you wish to hide a column for a view then just delete (or comment out) the flags line for the item you don't want displayed, so if you don't want the goal difference displaying on the Overall Table remove these lines:

<!-- Overall goal difference -->
<flags id="LOgd" />


You can also add columns from other table views so if you want to display the average points value you just need to locate the code where it is used elsewhere in the file and paste it into the position you want it to appear. For example the below code will display the Average Points last:


<!-- Overall stats -->
<record id="over">
<translation id="text" translation_id="359652" type="use" value="Overall[COMMENT: league_table; use top 10 matches; category for stats relating to performance at home or away]" />
<record id="view">
<!-- Main league position -->
<flags id="Lpos" />
<!-- Cup qualification info -->
<flags id="Lqin" />
<!-- Team name -->
<flags id="Ttea" />
<!-- Team's nation. Will be hidden if not an international club comp -->
<flags id="Dnat" />
<!-- Overall played -->
<flags id="LOpl" />
<!-- Overall won -->
<flags id="LOwo" />
<!-- Overall drawn -->
<flags id="LOdr" />
<!-- Overall lost -->
<flags id="LOlo" />
<!-- Overall for -->
<flags id="LOfo" />
<!-- Overall against -->
<flags id="LOag" />
<!-- Overall goal difference -->
<flags id="LOgd" />
<!-- Overall points -->
<flags id="LOpo" />
<!-- Away average points -->
<flags id="LAap" />

</record>
</record>


You can also resize the columns to do this you first need to change the line of code from flags to record and then add a width="X" bit where X is the width of the column, so if you wanted to resize the Qualification Status column to take up 200 pixels you'd change this line:

<!-- Cup qualification info -->
<flags id="Lqin" />


To read:

<!-- Cup qualification info -->
<record id="Lqin" width="200"/>


You can also change the alignment by adding the following alignment="left/centre/right" so if you wanted the Qualification Status content to be right aligned you'd change the code to read:

<!-- Cup qualification info -->
<record id="Lqin" alignment="right"/>


Note again that you need to have changed the flag code to record to get the changes to be read by the game.

You can also combine codes, so if you wanted the Qualification column 200 pixels wide and right aligned you'd change the code to read:

<!-- Cup qualification info -->
<record id="Lqin" width="200" alignment="right"/>


There are various other codes you can use as well (it looks like any of the styling codes used elsewhere will work) these are just a couple (replacing X with the value you want):

spec="X" - assign content to take on text, title font styling.
colour="X" - changes the colour of the content.
style="X" - changes font style, bold etc...

Also in the width values you can use -1, -2, -3 etc... values to dynamicaly adjust the width of the columns depending on resolution rather than having them at fixed widths (team name column looks like it's still defaulted to -1 which means it used up what space is left after the other columns have been called).

Unfortantly at the moment I haven't found the code that will also adjust the headings, so if you change the width or alignment values you might find that the header for the column isn't lined up with the content.

Also the file itself doesn't seem to contain any details as to what the default width of the columns are so adjusting the widths is a bit hit and miss.


An Example

In the below example I will show you how to move the content of the Overall view over to the left hand side of the table by moving the info column to the right and having that set to take up the extra space.

The default code for the Overall view is this:

<!-- Overall stats -->
<record id="over">
<translation id="text" translation_id="359652" type="use" value="Overall[COMMENT: league_table; use top 10 matches; category for stats relating to performance at home or away]" />
<record id="view">
<!-- Main league position -->
<flags id="Lpos" />
<!-- Cup qualification info -->
<flags id="Lqin" />
<!-- Team name -->
<flags id="Ttea" />
<!-- Team's nation. Will be hidden if not an international club comp -->
<flags id="Dnat" />
<!-- Overall played -->
<flags id="LOpl" />
<!-- Overall won -->
<flags id="LOwo" />
<!-- Overall drawn -->
<flags id="LOdr" />
<!-- Overall lost -->
<flags id="LOlo" />
<!-- Overall for -->
<flags id="LOfo" />
<!-- Overall against -->
<flags id="LOag" />
<!-- Overall goal difference -->
<flags id="LOgd" />
<!-- Overall points -->
<flags id="LOpo" />
</record>
</record>


So what we need to do is use the information learned at the top of the post and move the qualification code to the bottom, give it a dynamic width and then change the team name width from dynamic to fixed, this means when changing resolution the team name column will stay fixed and the qualification one will resize keeping everything on the left of the screen no matter your resolution:

<!-- Overall stats -->
<record id="over">
<translation id="text" translation_id="359652" type="use" value="Overall[COMMENT: league_table; use top 10 matches; category for stats relating to performance at home or away]" />
<record id="view">
<!-- Main league position -->
<flags id="Lpos" />
<!-- Team name -->
<record id="Ttea" width="200"/>

<!-- Team's nation. Will be hidden if not an international club comp -->
<flags id="Dnat" />
<!-- Overall played -->
<flags id="LOpl" />
<!-- Overall won -->
<flags id="LOwo" />
<!-- Overall drawn -->
<flags id="LOdr" />
<!-- Overall lost -->
<flags id="LOlo" />
<!-- Overall for -->
<flags id="LOfo" />
<!-- Overall against -->
<flags id="LOag" />
<!-- Overall goal difference -->
<flags id="LOgd" />
<!-- Overall points -->
<flags id="LOpo" />
<!-- Cup qualification info -->
<record id="Lqin" width="-1"/>

</record>
</record>


The above code will make the league table keep it's shape at different resolutions, you just need to pick a width value for the team name column that suits you:





Send to Kindle

---
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/