Page 1 of 1

Mafia Definitive Edition [Steam]

Posted: Sun Sep 27, 2020 1:18 pm
by sub1to
I quickly threw this together yesterday, haven't organized the scripts etc. I might do so if nobody else releases a table (or updates this one)
Inf ammo in clip applies to all weapons, so also the weapons of your enemies. I don't know if this is also the case for regular inf ammo. Inf health seems to work fine.
I would recommend you only use inf ammo and inf health.
mafiadefinitiveedition.CT
(11.55 KiB) Downloaded 1066 times

Re: Mafia Definitive Edition [Steam]

Posted: Sun Sep 27, 2020 1:25 pm
by kay0
Thank you for sharing!

Re: Mafia Definitive Edition [Steam]

Posted: Sun Sep 27, 2020 11:52 pm
by l0wb1t
Seems to be there is also a hidden Cheat Menu like in the Other Titles

Code: Select all

mafiadefinitiveedition.exe+2FCA7EC - 48 8D 15 3DACEF01     - lea rdx,[mafiadefinitiveedition.exe+4EC5430] { ("GetCheatList") }

Re: Mafia Definitive Edition [Steam]

Posted: Mon Sep 28, 2020 11:14 am
by chrisreddot3
No car damage and easy race win pls

Re: Mafia Definitive Edition [Steam]

Posted: Mon Sep 28, 2020 11:22 am
by SunBeam
l0wb1t wrote:
Sun Sep 27, 2020 11:52 pm
Seems to be there is also a hidden Cheat Menu like in the Other Titles
Yup, been looking at that in my analysis :)

Re: Mafia Definitive Edition [Steam]

Posted: Mon Sep 28, 2020 11:42 am
by Scaredcat
sub1to wrote:
Sun Sep 27, 2020 1:18 pm
Inf ammo in clip applies to all weapons, so also the weapons of your enemies. I don't know if this is also the case for regular inf ammo.

mafiadefinitiveedition.CT
yup, it was like that when I was hacking GTA games like vice city, gta 3 too. the ammo is a shared instruction for player and enemies and you would probably need to do a compare to make it proper. but i mean not that it matters anyway right. nobody just stands and waits for and lets enemies empty their entire gun ammunition on you. they're dead before you know it xD

Re: Mafia Definitive Edition [Steam]

Posted: Mon Sep 28, 2020 1:58 pm
by l0wb1t
SunBeam wrote:
Mon Sep 28, 2020 11:22 am
Yup, been looking at that in my analysis :)
Already tried to force enable the menu, by patching some checks , since the code at this point never gets executed. This is not where i am that good. haha but im sure you get that to work :D
Still working on a Proper No Reload atm

Possible more Proper No Reload Way

Code: Select all

aobscanmodule(_GetPlayerAmmoBase,mafiadefinitiveedition.exe,41 8B 40 04 41 3B C2)
The Instruction there accesses to your Total Ammo you can rerload into your gun. If you check what Values go thru you will notice only your Players Weapon Ammo. So far so good. if you set a BP and it breaks, check the registers. and compare them against your Ammo in Clip (set a bp on that aswell and save the result)
i came up with comparing RCX and RSI against RDI, RPB and RCX
which gives me, AFTER I RELOAD my gun No Reload.
Image

Code: Select all

aobscanmodule(_NoReload2,mafiadefinitiveedition.exe,41 8B 40 18 48 8B 5C 24 30)
Usage GetPlayerAmmoBase

Code: Select all

...
  mov [_pPlayerAmmo],rsi
    mov [_pPlayerAmmo2],rcx
  mov eax,[r8+04]
  cmp eax,r10d
....

Usage inside No Reload Script
Note: Somehow the game exchanges the Register Values sometimes, to circumvict that i added a Loop that is checking through the affected registers..

Code: Select all

....
NoReload2Mem:
cmp rbp,[_pPlayerAmmo]
jne Check1
mov [_pAmmoBase],r8
cmp [_enableNoReload],1
jne codeNoReload2
mov [r8+18],#999
Check1:
cmp rbp,[_pPlayerAmmo2]
jne Check2
mov [_pAmmoBase],r8
cmp [_enableNoReload],1
jne codeNoReload2
mov [r8+18],#999
Check2:
cmp rcx,[_pPlayerAmmo]
jne Check3
mov [_pAmmoBase],r8
cmp [_enableNoReload],1
jne codeNoReload2
mov [r8+18],#999
Check3:
cmp rcx,[_pPlayerAmmo2]
jne Check5
mov [_pAmmoBase],r8
cmp [_enableNoReload],1
jne codeNoReload2
mov [r8+18],#999
Check5:
cmp rdi,[_pPlayerAmmo]
jne Check6
mov [_pAmmoBase],r8
cmp [_enableNoReload],1
jne codeNoReload2
mov [r8+18],#999
Check6:
cmp rdi,[_pPlayerAmmo2]
jne codeNoReload2
mov [_pAmmoBase],r8
cmp [_enableNoReload],1
jne codeNoReload2
mov [r8+18],#999
codeNoReload2:
  mov eax,[r8+18]
  mov rbx,[rsp+30]
  jmp returnNoReload2
....