the aggregate table

Here you can... report bugs. Open a new thread for each bug, please.
Post Reply
ircarrascal
definitions team
Posts: 39
Joined: Thu Aug 23, 2007 8:50 pm
Location: Munich, Germany
Contact:

the aggregate table

Post by ircarrascal »

I've been playing the South-American leagues that have Apertura/Clausura and aggregate tables and found a very annoying error (which I'm pretty sure wasn't there before). The aggregate table is supposed to be used to select teams for international competition (Libertadores/Sudamericana), as can be seen in the definition files ("americas" folder within "definitions/south_america"). Problem is, teams are being picked from table 2 (clausura), always. I tried using the <from_table> option but still teams get picked from table 2 regardless. I'm 99.9% sure that this was not the case when I was working on these defs at the beginning of the year.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

I'll look into it next weekend.
Press any key to continue or any other key to quit.
will_the_canuck
Posts: 140
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Bug when using the <new_table> tag for the following seasons aggregate table

Post by will_the_canuck »

Well, as ircarrascal said over 10 years ago, there's a bug here and as gyboth was going to look into it, either he couldn't get to it or couldn't resolve it, and really, it seems like an easy enough fix. :)

To update, this error comes from using the <new_table> tag in the league files. That's how you can use the <from_table> tag in cup files to select teams from different tables within the same league. These are representative of countries that have different halves to a season, like an apertura and clausura in Mexico and South America, or just two different halves that divide the tables into two or more pieces and each table is separate from each other but there might be an aggregate table that is used for other purposes, like national or international cups.

For whatever reason, when the season is over and the new season begins, instead of updating the league standings/team list from the previous seasons aggregate table, it uses the league standings/team list from the last table that was created using the <new_table> tag.

Code: Select all

<new_table name="Torneo Apertura">1</new_table>
<new_table name="Torneo Clausura">20</new_table>
In the example code above, the "Torneo Apertura" would be considered table 1 and the "Torneo Clausura" would be considered table 2. I guess the aggregate table would be considered table 0. So for the following season, it would use the league standings/team list from the table "Torneo Clausura", in this example, and not from the aggregate table. Although I have not looked at the code for bygfoot or on this issue, but wouldn't it be possible to potentially list a table number of 0 (zero) to select the new seasons league standings/team list from instead of the last one from the previous season? Or add an if statement like "if old_season.league_number.table.table_number>0 then new_season.league_number.table.0.team_list=old_season.league_number.table.0.team_list", or something along those lines? Yes, I know the code won't look like that, but I'm just trying to relay an idea of what I'm trying to say. :)

Well, the fix seems easy enough in theory although yes, it likely isn't simple and might take a few things to modify, but having it correct would be greatly appreciated. If I ever look at the code, I'll see about looking into this one also, along with a few other things. Oh well. I just wanted to mention that this bug is still out there and seems simple enough but is also annoying enough.

Take care for now,

will_the_canuck
gunnar
Site Admin
Posts: 233
Joined: Wed Oct 19, 2005 11:13 am
Contact:

Re: the aggregate table

Post by gunnar »

Will, Can you add a bug report at https://sourceforge.net/p/bygfoot/bugs/new/.
Still slowly doing the rewrite, only a couple of methods a day. It's more likely I will remember this if it's in that list.

Thank you
will_the_canuck
Posts: 140
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: the aggregate table

Post by will_the_canuck »

gunnar wrote: Wed Apr 15, 2020 8:18 am Will, Can you add a bug report at https://sourceforge.net/p/bygfoot/bugs/new/.
Still slowly doing the rewrite, only a couple of methods a day. It's more likely I will remember this if it's in that list.
Done. One down....more to go. :)
will_the_canuck
Posts: 140
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: the aggregate table

Post by will_the_canuck »

Hello again.

I just wanted to make a comment which might be helpful here. While I was playing a game which utilizes multiple tables for a season (Apertura and Clausura) in addition to an aggregate table, when it came time to change seasons from the end of one season to the beginning of a new one, the teams that were in the relegation spots were different from the aggregate table and the Clausura table. Although the new season's aggregate table resembled the previous season's Clausura table, when it came to the teams that were relegated, the correct teams that were supposed to be relegated, as per the aggregate table, were relegated to the tier below. The one team that was in a relegation spot in the Clausura table but not in a relegation spot in the aggregate table was just moved up the list to allow the promoted teams from the lower tiers to be slotted into the new table correctly.

So from this point, I'm trying to say that even if the tables may be different, it seems that something in the promotion and relegation code may be working and might be useful to look at, as it might even have the solution to this problem already within it. I'm just guessing but I'm suggesting it just in case it might be worthwhile to look at.

Will aka will_the_canuck
Post Reply