New Builds: 2.3.3-alpha2

General discussions about the game, e.g. game strategy.
Post Reply
tstellar
Posts: 54
Joined: Mon Aug 31, 2020 5:46 pm

New Builds: 2.3.3-alpha2

Post by tstellar »

I've put up some new builds in my github repo:
https://github.com/tstellar/bygfoot/rel ... 3.3-alpha2

For people using Fedora I've also created a copr, so you can install the builds by doing:
dnf copr enable tstellar/bygfoot-snapshots
dnf install bygfoot (or dnf upgrade bygfoot if you already have it installed).

For other RPM based Linux distributions, you can try downloading the RPMs directly from here: https://copr.fedorainfracloud.org/coprs ... d/2059277/ No guarantees this will work though.

For these new builds, I've imported all the country and uefa cup definitions from the forums. I also removed all the real team names and replaced them either with a Bygfoot name, or a place holder name like "England 100"

In order to get the uefa cups to work, I had to make some changes to the xml, and also introduce some new xml tags to bygfoot. Here are the changes I made to the XML:
  • The generate tag is now obsolete, teams outside of the user's league are now automatically generated.
  • You can put the sid for league cups in the choose_team_sid for international cups.
  • The LEAGUE1 and CUP1 special tags are no longer necessary. If an international cup definition has for example, england1 and you are playing with a team from England, then a team from england1 will be correctly loaded into the international cup.
  • Added optional tag for choose_team. This tells bygfoot to not through an error if it can't find a team to match the choose_team definition. This can be used for cups like Champions League where you can qualify in multiple ways. (Example)
  • Added alternatives tag to choose_team, this allows you specify 1 or more alternative choose_team definitions in case no team can be found for the parent choose team. This is useful for cups like Europa cup, where if the cup winner from a league is choosen for Champions league, then the next highest ranked league team is selected.(Example)
In addition to the xml changes, I also added a json interface to bygfoot, so you can control the program using json commands e.g.

Code: Select all

{ 'commands' : [
  { 'add_country' : { 'name' : 'england' }},
  { 'start_bygfoot' : { }},
  { 'simulate_games' : {'seasons' : 2 }},
  { 'get_tables' : {}},
  { 'get_players' : {}},
  { 'get_fixtures' : {}}
]}
To use this interface, put json comands in a file and pass it to bygfoot using the --json option. Note that this feature is disabled in the prebuilt binaries on github. To use this feature, you will either need to build bygfoot yourself or use the RPM builds from the COPR. The interface is still a work in progress, so it doesn't support all bygfoot functionality yet.

If you are interested in these new builds, try them out and let me know if you run into any issues.
filipemb
Posts: 22
Joined: Mon Sep 07, 2009 11:29 pm

Re: New Builds: 2.3.3-alpha2

Post by filipemb »

tstellar,

In line with your new feature - reserve teams - would it be possible to develop regionalized relegation/promotion? It would be a main feature to a couple leagues such as Brazil (promotion/relegation to the 4th tier is region-based), England (below 5th tier), Italy (below 3rd tier) and many other countries. Region could be an attribute to both leagues and teams. The current problem with Bygfoot league structure is that we are chained to a certain dest_sid.

Regarding the Brazil example, we have a specific problem that mixes with the reserve team situation. In most of regional leagues that supplies teams to the 4th tier, teams from upper divisions play with reserve teams against other teams and those other teams are able to promote to the 4th tier.
tstellar
Posts: 54
Joined: Mon Aug 31, 2020 5:46 pm

Re: New Builds: 2.3.3-alpha2

Post by tstellar »

I think having regional leagues would be possible. It sounds like we would need to add a region_sid tag for leagues and teams. I would need someone to send me example country definitions with these tags to get a better idea of how it works. Can teams belong to more than 1 region? And do the regions get smaller / change names as you move lower in the league tiers?
filipemb
Posts: 22
Joined: Mon Sep 07, 2009 11:29 pm

Re: New Builds: 2.3.3-alpha2

Post by filipemb »

Tonight I wlll try to write down an example of Brazil definition with these tags. 1) Yes as a result of the regionalization. Eg: A Boston football team belongs Suffolk county, Mass state, New England or Northeastern macroregion and to the "north" part of the USS. In a fantasy USA league tier, this team can be relegated from the "US 1st Divison" to the 2nd Division - North side, 3rd Division - Northeastern, 4th divison - Mass, 5th division Suffolk Country.

In parallel, we could have NYFC playing in "US 1st division" and it could be relegated to the 2nd Division - North side, 3rd Division - Northeastern, 4th Division - NY State, 5th Division - New York... and so on.
tstellar
Posts: 54
Joined: Mon Aug 31, 2020 5:46 pm

Re: New Builds: 2.3.3-alpha2

Post by tstellar »

Ok, so sounds like in addition to the region_sid tag, we would need to define the region hierarchy in the country file. e.g

Code: Select all

<region> 
    <region_sid> New England </region_sid>
    <region>
        <region_sid> Massachusetts</region_sid>
        <region>
            <region_sid> Suffolk County </region_sid>
         </region>
    </region>
    <region>
        <region_sid> New York </region_sid>
    </region>
</region>
Or maybe there is some cleaner way to represent this? I'm not sure what the xml standard is for nested tags like this.
filipemb
Posts: 22
Joined: Mon Sep 07, 2009 11:29 pm

Re: New Builds: 2.3.3-alpha2

Post by filipemb »

I attached to this post a tentative Brazil definition file with partial regionalized structure. There are a couple new suggestive new tags. I tried to use your reserve_level tag to enable the possibility the teams play both national division and regionalized lower division with reserve teams with no chance of B team promotion. The example I used was Atl, Acreano, both in brazil4 and brazil5_regional_acre1.
Attachments
brazil.zip
(7.94 KiB) Downloaded 399 times
tstellar
Posts: 54
Joined: Mon Aug 31, 2020 5:46 pm

Re: New Builds: 2.3.3-alpha2

Post by tstellar »

I pushed up an initial implementation for regional leagues here: https://github.com/tstellar/bygfoot/pull/2. If you have a github account, you can download the binary builds from the GitHub action jobs if you want to test. I have not really tested this at all, because the in tree Brazil definitions aren't working for me due to some errors in the cup definitions. Do you have improved Brazil definitions that you want to contribute?

For this initial implementation, I just used the most simple XML definitions possible, which only required 2 new tags. The first is a regions tag for the leagues, which allows you to put a space delimited list of regions. The regions should be the most specific regions, e.g. if you were create a North league for Brazil, you would list Acre, and then all the other 'North' regions. The second new tag is a region tag for teams which allow you to specify the region for a team. It takes a lot of C code to add new tags, which is why I tried to do it with the least amount of new tags possible. This could always be improved upon in the future.

I updated the promotion code to take the regions into account and only promote/relegate teams into a league with a matching region.
filipemb
Posts: 22
Joined: Mon Sep 07, 2009 11:29 pm

Re: New Builds: 2.3.3-alpha2

Post by filipemb »

In the definition file I uploaded, I have only (1) changed the Serie A, B and C teams; (2) proposed new regionalized tags and (3) developed tentative definitions for regional divisions.

As you have implemented the tags, I will now fully update the definition file so I can test them. I will upload them to your pull request in github.
buffonishche
Posts: 16
Joined: Fri Jun 18, 2021 2:56 pm

Re: New Builds: 2.3.3-alpha2

Post by buffonishche »

Hi tstellar! i try your fork of bygfoot. Please tell me what is your plan? Do you have todo list or roadmap? This is just fix bugs or add new features, maybe migrate to new version gtk etc.

Bygfoot is needing new developer who continue to develop this beautiful game. I'm very sad that project is stopped now and not have maintainer.
I know. My English sux. Sorry, guys. I'm really stupid to learn langs. ^__^
tstellar
Posts: 54
Joined: Mon Aug 31, 2020 5:46 pm

Re: New Builds: 2.3.3-alpha2

Post by tstellar »

So far I've been focusing on improving simulation performance, updating the definitions, and adding tests. I also would like to create a bygfoot server so the game can be played over the network.
David
Posts: 11
Joined: Mon Sep 16, 2019 10:22 am

Re: New Builds: 2.3.3-alpha2

Post by David »

tstellar wrote: Mon Jul 05, 2021 9:50 pm So far I've been focusing on improving simulation performance, updating the definitions, and adding tests. I also would like to create a bygfoot server so the game can be played over the network.
That would be just super!
Post Reply