Jump to content

FM2011 XML (part of the guide do not use on it's own)


radestock

Recommended Posts

To allow the game to see your new graphic you'll need to create what's called a 'config.xml' file for most types of graphic (faces/kits/logos). There are some graphics that do not require a config.xml file. These are normally add-on graphics that change aspects of a skin like SITV graphics, player rating stars or 2D pitch items such as Balls, Popups, Nets and Player Icons. These rely on being put in the right place rather than config.xml files. If you are adding these then skip this section.

How to Create a Config File

A config file is an xml document that sits in the same folder as the graphic you want to add. Football Manager reads the config file and is told where the graphics files in the folder should be displayed. Without a config file the game just sees a load of graphics files and doesn't know what to do with them.

There are a few ways to create a config file:

1.Create the file from scratch.

2.Edit an existing config.xml file.

3.Use a program that will create the file for you such as FM Graphics Configurator or fmxml.

1. How to create a config file from scratch.

First thing you need to do is to create a blank file, the easiest way to do this is to open a new file with notepad, (or any other text or webpage editor) when you have opened a new file with notepad paste in the following code. This is just the basic information that every config.xml file needs:

 [i]<record>[/i]
 [i]                <!-- resource manager options -->[/i]

 [i]                <!-- dont preload anything in this folder -->[/i]
 [i]                <boolean id="preload" value="false"/>[/i]

 [i]                <!-- turn off auto mapping -->[/i]
 [i]                <boolean id="amap" value="false"/>[/i]

 [i]                <!-- logo mappings -->[/i]
 [i]                <!-- the following XML maps pictures inside this folder into other positions[/i]
 [i]                                 in the resource system, which allows this folder to be dropped into any[/i]
 [i]                                 place in the graphics folder and still have the game pick up the graphics[/i]
 [i]                                 files from the correct places[/i]
 [i]                -->[/i]

 [i]                <list id="maps">[/i]


 [i]                </list>[/i]
 [i]</record>[/i]

You shouldn’t ever change any of the above code. The bit that you change depending on what you are creating is located between
<list id="maps">
and
</list>
that is currently blank. Each different type of graphic (logo, kit, background logo, face pic) requires a different code to be used. Here we're going to demonstrate the process by displaying the normal logo for Manchester United, the code for this is:

 [i]<record from="680" to="graphics/pictures/club/680/logo"/>[/i]

The 680 refers to the 'unique ID' belonging to Manchester United. Everything has a unique ID in Football Manager, Players, Clubs, Staff, even competitions and leagues. You can find the unique ID for whatever you want either with the game editor or by checking the box called 'show unique IDs' within game preferences. If you do that the unique ID for something will be shown instead of the sub-text (the bit that says a player's positions, or a club's position in the league).

from="680"
is the .png graphics file the game is reading from (so it will look for a file called 680.png). Files can be called anything but it's easier to avoid duplicates and keep things organised by using the unique ID as the file name.
to="graphics/pictures/club/680/logo"
is the location that the graphics file will be mapped to. In this case the line of code tells the game that file 680.png is the normal logo for the club with unique ID 680. This part of the code is the bit that will change depending on what you're adding (logo/kit/face etc).

So a config file just displaying this logo would look like this:

 [i]<record>[/i]
 [i]                <!-- resource manager options -->[/i]

 [i]                <!-- dont preload anything in this folder -->[/i]
 [i]                <boolean id="preload" value="false"/>[/i]

 [i]                <!-- turn off auto mapping -->[/i]
 [i]                <boolean id="amap" value="false"/>[/i]

 [i]                <!-- logo mappings -->[/i]
 [i]                <!-- the following XML maps pictures inside this folder into other positions[/i]
 [i]                                 in the resource system, which allows this folder to be dropped into any[/i]
 [i]                                 place in the graphics folder and still have the game pick up the graphics[/i]
 [i]                                 files from the correct places[/i]
 [i]                -->[/i]

 [i]                <list id="maps">[/i]

 [i]<record from="680" to="graphics/pictures/club/680/logo"/>[/i]

 [i]                </list>[/i]
 [i]</record>[/i]

Now when you have pasted this code into notepad, you can save the file, goto File -> Save As and name the file config.xml – you need to ensure notepad saves the file as config.xml and not config.xml.txt, select 'all files' from the file type drop down box whilst saving.

You have now created a config file, you now need to place this config file in the same folder as your Man Utd logo (in the above example the logo graphic would be called 680). A single config file can contain multiple entries if you have multiple graphics files to add (for example you might have a folder with every EPL badge and a single config.xml file mapping all 20 badges to the game). You can also have as many config.xml files as you want. As long as there is only one config.xml per folder and the graphics the config file refers to are in the same folder, you can separate your graphics up into multiple sub-folders with lots of config files.

Coding Examples

As mentioned above, different types of graphics (kits/logos/faces etc) require slightly different codes to be entered. The different codes are detailed below.

FILE_NAME
– is the name of your graphic, in my example above it was 680 (note the lack of a file extension in the name).

UNIQUE_ID
– is the unique ID of the object, obtainable from the editor or in game.

Club Logos:

Normal Logo

<record from="
FILE_NAME
" to="graphics/pictures/
club
/
UNIQUE_ID
/logo"/>

Huge Logo

<record from="
FILE_NAME
" to="graphics/pictures/
club
/
UNIQUE_ID
/logo/huge"/>

Small Logo (or Small Flag for the case of countries)

<record from="
FILE_NAME
" to="graphics/pictures/
club
/
UNIQUE_ID
/icon"/>

Background Right Logo

<record from="
FILE_NAME
" to="graphics/pictures/
club
/
UNIQUE_ID
/logo/background/right"/>

Background Left Logo

<record from="
FILE_NAME
" to="graphics/pictures/
club
/
UNIQUE_ID
/logo/background/left"/>

For Nations replace
club
with
nation

For Competitions replace
club
with
comp

For Continents replace
club
with
continent

Also for Nations to replace the large flag (wizard and match screen) you need this code:

<record from="
FILE_NAME
" to="graphics/pictures/nation/
UNIQUE_ID/
flag"/>

3D Kits

To change the kits on the 3D match screen you need to add the following to the config file

Home Kit

<record from="
FILE_NAME
" to="graphics/pictures/team/
UNIQUE_ID
/kit_textures/home"/>

Away Kit

<record from="
FILE_NAME
" to="graphics/pictures/team/
UNIQUE_ID
/kit_textures/away"/>

Third Kt

<record from="
FILE_NAME
" to="graphics/pictures/team/
UNIQUE_ID
/kit_textures/third"/>

2D Kits

To display the 2D kits in the club information and match screen

Home Kit

<record from="
FILE_NAME
" to="graphics/pictures/team/
UNIQUE_ID
/kits/home"/>

Away Kit

<record from="
FILE_NAME
" to="graphics/pictures/team/
UNIQUE_ID
/kits/away"/>

Third Kit

<record from="
FILE_NAME
" to="graphics/pictures/team/
UNIQUE_ID
/kits/third"/>

Now if after using the above codes for the kits one still doesn’t show you may need to edit the code, as the team may have a special kit they are using for a season, so to enable the kit to show for future seasons you need to add an extra line to the config file, you basically add the year to the end of the line:

<record from="
FILE_NAME
" to="graphics/pictures/team/
UNIQUE_ID
/kit_textures/third/2010"/>

If 2010 doesn’t work try 2008 or 2009 etc... Generally you need the year you're playing in to be added. So if you are in 2015 game time, you need to add that to the end of the line.

Player/Staff/Manager etc Faces

Normal Face

<record from="
FILE_NAME
" to="graphics/pictures/person/
UNIQUE_ID
/portrait"/>

Small Face

<record from="
FILE_NAME
" to="graphics/pictures/person/
UNIQUE_ID
/icon"/>

In FM2011 the way the editor creates players has changed and in some cases the unique ID may change from game to game (especially if you add more than one editor file to your game) fortantley there is an alternative method to get player faces into the game without needing to know their unique id:

Normal Face

<record from="
FILE_NAME
" to="graphics/pictures/person/
{FIRSTNAME} {SURNAME} {BIRTHDAY_DD}-{BIRTH_MONTH_MM}
/portrait"/>

Small Face

<record from="
FILE_NAME
" to="graphics/pictures/person/
{FIRSTNAME} {SURNAME} {BIRTHDAY_DD}-{BIRTH_MONTH_MM}
/icon"/>

So for example if your players name was John Smith and he was born 30th March (year doesn't matter) and the filename of your graphic was johnsmith the line for the normal
face would look like:

<record from="
johnsmith
" to="graphics/pictures/person/
john smith 30-03
/portrait"/>

Backgrounds:

For people (including players and staff):

<record from="
FILE_NAME
" to="graphics/pictures/
person
/
UNIQUE_ID
/background"/>

For Teams (club and national) replace
person
with
team

For Competitions replace
person
with
comp

For Continents replace
person
with
continent

For Stadiums replace
person
with
stadium
where the ID is either the ID of the club that plays there or the stadium's ID gained from the game editor.

-------------------------------------------------------------------------------------

The above examples all depend on the config.xml file being put into the same folder as the graphic file, now you can have the config file in the parent folder to the graphic(s) (This is how SI do it, but I don’t really like it) and if you are doing that you need to adjust the code to look like this:

<record from="FOLDER/
FILE_NAME
" to="graphics/pictures/person/
UNIQUE_ID
/portrait"/>

In the above example you have the config file and a folder called FOLDER in the same folder, but with the graphic in the folder called FOLDER.

2. Editing an Existing Config File

This is just a case of copying the file you want to edit to the location you want, then opening the file in notepad and changing either the filename or Unique ID to match your graphic/team.

3. Using FMxml or FMGraphics Configurator

With programs like these, the best option is to name your graphics by unique ID, put all the graphics of the same type in one folder, load the program select the correct options and then drag the folder of graphics you want a config creating for into the program, and it will create the config file for you.

FMxml Download Link

FMGraphics Configurator Download Link

FMS XML Konfigurator by k750i Download Link

------------------------------------------------------

Now you have your graphic and your xml file in a folder, we need to know where to put it. The next step explains this process.

Go to the next step

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...