This could be the intended to be the missing ~10 points I thought. So I wanted to test what this sprint helper score actually does in the game.
So I set that the output values very high (something like 1000) and my sprinter actually got ... LAST! Out of the whole peloton.
I made a lot of other tests like taking a very bad sprinter and setting the values to -1000. He won. Smaller values also have a good/bad effect, so I could rule out that it was just an integer overflow.
So higher min_output/max_output values actually effect your sprinter negatively. Some programmer probably put the wrong operator and it was never realized for years.
So if you reverse all the values (pay attention min_ouput is -15 and max_output is -10 and so on), you actually fix all issues. Those are the missing 10 points of "JOUER_LA_VICTOIRE_SI_SPRINT_MASSIF", so you can leave that at 20. Testing provided good results for me, of course I can not promise that they aren't other weird issues.
Its crazy that such a huge bug has probably been in the game since the simulation was coded the first time. It seems most of the games code hasn't been touched in years and probably the guy who coded this doesn't even work there anymore, so they don't wanna touch it.
00Visor wrote:
Its crazy that such a huge bug has probably been in the game since the simulation was coded the first time. It seems most of the games code hasn't been touched in years and probably the guy who coded this doesn't even work there anymore, so they don't wanna touch it.
Probably it was broken since 2010, because I'm playing now PCM 2006 and in this edition everything is fine with sprints (and with cobbled stages too).
Let's save the history of PCM together!
Just write me a PM if you have something for old PCM Editions (from 2005 to 2014) - databases, stages, shirts etc. and we'll share it.
That's kind of wild. I noticed a similar pattern at times, but thought of it as just bad luck.
So I understand it correctly that the points of the sprint helper get added to your main sprinter's value, and the five points for the "poisson pilote" are the sprint helper's own chances of a good result, right? Do you know what/how the game calculates, when you assign more than one rider to help your sprinter?
Thanks a lot for the insight already, btw!
Edited by cunego59 on 14-06-2020 10:47
Nice find! I believe in one PCM version I made the change Tiemen suggested and my sprint results were better, but this looks to be the real answer to the problem.
The min_output and max_output on each line should be swapped or the values on the last line should be on the first, those on the second to last on the second line, and so on?
The absolute value should be the same, but plus has to become minus and minus has to become plus, because a positive value in the code has a negative impact on the simulation results (and the other way around). And then you have to basically switch the two columns, because if you just put a minus in front of the positive values, you'd have for instance min_output=-10 and max_output=-15, which doesn't work. So the "corrected" code would look like this:
I think it would also make sense to adjust some of those values to have better leadouts give an even bigger advantage (a leadout with 69 gives just 5 coefficient points more than a leadout with 79), but that's maybe debatable and definetely needs testing, I guess.
The value in that table by the way is, if I understand the xml correctly, a weighted value of flat, sprint and acceleration, with flat given a weight of 1 and sprint and acceleration a weight of 2, respectively.
cunego59 wrote:
Do you know what/how the game calculates, when you assign more than one rider to help your sprinter?
Did some testing myself here (thinking about doing a sim-only career myself, so this is very interesting to me). Had my sprinter have two assigned helper, one with a value of 499 to 500 in the xml, the other with -499 to -500. It appears as though the game simply selects one of the two to be the leadout at random, as my sprinter always finished either first or last. So, no use of having more than one good support rider for your sprinter if you only simulate.
Wow, didn't expect so many replies so quickly. Great that a lot of you are interested in this.
Cunego59 posted correctly how the "reversed values" should look like. Kinda funny that they even made an error in the original files putting "-2" as min_output and "-5" as max_output (-5 is the smaller than -2).
I didn't test with more than one sprint helper. Strange that it just selects at random and not selects the best one. But that's an issue you can deal with as a simulation player.
@Cunego59: Of course we don't know how it's coded and if 10 points from Sprint Helper just gets added and has the same effect as increasing JOUER_LA_VICTOIRE_SI_SPRINT_MASSIF by 10. But it seems like that and would make sense why AI has 10 points more. Of course you could modify the values to your liking, its correct that a better sprint helper doesn't really have a big effect. You could also make the argument that getting more than 10 points gives you an unfair advantage over the AI. I guess that's subjective.
If we want to further improve the simulation files (I hope I don't go offtopic here): The only other big issue I found so far is that the HIL stat is not used at all. The hill simulation files just use MO for mountain (and I did some test to confirm it really works like that).
If HIL remains indeed useless in simulations, we could potentially band-aid it by making FL and END more important for hill stages. The hassle is that you would to correct rider stats and young rider generation. So it would be much better to just find the HIL stat for XMLs.
There are very few sources on the internet about. ppanther posted optimized files 7 years ago in this forum which aren't accessible anymore. But he also claimed that just "HIL" works which I couldn't replicate in PCM2019.
Crazy find! That's much appreciated work right here, thank you!
For me as a veteran with easily over 5000 hours across all PCMs of the last decade, the big news is already that my usual strategy of just setting the entire team to support my sprinter on flat stages is very detrimental
You'd think that even without the human input +/- error, the game would be smart enough to assign the weaker helpers as water carriers or relay train participants and only the best two sprinters as the actual leadout.
To go beyond that, does anyone have any clue how the game calculates breakaway success rates in simulated flat stages?
Would the best way to ensure a bunch sprint be to assign the unused riders to the GC leader (or a random rider if there is none, like in a flat classic) and put them on relay?
So a TL;DR for the findings of you and cunego, correct me if I'm wrong:
1) fix the XML
2) only assign your second best sprinter as a helper for your sprinter
00Visor wrote:
The hill simulation files just use MO for mountain (and I did some test to confirm it really works like that).
My first thought was that maybe MO is a substitute for a combined MO/HIL stat depending on how the stage is rated. Because iirc, there's some ratio in the stage file that determines how hilly/mountaneous it is, right? Or was that in some earlier version? But I simulated LBL a few times with Alpecin, and MVDP (69 MO, 79 HI or something like that) never even finished inside the Top 40, which was pretty jarring.
Also, if you say you tested that, I assume you had some riders finish highly in hilly races with 80 MO and 60 HIL or something like that? Or how did you test it?
Could it also be possible that for some weird reason, BAR relates to the hill stat? I realize it's usually the fighting stat, right? So, the probability with which someone attacks or is in the breakaway. But it also features heavily in the calculations for "Leaders" and "Force des Puncheurs" in the Hill_Puncheurs xml and in "PreClassification_SmallGroups" in the Hill_Main xml, although I can't say that I have completely understood what all of these things do yet
Going to look into that a bit more later or tomorrow. Interesting stuff for sure, but also potentially very disheartening if you want to do a sim-only career ...
The only other big issue I found so far is that the HIL stat is not used at all. The hill simulation files just use MO for mountain (and I did some test to confirm it really works like that).
Yes, the HIL stat is completely broken too. When I played PCM 2017 I also noticed that the HIL stat is useless when you ride with effort < 85 And in simulation mode the hill specialist almost always lost to climbers in hilly classics... In this way Cyanide didn't solve this problem until now.
Sure, because it's a problem of the game engine. I found an interesting discussion (mostly in English) about hillstat bug on official Cyanide forum: https://forums.let...mp;t=21742
Let's save the history of PCM together!
Just write me a PM if you have something for old PCM Editions (from 2005 to 2014) - databases, stages, shirts etc. and we'll share it.
1) fix the XML
2) only assign your second best sprinter as a helper for your sprinter
That's correct. I could attach Cunego's corrected code to the top post.
Regarding breakaways, you can have look yourself in the breakaway XMLs. To be honest it's very difficult to understand how all of that works as it's sparsely documented and would probably require intensive testing.
That says something about Base Probability (ProbaBase?) and "TeamateValue", "TeamateWork" and "TeamateRank" values. Maybe someone with good french can confirm if the first comment is about a teammate in the breakaway or chasing it. But what has a variable "TeamRank" to do with Probability Base?
cunego59 wrote:
Also, if you say you tested that, I assume you had some riders finish highly in hilly races with 80 MO and 60 HIL or something like that? Or how did you test it?
Yes I have a test file with a 85 MO and 60 HIL rider and one vice versa. I am very sure the MO stat is really just mountain.
The puncheur files are for attacks at the end. It checks if PRENDRE_RISQUE_DANS_FINAL tactic is selected. I don't really know what tactic that could even translate too - in the game tactic selection.
But the results for hill and mountain stages seem to be mainly affected by the "_Main" xmls and by the "PreClassification" and "Classification". "PreClassification_SmallGroups" seems confusing for me. BAR mainly has an effect on the puncheur and breakaway files of both hills and mountains. Not in the main files.
tomcat9 wrote:
Sure, because it's a problem of the game engine. I found an interesting discussion (mostly in English) about hillstat bug on official Cyanide forum: https://forums.let...mp;t=21742
The site doesn't load for me right now. But I would be really interested to see that discussion.
Edited by 00Visor on 13-06-2020 14:04
[quote]cunego59 wrote:
Also, if you say you tested that, I assume you had some riders finish highly in hilly races with 80 MO and 60 HIL or something like that? Or how did you test it?
Yes I have a test file with a 85 MO and 60 HIL rider and one vice versa. I am very sure the MO stat is really just mountain.
The puncheur files are for attacks at the end. It checks if PRENDRE_RISQUE_DANS_FINAL tactic is selected. I don't really know what tactic that could even translate too.
But the results for hill and mountain stages seem to be mainly affected by the "_Main" xmls and by the "PreClassification" and "Classification". "PreClassification_SmallGroups" seems confusing for me. BAR mainly has an effect on the puncheur and breakaway files of both hills and mountains. Not in the main files.
I just did a test by switching every "MO" to "HIL" in the "Hill_Main" xml, and immediately Van der Poel won the first simulation of LBL ahead of Kwiatkowski. Two more simulations and again, all top climbers that don't have a great hill stat are gone. Side effect is that now someone like Keukeleire can be really good, but with some tinkering, we should be able to make this more realistic. I should mention, I'm doing this for the xml file for PCM20, so maybe they changed something from PCM19, but HIL does seem to work.
tomcat9 wrote:
Sure, because it's a problem of the game engine. I found an interesting discussion (mostly in English) about hillstat bug on official Cyanide forum: https://forums.let...mp;t=21742
The site doesn't load for me right now. But I would be really interested to see that discussion.
Apparently, pcmdaily converts links to have a "https", and the Cyanide forums don't have that. If you remove the s in your browser, it should work.
I remember that discussion back then and it's an interesting read (also brought me the insight that stamina no longer only has an impact on races longer than 200km), but it only addresses issues with the 3D racing, not the simulation.
Edited by cunego59 on 14-06-2020 10:46
@cunego59: Are you sure HIL really works? If you just remove the MO coeff, Van der Poel could just win through PL and END. And of course the pure climbers are off. That's the results that I get. It would be great if you can give an average rider 85 HIL in a database and test it. Could also set PL and END coeff to 0 and maybe remove the random variable.
Thanks for https tip. The forum thread seems to talk about 3D and not simulation though.
For the translation of XML tactic values like "PRENDRE_RISQUE_DANS_FINAL" to ingame tactics, the databse provides some insight in the STA_SIMULATE_xx tables, though I don't fully understand it yet.
Edited by 00Visor on 13-06-2020 14:27
00Visor wrote:
@cunego59: Are you sure HIL really works? If you just remove the MO coeff, Van der Poel could just win through PL and END. And of course the pure climbers are off. That's the results that I get. It would be great if you can give an average rider 85 HIL in a database and test it. Could also set PL and END coeff to 0 and maybe remove the random variable.
Yes, you're right, unfortunately. Moved Kwiatkowski's hill stat down to 66 and he still gets good results. Seems like it only looked that way because puncheurs are mostly the ones with good END and FL combinations ... oh well, I'll try some more at another point
Ok, I'm gonna attempt a pseudo-fix for the Hill Simulations. It's probably gonna be quite a rabbit hole to go down. Only read if you are really interested .
I like the way Endurance is coded, it actually seems to be affected by stage length in simulations, so I'm not gonna touch it. PL, the flat stat, will become more important for Hill stages and RES will be the equivalent for mountain stages. It's already kinda set like that, except PL is commented out in the Hill simulations.
To not make huge adjustments, we will increase the coefficents so PL and RES have half the effect that MO has. I think thats fair even with exisiting values.
Now because the HIL stat doesn't exist in simulations we will set all MO and HIL values of riders in the database to the maximum of the 2.
To balance these changes, we will give them a penalty to PL or RES, so our XML sums achieve the values intended. The penalty will be double the MO-HIL difference, because PL/RES have half the effect on the stages.
Example:
Rider 1: PL 75, MO 70, HIL 75, RES 75
Rider 2: PL 75, MO 75, HIL 70, RES 75
After changes:
Rider 1: PL 75, MO 75, HIL 75, RES 65
Rider 2: PL 65, MO 75, HIL 75, RES 75
You will get slight effects on other stages, especially with the PL stat, but I don't think there are too many riders with a considerable higher MO than HIL stat who care too much about timetrials or sprints. It's possible we can make adjustments to other XMLs if necessary.
I hope to set up a macro so you can edit existing database tables. (would also work for savegames)
Now to go further down the rabbit hole, we have to edit the classification of "Puncheurs" and their training. That can be done in the database. We also have to edit the generation of young talents. That can be done in another XML folder.
Edited by 00Visor on 13-06-2020 15:51
I went to the PCM Discord Server to ask about the xmls. Firstly, there is indeed no code for the hill stat and the MO variable is supposed to work as a ratio stat depending on the stage file, but that doesn't work as intended.
Secondly, though, it turns out that there has been quite some work done on the simu xmls for PCM19. Davy from PCMWorld has made some revamped files that can be downloaded here. His feature list is as follows:
- Fair mass sprints. No dissadvantage for humans anymore vs AI.
- Cobble specialists win cobble races
- Gave hill specialists more chances in hill classics (instead of favouring mountain specialists)
- Average/Difficult Hill stages in GT's are not only for GC contenders but also for hill speciliasts
- Easier hill stages in GT can end in a sprint with a mediumsized group favoring the strong sprinters who can survive a difficult stage
- In general, hill stages in GT will have smaller gaps between groups than in the default game
- More chance of breakaway winning mountain stages in GT. (like IRL and making it more difficult for GC contenders to win points jersey)
- Flat stages can be won by more sprinters, in the default game it's mostly the same sprinter that wins al flat stages
- Tried to avoid breakaway winning champs elysees stage (first results are promising but don't know for sure if I can 100% avoid it in the xml files)
He also points out that because they were made for PCM19, he can't guarantee they work just as well for PCM20, and also Cyanide seems to have already taken over some of his work for PCM20 or maybe improved on it (though apparently not for hills, I assume). So some testing should definetely be done (everyone feel free to join ), but I think this is a very good basis to continue the work on a more realistic simulation (or already the solution, if they still work).
One example of a season with his files (again, for PCM19):
Nice to get some confirmation. But sad that we indeed can't use the HIL stat. If Cyanide is aware of this issue and are using some of his work, why are they not fixing this? Are they indeed unable to understand and change their own code?
Very nice to see another attempt at optimizing the XML files. He made some good changes that I also did.
His sprints are not fair, because he didn't know about the operator bug.
Mainly I don't know how he claims that hill specialists have better chances if he can't use the HIL stat.
His stats used in the main classification for hill stages are:
So his approach is to make RES even more important than MO for hill stages. Still many climbers have high res and the hill stat can't be used.
If that Discord is official, I would like to engage in some discussion. Where can I find it? Maybe he knows more about what the different sections of the XML actually mean.
My firsts tests with an alternated database where pure climbers have a bad PL and pure puncheurs have a bad RES work quite well. Just need some finetuning so pure climbers don't lose too much time on hill stages in GTs. For that it would be really good to have more understanding of the XMLs.
It is indeed the official server, used for bug reports, official announcements of the developers and such. And lots of discussion among users, of course.
When it comes to the specific changes, it's important to note the possibility of different stat matrices. He did this with the PCM World DB, so it's possible that the resistance stat is distributed differently there. In addition, at least as far as I'm aware, he didn't do this with a simulation only career in mind, so his files had to work without adjusting the stats of the riders. I haven't gone through the files myself yet, I've just seen some of his test results.
You can find the short discussion I had regarding the files and the respective users in the PCM Topics - #general chat on the server.