Forums

Full Version: Magic addresses
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Friends,
 
I did a code analysis of our game (Windy.exe file) using the cheat engine, ghidra and ollydbg programs and found some opcodes/addresses that change some features of the game, as follows:

1)     004F3996=> This item, when reduced, greatly increases the speed of the player's car, without affecting the balance and stability of the car;

2)     004F3A33=> When we reduce the value, the player's car achieves superior performance with better acceleration, better braking and better tire consumption. When we increase the value, exactly the opposite happens;

3)     004F39A4=> The higher the number (Up to 244) the car is more stable and more grip;

4)     004F3A32=> When reduced, the car has better stability and performance;

5)     0043BEA6=> This code determines the break rate of the player and the AIs, the default code is "MOV EAX, 1B7740", if we change it, for example, to "MOV ECX, 9000", the breaks and crashes will become more frequent.

6)     0043BEAF=> This code is complementary to 43BEA6, the default is "STANDARD=> CMP EDX,64", if we change the 64 to a smaller number, the rate of player and AI breakdowns will be lower and the AI results will be more predictable, if we increase the value, breakdowns will be more frequent. 

7)     004F398E=> This rate affects the player's average consumption, if the value is reduced to the minimum (1) he will not consume fuel, if increased the consumption rate will be higher;

8)     004F3A60=> When the driver has an accident or suffer a breakdown, this address is set to 48, if we reset this value to zero and lock, the car it will be unbreakable, if for some reason the car suffer a breakdown and we set value to zero, the car will come back to life;

9)     00527D20=> This is the REL address (The same one from the TRACK.TXT file), it can be manipulated between a training session and the race;

10)  004F0610=> Opponent strength value, this index is determined at the beginning of the championship, but it is possible to change between a race and change the dynamics of a championship;

11)  004F3AE2=> Player's engine power, the maximum and default value is 65535, if we reduce this value, the car will lose power;

12)  00472765=> This address calculates the pole position point, if we set it to NOP the owner of the best time will not receive the point for the pole position;

13)  00469732=> The extra point calculation is done at this address, a small change of the code "inc [ebx+00000090]" to "inc [ebx+00000150]", prevents the game from awarding the extra point to the driver who leads the most laps;

14)  004F2668 to 004F2689=> In this range we have the points that are distributed in the championship races, if we change it the game starts calculating based on the new values.

These addresses allow us to create cars with different speed, stability and durability characteristics.

It is now also possible to distribute points based on other championships in other categories, such as Formula 1.

I made a simulation of the 1987 season, that year we had Mario Andretti's Lola-Chevrolet which was fast but fragile. I created a version of Bobby Rahal's Lola-Cosworth, which was fast and very reliable. I also created versions of the March Cosworth (Michael Andretti) which was fast and reliable, but not as good as Rahal's car, and I also made a version of the Penske which was a car which was not as fast, not as reliable, but which achieved good results with Mears, Fittipaldi, Unser,Sr and Danny Sullivan.

Now it is possible to create cars with characteristics from other smaller categories like Formula Atlantic or Indylights, the possibilities are endless.

I think it is even possible to reproduce rainy conditions, because we have a way to change the grip of the car and the strength of the AIs so that they act as if they were in the rain.
The only prerequisite is to know how to use the Cheat Engine program (there are numerous tutorials on youtube). I recommend paying special attention to the "Auto-assemble" option because this is where we will make the changes.

I believe we now have many possibilities to make our beloved game even more dynamic.


Sorry for my english, i used google translate, if any phase not make a sense, i ask you to let me know.
(12-11-2021, 11:55 AM)sandro_nunes Wrote: [ -> ]I believe we now have many possibilities to make our beloved game even more dynamic.
Sorry for my english, i used google translate, if any phase not make a sense, i ask you to let me know.


I understand your english just fine- you did a good job!  I am asking myself if you come from the world of grand prix 2 by microprose only because we use the term "magic data" there when we modify tracks.  If so I am on the GP2 forum as well!

I too do want to learn more about cheat engine, so I can make icr2 more fun and challenging in certain ways but not so much to cheat.  I think it is the most fun when it is extremely challenging, just like CART always was.

I use dosbox ece with the dos version 1.0.2 of icr2, so I'm sure my memory locations would be different.  It would be nice to be able to make the CC cars slightly more tough when you contact them so they do not crash and go out of the race so easy.  I kind of like this aspect grandprix 2 more in this reason because you can accidentally bump the cars just a little bit in tight racing without worrying about causing them to go off.  Maybe someday I will learn more about cheat engine to do more with icr2 but now I have almost completely devoted most of my spare time to track editing.

I wonder if there is a way to use your research to better understand how the TRACK.TXT numbers work.  I am especially interested in TIRES, TIRE2 and SCTNS.  For 25 years these have been a mystery and any documentation I can find on TIRES/TIRE2 seems wrong.  It would also be nice to be able to see (by observing memory values) which LP file an AI car is using, since we would be able to use this to get a better idea on how LPs work, and when or why the cars change LP!

Thinking about it more, it would be nice to make yellow flag duration shorter, and maybe increase the pace car speed so the yellows don't subtract so much excitement from the race. (maybe have the pace car acceleration/cornering and top speed a little faster?)
(12-11-2021, 11:55 AM)sandro_nunes Wrote: [ -> ]I think it is even possible to reproduce rainy conditions, because we have a way to change the grip of the car and the strength of the AIs so that they act as if they were in the rain.
(12-11-2021, 01:36 PM)samsepi0l Wrote: [ -> ]I wonder if there is a way to use your research to better understand how the TRACK.TXT numbers work.  I am especially interested in TIRES, TIRE2 and SCTNS.  For 25 years these have been a mystery and any documentation I can find on TIRES/TIRE2 seems wrong.

I tried to simulate rain conditions a few months ago, just reducing the grip level in the TRACK.TXT. It felt OK, but without manipulating the LP/AI behavior, it would need new LP files, because the LP files for dry condition are simply too fast for the reduced grip level, and the AI went off the track in every second corner.
@sandro_nunes This is unbelievably cool, thank you for the research! I also hope to learn more about the tools you mentioned and try it myself. It would be great if someday there can be a tool that anyone can use to change the above parameters, but this is a tremendous first step towards that.

I noticed this is your first post - welcome and what a contribution from the start.
This is excellent! One question I would have is could there be a parameter in there to change the hard coded maximum resolution of the game? That would make the biggest impact to it's playability.
Thanks for the words.

I'm not from the GP2 world, but I confess That I've played a lot in the past, but I've never tried to edit it.

I am absolutely sure that you will learn the cheat engine with great ease, because the program is very simple.

The hardest thing is to understand the code, so Ghidra and Ollydbg are important.

I do not know how is done the engineering of a software that runs on DOS as is the case of indycar.exe, because I always did it by Windy.exe.

I did not disclose all the findings I made so that the result of my research would not get too large, but I can say that there are addresses that are related to tires, such as the 004F3914, but I noticed that the maximized values for the street circuits are not compatible with the inclined ovals, so I decided to leave aside,  because i wanted data that maximized performance and didn't need to be edited according to the stroke.

I did some research with the track file data.txt and I found it interesting to be able to change the REL data between one session and another of the race and also change the level of The AI's during the championship.

Adding, I found that when we change the values of the item aggressiveness (Which is in drivers2.txt) the drivers begin to perform worse, with difficulties to overcome other opponents.
This behavior is most observed with values between 2000 and 4500, above that chaos spreads and races are blocked because of congestion caused by broken cars. These higher values are only possible to be reported in the cheat engine, the game only accepts values up to 999.

I would like to thank you for all your contribution with the construction of new tracks, they are getting great. I've always wanted to learn how to make tracks, but I always find it difficult, if one day someone does a simpler program, I'm sure our community will start producing tracks at the same pace as the Grand prix legends community.
(12-11-2021, 04:31 PM)Dennis Wrote: [ -> ]
(12-11-2021, 11:55 AM)sandro_nunes Wrote: [ -> ]I think it is even possible to reproduce rainy conditions, because we have a way to change the grip of the car and the strength of the AIs so that they act as if they were in the rain.
(12-11-2021, 01:36 PM)samsepi0l Wrote: [ -> ]I wonder if there is a way to use your research to better understand how the TRACK.TXT numbers work.  I am especially interested in TIRES, TIRE2 and SCTNS.  For 25 years these have been a mystery and any documentation I can find on TIRES/TIRE2 seems wrong.
Dennis

I think we can reproduce the rain conditions handled the following data:

1) 004F3A33=> Increasing the value to 50, in these conditions, the car becomes very unstable and difficult to control, to be able to have a good pace it is necessary to brake before and control the accelerator;

2) Change the data level of the REL(527D20) and the strength of the opponents (4F0610) so that the pace of AI drops enough for us to be able to keep up with them.
(12-11-2021, 06:28 PM)checkpoint10 Wrote: [ -> ]@sandro_nunes This is unbelievably cool, thank you for the research! I also hope to learn more about the tools you mentioned and try it myself. It would be great if someday there can be a tool that anyone can use to change the above parameters, but this is a tremendous first step towards that.

I noticed this is your first post - welcome and what a contribution from the start.
Checkpoint, 10, 

Thanks for the compliments.

Reverse engineering of a game is kind of boring at first, but after you learn it's really cool, I'm myself excited about my findings and I'll start making my cars from different eras.
I've done 1987, now I'll want to do the year 2000, because I see similarities between the two years, especially if i compare The Lola-Chevrolet of Mario Andretti with the Lola-Toyota of Montoya, both were dominant, but always broke, I see also similarities between The Lola-Cosworth of Rahal with the Reynard-Honda of Gil de Ferran, which were fast cars and reliable enough to be champions.

I'm not that new, my friend, I'm already very old, but I was just watching the evolution of our community, now I decided to contribute somehow, since I can not evolve in the track folder, I decided at least help in this part of customization of the player's cars.

My goal is not to cheat, mainly because our game is individual, because there are no communities that promote competitions among its members.

To find out how important this data I've presented is, I've broken all my records and i'm in Indianapolis at an average of 258 miles, i'll do a lap in Long Beach (original track) around 52 seconds, but as I said, my only goal is to have more challenges in that game.
(12-11-2021, 09:05 PM)Arenacale Wrote: [ -> ]This is excellent! One question I would have is could there be a parameter in there to change the hard coded maximum resolution of the game? That would make the biggest impact to it's playability.
Arenacale,

I can not tell if cheat engine goes so deep in the game as to change the resolution, I think not.

If I find out anything, you can be sure I'll share it.
This is some great work, thanks for posting!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26