MM2Hack

User avatar
SuperSecret
MM2X Junior User
MM2X Junior User
Posts: 127
Registered for: 15 years 3 months
Location: Italy

MM2Hack

Postby SuperSecret » Sat Mar 08, 2014 11:40 pm

I made a tool which can edit memory values while MM2 is running. It is similar to aaro4130's MMScript. (aaro4130 gave me the source code of his program, but it was too glitchy, so I made my tool from scratch)

It has the following functions:
  • Use custom sirens for each addon city (the cities with the siren filenames are defined in a list, editable within the tool)

    Show your speed on the HUD in KPH instead of MPH (it's disabled in the dashboard, since in some cars the speedometer is calibrated in MPH and in others in KPH)

    Use custom parked cars models for each addon city (configured in the same way as the sirens)

    Set multiple water levels in a city (used in Chicago for example, the .ini defining the water levels is included)

    Use custom train sound for each addon city (configured in the same way as the sirens)

    Change the default London and/or SF Crash Course car

    Change the max number of cops that can pursue you (from 0 to 255 or unlimited)

    Make the cops ignore you if you are using a cop car, like in MM1 (the cop cars are defined in a list)
To use it you have to open it and launch MM2 with it. With the command line argument -silent you can directly launch MM2 without passing through the tool's interface.
This tool automatically adds the -nolockcheck argument when launching MM2.

Donwload links: compiled, and source code

(Edited on July 6, 2016 for update)
Last edited by SuperSecret on Wed Jul 06, 2016 11:32 am, edited 2 times in total.
ImageAuthor of best MM2 track add-on of the year (2014) - Best Programmer (2015)
ImageBest programmer (2013 - 2014) - Best MM2 innovation of the year (2014)
ImageAuthor of best MM2 mod of the year (2013)

aaro4130
MM2X Super Active User
MM2X Super Active User
Posts: 2405
Registered for: 15 years 9 months
Location: Canada
Been thanked: 1 time

Postby aaro4130 » Sun Mar 09, 2014 4:07 am

Wow very interesting, Great work with getting some more memory addresses, I'll be sure to edit the source xD

EDIT: cannot use MPH to KMH, just get 0 :/
[img]https://i61.tinypic.com/25zrngo.jpg[/img][color=white]
- Most creative active member
- Most smart active member
- Best MM2 innovation of the year
- Best programmer

[img]https://i60.tinypic.com/2m4c2h5.jpg[/img]
- Most helpful active member[/color]

User avatar
SuperSecret
MM2X Junior User
MM2X Junior User
Posts: 127
Registered for: 15 years 3 months
Location: Italy

Postby SuperSecret » Sun Mar 09, 2014 10:55 am

EDIT: cannot use MPH to KMH, just get 0 :/
That's strange, it seems that the original function that updates the HUD speed got overwritten correctly, but the tool isn't writing the KPH speed in the right address. Are you using the speedboot exe? (because I'm using it, so the tool is meant to work with it. I forgot to mention that in the first post)
ImageAuthor of best MM2 track add-on of the year (2014) - Best Programmer (2015)
ImageBest programmer (2013 - 2014) - Best MM2 innovation of the year (2014)
ImageAuthor of best MM2 mod of the year (2013)

aaro4130
MM2X Super Active User
MM2X Super Active User
Posts: 2405
Registered for: 15 years 9 months
Location: Canada
Been thanked: 1 time

Postby aaro4130 » Sun Mar 09, 2014 7:21 pm

Yeah I am, The address is possibly dynamic and changing, like most in the game, Also when overwriting functions you can use

&H90909090 with a length of 4 rather than doing 4 addresses ;)
[img]https://i61.tinypic.com/25zrngo.jpg[/img][color=white]
- Most creative active member
- Most smart active member
- Best MM2 innovation of the year
- Best programmer

[img]https://i60.tinypic.com/2m4c2h5.jpg[/img]
- Most helpful active member[/color]

User avatar
SuperSecret
MM2X Junior User
MM2X Junior User
Posts: 127
Registered for: 15 years 3 months
Location: Italy

Postby SuperSecret » Sun Mar 09, 2014 7:58 pm

It is dynamic, indeed, but I'm already using a pointer to retrieve the right address, and it works flawlessly for me... Could you please check with Cheat Engine what values do the following pointers point to?:
  • 5E0D40, E5C (speed shown on the hud)
    655790, CC, 50, 24C (actual speed in mph)
The first value is the static address, the following values are the offsets
ImageAuthor of best MM2 track add-on of the year (2014) - Best Programmer (2015)
ImageBest programmer (2013 - 2014) - Best MM2 innovation of the year (2014)
ImageAuthor of best MM2 mod of the year (2013)

User avatar
cody
MM2X Occasional User
MM2X Occasional User
Posts: 340
Registered for: 18 years 4 months
Location: United States
Contact:

Postby cody » Sun Mar 09, 2014 11:01 pm

Nice Program! I always wondered how to get km/h on the HUD. :)
My Member Number is prime. LOL!

User avatar
Franch88
MM2X Admin
MM2X Admin
Posts: 15755
Registered for: 16 years 9 months
Location: Italy
Been thanked: 1 time
Contact:
Italy

Postby Franch88 » Sun Mar 09, 2014 11:02 pm

This sort of final version of your tool is already much better. Very good work, keep up finding more to implement. :wink:
The MPH to KM/H edit works greatly, impressing, and I use the Speedboot .exe file edited to have the replay mode working. Very good the custom sirens features on each city, something already native of the game and possible through some files editing, but in this way it's more quicker to do.
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|

User avatar
Seahawk
MM2X Super Active User
MM2X Super Active User
Posts: 2237
Registered for: 11 years 3 months
Been thanked: 1 time
Contact:
India

Postby Seahawk » Mon Mar 10, 2014 10:01 am

Nice to see KM/H if it works properly. I like that and it is better than MPH.
-Seahawk
Image
Third Best New-comer screen shooter of the year 2013
Image
Second Best MM1 screen shooter of the year 2014

User avatar
SuperSecret
MM2X Junior User
MM2X Junior User
Posts: 127
Registered for: 15 years 3 months
Location: Italy

Postby SuperSecret » Wed Apr 13, 2016 11:26 pm

I have updated it with new functions, check the first post.
ImageAuthor of best MM2 track add-on of the year (2014) - Best Programmer (2015)
ImageBest programmer (2013 - 2014) - Best MM2 innovation of the year (2014)
ImageAuthor of best MM2 mod of the year (2013)

User avatar
Franch88
MM2X Admin
MM2X Admin
Posts: 15755
Registered for: 16 years 9 months
Location: Italy
Been thanked: 1 time
Contact:
Italy

Postby Franch88 » Wed Apr 13, 2016 11:45 pm

Impressive work with these updates! :D
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|

User avatar
The_Most_Wanted
MM2X Active User
MM2X Active User
Posts: 960
Registered for: 11 years 5 months
Location: Egypt

Postby The_Most_Wanted » Thu Apr 14, 2016 2:26 am

Awesome work I really like the "Cops ignore Cops" option! :D
Image
Best Midtown Madness 2 car converter of the year
Best Midtown Madness 2 innovation of the year
Author of the best Midtown Madness 2 mod of the year

Image
Best Midtown Madness 2 breakout of the year
Author of the best Midtown Madness 2 car add-on of the year

Image

User avatar
FXANBSS
MM2X Active User
MM2X Active User
Posts: 686
Registered for: 11 years
Location: Midtown Club, Discord
Been thanked: 4 times

Postby FXANBSS » Thu Apr 14, 2016 2:38 am

You are a genius! :D

EDIT: About the unlimited cops, 10 is recommended, because if you have more than 10 cops chasing you, the game becomes unstable and can crash.

If you want more than 20 cops, then install az5k's trainer, available in MMA.
https://mmarchive.com/file_details.php?file_id=2248

But there is a little problem in az5k trainer, all cops will always drive behind you, except the last cop that started to chase you, it will be the only one attacking you.

Note: 30 cops will be ALWAYS the maximun that can chase you, so more than 30 cops chasing you is impossible, because 30 is the limit of objects with physics enabled, so, the other cops will be frozen until you unload the others, yeah, there is a distance, if cops are far, then they unload, even the CopChaseDistance from roam.aimap doesn't fix this, because it just changes other kind of distance, the distance when you lost the cops.

User avatar
sajmon14
MM2X VIP Member
MM2X VIP Member
Posts: 5321
Registered for: 16 years 1 month
Location: Poland
Contact:
Poland

Postby sajmon14 » Thu Apr 14, 2016 8:18 am

Great work :D

User avatar
SuperSecret
MM2X Junior User
MM2X Junior User
Posts: 127
Registered for: 15 years 3 months
Location: Italy

Postby SuperSecret » Thu Apr 14, 2016 8:46 pm

About the unlimited cops, 10 is recommended, because if you have more than 10 cops chasing you, the game becomes unstable and can crash.
I haven't tested more than 10 cops, but yes, even before crashing they become clumsy (they tend to crowd at a point behind the player), MM2 was not programmed to handle so many cops. Anyway 255 is just the maximum theoretical value insertable. (the maximum value of a byte)
ImageAuthor of best MM2 track add-on of the year (2014) - Best Programmer (2015)
ImageBest programmer (2013 - 2014) - Best MM2 innovation of the year (2014)
ImageAuthor of best MM2 mod of the year (2013)

User avatar
Fuyunyan
MM2X Occasional User
MM2X Occasional User
Posts: 286
Registered for: 8 years
Location: Farbanti, Erusea

Postby Fuyunyan » Sat Apr 30, 2016 10:08 pm

Is the parked car model replacer count for all parked cars of the type you choose to replace or just 1?