League play offs

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
billys_boots
Posts: 105
Joined: Wed Apr 17, 2019 4:45 pm

League play offs

Post by billys_boots »

End of season play offs are used in many national leagues but getting them to work as they do in the real world is proving difficult.

Question 1 - In England (and many other domestic leagues) 2 leg play off matches, like semi finals, are usually played in the same week. There is the two_match_week option but I don't know if that works for cup games. If not is there another option? At the moment play off semi finals are played on consecutive weeks

Question 2 - Can play off games be drawn so that, for example, 2nd v 5th and 3rd v 4th? At the moment cups seem to a random draw, even for league play-offs. In England National League the format should be
Quarter Finals 4th v 7th and 5th v 6th
Semi Finals 2nd v winner 4th/7th and 3rd v winner 5th/6th
Final between 2 semi final winners
All games are one off

Question 3 - In Scotland there is a league play off between the Highland League, Lowland League and League 2. The first round is Highland v Lowland over 2 matches with the winner playing the bottom team in League 2. I can only get this to work if I create a 3 team round robin league, which is not how it works. I have also have to get the losing team in the first game to return to their original league and the loser of the 2nd game to drop into the other league (Highland or Lowland), with the winner going into League 2. An explination of how this would work is as follows

play off semi final - Lowland League champions v Highland League champions. Loser returns to the league they cam e from
play off final - League 2 bottom club v winner of play off semi final. Loser goes to Highland League or Lowland League (opposite to semi final loser) and winner goes to League 2.

If questions 1 and 2 are not possible in the current version then I can go with how the program currently works. Question 3 does require some help getting it to work, if possible otherwise I can go with the end of season 3 team round robin solution.
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: League play offs

Post by will_the_canuck »

End of season play offs are used in many national leagues but getting them to work as they do in the real world is proving difficult.
Hahaha. Welcome to the club billy_boots. :) I think all we can really do is try to make the best of it and go from there. And when I think of it, some real world play-off situations would be different from other real world play-off situations so it kind of makes it hard for the programmers to satisfy everyone and just do it one way, although yes, even the way it is right now isn't the right way even.
Question 1 - In England (and many other domestic leagues) 2 leg play off matches, like semi finals, are usually played in the same week. There is the two_match_week option but I don't know if that works for cup games. If not is there another option? At the moment play off semi finals are played on consecutive weeks
Are you talking about the <two_match_week_start> and <two_match_week_end> options found in league files? Or are you talking about the <two_match_week> option found in cup files? From your question, it sounds like you haven't played the right country yet, but I'll forgive you on this one as Mexico does use the <two_match_week> option in the cup files but the country files as a whole didn't work since it was missing files for the libertadores cup file. I corrected the issue and uploaded them about a month ago. Anyways, when I played the Mexico files (found in North America), the <two_match_week> option kind of failed for me in that when trying to play a two legged round in the same week, it treated it like two matches in one week, one round. It was a complete fail. At least for the first round of the cup. It appeared to work properly for the second round, but it was the point of getting TO the second round that was the hard part. You can try it for yourself but for me, I think I'll avoid using that option as it seems to be a big fail. :) Although I do know what you mean about having the ability to have a two legged, single round play-off in one week happen, at least where you can have it in two separate rounds for the one week but still be a single round for the cup file. I think that option will only work for one legged rounds really. Kind of like my FIFA CWC definitions for USA and the South American Mundial Clubes file...single leg in one week with multiple rounds.

Right now, all I can think of is that two legged matches/rounds have to be played over two weeks or more. It will likely only work that way for now until the programmers change it.
Question 2 - Can play off games be drawn so that, for example, 2nd v 5th and 3rd v 4th? At the moment cups seem to a random draw, even for league play-offs. In England National League the format should be
Quarter Finals 4th v 7th and 5th v 6th
Semi Finals 2nd v winner 4th/7th and 3rd v winner 5th/6th
Final between 2 semi final winners
All games are one off
There was a setting which was a property in the cups that could be used I believe, which would allow for the Quarter Finals to be done the way you want, but afterwards, I don't think it would play out the way you want. All I can think of is that you'd have to use multiple cup files to achieve what you want to achieve. And since you're dealing with one league file above and below, since I'm assuming this is for a promotion, it shouldn't be as difficult. :)

Of note, I just checked and there is the <randomise_teams> tag that can be used in cups, but it likely would only work for the first round. With my example, multiple cup files seems the best way to get what you want, but the home team may still not be who you want it to be. :) You can look at the help files for definitions on the bygfoot website for information on this tag.

When I think of it, you could have one cup file for the 4th v 7th and the winner plays against the 2nd. The second cup file could be for the 5th v 6th and the winner plays against the 3rd. And a third cup file could have the winner of the first cup play the winner of the second cup, and that will be your final with the two semi final winners. Now since you would have more than one cup file, you could have the quarter finals and semi finals take place in one week and have the finals take place the week after, since the cup rounds are single leg games. Fun coding. :) But for the basics, that's the only true way I can see it work the way you want it to work out.
Question 3 - In Scotland there is a league play off between the Highland League, Lowland League and League 2. The first round is Highland v Lowland over 2 matches with the winner playing the bottom team in League 2. I can only get this to work if I create a 3 team round robin league, which is not how it works. I have also have to get the losing team in the first game to return to their original league and the loser of the 2nd game to drop into the other league (Highland or Lowland), with the winner going into League 2. An explination of how this would work is as follows

play off semi final - Lowland League champions v Highland League champions. Loser returns to the league they cam e from
play off final - League 2 bottom club v winner of play off semi final. Loser goes to Highland League or Lowland League (opposite to semi final loser) and winner goes to League 2.
Ah. This is nothing. Try dealing with one upper tier league and up to 24 lower tier teams billy_boots. :) That's what I got myself into last year, kinda. I understand what you're talking about and really, it won't work the way you want it to work. And when I think of it, since that is how I coded my USA definitions, you could have easily looked at or played them and found your answer out, at least to a point. And with the 3 team round robin, that isn't necessary. Although having the loser of the play-off semi final going back to their own league is kind of a problem I think since it likely won't happen. It is based upon randomness I believe. But anyways, here is how you do it...

To begin with, you have to make sure that all three league files are completed and the leagues have no more games to play before you can have the cup files start. You basically create a cup file to have the Lowland League champions play the Highland League champions for a round, whether single or two legged. Then you have a second round where the winner of the first round plays the bottom club team of the League 2. That's it. :) But in a league file, likely the single League 2 file, you have the promotion stuff saying the winner goes to League 2 and the loser goes to either Lowland League or Highland League. Because you have more than one league listed as places the loser can go to, you have to have a representative from each of those leagues play in the cup file that can determine the winner, thus having two rounds like I have mentioned above. But again, you can not control where the losers will be placed. That's the only problem. If you can get over that slight, then you'll be fine. If you can't get over it, then it can't be done since the whole point of randomizing the losers is a way to ensure that one lower league doesn't get better or stronger than another lower league.
If questions 1 and 2 are not possible in the current version then I can go with how the program currently works. Question 3 does require some help getting it to work, if possible otherwise I can go with the end of season 3 team round robin solution.
Ok. So question 1 - two legged matches for one round are best done over two consecutive weeks. If they could be done over one week with multiple rounds within that one week and the player could play both matches without problems, that would be great, but right now, I don't know how to do that. :) I think I should add that when I tried playing the Mexico definitions, I used the Win32 version, which gave me the issues I believe. I didn't try it under lubuntu, but I don't think it would make a difference anyways. Question 2 can be achieved using multiple cup files. And as for Question 3, it is possible but not with the results you want or rather, the losers won't always go where you want them to go. :) Hope this helps.

And billy_boots, I might suggest trying or playing different country files as that is how I found out about some of these methods and solutions, in comparison to the original USA definitions which were sorely lacking in comparison. As well, checking out the help files for definitions works too on the bygfoot page. And don't be afraid of trial and error. Oh heaven knows how much I did for trial and error testing to get my definitions working. ;) Having to go through a 52 week season just to find an error in my coding. That was fun.

Anyways, I'll let you get back to your work and hopefully it works out nicely and hopefully you'd post your work so others can enjoy it too. Bye for now,

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

Re: League play offs

Post by billys_boots »

I got fed up with the trial and error method only to have it crash after a long 52 week test so I created a 3 league 4 team definition file which takes less the 5 minutes to run tests... Go me :D

Question 1 - 2 leg play off in same week would have been a nice to have but since the period between the second leg and the final is about 9 to 10 days I can just adjust the last week of the season and let the system run as it was coded to with play off games on consecutive weeks

Question 2 - I did end up with a play-off cup definition with teams 4 to 7 playing a one off game in the quarter finals followed by teams 2 and 3 entering in at the semi final stage followed by a final. It is random but the play offs are a lottery anyway so I can go with how it was coded.

Question 3 - was the head scratcher. I got the 3 team round robin to work but the promoted winner would then disappear never to be seen again. I am going to try your other suggestion of a sequence of cups to see if that works. It would be nice to have teams returned to the league they came from but if that isn't the case then so be it. I'll check the Mexico definitions and see how that works, hopefully I can figure it out by reading the def files and copying the code to my test file.
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: League play offs

Post by will_the_canuck »

billys_boots wrote:I got fed up with the trial and error method only to have it crash after a long 52 week test so I created a 3 league 4 team definition file which takes less the 5 minutes to run tests... Go me :D
Ah...that's quitter talk. :lol: How many times you try it before you gave up? I know when I was first creating the definitions, I would have done that at least 3 or 4 times, sometimes more to get it to work. Sometimes I even played the game myself. Other times, I would let the computer automatically play it. But still, I hung with it.
Question 1 - 2 leg play off in same week would have been a nice to have but since the period between the second leg and the final is about 9 to 10 days I can just adjust the last week of the season and let the system run as it was coded to with play off games on consecutive weeks
I know what you mean. Oh well. But then you have all the time you need to do things. There is after all the <two_match_week_*> tags for the league files which can be used, if needed.
Question 2 - I did end up with a play-off cup definition with teams 4 to 7 playing a one off game in the quarter finals followed by teams 2 and 3 entering in at the semi final stage followed by a final. It is random but the play offs are a lottery anyway so I can go with how it was coded.
For this one, you son of a bitch. Making me think whether or not I should be doing this for my definitions. :lol: Although I can honestly do it, I likely won't since it isn't necessary. Also the biggest problem with this issue is that the home field advantage for the cup files is random, so that even if you have the proper teams playing against each other, the higher seed may not even be the home team, and that's the biggest issue. The only real resolution to this is to code it the way it should be and then make it a neutral game, if it is a one legged match. Else, if it is a two legged match, coding it like this would make sense. But still, you bugger for making me wonder if I should be doing it like this too, at least for the top three tiers of my new USA definitions. I just wanted to say that. And when I think of it, red cards and yellow card accumulation would have less effect in the play-offs if each round was a different cup file.
Question 3 - was the head scratcher. I got the 3 team round robin to work but the promoted winner would then disappear never to be seen again. I am going to try your other suggestion of a sequence of cups to see if that works. It would be nice to have teams returned to the league they came from but if that isn't the case then so be it. I'll check the Mexico definitions and see how that works, hopefully I can figure it out by reading the def files and copying the code to my test file.
Ok. I checked out the reference here and you're talking about the promotion and relegation between the 4th and 5th tiered leagues, of which the 4th tiered league is a single league and the 5th tiered leagues are two separate leagues. From my experience, there should be no problems with promotion and relegation as long as the league files are properly coded to accept the new team and show where the losing teams will go. As I said, since a tier one league is not involved, there should not be any real issues here.

Now, if even after you properly code the files and they still don't work, you might have to do things differently to make it work. :wink:

If the 4th tier team has to play against the 5th tier team, one way might be to combine the leagues in the 5th tier into one league and make it inactive. And after that, use a cup file to play the league out. This way, you can have the 4th tier team play against the winner of the 5th tier and in the 4th tier league file, tell the loser to go down to the 5th tier league file that is inactive, and also you can tell the 4th tier that the winner of said match between the 4th and 5th tiers will be joining the 4th tier. But let's hope it won't come to that. It could likely be done but won't be as nice as you'd likely want it. I do something like that I think in my USA files versions 1 and 2, although Peru's 3rd tier also works that way.

Alternatively, if the 4th tier team doesn't have to play against the 5th tier team, you can likely just send the 4th tier team down to either league and have the winner of a cup between the two winners of the 5th tier leagues go up to the 4th tier team that would be specified in the 4th tier league files for promotion, listing a winner but no loser.

And on that note, as it has been a long evening writing back and forth on this forum, at least for me, I'll say good bye for now and wish you luck.

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

Re: League play offs

Post by billys_boots »

The last few days I have spent trying to resolve the problem of teams gong missing after promotion play-offs. I read your reply in the other thread about there being a possible coding problem if the promotion via a play off is at a top tier league. I was trying to solve this problem using a tier1, tier 2a, tier2b structure and getting nowhere. I amended my test definition to include a new top tier, so now I have tier1, tier2, tier3a, tier3b and I ran my test. Eureka, this was the problem. I can now run with a 2 leg play off semi final tier3a v tier3b with the winner playing bottom team in tier2. The following season all is well and no missing teams from tier2. Teams from the play-offs are still placed randomly in tier3a and 3b but this is very minor and is how the code works.

I added the <two_match_week>1</two_match_week> tag to the play-off cup file so the 2 leg semi finas are played in the same week and the 2 leg final play the following week. This didn't quite work with both legs of the semi final played in the same round but the final worked with the final leg 1 played on round 1 and the 2nd leg played on round 2 of the same week (week after the semi final).

If the <two_match_week>1</two_match_week> issue is a known issue then I can work around that.

At least now I can transfer my test code to the Scotland definition and work on this definition is complete.

Thanks for your help/tip on this.
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: League play offs

Post by will_the_canuck »

billys_boots wrote:The last few days I have spent trying to resolve the problem of teams gong missing after promotion play-offs. I read your reply in the other thread about there being a possible coding problem if the promotion via a play off is at a top tier league. I was trying to solve this problem using a tier1, tier 2a, tier2b structure and getting nowhere. I amended my test definition to include a new top tier, so now I have tier1, tier2, tier3a, tier3b and I ran my test. Eureka, this was the problem. I can now run with a 2 leg play off semi final tier3a v tier3b with the winner playing bottom team in tier2. The following season all is well and no missing teams from tier2. Teams from the play-offs are still placed randomly in tier3a and 3b but this is very minor and is how the code works.
Well, I did post and report this as a bug last year some time, so the people that would be developing the game would know about it. Now when they may have time to get around to it, that's another story. :) And when thinking of this, I'm wondering about my Canada definitions I want to do too. I guess I'll just have the top tier team fall down to the lower tier without playing against the lower tier and have the lower tier have a play-off and have the winner rise up to the upper tier. I'll see how that goes.
I added the <two_match_week>1</two_match_week> tag to the play-off cup file so the 2 leg semi finas are played in the same week and the 2 leg final play the following week. This didn't quite work with both legs of the semi final played in the same round but the final worked with the final leg 1 played on round 1 and the 2nd leg played on round 2 of the same week (week after the semi final).
Ah...billys_boots...Did you actually try this by playing it yourself? I ask since I believe I implied that the outcome was rather horrible. Let me just say that this is a very bad idea and I'll tell you why. But, you should also play it yourself so you can experience what it will be like for a user when they play your definitions through a live game and not just having the computer do it automatically for them.

When I played the Mexico definitions, as it has that <two_match_week> tag in its cup files, and I got to the point where I would play in the cup with that tag in it, the live game would play fine for the first game. It was the second game that messed up. Basically, after you finish the first live game, an error pop-up would show up and you would suddenly be thrust into the second game, without the ability to change your line up or such. And when I played, the live game window could not be used to change the selection of attack/neutral/defend selection. I'd have to pause the live game window to go to the parent window to change my selection of attack/neutral/defend and then unpause the live game window to continue. I actually made it past the first round in the one cup but it was brutal. Basically, this feature, although a very good one to have, doesn't work properly. There have been times when the live game has crashed on me and done this behaviour, where you play another game right after you finished the live game without giving you the ability to change line ups and all, but with this tag, it seems to be a part of it.
If the <two_match_week>1</two_match_week> issue is a known issue then I can work around that.
I don't know if this issue is a "known" issue to the developers. I guess I'll have to report it in the "Bugs" section. But yes, it is an issue known to myself and to anyone who gets to play the Mexico definitions. As I said, it is a nice feature to have but as it stands right now, it doesn't work. The only way to work around it right now is to either have single legged rounds or let them play out over two weeks.
At least now I can transfer my test code to the Scotland definition and work on this definition is complete.
Hahaha. And now you can test your Scotland code as is before considering it complete. You never know what you might run into otherwise. :) Even though it takes a long enough time, I run the tests on the complete code I want to do. And again, I'd reconsider the <two_match_week> tag. As I said, try it yourself first and see what you think.
Thanks for your help/tip on this.
Well, besides myself here, I have written bug reports and all so that could have helped some too, if you read them. And I even gave some follow up to problems I initially had and dealt with. They are also a resource. Now whether or not they would apply to your situation, only you can tell after you read them for yourself. Some of the stuff I've come across when doing the USA definitions has been interesting I'll say.

And I do want to say sorry billys_boots as I was calling you BILLY_boots, without the 's' on the billy part. Oh well. :)
billys_boots
Posts: 105
Joined: Wed Apr 17, 2019 4:45 pm

Re: League play offs

Post by billys_boots »

I haven't tried the <two_match_week> option myself, When I ran my test file I didn't qualify for the play offs. Since my test set up is only 4 leagues of 4 and only takes about 2 minutes to run, then I will play a few seasons and see how it pans out.

I have been through the forum reading most of the posts but not the bug reports. I will start reading through those they could be useful. It is a shame that development seems to have ended, although the game is about 15 years old, but still a fun game to play. I could learn C and attempt some coding, but that isn't going to happen.
Post Reply