Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic mercato #226

Open
axel3rd opened this issue Jan 12, 2022 · 3 comments
Open

Automatic mercato #226

axel3rd opened this issue Jan 12, 2022 · 3 comments
Labels
enhancement New feature or request postponed Feature or fix not implementable in short terms

Comments

@axel3rd
Copy link
Owner

axel3rd commented Jan 12, 2022

With #139 support, an automatic mercato feature can be implemented.

Options to support (with default values):

# Amount by line (sum <= 500)
mercato.auto.amount.attackers = 200
mercato.auto.amount.midfielders = 150
mercato.auto.amount.defenders  =  100
mercato.auto.amount.goalkeepers = 50

# Number of players to buy by line (should respect minimal MPG values)
mercato.auto.number.attackers = 5
mercato.auto.number.midfielders = 6
mercato.auto.number.defenders  =  5
mercato.auto.number.goalkeepers = 2

# Maximum (in percent) of remaining amount for next player choice
# A value near 100 will provide 2 goods players and poor for the rest
mercato.auto.amount.remain.ratio = 50

# Coefficient to apply on auction players (see mpgstats website)
# Useful when your friends bet like Qataris
mercato.auto.auction.coeff.attackers = 1.0
mercato.auto.auction.coeff.midfielders = 1.0
mercato.auto.auction.coeff.defenders  =  1.0
mercato.auto.auction.coeff.goalkeepers = 1.0

# Keep any players pre-selected at turn 1
mercato.auto.keep.players = true
@axel3rd axel3rd self-assigned this Jan 12, 2022
@axel3rd axel3rd added the enhancement New feature or request label Jan 12, 2022
@axel3rd axel3rd added this to the 1.9 milestone Jan 12, 2022
@axel3rd axel3rd modified the milestones: 1.9, 1.10 Apr 21, 2022
@axel3rd axel3rd added the postponed Feature or fix not implementable in short terms label Jul 21, 2022
@axel3rd axel3rd removed this from the 1.10 milestone Jul 21, 2022
@axel3rd
Copy link
Owner Author

axel3rd commented Jul 21, 2022

WARNING: When season start and no mercatos achieved in any leagues, no transactions done so auction = 0 for all players (The metric of last season/year is not used) => cannot be used for automatic process 😢.

@axel3rd axel3rd removed the postponed Feature or fix not implementable in short terms label Jul 23, 2022
@axel3rd axel3rd added this to the 1.10 milestone Jul 23, 2022
@axel3rd
Copy link
Owner Author

axel3rd commented Jul 23, 2022

WARNING: When season start and no mercatos achieved in any leagues, no transactions done so auction = 0 for all players (The metric of last season/year is not used) => cannot be used for automatic process 😢.

Could be now fixed by using "long auctions" concept (#232)

@axel3rd
Copy link
Owner Author

axel3rd commented Aug 3, 2022

API info


Mercato infos

URL:

GET https://api.mpg.football/division/mpg_division_MLMHBPCB_5_1

Response: "mercatoState.nextMercatoTurn" (UTC !!!)

Team set name

URL:

POST (or PATCH?) https://api.mpg.football/division/mpg_division_MLMHBPCB_5_1/team

Request:

{"abbreviation":"AFC","gear":{"home":{"jerseyId":"mpg_jersey_0_1631281964754"}},"name":"Axel Football Club"}

Jersey info:
URL:

GET https://api.mpg.football/locker-room/extended

Response: "lockerRoom.jerseys"

Mercato Bid

URL:

POST https://api.mpg.football/team/mpg_team_MLMHBPCB_5_1_3/mercato-bids

Request:

{"turn":1,"bids":[{"id":"mpg_championship_player_149065","price":29},{"id":"mpg_championship_player_17745","price":21},{"id":"mpg_championship_player_226597","price":26},{"id":"mpg_championship_player_94147","price":28},{"id":"mpg_championship_player_199796","price":23},{"id":"mpg_championship_player_60914","price":20},{"id":"mpg_championship_player_199584","price":1},{"id":"mpg_championship_player_212721","price":1},{"id":"mpg_championship_player_85971","price":74},{"id":"mpg_championship_player_101178","price":42},{"id":"mpg_championship_player_45034","price":17},{"id":"mpg_championship_player_433154","price":15},{"id":"mpg_championship_player_180135","price":1},{"id":"mpg_championship_player_168580","price":1},{"id":"mpg_championship_player_118748","price":85},{"id":"mpg_championship_player_78830","price":80},{"id":"mpg_championship_player_195899","price":26},{"id":"mpg_championship_player_80146","price":10}]}

@axel3rd axel3rd modified the milestones: 1.10, 1.11 Aug 5, 2022
@axel3rd axel3rd added the postponed Feature or fix not implementable in short terms label Sep 12, 2022
@axel3rd axel3rd removed their assignment Sep 12, 2022
@axel3rd axel3rd removed this from the 1.11 milestone Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request postponed Feature or fix not implementable in short terms
Projects
None yet
Development

No branches or pull requests

1 participant