Page 1 of 2

MM2Hack

Posted: Sat Mar 08, 2014 11:40 pm
by SuperSecret
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)

Posted: Sun Mar 09, 2014 4:07 am
by aaro4130
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 :/

Posted: Sun Mar 09, 2014 10:55 am
by SuperSecret
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)

Posted: Sun Mar 09, 2014 7:21 pm
by aaro4130
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 ;)

Posted: Sun Mar 09, 2014 7:58 pm
by SuperSecret
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

Posted: Sun Mar 09, 2014 11:01 pm
by cody
Nice Program! I always wondered how to get km/h on the HUD. :)

Posted: Sun Mar 09, 2014 11:02 pm
by Franch88
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.

Posted: Mon Mar 10, 2014 10:01 am
by Seahawk
Nice to see KM/H if it works properly. I like that and it is better than MPH.

Posted: Wed Apr 13, 2016 11:26 pm
by SuperSecret
I have updated it with new functions, check the first post.

Posted: Wed Apr 13, 2016 11:45 pm
by Franch88
Impressive work with these updates! :D

Posted: Thu Apr 14, 2016 2:26 am
by The_Most_Wanted
Awesome work I really like the "Cops ignore Cops" option! :D

Posted: Thu Apr 14, 2016 2:38 am
by FXANBSS
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.

Posted: Thu Apr 14, 2016 8:18 am
by sajmon14
Great work :D

Posted: Thu Apr 14, 2016 8:46 pm
by SuperSecret
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)

Posted: Sat Apr 30, 2016 10:08 pm
by Fuyunyan
Is the parked car model replacer count for all parked cars of the type you choose to replace or just 1?