Closed pierpaolocira closed 4 years ago
EITHER is able to get information both on the moment the playered entered in the team and on the report from the last update. By crossing them it should be possible to avoid
It is feasible but I am not sure of how much work this will require
OR allows the user to manually set decimal values for his players. This is already possible. What am I missing ?
This is already possible. What am I missing ?
@akasolace sorry, it was not written properly. My idea is that either we fix it as proposed (HO manages it automatically) or we keep it as today (because HO allows the uset to manually set values).
I'm going to rephrase it properly.
I would suggest to keep this feature as open in the queue, and not to keek HO as today... Ideally, if someone could provide a high level estimation of the effort it would help to manage when the right moment arrives.
@pierpaolocira is it something you want to work on at some point?
Hi sorry, I just saw this. I asked if someone could provide a raw estimation, because I don't relly know... Then if it's worth spending this time I can work on it (e.g. if it requires a big effort we could ignore it for the time being, because a workaround exists).
Additionally just few weeks ago I bought a new player and I had the feeling that he wasn't affected by this... so, if possible, someone should try to replicate and confirm by following the three initial steps. The hard part is that a player that improves one of his skills is needed.
@akasolace @pierpaolocira my approach would be to change the method HOModell.calcSubskills. Currently this method examines the version of the player of the previous HRF to get the skillups. if the player is not found in the last HRF NO skillup is assumed. i suggest to download the trainings events of such players and build the OLD player with that infos: equal to the current skills if no training events were listed and skill=current-- if an event on that skill is given.
could be done in a few working days, i think
@akasolace a first approach is in the my branch bug#188. Before i want to create a pull request i would like to have an idea how to test that. i could wait until i promote a youth player which is planed to be trained in the seniors team. this could happen in a few weeks. but it is very likely that he will not have a skillup in the first week
i suggest to download the trainings events of such players
@wsbrenk how can you do that ?
Before i want to create a pull request i would like to have an idea how to test that.
depending of the answer above I might have an idea ...
@akasolace there is a trainingevents.xml file in chpp which gives such informations
<?xml version="1.0" encoding="utf-8"?>
<HattrickData>
<FileName>trainingevents.xml</FileName>
<Version>1.1</Version>
<UserID>1757369</UserID>
<FetchedDate>2020-04-12 10:55:03</FetchedDate>
<UserIsSupporter>1</UserIsSupporter>
<UserHasClubHouse>False</UserHasClubHouse>
<Player>
<PlayerID>423970923</PlayerID>
<TrainingEvents Available="True">
<TrainingEvent Index="0">
<EventDate>2019-12-13 00:49:00</EventDate>
<SkillID>5</SkillID>
<OldLevel>3</OldLevel>
<NewLevel>4</NewLevel>
<Season>73</Season>
<MatchRound>8</MatchRound>
<DayNumber>5</DayNumber>
</TrainingEvent>
</TrainingEvents>
</Player>
</HattrickData>
@akasolace i found that the hattrick SkillIDs are not equal to the HO PlayerSkills https://hattrick.org/Community/CHPP/NewDocs/DataTypes.aspx#skillID i plan to implement a mapping in the class Skills. Or is it elsewhere already?
@wsbrenk indeed I can't see it...
@wsbrenk so with the trainingevents.xml you can now when the player had its last up. Then how do you calculate the decimal ? How would you how many additional trainings the player received ?
@akasolace the trainingsevents are only loaded when the player is downloaded the very first time (bought new, promoted from youth or it is the very first download at all). then we don't have any idea about sub skills. as @pierpaolocira suggested the skill estimation should be a conservative one:
in the first case the inaccuracy is 5.28 to 5.99, in second case only 5.00 to 5.27
@wsbrenk I am sorry but it is still not clear for me, the only thing you got from trainingevents.xml is date of last update, right ? You still have no idea if the player received some training since that, right ?
as @pierpaolocira suggested the skill estimation should be a conservative one:
if there is no related trainingevent the previous sub skill should be 0 (training effect counts completly to the current sub skill; this is what HO already does; 5.28 in example above) if there is a related training event the the current sub skill should be 0 (the current training effect led to the skill up; 5.00 in example above). in the first case the inaccuracy is 5.28 to 5.99, in second case only 5.00 to 5.27
I don't follow. In your example all we know is that player skill upgrade from 3.0 to 4.0 on the 13th of December. Currently in HO this player will be assumed to have a skill at 4.0. I that player is not trained it will have a subskill a 4.5 (because lower than 7) and after a training he will have something like 4.2.
Sorry to be a pain, but can you explain me once more what you intend to change here ?
@akasolace forget the values of my xml example above. the example i refer to is that of @pierpaolocira.
let's make an example
if today you would have downloaded HO data before the training update, p2 will be stored with pm 4.0 and after the training HO will set the skill to 5.0. So for people who regularly download the HO data everything is fine right now.
@wsbrenk ah ok so the issue is only for user who bought/pull player and train them directly and for which the skill up happens on first training and did not download data between the time they bought the player and the time skill up occurs? It is really very specific but in that case, yes this time I got it :-)
Hi... true... just to explain, I download data from HO every Friday. So:
@pierpaolocira yesterday i successfully run a new subskill calculation. but none of my current player had a skillup in the first week. if you would like to test my changes you could run a subskill calculation with your team. if your mentioned example is still in your team you should reach a debugger breakpoint which handles your very special event. Are you interested?
@wsbrenk hello do you want to submit a PR for this for 3.0 or do you want to wait next version ?
@pierpaolocira if your mentioned example is still in your team you should reach a debugger breakpoint which handles your very special event. Are you interested?
@wsbrenk sory for my late reply. It was a long search because I couldn't rememer the name of the player. I had to go into dates, tranfers, and my memory :) ... and I'm almost sure the player has been sold. Do you think it can work only for "main skills" or also for something like stamina, etc? In this case I could keep an eye open on my next purchases...
@pierpaolocira no problem - and yes, the subskill calculation only works for "main skill", stamina and form are skipped.
@akasolace the risc to release this pr would be very low, i think.
These are the steps:
Description of the issue I experienced, so that I can explain the side effects:
This should apply also for new promoted players (but I didn't verify).
This could be solved if HO is able to get information both on the moment the playered entered in the team and on the report from the last update. By crossing them it should be possible to avoid
As alternative, the user is still able to manually set decimal values for his players... although this whould not be the best scenario.