|
Post by jayott on Jan 7, 2022 12:17:34 GMT 2
I know that some level of de-compilation has occurred over the history of GPW modding (I'm told this was Veedub's doing). This led to the 1.03 patch which later got consolidated into GPWedit. There was also a code dump which I still have a portion of saved, and have hence attached. I unfortunately don't have the part where the chassis calculation is done but I'm sure someone must have it as it was one of the major fan patch changes.
Anyway, I wanted to ask a couple of things. I can reasonably figure out what many of the v values in the c file I posted do already*, but a fair few others, especially outside of the car performance calculation, are a mystery to me. I'd ask Veedub about this and other things but he hasn't been on these forums since 2020, so does anyone else know what the rest of the v values do?
Furthermore, I wanted to ask about how I can access, edit and recompile both the section I've attached and the parts where wet weather and chassis quality calculations are made. I'm feeling really motivated to mod the game right now and was hoping to be able to improve the overall car performance calculation, and make wet weather a little less overpowered. I just hope someone was able to save this information, there was a backup of the gpracegames site posted on google drive but that link is dead now...
*that being;
v54 = car performance value v60 = chassis quality v68 = engine power v36 = track speed
v37 = track grip
v14, v17 = driver speed/skill (which is which?)
v29 = brakes performance v30 = clutch performance v31 = electronics performance v32 = gearbox performance v33 = hydraulics performance v34 = suspension performance v35 = throttle performance v50 = active suspension level v51 = automatic gears level v52 = power brakes level v53 = traction control level
Attachments:GPW.c (8.65 KB)
|
|
|
Post by manuel on Jan 15, 2022 17:10:28 GMT 2
I think Veedub ist the only one who knows. Sad that hes not active anymore.
|
|
|
Post by jayott on Mar 18, 2023 10:12:55 GMT 2
|
|
|
Post by manuel on Mar 18, 2023 16:16:12 GMT 2
Thats one of the biggest impact for the game since gpwedit
|
|
|
Post by jayott on Mar 21, 2023 17:47:53 GMT 2
|
|
|
Post by gozza on Mar 22, 2023 4:17:13 GMT 2
Great find !
|
|
|
Post by matcap on Mar 22, 2023 23:19:07 GMT 2
after 25 years this game still surprise me, it's a masterpiece. good job to who did this, amazing
|
|
|
Post by fortispeed on Mar 24, 2023 12:55:28 GMT 2
Maybe it will finally be possible to shorten the lap times, e.g. in Melbourne, so that drivers achieve times below 1:30,000? And maybe we can fix the bug in the pit stops so that Minardi doesn't have to wait for other teams from the 1997 season standings to leave the pit lane. Williams drivers have priority over everyone else. Plus, the last mistake is when the AI driver goes for one stop, he reaches the speed as if he had soft tires on.
|
|
|
Post by jayott on Mar 28, 2023 11:35:21 GMT 2
I showed Jose the c file, which they didn't actually have on hand before, and they went on to fill in a lot of the blanks. This is what we now have:
v54 = car performance value v60 = chassis quality v68 = engine power v36 = track speed v37 = track grip v14 = driver speed v17 = driver skill v29 = brakes performance v30 = clutch performance v31 = electronics performance v32 = gearbox performance v33 = hydraulics performance v34 = suspension performance v35 = throttle performance v50 = active suspension level v51 = automatic gears level v52 = power brakes level v53 = traction control level v63 = tyre stiffness v72 = chassis issue case 1 = oversteer - slow speed case 2 = oversteer - high speed case 3 = understeer - slow speed case 4 = understeer - high speed case 5 = high drag case 6 = poor balance case 7 = low downforce case 8 = high pitch sensitivity v20 = tyre grip modifier v39 = track dust v19 = tyre deg modifier v40 = track overtaking v15 = driver overtaking v16 = driver experience v7 = car ahead/defend v6 = car behind/overtake v69 = engine response v10 = driver mistake modifier v43 = track wind v42 = track heat v67 = engine heat v41 = track braking v38 = track surface v9 = pre calc suspension wear v8 = pre calc brake wear v70 = engine rigidity
|
|
|
Post by veedub on Apr 1, 2023 14:46:47 GMT 2
Greetings, yes I am still on planet Earth. Nice to see some familiar names are still kicking around and genuinely I hope you are all well. This game seems to have left its mark on many of us, as we keep coming back to it. I even have the original box, cd and manual. Great to see that someone has been snooping around in my notes and has found one of the Easter eggs that I left behind. Congrats! Unfortunately when the gpracegames website went under, a lot of my write ups went missing (probably my fault for not archiving them) and a lot of my motivation went with it too. But tbh I was pretty exhausted already with coding/hacking - incredibly fun and rewarding but also incredibly time-consuming too. I do/did have a copy of the gpracegames website and I managed to get it up and running BUT sadly it did not come with the MySQL database that contained all the useful stuff, so it’s effectively an empty website. But the good news is that I still have my brains and my memory… just very little time - thanks to life and work. It looks like you guys have got up to where I left off. Aside from building GPWEdit and unlocking the track editor, my next announcement was going to be about the telemetry and the frame rate bypass. But given the website went down I decided at the time not to ruin the game for all of you by sharing these hacks. As you will quickly discover, this beautiful game is just simply a bunch of numbers behind the scenes. Frankly I was a bit underwhelmed that a computer game just boils down to maths, and not a neural network. In regards to telemetry, my plan was to create a program/editor to parse the telemetry text files, so that after each race you could graph the data of the race for every driver and every lap. The telemetry data is not particularly uniform or consistent, so it will require some effort to represent that data as information. But certainly it is an exciting prospect should anyone have the skills. in regards to the frame rate bypass, this caused issues with the ingame mathematics, as some players may have already experienced when using older speed up tools. I know a lot of people get annoyed at how slow the game runs (when at optimum speed) but speeding it up can actually create wild / broken results. So bigger picture, it may be possible to remove the frame rate limit and then fix it to 60 FPS, improving the game speed and then adjust the system clock speed (programmatically speaking) to ensure that the game mathematics are calculated / compensated with the adjustment in the frame rate. it looks like you now have the answers on most of the race performance variables and the impact they have on race performance and reliability. Well done on figuring most of these out. Most are straightforward but just time consuming to trace them back. Unfortunately when reverse engineering the game it doesn’t give you any clues, unless you put in the time to trace everything back to either a text value in the language files or by identifying things like salaries or cash values that are hardcoded into the executable and then explore nearby code. Apologies that GPWEdit v1.1 contains that bug about supplies and pay salary drivers. It was a pretty aggressive attempt to rework the supplier blocks and allow the switching on and switching off of supplies. There must be some crossover in the memory blocks and is interfering with pay drivers. But it could also just be a bug that I slipped up on. I’d love to fix it but no promises. I’d really want to sit down and rewrite the GPWEdit code base, if I was ever going to get back into modding the game. And that would also include trying to fix the original Microprose pit stop bug, which is the worst of the worst bugs for gameplay. But hey, at least we got it running on Windows 10 and removed the yellow flag penalties! Happy to answer any questions you may have, and I prefer publicly, as then it can be referenced by anyone in the future (rather than being buried in DMs / PMs). In terms of reverse engineering, disassembly and then re-patching, then you are entering programming territory. You would need skills in memory management, understand portable executables (PE), know a the basics of assembler and C languages, and for GPW Edit, know Windows Forms and C#. Keep in mind that 20 years ago I knew none of this, so anything is possible for everyone. I just started out with a hex editor, perhaps six years of my life, and the rest is history.
|
|
|
Post by fortispeed on Apr 1, 2023 19:58:29 GMT 2
Hello Veedub! Grand Prix World is the game of my life! I translated this game into Polish. I took all the photos of the tracks without censorship, i.e. with the logos of Marlboro, Campari, Foster's, Gauloises and others. I've created new track maps. I also created real 1998 car liveries. I would like you to fix GPW Edit 1.1 and the bug in pitstops someday. This would definitely fix perhaps the worst bug in the game. My dad is a big fan of Grand Prix World, he's the reason I started playing it in 2001. I would like to give him a present for his 50th birthday, and give him the Grand Prix World with all the corrections, with my translation into Polish. Could you help me with the pit stop problem?
|
|
|
Post by veedub on Apr 2, 2023 12:45:30 GMT 2
Thanks Forti. I am forty (40) years old myself, so I can imagine how impressed your dad will be to get all the upgrades you have worked on. Very cool story. The problem with the pitstop bug is that it is a programming logic error and I suspect Microprose knew that it was too difficult to fix in their one and only patch. Basically, if a 1998 Jordan (ranked 5th?) is in the pit box (i.e. has arrived into the pits, and has stopped in it's box), it won't be immediately impacted when a 1998 Ferrari (ranked 2nd?) comes into the pits. But if the Ferrari stops in the box before the Jordan is ready to leave the box, then the Jordan is impacted and it cannot leave the box before the Ferrari leaves (as you probably already know). It is incredibly challenging to follow the assembler code (when debugging the disassembled executable) when these scenarios happen. But from what i can see, the game does not store the "state" of the pitlane in memory. In other words, the game does not have the brains to determine who should leave the pitboxes first (possibly related to the TV graphics that show cars exiting the pit boxes). It seems to build a list of cars that are currently in the pitbox and this list remains suspended and is not cleared until the highest ranking car is ready to leave the pit box (as you probably already know). What you see on screen does match what is happening in the code. Incredibly frustrating. For the code to work properly, I could probably rewrite some logic but I would also need some memory space to store the current "state" of each car. And then how to you manage that state and clear it as each car comes and goes, and or catches fire, has to retire etc. I would need to find free memory space within the "racing context" to be able to run proper logic. I think the main challenge was how "track segments" and "running order / overtakes" are recorded when the car enters the box (not the pits but the pit box itself). e.g. cars are coming off the track and into the pitbox, so they "fall" off the track in terms of positioning, so you lose the order of each car. i.e. the game doesn't know that the Jordan was ahead of the Ferrari and waits for the Ferrari to leave first because that's how the list is naturally ordered by ranking. So you would need to find a way to compare the pitstop time against the other car. e.g. if the game knew that there are two cars in the pit box list, and the Jordan entered at 20m30s into the race and stopped for 8s and is ready to release, it would need to record the time that the Ferrari entered the pits (e.g. 20m35s) and whether it stopped for 2s or 10s and is ready to release. If 2s, then the Ferrari should leave the pitbox first @20m37s and the Jordan can leave @20m38s. If 10s then the game should check the list and see that the Jordan does not need to wait until 20m45s and can be released. If I remember, I think the pitstop time is calculated before the pit stop actually starts (based on pitcrew performance, fuel levels and other modifiers). If the game could do that calculation when there are at least 11 cars waiting in their pitboxes, for each individual car, then perhaps the bug could be fixed. Of course, remember that if there is a Jordan that has not yet left it's pitbox, then the other Jordan cannot even enter the pitlane and must remain on track. So double stacking is not possible in the game but it could be, if the second Jordan had the pitstop time of the first Jordan added to it's time of arrival at the pit box, plus perhaps another 3s for punishment/delays. So there is a bit of complex logic around pitstops and what triggers are fired when a car is ready to leave its pitbox. Anyway, I hope that helps to explain the challenge and complexity of the bug. If I do find some notes on my pitstop bug investigation, I'll try to post it into a new thread so that maybe it helps someone else one day.
|
|
|
Post by fortispeed on Apr 2, 2023 21:56:53 GMT 2
This sounds very complicated and quite a difficult error to fix. I hope someone who is good at coding could fix the worst glitch in Grand Prix World. I often play Minardi and this error is very frustrating because if a team pits with my team, my drivers automatically always have to wait for the other teams to leave - and always behind the others.
|
|
|
Post by jose21crisis on Apr 12, 2023 16:57:13 GMT 2
Hi all. Welp, I am the guy that decided "You know what, Google is a powerful thing, let's see what happens" and found Veedub's GPWEdit GitHub page with a whole bunch of notes. Some that made sense, like the dat ones (Although took me a while to figure out that I had to create a DAT folder), some ... well, a bit more complicated since I'm not an Assembler code master ... or trainee ... I can barely read the thing. There was a bit on the Pit Stop Bug Investigation as well, but ... again, can't read ASM really well.
Anyway, I actually had seen "frame rate bypass", I think (unlimit.dat), and I have seen it breaks all kinds of stuff. The UI gets hard to use because it clicks a lot of times, the lap times get real quick. There's something off about it, can't quite pin it down. I think the game does run best at 100% Speed, but running a whole 90 minute GP is ... not for all of course.
The telemetry file has been really useful to show what matters in terms of performance, but the only issue is that it doesn't show how it gets the rating that "apparently" matters. The Speed rating. It doesn't show the effect of driver orders on the car either, then again, the file specifically mentions that it shows the "Pre Calc" stats, before it takes into account the driver. Generally speaking, more Points = more Speed = more Fast, but I've seen some ... inconsistent behavior. I've seen Braking generally slightly reduce the Speed rating and generally be useless when it comes to pace (Which is why I commonly suggest dropping it unless necessary), I've seen Off Line Racing reduce the rating and yet increase pace despite it adding no points so ... even though the game shows ratings (after some manipulations), it still manages to hide some of them.
And among those are the ones I've been working on. The Off Track stuff. How many time units it takes to build spare parts/race cars, start negotiations with sponsors, progress negotiations with them (These are two very different things!), how Sponsor Morale works, progressing Licensing, that sort of thing. Unfortunately (AFAIK) there is no GPW output file that shows the raw values of this. So instead I get to break out my two crowbars: Cheat Engine (To see the underlying values that GPW shows as just blocks and bars) and Microsoft Excel (To keep track of things).
|
|
|
Post by veedub on May 7, 2023 13:31:03 GMT 2
Welcome jose21crisis. Thanks for taking the time to find and enjoy some of the easter eggs that I left behind. If the stars were aligned, I imagine we could get the game to reliably run at 60fps to a fixed system clock and the races should run in 30-60 mins. I wouldn't want the game to run too fast, as that would spoil the gameplay/immersion but for me, double-speed or triple-speed would be ideal. e.g. a 90s lap would take 45s or 30s. In terms of car performance, from memory it's largely based on a single value up to 10000 (or whatever). So your chassis might make up 8000 of that and the rest are modifiers (positive and negative). I presume this rating is then calculated to pre-determine (precalc) the speed of the lap/segment which is restricted by scenarios during the lap/segment (e.g. weather / opponents). But to be honest, I'd better not say anything further in case I'm inaccurate. At the end of the day, the code does what it does and that's what needs to be translated into English. From what I remember of "human effort", you are correct that there is a thing called TUs - "Time Units" (not sure if I made that up or it is in the code/game manual). So depending on the level of each of your personnel (including chiefs), they add TUs to spend for engineering/repairs/sponsorship etc. Morale is a separate thing but I believe that completing tasks, like building a chassis or signing a works deal would give huge morale boosts. And possibly having staff sitting idle is a bad thing. Apologies, I'm not around much but will reply when I can.
|
|
|
Post by jose21crisis on Sept 18, 2023 3:56:33 GMT 2
Welcome jose21crisis. Thanks for taking the time to find and enjoy some of the easter eggs that I left behind. If the stars were aligned, I imagine we could get the game to reliably run at 60fps to a fixed system clock and the races should run in 30-60 mins. I wouldn't want the game to run too fast, as that would spoil the gameplay/immersion but for me, double-speed or triple-speed would be ideal. e.g. a 90s lap would take 45s or 30s. In terms of car performance, from memory it's largely based on a single value up to 10000 (or whatever). So your chassis might make up 8000 of that and the rest are modifiers (positive and negative). I presume this rating is then calculated to pre-determine (precalc) the speed of the lap/segment which is restricted by scenarios during the lap/segment (e.g. weather / opponents). But to be honest, I'd better not say anything further in case I'm inaccurate. At the end of the day, the code does what it does and that's what needs to be translated into English. From what I remember of "human effort", you are correct that there is a thing called TUs - "Time Units" (not sure if I made that up or it is in the code/game manual). So depending on the level of each of your personnel (including chiefs), they add TUs to spend for engineering/repairs/sponsorship etc. Morale is a separate thing but I believe that completing tasks, like building a chassis or signing a works deal would give huge morale boosts. And possibly having staff sitting idle is a bad thing. Apologies, I'm not around much but will reply when I can. Hi again. For car performance, the code does seem to limit perfomance points to 10000, although getting there legally is pretty tough. Then in the precalc driver ratings and stuff do their thing and so on. It's pretty straight forward ... until the "Grip" precalc rating rolls around, which I'm not sure what it does because the decompliling doesn't show anything regarding this particular rating. I'd guess it has an effect on driver errors but, as per usual, I am not sure. And yes, they are "Time Units", there was an official Hints and Tips doc that refers to them as such. Their Morale does seem to increase when they do "their job", although the Engineering and Mechanics department seem to get easily annoyed when the team isn't doing good. I'd guess they want to build a certain amount of things each weekend. On the other hand, the Mechanics seem to like testing and keeping the cars fixed, and maybe no commiting pit stop mistakes. At least Commercial and Design are simple: If design complete/contract signed: we happy. Each action has a certain amount of time units to be complete, which is what I've been trying to discover. The most difficult part is the pit stop priorities, whose values don't make any sense.
|
|
|
Post by ferrim on Dec 7, 2023 14:12:12 GMT 2
in regards to the frame rate bypass, this caused issues with the ingame mathematics, as some players may have already experienced when using older speed up tools. I know a lot of people get annoyed at how slow the game runs (when at optimum speed) but speeding it up can actually create wild / broken results. So bigger picture, it may be possible to remove the frame rate limit and then fix it to 60 FPS, improving the game speed and then adjust the system clock speed (programmatically speaking) to ensure that the game mathematics are calculated / compensated with the adjustment in the frame rate. Regarding frame rate issues, I think we already got a very nice fixing of it with Dxwnd. I haven't played the game for a couple of years, but my last configuration (which hopefully I still have stored somewhere, I have to check) did a pretty good job. I documented it somewhere on Sionco's forum, sadly lost, but basically playing with the ALPHACHANNEL setting the race screen popped up okay (no garbage), and there was a feature that allowed to speed up the races quite a bit. IIRC, you could speed it up to 16x although I only found it to work ok up to 4x, anything after that didn't improve matters (maybe a computer power limitation?). So, by setting up this check and the race speed at 150%, I clocked up qualifying sessions at 10-12 minutes, although for some tracks it took a little longer. So I could play a whole race weekend within the hour, which isn't perfect but decent enough. Actually, some times I found myself slowing down race speed, when there were changing weather conditions or around the time of the pitstops.
And, somehow, this didn't break game speed in the management part. It worked like a charm, apart from the very occasional EXE crash.
You also had windowed mode, the game would pause as soon as the window lost focus but it was nice to have.
I know it's not the perfect solution, as we would like to just double click the exe and play the game with the optimal configuration, but I don't think too many people are aware of this. People are still playing either the default game, or the patched one which, for example, still has the default performance curve, which forced us to use pretty weird values for car handling in the 1998 season (I say us because I supplied Veedub those values... Sauber car is like 37, Jordan forty-something, and McLaren are veeeery far ahead of Ferrari). I did a new performance curve which allowed for far nicer handling values, and wanted to release a "1998 remastered mod" with a lot of changes and house rules, but never came around to it.
|
|
|
Post by ferrim on Dec 13, 2023 14:25:10 GMT 2
Hi all. Welp, I am the guy that decided "You know what, Google is a powerful thing, let's see what happens" and found Veedub's GPWEdit GitHub page with a whole bunch of notes. Some that made sense, like the dat ones (Although took me a while to figure out that I had to create a DAT folder), some ... well, a bit more complicated since I'm not an Assembler code master ... or trainee ... I can barely read the thing. There was a bit on the Pit Stop Bug Investigation as well, but ... again, can't read ASM really well. Anyway, I actually had seen "frame rate bypass", I think (unlimit.dat), and I have seen it breaks all kinds of stuff. The UI gets hard to use because it clicks a lot of times, the lap times get real quick. There's something off about it, can't quite pin it down. I think the game does run best at 100% Speed, but running a whole 90 minute GP is ... not for all of course. Can you explain, step-by-step, how to activate this telemetry stuff?
I've followed your blog post but have been unable to get any data from the game, the files are not appearing in my folder. What I've done is: create the "dat" folder in my game directory (which is C:/MicroProse/Grand Prix World), and create the "dumpaid.dat" and "dumpaidq.dat". I then run the game and start qualifying for the Australian GP, but nothing happens. Those two files remain as 0KB each, and no "qual" or "race" file with information is created anywhere...
I must be missing some step.
|
|
|
Post by jose21crisis on Feb 12, 2024 22:44:50 GMT 2
Can you explain, step-by-step, how to activate this telemetry stuff?
I've followed your blog post but have been unable to get any data from the game, the files are not appearing in my folder. What I've done is: create the "dat" folder in my game directory (which is C:/MicroProse/Grand Prix World), and create the "dumpaid.dat" and "dumpaidq.dat". I then run the game and start qualifying for the Australian GP, but nothing happens. Those two files remain as 0KB each, and no "qual" or "race" file with information is created anywhere...
I must be missing some step.
Sure. So, first thing is creating the "dat" folder inside the game directory. Inside said folder must be the dumpaid.dat and/or dumpaidq.dat. They MUST be in there, otherwise it won't work. After that, load up a session. As people starts completing laps, a file by the name of RaceAID.txt will be created in the game directory. That one outputs all of the data for each lap each driver completes.
|
|
|
Post by ferrim on Feb 12, 2024 22:55:37 GMT 2
Well, that's exactly what I describe in my post, but it doesn't seem to work for me. I Will have to give it another try. I run the game through Dxwnd, I don't see why that should make a difference though.
|
|
|
Post by alben on Feb 21, 2024 20:56:56 GMT 2
how do you use the GPW.c file? Anyone can put up step-by-step guide how to edit and use it? thx
|
|