To homepage
667 online
The definitive FM fan site
Footbe - Your football betting environment

Home / Advice / FM Tutorials

FM 2010 Data Editor - Advanced Editing Tips

author By date views 12901 views comments 4 Comments
Original article here @ SI forums, posted by The Amazing Dale Watkins

I've spent quite some time with the editor to create leagues, and I've butted my head against the walls on more than one occasion, trying to solve weird issues or overcome editor limitations. There is so little information on the more advanced editor topics out there, that I figure I'm gonna post some of these findings in the hope that others find it useful, and maybe save their head from similar maltreatment.

Resolving the Require minimum of xx teams in division X, found only 0 error message
The problem is caused by the rules set in the nation file stored in the editor/data/basic comps. Some countries have rules set for divisions even if they aren't playable in the game. For example, the basic ruleset for Germany determines a minimum number of teams for all of the divisions in the db, even the not playable 4th and 5th tiers. Similar rules for non-playable competitions exist in other countries. The obvious solution is to keep using the same divisions that are already there and fill them up with enough teams, but what do you do when you need to change the structure and the old divisions just don't make sense? Some of the data is so old and outdated that these divisions don't even exist anymore in real life, yet the game complains if you don't use them.

That's where this little trick comes in: save the editor data and open the xml file in a text editor, such as notepad. At the beginning of the file there will be a <record id="rule_group"> for the country you're editing, and in there you'll see a <list id="required_teams"> followed by a bunch of records that set the minimum and maximum number of teams for a competition. It looks like this:

			<record>
				<string id="competition" value="8700001"/>
				<string id="nation" value="0"/>
				<string id="minimum_number_teams" value="10"/>
				<string id="maximum_number_teams" value="-1"/>
				<boolean id="next_season" value="false"/>
			</record>

Look for the competition ID that causes you problems and delete the entire record. Save, and reload the file in the editor. Voila.

How to make regional divisions work properly
I shouldn't say properly, because the way the game handles the data is pretty bad, and you won't have a 100% success rate, but you can get pretty close if you put in some work. You have probably already noticed that there's a new regional boundaries section for newly created competitions. The idea behind that is that you can set four boundaries and only clubs that fall into the boundaries are supposed to get placed in that competition. It would be great if it worked that easily, but unfortunately it doesn't.

The very first pitfall is that boundaries can only work if the game knows where a particular club is located, and the only thing tying a club to the map is its stadium. So you'll have to go through all the clubs and make sure they have a stadium set. An easy way to do that is to filter the clubs by your nation and by "Stadium" "Is" "" (yeah, that's a blank). However, you'll also have to make sure that each stadium is in a city, which in turn has proper coordinates set in the db. This is usually the case, but there are some countries in the db where a lot of coordinates are missing.

Ok, now you've gone through all this work, simulate a season, and goddarnit, it still won't work? Welcome to Editor hell. Unfortunately, there are scenarios where the clubs will have to be moved, and that's when the game is making up its own rules on how to do that.

For example, let's say you have a Northern and Southern division, with one promotion spot each. Now two northern teams from the tier above are getting relegated, and none from the South. What the game should be doing is move the Northern team closest to the southern boundary to the Southern division. However, what will most likely be happening instead is that one or more teams randomly switch divisions, without regard to geography. With teams getting promoted from below and with more than two regional divisions on a tier, things get exponentially worse, to the point that the entire mix looks very random.

Thankfully, there is still the old "regional divisions" tab available on each club page, and you can use that to improve the accuracy significantly. Set a regional division for each level (tier) for each club, and watch the number of mismatches go down dramatically. I can't explain why this is happening, but it did the trick for me. You'll still get the occasional odd move, but you will no longer see multiple senseless re-locations that completely shuffle the divisions.

How to merge multiple data files
This is a complete nightmare, and you should avoid merging data at all cost. Whenever you have newly created data in more than one file and want to merge the two, things go absolutely haywire, and you won't even always notice it right away. There seems to be a bug in the Merge function that doesn't properly reassign IDs to newly created objects in the second file, so you end up with duplicate unique IDs for different objects, causing teams, players, stadiums, etc to outright disappear. So again, simply don't do it is by far your best option. However if you must, and you're into masochism, there's a way to salvage hard work when it's split up in multiple files.

Again this involves editing the XML files manually, by using a text editor. The idea is to give all newly created objects in the second file new IDs, and getting rid of all duplicate data, such as competitions that are created in both files. To find the duplicate data, I recommend using winmerge, a freeware utility that allows you to see differences in two files side by side. Delete all the duplicate data in the second file. There will be some minor differences because the editor tends to change datatypes from "unsigned" to "string" for no particular reason, but you can ignore those. It will work fine regardless of datatype.

After you've weeded out the duplicates, it's time to reassign IDs. I can't get into great detail here because this would be a novel, but if you figure out how new objects are stored in the XML, you can identify its unique ID and then do a "replace all" to replace it with something that's larger than the highest ID in the original file. Do that for each object, be it a club, person, competition, city or stadium. When you merge the modified data the editor will properly reassign all IDs to be in sequence.

Hopefully SI will fix this in the next patch, but for now maybe this saves some people from having to throw away a lot of work they've put in.

Some troubleshooting tips for crash dumps
Crash dumps can happen for many reasons, and frequently occur on the new season start date. Some reasons I've found were:
corrupt data (especially if you try to merge, so don't do that).
Not enough teams eligible for promotion to the lowest tier. Test that by disabling relegation from the lowest tier.
Playoffs. Try disabling the playoffs, if the error goes away you at least narrowed down where to look.
There are probably a ton of other reasons, but you can start there.

How to make the unique ID field on the club screen no longer read-only
Graphics editors have been exasperated by how much harder it is to create logos for clubs because they can no longer copy and paste the unique ID field. That's relatively easy to fix, but don't do it unless you have to, because my fix makes the unique ID editable, and you'll want to avoid editing the unique ID in the editor.

Open the file club ui.xml in the folder C:\Program Files\Sports Interactive\Football Manager 2010\tools\editor\data\format\database ui
near the top, edit the line that says <record db_field="club,duni" is_read_only="true"/> and change the true to a false. Save the file (you may need administrator access in Vista and Win 7) and the field will turn into a regular text field that you can copy from.

How to change the columns shown in the editor, i.e. adding the Unique ID column
Here's a quick guide for adding a Unique ID column to the clubs screen. The same concept also works for adding any other kind of column to any of the screens.

Open the file club ui.xml in the folder C:\Program Files\Sports Interactive\Football Manager 2010\tools\editor\data\format\database ui
At the top you see the fields for the clubs table, looking like this:

	<!-- fields for the clubs table -->
	<record id="clrs">
		<list id="fields">
			<record db_field="club,Csnm" width="-2"/>		<!-- name -->
			<record db_field="club,Cnti" width="-2"/>		<!-- nation -->
			<record db_field="club,Cdvi" width="-2"/>		<!-- division -->
			<record db_field="club,Crep"/>				<!-- reputation -->
		</list>
	</record>

Add a line for the column(s) you want to show. For the Unique ID I did the following:

	<!-- fields for the clubs table -->
	<record id="clrs">
		<list id="fields">
			<record db_field="club,Csnm" width="-2"/>		<!-- name -->
			<record db_field="club,Cnti" width="-2"/>		<!-- nation -->
			<record db_field="club,Cdvi" width="-2"/>		<!-- division -->
			<record db_field="club,duni" width="75"/>		<!-- unique ID -->
			<record db_field="club,Crep"/>				<!-- reputation -->
		</list>
	</record>

The width of 75 causes it to be a fixed width of approximately the right size for the 8 digit IDs. Setting it to -2 like the others would cause it to be evenly sized and grow with the screen width, making the other fields smaller.


Hope these are useful for someone. If you have similar nuggets that you've discovered after lots of trial and error and can help other people avoid similar frustration, please post them here.


pushI speak my mind and I speak the truth. FM Scout is my brainchild and I try to make it a better place every year. I consider myself a lucky man for being able to turn this website into an engaging and vibrant community.


4 Comments

Discussion on "FM 2010 Data Editor - Advanced Editing Tips"

sergioma332009-12-18 16:56
i cant do anything with the regional divisions in spain, i cant make them to be in his own division, the game do it on his way, and i get stressed,
i put every team his regional division, and all, but it his impossible

Avatar
manager-1822009-11-26 12:46
wow i havent tried any of this yet but it seems your more helpful than si! i dont think they have any idea

Group Stam2009-11-12 14:05
You're welcome, glad this could be useful to someone :D

Avatar
BeyZade2009-11-12 14:04
Thanks man.:beer

Login to Comment