|
Post by fortispeed on Dec 31, 2023 1:10:16 GMT 2
Has anyone managed to improve the GpwEdit version 1.1.0.0? A pay driver error that, after saving the file, takes money from the team instead of paying the team, destroys the game
|
|
|
Post by veedub on Jan 4, 2024 4:23:30 GMT 2
Hi fortispeed. Unfortunately that was the last change that I made to the editor, so I imagine the pay driver bug still remains in v1.1. I'm not sure if I'll ever have the chance to look at it but I suspect it's down to the experimental code that I wrote that shifted all the driver and sponsor profiles. From what I remember, the game executable stores three values for each driver: - the salary of each driver (positive or negative, e.g. 9,600,000 or -9,600,000) - the pay driver rating as a number from 1-5 (calculation shown here) - the pay driver salary as a positive value (e.g. 9,600,000) As the game detects that the pay driver rating is set to a value other than 0, it should display the salary as a negative value (which I believe it does successfully). But somewhere in the accounting of the financials, the game does not invert the number to a negative value, so you end up paying Pedro $9.6m instead of him paying you $9.6m. A very strange bug, as it was not an issue in v1.0. Without an immediate fix, after doing the import/export, I suggest getting out a hex editor and look for the pay driver salaries (e.g. search for 9600000 in the executable). They should be close by (within 100 bytes) and the first value should be changed from 9600000 to -9600000. And just see if that fixes it. But you will have to fix the rest too, sorry. Use the first link below to guide you as to the shape of the data in the executable. (Maybe I could spin up a hot fix that looks for pay drivers and quickly inverts this value, if this is indeed the problem. The below is just technical jargon, should I (or some other C# developer / reverse engineer) ever investigate the issue further. ----- When the original exe is first "upgraded" to be able to use with the editor, all the driver data is rewritten to the exe in new locations: github.com/Vjww/GpwEditor/blob/master/App.BaseGameEditor.Application/Patchers/CodeShiftPatcher/DriverData.csOnce upgraded, you can then edit the executable using the editor. It will import the values and then export the values. I suspect this import/export is where the issue lies, unless the bug is already present as a result of the "upgrade" process (maybe someone can test this). I suspect the issue is that my mapping of values is incomplete or not behaving as expected. I'd need to review the before and after of the export and maybe write an independent program that uses some of this mapping code to test the problem. github.com/Vjww/GpwEditor/blob/master/App.BaseGameEditor.Application/Maps/AutoMapper/PersonDataEntityOnPersonEntityProfile.cs#L52github.com/Vjww/GpwEditor/blob/master/App.BaseGameEditor.Application/Maps/AutoMapper/MemberValueResolvers/EntityF1DriverPositiveSalaryMemberValueResolver.csgithub.com/Vjww/GpwEditor/blob/master/App.BaseGameEditor.Application/Maps/AutoMapper/MemberValueResolvers/EntityF1DriverPayRatingMemberValueResolver.csApologies for this bug. The v1.1 code was experimental and untested (and I ran out of energy at the time).
|
|
|
Post by fortispeed on Jan 4, 2024 19:19:49 GMT 2
Unfortunately, I am not a programmer and I admit that it is difficult for me. Graphically, I am constantly modifying this game, I am in the process of creating minimaps for the tracks with a top view from the 1998 season. Each track takes 6-7 hours, but I think it is worth it. Maybe someone else will take on this task to fix this editor which will help improve this game even more.
|
|