@
budabum: Here's the location for Adrestia Crew damage multiplier:
Code: Select all
ACOdyssey.exe+2E96AA6 - FF 90 18060000 - call qword ptr [rax+00000618]
ACOdyssey.exe+2E96AAC - 44 8B C6 - mov r8d,esi
ACOdyssey.exe+2E96AAF - 8B CB - mov ecx,ebx
ACOdyssey.exe+2E96AB1 - 0FB6 D0 - movzx edx,al
ACOdyssey.exe+2E96AB4 - E8 A727FBFF - call ACOdyssey.exe+2E49260 // returns 0.65 in xmm0
ACOdyssey.exe+2E96AB9 - 66 41 0F6E 8E 84000000 - movd xmm1,[r14+00000084] // base == 7871.00
ACOdyssey.exe+2E96AC2 - 0F5B C9 - cvtdq2ps xmm1,xmm1
ACOdyssey.exe+2E96AC5 - F3 0F59 C8 - mulss xmm1,xmm0 // 2495.68 == 1 arrow damage
ACOdyssey.exe+2E96AC9 - 0F57 C0 - xorps xmm0,xmm0
ACOdyssey.exe+2E96ACC - 0F2F C8 - comiss xmm1,xmm0
ACOdyssey.exe+2E96ACF - 76 0A - jna ACOdyssey.exe+2E96ADB
ACOdyssey.exe+2E96AD1 - F3 0F58 0D C39AF300 - addss xmm1,dword ptr [ACOdyssey.exe+3DD059C] { [0.50] }
ACOdyssey.exe+2E96AD9 - EB 08 - jmp ACOdyssey.exe+2E96AE3
ACOdyssey.exe+2E96ADB - F3 0F5C 0D B99AF300 - subss xmm1,[ACOdyssey.exe+3DD059C] { [0.50] }
ACOdyssey.exe+2E96AE3 - F3 0F2C C1 - cvttss2si eax,xmm1
ACOdyssey.exe+2E96AE7 - 41 89 86 84000000 - mov [r14+00000084],eax
ACOdyssey.exe+2E96AEE - B0 01 - mov al,01 { 1 }
ACOdyssey.exe+2E96AF0 - 48 8B 5C 24 48 - mov rbx,[rsp+48]
ACOdyssey.exe+2E96AF5 - 48 8B 74 24 50 - mov rsi,[rsp+50]
ACOdyssey.exe+2E96AFA - 48 83 C4 20 - add rsp,20 { 32 }
ACOdyssey.exe+2E96AFE - 41 5F - pop r15
ACOdyssey.exe+2E96B00 - 41 5E - pop r14
ACOdyssey.exe+2E96B02 - 5F - pop rdi
ACOdyssey.exe+2E96B03 - C3 - ret
And my player-sided code (function is used by any ship firing):
Code: Select all
[ENABLE]
aobscanmodule( AdrestiaDamageMultiplier, ACOdyssey.exe, 66410F6E8E????????0F5BC9F30F59C80F57C00F2FC8 )
registersymbol( AdrestiaDamageMultiplier )
label( AdrestiaDamageMultiplier_o )
registersymbol( AdrestiaDamageMultiplier_o )
label( back )
label( CheckEntity )
registersymbol( CheckEntity )
label( CheckEntity_null )
label( CheckEntity_exit )
label( GetEntity )
registersymbol( GetEntity )
AdrestiaDamageMultiplierHook:
AdrestiaDamageMultiplier_o:
readmem( AdrestiaDamageMultiplier, 9 )
push rax
push rcx
push rdx
call short CheckEntity
test al,al
je short @f
mov rax,s_dmg_mult_f
movss xmm0,[rax]
@@:
pop rdx
pop rcx
pop rax
jmp back
db CC CC CC CC
CheckEntity:
sub rsp,28
//mov rcx,r13 -- this is the EntityGroup of the target ship
mov rax,[r14+50]
test rax,rax
je short CheckEntity_null
mov rcx,[rax+8]
shl rcx,20
sar rcx,3F
and rcx,[rax] // this gets the EntityGroup of the ship firing
je short CheckEntity_null
call short GetEntity
test rax,rax
je short CheckEntity_exit
movzx ecx,byte ptr [rax+D8]
xor eax,eax
and cl,7
cmp cl,1
sete al
add rsp,28
ret
CheckEntity_null:
xor al,al
CheckEntity_exit:
add rsp,28
ret
db CC CC CC CC
GetEntity:
sub rsp,28
add rcx,1A0
call GetMetaAIVirtualObjectivePlayerEntity
mov rcx,[rax]
mov rax,[rcx+8]
shl rax,20
sar rax,3F
and rax,[rcx]
je short @f
cmp qword ptr [rax+18],00
jne short @f
xor eax,eax
@@:
add rsp,28
ret
db DE AD C0 DE
AdrestiaDamageMultiplier:
jmp AdrestiaDamageMultiplierHook
db 90 90 90 90
back:
[DISABLE]
AdrestiaDamageMultiplier:
readmem( AdrestiaDamageMultiplier_o, 9 )
unregistersymbol( GetEntity )
unregistersymbol( CheckEntity )
unregistersymbol( AdrestiaDamageMultiplier_o )
unregistersymbol( AdrestiaDamageMultiplier )
Just give it a cave for
AdrestiaDamageMultiplierHook (either use
alloc( AdrestiaDamageMultiplierHook, 0x1000, ACOdyssey.exe ) +
registersymbol( AdrestiaDamageMultiplierHook ) or
define( AdrestiaDamageMultiplierHook, address ) +
fullaccess( address, 0x1000 )).
Have fun
P.S.: Also do this:
Code: Select all
label( s_dmg_mult_f )
registersymbol( s_dmg_mult_f )
s_dmg_mult_f:
dd (float)1.0
After "db DE AD C0 DE" in the cave in [ENABLE].