So to begin with, here's an example of my San Marino definitions, which are part of the definitions for Europe. I'll add that the following country file works in my definitions, which prior, it did not. This is the country_san_marino.xml file illustrated below:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<country>
<name>San_Marino</name>
<symbol>flag_san_marino.png</symbol>
<sid>san_marino</sid>
<rating>4</rating>
<leagues>
<league>san_marino_group_a</league>
<league>san_marino_group_b</league>
</leagues>
<cups>
<cup>san_marino_coppa</cup>
<cup>san_marino_playoffs_group_1</cup>
<cup>san_marino_playoffs_group_2</cup>
<cup>san_marino_playoffs_final_qualifier</cup>
<cup>supercup_san_marino_playoffs_final</cup>
<cup>san_marino_supercoppa</cup>
<cup>europe_uefa1_sm</cup>
<cup>europe_champ_league_sm</cup>
<cup>conmebol_copa_libertadores_fifa</cup>
<cup>supercup_europe_uefa</cup>
<cup>supercup_europe_intercontinental_sm</cup>
</cups>
</country>
To begin with, you have the file begin with the line of:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
With the section of:
Code: Select all
<country>
<name>San_Marino</name>
<symbol>flag_san_marino.png</symbol>
<sid>san_marino</sid>
<rating>4</rating>
Although it isn't necessarily listed, the <name> tag is important since it gives the country a literal name to use. An undocumented feature of the <name> tag is that when you have the autosave feature on in bygfoot, it takes what is between the <name> tags and uses that as part of the filename for the autosave file. But one bug in bygfoot is that in the autosave feature, as it uses the username, country name, and team name as part of the filename for the autosave file, it will only account for the team name having more than one word in it. This means that if you have a username (, which you sign up with when you start a new game,) or a country name (, which you enter here between the <name> tags,) which have more than one word associated with them and thus a space between those words, either your autosave games won't save properly and/or you will get an error message and your game may crash. So having a username like "Joe Smith", a country name of "San Marino", and a team name of "San Giovanni", when bygfoot goes to autosave your progress, it will fail because of the spaces between the words in the username and the country name. As mentioned before, the autosave feature expects that the team name will most likely have more than one word in it so it will compensate by inserting an underscore between the words to fill in the space. So when you start a game, it is best to either use a name with no spaces in it or use either a minus sign or underscore to connect multiple words together so that no spaces are between them. As for the country name, this is why you see the name as "San_Marino" instead of just "San Marino". I've inserted the underscore between the words for this very issue.
Now onto the <sid> tag. Basically, this relates to the country_*.xml file. As the filename is country_san_marino.xml, the part between the <sid> tag would have to match the filename exactly so it can be read by bygfoot properly. Otherwise the format would be country_<sid>.xml, where the value for <sid> would be between the <sid> tag, which in this case is "san_marino".
The <symbol> tag is basically if you want to include an image to represent your country, like say the country's flag, then it could be used for all competitions that are national, I believe. I say I believe since I also include the <symbol> tag in the national leagues and cups also. As for the <rating> tag, it relates to the rating of job offers from 1 to 10, of which 10 is the highest value. The high value ratings are perceived to be more enjoyable or valued than low value ratings. Think of England as being a rating of 10, as being with the English system may be more favorable than being within the San Marino system.
Code: Select all
<leagues>
<league>san_marino_group_a</league>
<league>san_marino_group_b</league>
</leagues>
Code: Select all
<cups>
<cup>san_marino_coppa</cup>
<cup>san_marino_playoffs_group_1</cup>
<cup>san_marino_playoffs_group_2</cup>
<cup>san_marino_playoffs_final_qualifier</cup>
<cup>supercup_san_marino_playoffs_final</cup>
<cup>san_marino_supercoppa</cup>
The "san_marino_supercoppa" is the tournament where the winner of the Coppa Titano plays the winner of the Championship Play-offs, or the 2nd placed team of the Play-offs if the winner of the Play-offs is also the winner of the Titano. Basically these files are listed in an order that would be played from top to bottom and all the teams are taken from the league files. As for the san_marino_supercoppa, this file can actually be placed anywhere in the list AFTER the above listed files, but I chose to put it where it is since it is a national cup and I decided to group it with the other national cups in this list.
Code: Select all
<cup>europe_uefa1_sm</cup>
<cup>europe_champ_league_sm</cup>
<cup>conmebol_copa_libertadores_fifa</cup>
<cup>supercup_europe_uefa</cup>
<cup>supercup_europe_intercontinental_sm</cup>
</cups>
</country>
Well, in my example listed above, the "europe_uefa1_sm" represents the UEFA Cup/Europa League; the "europe_champ_league_sm" represents the UEFA Champions League; the "conmebol_copa_libertadores_fifa" represents the Copa CONMEBOL Libertadores that only uses South American teams within its definition; the "supercup_europe_uefa" represents the UEFA SuperCup which has the winner of the UEFA Cup/Europa League play against the winner of the UEFA Champions League; and the supercup_europe_intercontinental_sm" represents the Intercontinental Cup, which has the winner of the UEFA Champions League challenge the winner of the Copa CONMEBOL Libertadores.If there are cups that 'compete' against each other concerning the teams that participate in them, e.g. the Champions' League and the CWC (what does this mean? If there's a double winner, e.g. a team winning both the first league and the first cup, the league runner-up should participate in the CWC.), they should be listed in reversed priority order. In our case, the CL participant gets chosen first. If the team is also qualified for the CWC (ie. a double winner), he doesn't participate in the CWC as well, but the runner-up gets chosen. So, in a way, the CL wins against the CWC.
Now how this all relates to my country definitions is that for the UEFA Cup/Europa League and the UEFA Champions League, each of those cups has one or more qualifying spots available to the teams in my leagues, and getting the right teams to the right spots is important. And this is where my problem was. When I look at the way the cups are listed in the <cups> section, I perceived it to be that from the top to the bottom of the list, those teams would be loaded in order and run in that order during the season. That was partly right. The part that was right was that during the season, from week to week, the particular cups are updated in the list from top to bottom, I believe. The part I got wrong was how the teams are loaded at the beginning of a season.
As the UEFA Champions League is the higher ranked competition compared to the UEFA Cup/Europa League, the higher ranked qualification in the national leagues gets to play in the UEFA Champions League and the second highest ranked qualification in the national leagues gets to play in the UEFA Cup/Europa League, since in my definitions, there are only two qualifying spots for San Marino. The qualifying spots are the winner of the Championship Play-Offs (cup file supercup_san_marino_playoffs_final), which would be the higher ranked qualifying spot, and the winner of the Coppa Titano, the national cup (cup file san_marino_coppa), which would be the lower ranked qualifying spot. So as one team can realistically win both qualifying spots, we want that winner to go to the higher ranked competition and the 2nd placed team in the lower ranked qualifying spot to go to the lower ranked competition. So this means that the winner of the Play-Offs would go to the Champions League and the winner or runner-up of the Coppa Titano would go to the UEFA Cup/Europa League.
And here's the rub. As the note mentioned above from the website says, "If there's a double winner, e.g. a team winning both the first league and the first cup, the league runner-up should participate in the CWC.), they should be listed in reversed priority order." Well, it doesn't really say why. Well, I checked that out by running bygfoot in debug mode (bygfoot -d ###) when starting a game and it gave me the answer. When you start a game, before selecting a sponsor, the definitions files are run and loaded to initialize your game so it will work. WIth regards to the cup files, they are read from the bottom of the list up, which is why the UEFA Cup/Europa League (file "europe_uefa1_sm") is listed in the <cups> section before the UEFA Champions League (file "europe_champ_league_sm"). But alas, I never knew this before and in my definitions that were failing, I had the order of the UEFA Cup/Europa League and the UEFA Champions League switched so that the Champions League file was listed before the UEFA Cup/Europa League file, in the <cups> section, as illustrated below:
Code: Select all
<cup>europe_champ_league_sm</cup>
<cup>europe_uefa1_sm</cup>
<cup>conmebol_copa_libertadores_fifa</cup>
So that is my big spiel. When you have cups that are dependent upon the results of other cups, their order is important. When you have international cups that have qualifications that are dependent upon certain criteria and multiple cups to boot, the order in which they are listed and loaded is very important. If you have cups that are just based on league standing and all teams generated are from other league files, order isn't as important but still nice to have. This truly was an eye opener for me and I'll have to pay attention in the future on how I order my listings in the <cups> section for sure. So after all of this writing and information, hopefully this can help someone if they too are having problems when redesigning international cups for their definitions.
Until then, take care and have fun and happy gaming.
will_the_canuck