Better cup round bye system
Posted: Mon May 30, 2005 2:40 pm
A while ago I spent some time playing with the new feature that allows teams to be brought into a cup part-way through. I realised that the automatic bye system doesn't allow much flexibility.
For example, in the real FA cup, 80 teams play in round 1, 40 in round 2, and then in round 3, the 44 teams from leagues 1 and 2 join in to make up 64. The rest of the rounds then work out correctly. If you try to do this in bygfoot, it awards 48 byes in round 1 to provide 64 teams in round 2.
I've got round to making a small patch that allows a new tag <byes> in a cup round, so you can specify the exact number of byes you want. If it's not specified, the original "power of two" system is used. My new FA cup definition has 70 teams in round 1 with 10 byes, then 40 teams in round 2 with 0 byes, then in round 3 leagues 1 and 2 come in and the default bye system is OK.
I've attached my patch and a new FA cup file. I've tested a whole season and some load/save stuff and it all seems OK. At least I think I changed everything that's needed for a completely new XML tag...
Note that the cup is now one round longer, so it starts in week 19.
This brings up another issue. The default round names "Last 256" and so on are no longer accurate in a case like this. A <round_name> tag would be nice, and would allow for special round names such as qualifying rounds, but the disadvatage of this is that the same name would be used regardless of the user's locale. (i.e. no translation).
For example, in the real FA cup, 80 teams play in round 1, 40 in round 2, and then in round 3, the 44 teams from leagues 1 and 2 join in to make up 64. The rest of the rounds then work out correctly. If you try to do this in bygfoot, it awards 48 byes in round 1 to provide 64 teams in round 2.
I've got round to making a small patch that allows a new tag <byes> in a cup round, so you can specify the exact number of byes you want. If it's not specified, the original "power of two" system is used. My new FA cup definition has 70 teams in round 1 with 10 byes, then 40 teams in round 2 with 0 byes, then in round 3 leagues 1 and 2 come in and the default bye system is OK.
I've attached my patch and a new FA cup file. I've tested a whole season and some load/save stuff and it all seems OK. At least I think I changed everything that's needed for a completely new XML tag...
Note that the cup is now one round longer, so it starts in week 19.
This brings up another issue. The default round names "Last 256" and so on are no longer accurate in a case like this. A <round_name> tag would be nice, and would allow for special round names such as qualifying rounds, but the disadvatage of this is that the same name would be used regardless of the user's locale. (i.e. no translation).