Jump to content
Sports Interactive Community
The Amazing Dale Watkins

A thread for some advanced editing tips

Recommended Posts

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.

- Teams entering a cup when the team has no nation set.

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 -->
           [color=red]<record db_field="club,duni" width="75"/>        <!-- unique ID -->[/color]
           <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.

Share this post


Link to post
Share on other sites

Very good post. With reference to the issues with regionalised divisions, I understand that SI are currently working on a solution to this.

Regards,

C.

Share this post


Link to post
Share on other sites

Just changed my created super cup to two-leg style (option disabled in editor at the moment):

Before:

<date id="date" day="10" month="7" year="2009" hours="0" minutes="0"/>

<string id="number_legs" value="1"/>

After:

<date id="date" day="10" month="7" year="2009" hours="0" minutes="0"/>

<date id="date_2" day="24" month="7" year="2009" hours="0" minutes="0"/>

<string id="number_legs" value="2"/>

Trying to do some advanced things atm (like transfer windows for free transfers or foreign players only etc.) but no luck yet, perhaps because I don't have too much experience editing xml or it's just disabled.

Manually added new transfer window to my test league

<record>

<string id="type" value="foreign_players_only"/>

<date id="start_date" day="1" month="9" year="2009" hours="0" minutes="0"/>

<date id="end_date" day="1" month="10" year="2009" hours="0" minutes="0"/>

</record>

Took "foreign_players_only" rule from tools\editor\data\format\rulegroup\transfer_rules.xml

There are loads of advanced options but I think those are for developers' vesion of editor and disabled for us.

Share this post


Link to post
Share on other sites

Great post, mate! But I have a very dumb and basic question to ask! Where is the XML files located? In "My Documents" folder or in Program files?? Thanks for the help!

Share this post


Link to post
Share on other sites
Great post, mate! But I have a very dumb and basic question to ask! Where is the XML files located? In "My Documents" folder or in Program files?? Thanks for the help!

It's all in the editor FAQ sticky thread.

Share this post


Link to post
Share on other sites

This needs to be stickied, really useful stuff in here. Especially intriguing that directly editing the .xml file can allow more advanced editing. Cheers :)

Share this post


Link to post
Share on other sites

Excellent news, especially regarding how to add new columns to the editor.

Seeing as you're evidently much more au fait with xml editing than me, I was wondering if you could help me with a problem.

I downloaded an edited database and modified it. One player I deleted (which was added to the edited database), however, is still visible in the squad screen. He is not clickable and none of the squad views give any info about him (contract, nationality etc). I opened the xml file and found him still in there and got his UID. If I delete all items in the xml attached to that UID, will I corrupt it? I'm loath to delete it, play on and end up finding out further down the line that I messed it up and corrupted the file.

Share this post


Link to post
Share on other sites

Great work so far!

I was wondering if someone could help me with a couple of my questions? (Since my thread not getting any attention and you guys seem to know a lot!)

1. I made a league using UAE as home country. Stadiums set around the world, but when the transfer window is open, my teams only buy UAE based players, is there any way I can change their buying behaviour?

2. I want my teams to receive more players from their parent team, which type of "affiliation" should I select?

There were a couple more things but I'll play around with the editor for a little while longer before bothering you guys. Hope someone can help me! Might put my project online once finished.

Share this post


Link to post
Share on other sites
It should work if you delete all records pertaining to that ID, just make sure you get all of them.

I'll try it, let it on holiday for a season or two and make a backup, just in case.

Great work so far!

I was wondering if someone could help me with a couple of my questions? (Since my thread not getting any attention and you guys seem to know a lot!)

1. I made a league using UAE as home country. Stadiums set around the world, but when the transfer window is open, my teams only buy UAE based players, is there any way I can change their buying behaviour?

2. I want my teams to receive more players from their parent team, which type of "affiliation" should I select?

There were a couple more things but I'll play around with the editor for a little while longer before bothering you guys. Hope someone can help me! Might put my project online once finished.

Can't really help you with the second one but re: the first one - you can go into nations > UAE in editor and there is a tab named transfer preferences. In there you can add specific transfer preferences and scouting knowledge for countries...

Share this post


Link to post
Share on other sites
Excellent news, especially regarding how to add new columns to the editor.

Seeing as you're evidently much more au fait with xml editing than me, I was wondering if you could help me with a problem.

I downloaded an edited database and modified it. One player I deleted (which was added to the edited database), however, is still visible in the squad screen. He is not clickable and none of the squad views give any info about him (contract, nationality etc). I opened the xml file and found him still in there and got his UID. If I delete all items in the xml attached to that UID, will I corrupt it? I'm loath to delete it, play on and end up finding out further down the line that I messed it up and corrupted the file.

Yeah - that's a bug in the editor. To delete players, you must not have double-clicked on them beforehand, otherwise they will remain as "ghost-players" in the game. You can sort it out as described by Dale - first deleting the <record>-</record>-section where the player was created, and then deleting the <record>-</record>-section where the player was deleted.

Share this post


Link to post
Share on other sites
Yeah - that's a bug in the editor. To delete players, you must not have double-clicked on them beforehand, otherwise they will remain as "ghost-players" in the game. You can sort it out as described by Dale - first deleting the <record>-</record>-section where the player was created, and then deleting the <record>-</record>-section where the player was deleted.

I've done what Super Dale Watkins (20 shooting back in the day - what a LL player) suggested and it appears to have solved itself :thup:

Share this post


Link to post
Share on other sites

I was wondering if it would be possible to add the ability to filter by second nations in the editor by editing the XML file for the filters in the editor?

Share this post


Link to post
Share on other sites

For second nations searching the answer is NO trust me I have tried it

As for the advanced rules I have managed to enable them in the editor but for some reason the game does not see them

Share this post


Link to post
Share on other sites

I think the only way to sort out the second nation thing is to search for eligable players in the game. I did this and removed about 4 players.

Share this post


Link to post
Share on other sites

Adding an award tip

If you want a created award but also want working correctly, search and duplicate one of the exiting awards form any league and edit league / Nation Parts.

Share this post


Link to post
Share on other sites

Follow up to my previous question about different matchdays for subdivisions at the same level.

I looked into the xml file and saw the following:

<record>

<unsigned id="competition" value="98005478"/>

<string id="use_game_rules" value="not_in_game"/>

<boolean id="has_sub_divisions" value="true"/>

<string id="type" value="league"/>

<integer id="minimum_number_teams" value="16"/>

<integer id="maximum_number_teams" value="16"/>

<integer id="number_rounds" value="2"/>

<string id="priority" value="league_low"/>

<real id="initial_tv_money" value="250000.000000"/>

<real id="parachute_money" value="0.000000"/>

<integer id="promotion_places" value="4"/>

<integer id="relegation_places" value="6"/>

<boolean id="b_teams_cannot_be_promoted" value="false"/>

<list id="sort_value">

<string value="goal_difference"/>

<string value="goals_for"/>

</list>

<boolean id="use_specified_fixtures" value="false"/>

<date id="start_date" day="10" month="7" year="2009" hours="0" minutes="0"/>

<date id="end_date" day="10" month="5" year="2010" hours="0" minutes="0"/>

<record id="match_days">

<string id="day_of_week" value="sat"/>

<string id="time" value="1430"/>

</record>

<string id="check_clashes" value="none"/>

<list id="tv_dates"/>

<list id="league_fixtures"/>

<list id="opening_league_fixtures"/>

<list id="closing_league_fixtures"/>

<list id="prize_money"/>

<string id="subs_rules" value="three_from_seven"/>

<list id="match_fixture_rules"/>

<list id="squad_fixture_rules"/>

<list id="child_competitions">

<record>

<integer id="competition" value="98005479"/>

</record>

<record>

<integer id="competition" value="98005480"/>

</record>

</list>

</record>

I reckon the bold part are the subdivisions.

Now if I add the lines

<record id="match_days">

<string id="day_of_week" value="sun"/>

<string id="time" value="1430"/>

</record>

to one of those will it make them play on sunday?

Share this post


Link to post
Share on other sites

When I want to edit or create a award, the tick box corresponding to "Minimum Percentage of Games Played" does not work. Is there a way to get it working?

Share this post


Link to post
Share on other sites

I reckon the bold part are the subdivisions.

Now if I add the lines

<record id="match_days">

<string id="day_of_week" value="sun"/>

<string id="time" value="1430"/>

</record>

to one of those will it make them play on sunday?

unlikely, but what you can try is add a record for the child division and enter it there. Something like

<record>
   <unsigned id="competition" value="[b]98005479[/b]"/>
   <record id="match_days">
       <string id="day_of_week" value="sun"/>
       <string id="time" value="1430"/>
   </record>
</record>

It's probably gonna crash, but worth a shot. If this works we could do a bunch of other things we previously couldn't, such as having a different number of promotion/relegation places for subdivisions, which would make me very happy, so make sure to report back.

Share this post


Link to post
Share on other sites

Ok thanks for trying though. Kind of a bummer it doesn't work. It would've added to the realism in my Dutch league setup.

BTW, have you tried both mine and your option? If not, I'll try mine tomottow

Share this post


Link to post
Share on other sites

Trick i found out today, if you want all clubs in a certain league be the one nationality, just click on the nation set for the league again and he presto all clubs in that division will be the one you want.

Share this post


Link to post
Share on other sites

I am trying to play around the xml but no success so far.

Basically I have created a CFA french league (tier 4) and defined in the editor a win = 4 points. There is no way to change the point for a draw or the point for a defeat.

I have tried to modify that in the xml but no success. Do you think that it is impossible even if the xml code is available in the league.xml file (C:\Program Files\Sports Interactive\Football Manager 2010\tools\editor\data\format\rule group) ?

before

<string id="points_for_win" value="4"/>

after

<string id="points_for_win" value="4"/>
<string id="points_for_draw" value="2"/>
<string id="points_for_defeat" value="1"/>

Share this post


Link to post
Share on other sites

I looked at the league.xml and indeed it looks like that would be something you can modify, or why else define it? Maybe they didn't get around to implementing that feature, or maybe it's only applicable to some special league formats. Have you tried changing the default in the league.xml to see what happens? That could give a hint as to whether it isn't in the game entirely or just not in the context you're using it.

Share this post


Link to post
Share on other sites

Also, I don't think league.xml is applicable for custom leagues. the file it draws from is "basic league settings.xml". I'm not sure what the league.xml is used for, but all the user-defined leagues seem to be basic leagues. Maybe the other is only applicable for in-game, hardcoded leagues.

Share this post


Link to post
Share on other sites
Maybe the other is only applicable for in-game, hardcoded leagues.

apparently yes as I saw that the French -18 competition allows 2 points for a draw and 1 point for a defeat and the rules are hardcoded.

Hopefully this option will be available with FM 11

Thanks for your help anyway.

Share this post


Link to post
Share on other sites

Does anybody know if it is possible to alter the amount of goals that are scored in a particular league or nation?

I have created a league that is a poor standard. This seems to mean that not very many goals are scored. I have trialled this using holidays and the games seem to average between 2.5-3 goals a game.

Is there a way of increasing this? IRL, scorelines would often be 5-2, 6-0 etc as attacking overpowers poor defending.

Thanks.

Share this post


Link to post
Share on other sites
Also, I don't think league.xml is applicable for custom leagues. the file it draws from is "basic league settings.xml". I'm not sure what the league.xml is used for, but all the user-defined leagues seem to be basic leagues. Maybe the other is only applicable for in-game, hardcoded leagues.

What you said here gave me an idea to see if we could change what is in the basic league settings file. I went in and moved some of the information from the "discipline rules" file and inserted them into the "basic league settings" file in order to see if I could get the hidden disciplinary rules into the game (ie. MLS points rules, French rules, etc). I am not sure if they work in game as my league discipline rules don't show it working right (I'll have to run a test tomorrow night though). However, I got them all to appear in the editor. Where normally you would just do the yellow card sequence there was an extra drop down that gave you all the other options and then a drop down for what sequence you used. I'll play around with some stuff tomorrow night and see what I can do with it (if anything).

Share this post


Link to post
Share on other sites

This is a cool thread, and I've been looking at things and digging around the various xml files, and I'm trying to figure out how to limit the amount of loan players in a squad. I've found a file called "enums.xml" which has a ton of cool stuff in it. Its got lots of things that can be learned and implied. For instance, it has a list of squad selection rules, including the ones in the editor, and ones you find in the game, but aren't currently implimented in the editor. One of these is "loan_players_in_match_squad". From all my ventures into the xml files, I have found

                                       <record>
					<string id="type" value="less_than_all_foreign_players_in_match_squad"/>
					<string id="value" value="8"/>
				</record>

which is created by having a max of 8 foreign players in the match squad. When I try to change this to

                                       <record>
					<string id="type" value="less_than_loan_players_in_match_squad"/>
					<string id="value" value="4"/>
				</record>

and the game crashes. By the way, its not "less_than_all_loan_players_in_match_squad", I didn't think it was, but tested it anyway and it doesn't work.

Anyone have any success with adding squad or match squad rules that don't appear in the editor?

Share this post


Link to post
Share on other sites
Does anybody know if it is possible to alter the amount of goals that are scored in a particular league or nation?

I have created a league that is a poor standard. This seems to mean that not very many goals are scored. I have trialled this using holidays and the games seem to average between 2.5-3 goals a game.

Is there a way of increasing this? IRL, scorelines would often be 5-2, 6-0 etc as attacking overpowers poor defending.

I'd love to know how to alter this. I've created a league based in the Isle of Man. It's getting there data-wise but the scores are far too low to be close to the actual real life scorelines. I don't want to alter the reputations of the side as they are tiny, in world football terms. Does anyone have any other ideas? I'm still trialling the game, holidaying and running tests to see the effects certain settings have on the game.

Are fewer goals from poor league structures simply a match engine issue?

Share this post


Link to post
Share on other sites

OK, well if anyone is interesting I seem to be getting somewhere. I began to have a look into the tactical attributes of sides. Giving the stronger sides higher attacking and defensive attributes than the lower sides have led to the scorelines going somewhere towards what I'm hoping for.

Every attribute is 0 by default. My first attempt had a couple of teams with high teens attributes and some with low atts. The middling teams were all left at 0. Surprisingly, the lower atts teams performed better than the middling ones. I'd expected using 0 would generate a random attribute. Early tests seem to show it doesn't, it leaves it at 0.

Could be worth looking into for others if they are having similar problems.

Share this post


Link to post
Share on other sites

Will this have implications though for when teams get promoted?

Dale, I would have thought that with completely new nations (e.g. St Kitts) you can set the National tactics rather than individual clubs to replicate more attacking play?

Share this post


Link to post
Share on other sites
I'd love to know how to alter this. I've created a league based in the Isle of Man. It's getting there data-wise but the scores are far too low to be close to the actual real life scorelines. I don't want to alter the reputations of the side as they are tiny, in world football terms. Does anyone have any other ideas? I'm still trialling the game, holidaying and running tests to see the effects certain settings have on the game.

Are fewer goals from poor league structures simply a match engine issue?

You would probably have to edit individual teams to bias them more to good striking, I am sure there are many ways to do this.

Share this post


Link to post
Share on other sites
Will this have implications though for when teams get promoted?

Dale, I would have thought that with completely new nations (e.g. St Kitts) you can set the National tactics rather than individual clubs to replicate more attacking play?

The idea is to give very different attributes to the individual teams to make some teams much stronger than others so you get scorelines of 6-0 and such, which is common in tiny leagues like that.

Share this post


Link to post
Share on other sites

The idea I was attempting doesn't seem to be the way forward, at least not as clear cut as 20 = goals, 0 = no goals.

I've gone back to scratch with the tactical attributes. I'm testing a league where all I'm editing is the newly created teams, using generated players. My league winners generally have a +30 GD over 24 games. Ideally, I'd like to this to be +50 and above.

Share this post


Link to post
Share on other sites

i try making an international league where all the nation play in the league system, so far i tried only with asian and oceanic team, but i have a problem, whenever i put certain team in the league, that team doesnt appear in the league, instead being replaced by the country, where the league based, clubs. after trying, i found out that only those team who still playing in world cup qualifying asia, doesnt appear, but the rest of the other nations can. Could this be solved?? anyone??

thanks

cheers

Share this post


Link to post
Share on other sites
i try making an international league where all the nation play in the league system, so far i tried only with asian and oceanic team, but i have a problem, whenever i put certain team in the league, that team doesnt appear in the league, instead being replaced by the country, where the league based, clubs. after trying, i found out that only those team who still playing in world cup qualifying asia, doesnt appear, but the rest of the other nations can. Could this be solved?? anyone??

thanks

cheers

what if you move the season start date back so it starts after the asian qualifiers are over?

Share this post


Link to post
Share on other sites

I have tried adding the advanced rules and the most of them are not recognized by the game

editor4.th.jpg

editor3.th.jpg

discipline0.th.jpg

discipline1.th.jpg

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...