Update for USA (North America) country definitions for 2019

Forum devoted to country/league/cup/team definition topics. You can also get help here if you have trouble writing or using a definition.
Post Reply
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Update for USA (North America) country definitions for 2019

Post by will_the_canuck »

Hello all.

I am posting my updated USA country definitions that I updated for the 2019 season. I've updated the league definitions to include team changes within the leagues and play-off changes too, in how they should be played. Additionally, I've added country files for the international competition(s) within CONCACAF for the FIFA Club World Cup qualifying. Although all country files are not being used at the same time, I hope to change that with an update at a later time this year.

If you are using the Win32 version of bygfoot, which you can download via the bygfoot website, only version 4 will most likely work for you, as long as you keep the saved filename down to a limited number of characters. Otherwise, if you're using the linux version of bygfoot, all versions will work with little problems if any.

As I have included a readme.txt file within the zip file, I'll give a few excerpts to give you an idea of what's included:

"For the league aspect, I've updated the definitions to include the four (4) tiers in US Soccer:

tier 1: the MLS East and West with twelve (12) teams in each;
tier 2: the USL Championship East and West with eighteen (18) teams in each;
tier 3: the USL League One with ten (10) teams; and
tier 4: the USL League Two with four (4) conferences and eleven (11) divisions with 72 teams and the NPSL (National Premier Soccer League) with four (4) regions and thirteen (13) conferences with 91 teams.

That makes a total of 233 teams that are playable. I've also updated and tried to make the play-offs resemble the actual play-offs as best I could, as for example, the MLS play-offs actually changed this year to one-legged games instead of two-legged games for some of them.

I will also add that I put the <average_talent> ratings as 7600 for tier 1 down to 4600 for tier 4, with a difference of 1000 per tier."

and

"Now for the international aspect, I made a few additions as well. They include:

(1) Adding International Friendlies for the MLS teams, wherein they get to play an international club from a country that has a higher <average_talent> rating than the USA definitions. Of note, there are 11 different countries that are listed for the files for the teams to be chosen from.

(2) Adding FIFA International Friendlies for the user to watch. Basically I made a cup file from the wc06 files and load up 16 countries to play a round robin in 4 groups. Right now, they just each play 3 games and nothing more. I could have them play to decide a winner but it is mostly meant to be an international friendly after all.

(3) Expanding CONCACAF more than my previous 2018 updates in that I included 39 of the 41 CONCACAF member countries that can be selected for the CONCACAF Champions League tournament. Two countries are not included because I could not find any league information on them that was recent. The two countries not included are Montserrat and Saint Martin.

(4) Changing which teams from the USA definitions now qualify for the CONCACAF Champions League. Before, to make things simplier, the top two teams of the MLS East and MLS west used to qualify for the USA's four (4) spots. Now, as it is in real life, the winner of the US Open now qualifies for one (1) spot. The winner of the MLS Cup also qualifies for one (1) spot. But in the instance where the winner of the US Open and the MLS Cup are the same team (for the definitions of this game only), the second placed team in the MLS Cup qualifies for the one (1) spot alloted to the MLS Cup winner. The other two (2) spots are given to the highest finishers of each the MLS East and MLS West, who have yet to qualify for the CONCACAF Champions League.

(5) Changing the tournament between USA teams and Mexican teams. Before there used to be the USA and Mexico SuperLiga. As it isn't played anymore, I did include it in the 2018 definitions because it was useful. I removed it and replaced it with the Campeones Cup, which is the current one game between the MLS Cup Champions and the Liga MX Champions. For the Liga MX Champions, I believe it is the winners of the Apertura and Clausura in their regular season and they then battle in a game to get their Champion of Champions title. And then that winner will play the MLS Cup winner in the Campeones Cup, I believe.

(6) Changing the country rating for the USA from 5 to 6. More a personal choice as it seems more competitive in a way and the MLS is getting more known in the world I would think, although we still are not as good as other leagues and teams can be."

So, those are my updates for now. If you get to play them, I hope you can enjoy them and win the FIFA Club World Cup. Feel free to leave any comments or feedback if desired.

Bye for now,

will_the_canuck
Attachments
usa_2019.zip
2019 Definitions for USA
(226 KiB) Downloaded 62 times
Last edited by will_the_canuck on Thu Jun 06, 2019 5:49 am, edited 1 time in total.
billys_boots
Posts: 105
Joined: Wed Apr 17, 2019 4:45 pm

Re: Update for USA (North America) country definitions for 2

Post by billys_boots »

Hello

I downloaded your new USA_2019 definitions, and copied the new files into the bygfoot folder, I left the original usa definition because your file is usa_2019. Firstly, excellent work with many leagues over several tiers of the US pyramid. The definition file contains 4 (four) versions but selecting usa_2019 from the start menu loads version 2, Is this correct? I did encounter an issue early on while playing, which is probably an autosave issue, but the game crashed on week 11.


rm: cannot remove '/home/xxx/.bygfoot/saves/autosave_NONAME_United': No such file or directory
rm: cannot remove 'States_The_Villages_S01_W11_00.zip': No such file or directory

** (bygfoot:25214): WARNING **: 16:33:22.162: file_my_system: system returned -1 when executing 'rm /home/xxx/.bygfoot/saves/autosave_NONAME_United States_The_Villages_S01_W11_00.zip'.


zip error: Nothing to do! (autosave_NONAME_United.zip)

** (bygfoot:25214): WARNING **: 16:33:22.477: file_my_system: system returned -1 when executing 'zip -q autosave_NONAME_United States_The_Villages_S01_W11_00.zip


This is followed by a long list of all the files that should have been saved but failed.

This might be down to permission issues, although I did have to change the permission of the root folder and all sub folders to get the definitions to load at the start, so i set all permissions to match those of the original game, which I know to work.

If you remember from a previous post, I only run Linux. I will do some more testing on your definition file and see if I can resolve this issue.

Once again, great work on the new definitions.
billys_boots
Posts: 105
Joined: Wed Apr 17, 2019 4:45 pm

Re: Update for USA (North America) country definitions for 2

Post by billys_boots »

I think the crash problem could be with your file naming. There is a post on the forum about having spaces in file names and the autosave funsction and you use united states instead of unitedstates or usa.
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: Update for USA (North America) country definitions for 2

Post by will_the_canuck »

Hey billys_boots,

My USA 2019 definitions are done in a way to replace the existing USA definitions, unlike my 2018 definitions which were meant to complement the existing definitions.. As you are using linux, if you left the files in the root directory alone and copied the files to your home directory's installation of bygfoot instead, then you'll be ok. By root directory, I'm referring to the /usr/share/games/bygfoot ... location. In those directories, if you make a change, it is more or less permanent. If you make a change in your home directory's installation of bygfoot, which is at (/home/userid/).bygfoot-2.3.2, any changes you make won't necessarily be permanent, as long as you don't delete those files. Delete those files in your home directory's installation and they are gone. Anything that is saved in your root directory's installation will repopulate your home directory's installation whenever the game is run.

IMPORTANT NOTE:
So, after all of that, let me explain my updated definitions for USA. As you mentioned there are 4 versions, that is correct. There are directory names of version1, version2, version3, and version4. Within each directory there is another directory with the name of usa. So the 4 directories representing different versions of the game each has another directory with the name of usa in it. These 4 directories with the name of "usa" are slightly different from each other and thus the variations that warrant the titling of version1, version2, version3, and version4. :) The directory titled "usa" is the one you are supposed to copy to the bygfoot definitions directory to get it to play, not the directory with the version number itself. In the readme.txt file I included within the zip file, hopefully I made it clear that for the different versions, you would select one and copy the contents of that directory, that being the usa directory, to the definitions folder for bygfoot to play it. If you were copying the files to your home directory, you could simply delete the usa folder and just copy the new folder to the north america directory, thus replacing it. You would also have to include the short league files directory also, as they are called upon in my new definitions. And yes, when you play the game, the old and existing usa files that would be stored in the root directory installation would then populate in the home directory's installation directory, but not overwrite any files. Hopefully this helps you better.

As for the different versions, since you're on linux, I'd recommend version 1 or 2, depending on whether or not you wanted promotion and relegation or not as version 1 and 2 are similar except for version 1 HAVING promotion and relegation and version 2 NOT HAVING promotion and relegation. Versions 3 and 4 are made mostly for people using the win32 version although version 3, which combines some of the league files in the fourth tier, might provide some fun times too.

Myself right now, as I was playing a test file for version 1, gave me a segmentation fault error and crashed my game. Argh. Now I have to start it all over again, although I was about mid-way through the 4th season in that game. Oh well. I don't know what caused the error but it sucks the big one. And even though I have a saved file for it, when I reload the saved file and run it again, whether I play the game via live game or let the computer run it, it always crashes after the game or when it comes time to compile my score. I ran it about 3 times or more and the results are the same. Odd.

Now for your error you came upon when using the autosave feature. :) The relative quoted parts are below:
rm: cannot remove '/home/xxx/.bygfoot/saves/autosave_NONAME_United': No such file or directory
rm: cannot remove 'States_The_Villages_S01_W11_00.zip': No such file or directory

** (bygfoot:25214): WARNING **: 16:33:22.162: file_my_system: system returned -1 when executing 'rm /home/xxx/.bygfoot/saves/autosave_NONAME_United States_The_Villages_S01_W11_00.zip'.
and
I think the crash problem could be with your file naming. There is a post on the forum about having spaces in file names and the autosave funsction and you use united states instead of unitedstates or usa.
Well, since I made these definitions, I know them well enough and when I see the use of "United States", I know that that is located in only ONE file...the country_usa.xml file. It is the name used for the country for my definitions. Basically in your error message, "NONAME" represents the username you added or associated the team selection with. If you did not select or input a username to add with a team name selection when you started the game, it put "NONAME" for you. As for the "United States" part, because you may not have had a saved file before hand, it took the name listed in the country_usa.xml file as seen below:

Code: Select all

<country>
	<name>United States</name>
	<rating>6</rating>
	<symbol>flag_usa.png</symbol>
	<sid>usa</sid>
To remedy this issue, if you can edit the country_usa.xml file and either add a "-" or "_" between "United" and "States", that should suffice. I will implement this is a future update but for now, it doesn't seem worth it. :) So either have it like "United_States" or "United-States" between the <name> and </name> tags.

IMPORTANT NOTE:
Of note, this above error when using the autosave feature will also affect 4 other country files: the Faroe Islands, FYR Macedonia, Northern Ireland, and San Marino, although as far as I know, the San Marino definitions don't quite work at the moment.

Because I never really use the autosave feature and prefer to save the files manually, I never came across this issue, or else I would have coded the definitions slightly better in reference to this issue. And in reference to the posting about having spaces in file names and that creating errors also, that was the username that had a space in it. So another note would be for that when selecting a username to associate with a team selection, make sure there are no spaces in the username also.

So although this is long, hopefully it is understood what is required to play my definition updates for 2019. :) I guess I'll have to re-read my readme.txt file and maybe update it to be more clearer for the next time I update my definitions.

Hope you get to enjoy them.

will_the_canuck
billys_boots
Posts: 105
Joined: Wed Apr 17, 2019 4:45 pm

Re: Update for USA (North America) country definitions for 2

Post by billys_boots »

Hello

I'm male i don't read instructions :D I will read through your readme file and run each version according to your instructions, I am now intrigued to find out how you have implemented promotion and relegation in a country that doesn't bother with such matters in any of it's sports (I'm an outsider so I could be wrong on this point).

As you mention, in Linux the game is installed in the root directory and when a new game is started definition files are copied to the /$HOME/ directory, This enables me to have several instances of the game in my /$HOME/ directory at the same time. I don't actually know how Windows does this, maybe I should load up Virtualbox and and have a play around with the game.

Your issue with segmentation faults, I always start bygfoot from terminal so any errors, warnings and crashes are reported and hopefully resolved. Is this method of starting bygfoot available in Windows?

The 4 European countries you mention, Faroe Islands, FYR Macedonia, Northern Ireland, and San Marino all contain "_" in their title so they should work with autosave, I wonder if anyone has actually played any of these 4 leagues? When I have more time and will look into the San Marino definition and see if I can find what the problem is. I have plans to rework FYR Macedonia in the future because this country is now called North Macedonia so that is a little project for a later date.
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: Update for USA (North America) country definitions for 2

Post by will_the_canuck »

billys_boots wrote:Hello

I'm male i don't read instructions :D I will read through your readme file and run each version according to your instructions, I am now intrigued to find out how you have implemented promotion and relegation in a country that doesn't bother with such matters in any of it's sports (I'm an outsider so I could be wrong on this point).
HAHAHA!!!! Yeah, that makes sense. :) I implemented promotion and relegation based on my thoughts and the coding that would work. For this years update (2019), I chose the top two and bottom two of the respective tiers to be allowed to be promoted and relegated, except for the 4th tier which I made only the top team of each division/conference allowed to have the right to promotion. If I wanted to make it even harder, I could switch it down to the top one and bottom one of the respective tiers, and then that would make the game even harder and take the user much longer to play, especially when they would start off in the 4th tier. :) And even so, I don't give those teams free passes either. Except for the two teams in the top tier and 2nd tier who switch places because the coding would otherwise fail, the other teams up for promotion and relegation have to fight for their promotion and get to defend their right to not be relegated. It is just more fun this way I think.

But I will say you are right about these countries (Canada and the United States) not having promotion and relegation normally in sports. As our two countries are quite vast in size, leagues vary in geographical areas as some may be more regional than national and vice versa. And at the level of those leagues, it also depends on finances and such. So traditionally, the leagues are basically set up a certain way and don't really change through promotion and relegation, unless money is involved. Then changes can take place but through expansion, not through the merits of the teams performance. As I mentioned, either in this post or in the readme file, FC Cincinnati is an example of this as last year, they were in the USL (United Soccer League - tier 2) and this year, they are in the MLS (Major League Soccer - tier 1) through expansion as the MLS went from 23 teams to now 24 teams. It was all about money and investment and paying the expansion fee. :)

But I will add that in some sports, they do have minor leagues which are basically feeder leagues for the athletes to progress and get to the major leagues, of which most major league teams have affiliates in the minor leagues that are used to groom and grow their young talent so that they can eventually play at the major league level. So although the affiliated teams would be separate teams, they would still be part of the major league team's organizational structure, to a point.
As you mention, in Linux the game is installed in the root directory and when a new game is started definition files are copied to the /$HOME/ directory, This enables me to have several instances of the game in my /$HOME/ directory at the same time. I don't actually know how Windows does this, maybe I should load up Virtualbox and and have a play around with the game.
Well, first you have to find where to download the bygfoot files from, as lately, the bygfoot website was not working properly. :) Though I found them anyways. Going to bygfoot.sourceforge.net leads you to bygfoot.com. Following the "Download" options that way eventually leads you to a blank screen, which is odd. If you go through sourceforge.net and search for "bygfoot", you then end up at sourceforge.net/projects/bygfoot, of which you can then select the "Files" tab to download the files that you want. As for the Windows files for the game, within the self extracting file, it basically will have a bygfoot.exe executable file and support_files directory where the definitions (as well as other files) are saved. Delete those definitions and they are gone. :) So it truly isn't an installed version like with linux, just a saved version which you can play, as long as you don't mess anything up. And as you can place the bygfoot directory anywhere you want on your hard drive, it isn't directory/location sensitive.
Your issue with segmentation faults, I always start bygfoot from terminal so any errors, warnings and crashes are reported and hopefully resolved. Is this method of starting bygfoot available in Windows?
No. As you can start the Windows version of bygfoot in the file manager (gui), they have log files in the root directory where bygfoot is installed in to give you error messages: stderr.log and stdout.log I believe. There is also a bygfoot.log (or something like that) in the saved files directory that will also give error messages. Although the stderr.log is rewritten every time you have an error or every time you start the game. I think there is also a bygfoot.log file that accumulates the messages also in the bygfoot root directory, in case you wanted to see that.

Although I will also say that with regards to my 2019 definitions, the Windows version of bygfoot won't save the games properly and will crash, except for the 4th version and even then, the filename used to save the file should be small. I wrote about that in the readme.txt file. So the Windows bygfoot version does have its limitations also. I'll be posting a bug report about it at a later time. And in reality, this is why I created the 3rd and 4th versions of my 2019 USA definitions, just so it would work with the Windows version of bygfoot.
The 4 European countries you mention, Faroe Islands, FYR Macedonia, Northern Ireland, and San Marino all contain "_" in their title so they should work with autosave, I wonder if anyone has actually played any of these 4 leagues? When I have more time and will look into the San Marino definition and see if I can find what the problem is. I have plans to rework FYR Macedonia in the future because this country is now called North Macedonia so that is a little project for a later date.
First off billys_boots, you are potentially right but also wrong. The 4 European countries, as well as the USA definitions, do contain a character that joins the country name so that there are no spaces, in the filenames of their respective country definitions. As USA has no spaces, its filenames do not require any other characters between its letters. Now what you may not have properly understood was that I wasn't talking about the filenames for the 4 countries, including the USA. I was talking about the respective country files for the 4 European countries AND my USA definitions. In the respective country_ENTER_COUNTRY_NAME.xml for the countries, there is a country tag and that is what was causing this problem. As illustrated earlier, the country tag of <name> for these 4 European countries and my USA definitions has a space in them, which would be where the bygfoot program is getting the information from for the autosave filename. As you experienced with my USA definition, the autosave feature tried to name the file "autosave_United States_The_Villages_*". Within the country_usa.xml file, I have the <name> tag and the value for that is "United States", WITH a space. When you check the other 4 European countries, they have similar values within the <name> tags for the country values. And those similar values are names WITH spaces. This autosave error has NOTHING to do with filenames and EVERYTHING to do with the country's <name> tag value. As you can see, since this issue is very limited to 5 countries of 60+ countries available to play, if very few people play those 5 countries and use autosave, this error wouldn't be picked up. :)

For illustration purposes, look at the contents of country_faroe_islands.xml, country_fyr_macedonia.xml, country_n_ireland.xml, and country_san_marino.xml under their respective directories and when you look at them, look for the <name> and </name> tags to see what I am talking about. You'll then understand why I'm saying what I'm saying.

Now whether or not this autosave behaviour is a bug or not, I can't say. But I do know that going forward, it surely is something to consider when coding the country_ENTER_COUNTRY_NAME.xml file for countries that have more than one word in its name. I might have to experiment what might happen if the <name> tag was left out of the country section. Would the game crash when it went to autosave or because there was no <name> tag to use in the country file, would it just use the name from the filename? Or might it use something else like "NONAME" or "NOCOUNTRY"? Hmm. Good question. Well, it still makes me think now for future updates and all and what to use for the <name> tag.

Anyways, hope this all helps. I don't really want to do any updates until later this year as I want to wait until the FIFA rankings are out, maybe for October and all, since I want to use the total points values for the countries from FIFA's website for the FIFA Club World Cup qualifications and all. Basically taking their total points value and converting it to an <average_talent> value for the respective countries. And since the FIFA Club World Cup qualifications will require a lot of work, it would be best held off since then. :) Well, the African, Asian and Oceanic regions aren't even listed here, in relation to the countries listed and leagues within the countries. That will take some time for sure. And if you are going to say that Australia is part of the Oceanic region for Soccer/Football, you're now wrong as they joined the Asian Football Federation (not their proper name) with relation to FIFA Club World Cup and FIFA World Cup qualifications, back in 2007 I believe it was. I was reading up on the Asian federation's tournament last night and they have an east/west thing going where they have separate tournaments for the regions and it isn't until the finals that the winners of the respective regions finally meet. So just for their Champions League qualifications, 3 cup files would be needed, unless I cheated and used 2 cup files and had the one cup file load into the other for the final match. :)

And as for San Marino, they don't work because the definitions tried to use the <joined_league> tag and it is flawed. I have an idea on how to fix it but for the moment, I'll leave it until a later date also. :) But still, even if it did work, the UEFA Champions League definitions are wrong for it since San Marino has two tier 1 league files and the UEFA Champions League definitions call on the "LEAGUE1" leader/winner. So this means if the user was in the 2nd group (Group B) and won everything, they still wouldn't qualify for the UEFA Champions League. :) San Marino is unique in the European League and thus require a special UEFA Champions League definition just for them. Although I should add that the possibility of a team from San Marino actually WINNING the UEFA Champions League is very, very, VERY low, if at all possible. :)

So on that note, I'm done for now.
Post Reply