Как сделать скин для FM2009 - часть 1.
Translations of this material:
- into Russian: Как сделать скин для FM2009 - часть 1.. Translation complete.
-
Submitted for translation by shevelevee 19.03.2009
Published 2 years, 10 months ago.
Text
A lot of people have asked, both here and elsewhere, for skinning tutorials, and short of a basic tuturial for FM07 and a couple of guides on how to change colours etc, there just isn't anything to cater for those who are looking to learn.
I decided to do this a while ago, and the skin didn't go anywhere, so by posting it here whilst it is still a work in progress, I intend to motivate myself to get it finished this time.
A couple of disclaimers:
I am making a new skin and will document everything that I do as it moves from the default skin to the new finished product. This is not meant as the be all and end all of skinning, just as I am not the be all and end all of skinners. It is not an exhaustive guide on how to create a skin for Football Manager. The skin itself is not intended to be a world-beating interface for the game, but purely a project to enable me to look at the xml - this is more about showing you the coding than making something so good you nearly wet yourself just looking at it
With that in mind, I'll try to keep things relatively simple (which won't be that hard, it's not as evil as it all looks), and will keep the topic open so anyone can add their comments and questions. At the end I'll gather all the instructional posts together and merge them into a single guide, so no one has to go filtering through all the additional posts made in between them. The skin will also be released when it is done, should anyone want it
A couple of resources:
Radestock's Skinner Panel - This is probably the most useful skinning tool there is, although saying that, it's not as if there's an abundance of them. The skinner panel is simple, but effective. It provides a small, moveable button in your skin, that allows you to reload the skin just by pressing it twice. This is useful for two reasons. First, it gives you a shortcut, so you don't constantly have to go through the preferences menu when you are making every little adjustment to your skin. Second, and importantly, the button is always visible, which is vital in those situations where you make an error in the code and the menu no longer appears. You'll see the skinner panel in the progress screenshots I'll be posting with the making of my new skin.
FM2009 Default Skin - Since FM08, the skin elements have been locked away in .fmf files that you can only access with the resource archiver tool. FM09's skin comes in four separate folders, and this download gathers the elements from all four and puts them into one handy file for those who can't, or don't want to extract the skin files themselves.
So, where to start?
I know a lot of skinners start by producing a mock up of their idea in Photoshop, and move on afterwards to transferring that into the game. I don't tend to work that way, if I'm honest, and for this project, the idea isn't to make a perfect skin, so spending a lot of time and effort putting together a preview isn't necessary.
So we'll start with the first step, but before that, the first tip of the day:
Always try to start from scratch if you're looking at creating a skin to release. That way, the base is the default skin, and the work is your own - using someone else's skin as your base means that you're going to end up with someone else's code or graphics in your skin at some point, which is not fair or right.
So, starting from scratch is creating a home for your skin. Head to your "user data folder" which should be in the following location:
(My) Documents/Sports Interactive/Football Manager 2009
There should be a folder in that location named "skins" (if not, just create one). Create a new folder inside the skins folder and give it the name of your skin. You can chance the name of your skin at any point, and especially at this stage, the name isn't all that important, so long as the skin actually has one. I haven't thought about a name for my new skin yet, so I'm just going to call it "WIP" for "work in progress." With that in mind, I now have the following location on my harddrive - Documents/Sports Interactive/Football Manager 2009/skins/wip
In your new folder, create three more folders: graphics, panels and settings.
From the default skin (see the first post for a download link if you don't have this available), copy across the following files into the same folders you find them in:
Settings: config, fm colours
Panels: config, global panels, sections
And from the main folder: fm2009
This last file is the one we'll work on first. Rename it to exactly match the name of your new skin (so I'll retitle mine from "fm2009" to "wip"). Once done, open the file and edit the information inside - this is an xml file, like those in the panels folder, and will open in notepad.
This is what you'll see in this file (note that I've missed out a bit of the code above and below this as it's not relevant at this point):
--- здесь будет часть кода ---
You'll notice that the files give you hints (between <!-- and -->) for a lot of the code. The game doesn't read these but they do provide you with useful information, telling you what various things do.
There's 5 separate areas here to edit: name, author, description, version and parent.
This is really as self explanatory as it sound, for the first four. Change the values (in "") for your own skin. The name here does not have to exactly match the file and folder name that we changed earlier, so I shall change mine to "WIP Left" because it's going to be a left-sided version, and capitals are neater! Author is me, so I change that to "Murray" and version I'll keep as "1.0" because it's the first version.
Description is something that you can change or not really, it's personal choice for FM09 I think, as unless you make changes to some screens later, the game doesn't actually display this information. You'll notice when you go to change a skin, the value given instead of "description" is "website" but that isn't listed in this config file, so we'll ignore it.
The last part is "parent" and is important. This tells the game where to look for anything that is missing from your skin. Change it to "fm2009" - all this does is tells the game that you're using FM09's default skin as the base. It means that you don't have to include everything in your skin, because anything you leave out will still be provided, because the game will take the default image to cover the one that isn't available in your skin.
To this end, another tip:
In your skin, only include the panels and graphics that you have changed (with the exception of those vital few files you've already moved across but may not edit). Everything you leave the same will be provided by the default skin, so by leaving them out of your own, you will lessen the size of your skin - you'll literally just be including vital files.
Once our changes are done, and the file saved, load up FM09 and refresh the skin cache.
To do this, go to Options > Preferences and select Display and Sound. Tick "always reload skin on confirm" and untick "use skin cache" (see the image below) then press confirm.
[img]http://img32.picoodle.com/img/img32/3/1/2/murray_g/f_skincachem_86fff25.png[/img]
Once the skin has reloaded, you'll notice that it's exactly the same as the default skin - because you've not altered anything in terms of graphics or coe yet. If you've used Radestock's Skinner Panel, the only difference you'll notice is the addition of the "floating button" to the lower right of the screen. Now your skin has it's place held, you can move on to actually making those changes, my first will be to change the titlebar...
