Apertura/Clausura and Conferences

Forum devoted to country/league/cup/team definition topics. You can also get help here if you have trouble writing or using a definition.
ircarrascal
definitions team
Posts: 39
Joined: Thu Aug 23, 2007 8:50 pm
Location: Munich, Germany
Contact:

Apertura/Clausura and Conferences

Post by ircarrascal »

A common feature of SouthAmerican leagues is the Apertura/Clausura format. In principle they are separate tournaments and the Champions of each usually play a final match to decide who's the National Champion. Also, it is common to have an "acumulado" table, which is the sum of all games, including Apertura and Clausura, to decide relegation. Teams with less points in the "acumulado" are relegated, regardless of how they finish Apertura or Clausura. I would like to have the chance to create leagues like that.

Another request would be to add the option of Conferences. This is something that USA does (the MLS), and I think Mexico also. Here there is a normal round robin, everybody against everybody, but teams are sorted into Conference tables, not a single table. At the end of the season then you have champions in each conference, or you can decide which teams go to the play-offs based on their performace against teams from their own conference only (like in USA).
chunter
definitions team
Posts: 52
Joined: Sun Nov 27, 2005 10:24 pm
Location: USA
Contact:

Post by chunter »

I tried, really. I can give you some prototypes of Argentina that run terribly... the one installed is a kind of compromise that just worked in the system.

I also considered some trials to make USA's conferences work that... didn't really work, so I went to what we have now. If you read the code for USA, you'll find a surprise that gives a lot of MLS fanatics what they've wanted since the league was founded...
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

Maybe Apertura/Clausura could be done with two separate cups? Relegation's a bitch, though, I have no idea how that could be added. In particular if you have two cups; cups don't have relegation.

Gyözö
Press any key to continue or any other key to quit.
ircarrascal
definitions team
Posts: 39
Joined: Thu Aug 23, 2007 8:50 pm
Location: Munich, Germany
Contact:

Post by ircarrascal »

Well yes, one could get around and create cups to emulate apertura/clausura but as it has already been pointed out, relegation is an issue; you need some sort of single table for that. And also for qualification to international tournaments.

I wasn't really asking for a definition within the current Bygfoot capabilities but rather my "wish" is to have bygfoot modified so it could accommodate these types of leagues. If it's too complicated don't bother, I don't like those things myself but I think some new players may get turn down because their leagues are not represented in a "realistic" way in Bygfoot.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

ircarrascal wrote:I wasn't really asking for a definition within the current Bygfoot capabilities but rather my "wish" is to have bygfoot modified so it could accommodate these types of leagues. If it's too complicated don't bother, I don't like those things myself but I think some new players may get turn down because their leagues are not represented in a "realistic" way in Bygfoot.
Since I've already been suggesting that tommasi join the development team as definitions maintainer (and other stuff, he also improved player names etc.), I though I could extend the invitation to you, too, ircarrascal. I'd also be willing to improve on the def system in Bygfoot, but you'd have to tell me what you'd like to have added (preferably by IM).
Press any key to continue or any other key to quit.
chunter
definitions team
Posts: 52
Joined: Sun Nov 27, 2005 10:24 pm
Location: USA
Contact:

Post by chunter »

I may still have the .xml's to my rough-draft attempts to get Argentina working as two cups, the problem is that it was crash prone and I didn't like the result. I wanted the result to be playable.

The -real- Argentine promotion system is a bit too complex; like the Belgian playoff system, I wouldn't expect it to be implemented here.
ircarrascal
definitions team
Posts: 39
Joined: Thu Aug 23, 2007 8:50 pm
Location: Munich, Germany
Contact:

Post by ircarrascal »

gyboth wrote:Since I've already been suggesting that tommasi join the development team as definitions maintainer (and other stuff, he also improved player names etc.), I though I could extend the invitation to you, too, ircarrascal. I'd also be willing to improve on the def system in Bygfoot, but you'd have to tell me what you'd like to have added (preferably by IM).
Will be glad to help. I can take care of South America since I see that others are already working on Europe and USA. My MSN is ircarrascal.

Ivan
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

I'll need your sf.net username, Ivan, to give you SVN access.
Press any key to continue or any other key to quit.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

chunter wrote:I may still have the .xml's to my rough-draft attempts to get Argentina working as two cups, the problem is that it was crash prone and I didn't like the result. I wanted the result to be playable.

The -real- Argentine promotion system is a bit too complex; like the Belgian playoff system, I wouldn't expect it to be implemented here.
Did anyone of you think about making it work as a prom_rel cup? That way the relegation could work; not sure about the rest, though.
Press any key to continue or any other key to quit.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Re: Apertura/Clausura and Conferences

Post by gyboth »

ircarrascal wrote:Another request would be to add the option of Conferences. This is something that USA does (the MLS), and I think Mexico also. Here there is a normal round robin, everybody against everybody, but teams are sorted into Conference tables, not a single table. At the end of the season then you have champions in each conference, or you can decide which teams go to the play-offs based on their performace against teams from their own conference only (like in USA).
After agonising for quite a while over the problem I can now offer you a tentative solution. I hope you'll accept it, since I really had to jump through several hoops for this one.

There is a new tag for league defs, to be added at the upper level:

Code: Select all

<joined_league rr="1">usa_wconf</joined_league>
This will add fixtures with teams from the specified league to the fixtures of the league we're defining. "rr" means "round robins" and determines how often a given team from the league will play against any other given team from the joined league. Default value is 2.

The results will have an effect in the tables for both leagues. More than one league can be joined.

The whole feature is rather untested, so give it a shot and tell me about the horrendous crashes you're bound to experience.
Press any key to continue or any other key to quit.
chunter
definitions team
Posts: 52
Joined: Sun Nov 27, 2005 10:24 pm
Location: USA
Contact:

Post by chunter »

Consider me on it after I finish fixing some network issues.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Re: Apertura/Clausura and Conferences

Post by gyboth »

ircarrascal wrote:A common feature of SouthAmerican leagues is the Apertura/Clausura format. In principle they are separate tournaments and the Champions of each usually play a final match to decide who's the National Champion. Also, it is common to have an "acumulado" table, which is the sum of all games, including Apertura and Clausura, to decide relegation. Teams with less points in the "acumulado" are relegated, regardless of how they finish Apertura or Clausura. I would like to have the chance to create leagues like that.
I've added a new tag and related functionality to league defs that can be used to accomplish this. Using

Code: Select all

<new_table name="Clausura">4</new_table>
you can make Bygfoot create and use a new, fresh table from the specified week on (in this example 4). Additionally, a cumulative table will be created, and new matches will have an effect on the new table and on the cumulative table, but not on the previous table(s).

prom_rel elements will refer to the cumulative table, but I can add the possibility to override this if needed.

To get your Apertura/Clausura, you'll have to add something like this to the league definition:

Code: Select all

<new_table name="Apertura">1</new_table>
<new_table name="Clausura">16</new_table>
What you'll still be needing (and isn't implemented yet) is the possibility for cup choose_teams to specify from which table to pick a team. I think that'll be the best solution for the season-ending match between the Apertura and Clausura champions, namely to specify it as a normal cup.

Needless to say, you'll need to update your SVN repository to take advantage of all this.
Press any key to continue or any other key to quit.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Re: Apertura/Clausura and Conferences

Post by gyboth »

gyboth wrote:What you'll still be needing (and isn't implemented yet) is the possibility for cup choose_teams to specify from which table to pick a team.
I've added this too, now. You can specify which table to pick the team from with

Code: Select all

<from_table>1</from_table>
Default value is 0, ie. the cumulative table. Higher values take later tables, 1 would take the oldest (from a season progression point of view); this means the value here corresponds to the number of the table in the tables view from bottom to top, starting with 0.
For the Apertura you'd give

Code: Select all

<from_table>1</from_table>
for Clausura

Code: Select all

<from_table>2</from_table>
Happy defining ;-)
Press any key to continue or any other key to quit.
ircarrascal
definitions team
Posts: 39
Joined: Thu Aug 23, 2007 8:50 pm
Location: Munich, Germany
Contact:

Post by ircarrascal »

Thanks! I tested it with the Peru league that I'm working on again.

Relegation worked like a charm. One minor detail is that there is no need to highlight the relegation zone in the Apertura/Clausura tables, only the aggregate one.

And yes, it would be very nice if we could treat the separate tables like cup tables from which we can pick teams for play-offs.

Now this could be a little complicated but this is what I would try to do next if I were a computer genious like our kind developers here :) ...

[some relevant information first:]
Qualification to International Tournaments (i.e., Libertadores/Sudamericana) --
- Champions of Apertura/Clausura qualify, regardless of how they end up in the aggregate.
- "N" next best teams qualify as well. For example, in Peru, the third qualified team to Libertadores is the one that has more points in the aggregate table without being champion of apertura or clausura.

So I suggest that at the end of season, right before turning to the next one, the table gets shuffled a little. Regardless of how they actually end up in the aggregate table, the champions of apertura and clausura should be placed in positions 1 and 2 (maybe the winner of the play-off goes first?), with the rest of teams rearraged accordingly so that their relative positions to the rest of teams remain the same. In this way one can still use the tags <start_idx> <end_idx> to select the correct teams for international competition.

One should keep in mind of course that the same team can be Apertura and Clausura champion, in which case the table shuffling can get more complicated! Sorry but that's how the Argentinians defined it and for some reason the rest of SouthAmerica decided to follow the same rules! Brasil is the only exception I think.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

ircarrascal wrote:Relegation worked like a charm. One minor detail is that there is no need to highlight the relegation zone in the Apertura/Clausura tables, only the aggregate one.
Good point. I'll see what I can do.
And yes, it would be very nice if we could treat the separate tables like cup tables from which we can pick teams for play-offs.
Already implemented, see my last post.
- Champions of Apertura/Clausura qualify, regardless of how they end up in the aggregate.
This can be done with the appropriate choose_team with the "from_table" tag.
- "N" next best teams qualify as well. For example, in Peru, the third qualified team to Libertadores is the one that has more points in the aggregate table without being champion of apertura or clausura.
I'm not sure but can't this be done with a normal choose_team by specifying N teams but giving a large enough range with "start_idx" and "end_idx" so that N can be picked even if the Apertura/Clausura champions are within the range? Those would get skipped since they've already been selected by the previous choose_teams.
One should keep in mind of course that the same team can be Apertura and Clausura champion
What happens in this case, anyway? No final? Or final against second-ranked team from one of the tables?
Press any key to continue or any other key to quit.
Post Reply