Browse Source

Revised control flow in Vergil's Trick Down in Human Form script.

master
5 years ago
parent
commit
9a4315444a
2 changed files with 50 additions and 42 deletions
  1. 16
    12
      CEAs/vergil-allow-non-DT-trick-down.CEA
  2. 34
    30
      DevilMayCry4SpecialEdition.CT

+ 16
- 12
CEAs/vergil-allow-non-DT-trick-down.CEA View File

@@ -1,14 +1,20 @@
[enable]
alloc(newmem,135)
alloc(newmem,200)
alloc(option_trickup, 1) //boolean, only need a byte
registersymbol(option_trickup)
label(returnhere)
label(in_air)
label(no_anim)
label(maybe_do_it)
label(do_it)
label(trickdown)
label(exit)
//Vergil currently does not have a input combination:
//Lock-ON + Back + Jump
//while he is in air in his human form
//so add it.
option_trickup:
db 0
newmem: //still going to do this
//currently this will be called every frame
//currently esi is address of player character
@@ -42,10 +48,13 @@ movq xmm0, [esi+3938]
movq [eax+8], xmm0
mov [eax+10], ecx
call DevilMayCry4SpecialEdition.exe+4CCD40 //listen lock-on input
cmp [esi+1bfc], C //input for back
jne maybe_do_it
cmp [esi+1bfc], C //representation for back
je trickdown
cmp [esi+1bfc], 6 //representation for diagonal back
je trickdown
jmp exit
do_it:
trickdown:
mov eax, [esi] //get starting address for player character methods
mov eax, [eax+234]
push 2a //push animation i.d for trick down
@@ -55,12 +64,6 @@ mov al, 01
//don't add esp, end of real function will do that instead
jmp exit
maybe_do_it:
//*internally screams*
cmp [esi+1bfc], 6 //integer representation for diagonal back
je do_it
jmp exit //otherwise exit
"DevilMayCry4SpecialEdition.exe"+D2C77:
jmp newmem
nop
@@ -76,6 +79,7 @@ nop
[disable]
dealloc(newmem)
dealloc(option_trickup)
"DevilMayCry4SpecialEdition.exe"+D2C77:
test byte ptr [esi+00001A64],01

+ 34
- 30
DevilMayCry4SpecialEdition.CT View File

@@ -801,20 +801,26 @@ push 6 //jump back animation i.d
<CheatEntry>
<ID>685</ID>
<Description>"Allow Trick Down (Air) (Hotkey Unsafe)"</Description>
<LastState Activated="1"/>
<LastState Activated="0"/>
<Color>FF8000</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[enable]
alloc(newmem,135)
alloc(newmem,200)
alloc(option_trickup, 1) //boolean, only need a byte
registersymbol(option_trickup)
label(returnhere)
label(in_air)
label(no_anim)
label(maybe_do_it)
label(do_it)
label(trickdown)
label(exit)
//Vergil currently does not have a input combination:
//Lock-ON + Back + Jump
//while he is in air in his human form
//so add it.
option_trickup:
db 0
newmem: //still going to do this
//currently this will be called every frame
//currently esi is address of player character
@@ -848,10 +854,13 @@ movq xmm0, [esi+3938]
movq [eax+8], xmm0
mov [eax+10], ecx
call DevilMayCry4SpecialEdition.exe+4CCD40 //listen lock-on input
cmp [esi+1bfc], C //input for back
jne maybe_do_it
cmp [esi+1bfc], C //representation for back
je trickdown
cmp [esi+1bfc], 6 //representation for diagonal back
je trickdown
jmp exit
do_it:
trickdown:
mov eax, [esi] //get starting address for player character methods
mov eax, [eax+234]
push 2a //push animation i.d for trick down
@@ -861,12 +870,6 @@ mov al, 01
//don't add esp, end of real function will do that instead
jmp exit
maybe_do_it:
//*internally screams*
cmp [esi+1bfc], 6 //integer representation for diagonal back
je do_it
jmp exit //otherwise exit
"DevilMayCry4SpecialEdition.exe"+D2C77:
jmp newmem
nop
@@ -882,6 +885,7 @@ nop
[disable]
dealloc(newmem)
dealloc(option_trickup)
"DevilMayCry4SpecialEdition.exe"+D2C77:
test byte ptr [esi+00001A64],01
@@ -1190,7 +1194,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>465</ID>
<Description>"Style Rank"</Description>
<LastState Value="1" Activated="0" RealAddress="1C479180"/>
<LastState Value="5" Activated="0" RealAddress="1C479180"/>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
<Address>DevilMayCry4SpecialEdition.exe+F59F14</Address>
@@ -1526,7 +1530,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>49</ID>
<Description>"X"</Description>
<LastState Value="-217.6496429" Activated="0" RealAddress="1EA200A0"/>
<LastState Value="371.5971375" Activated="0" RealAddress="1EA200A0"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>1359F00</Address>
@@ -1538,7 +1542,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>50</ID>
<Description>"Y"</Description>
<LastState Value="-19.65774918" Activated="0" RealAddress="1EA200A4"/>
<LastState Value="-11.14044094" Activated="0" RealAddress="1EA200A4"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>1359F00</Address>
@@ -1550,7 +1554,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>51</ID>
<Description>"Z"</Description>
<LastState Value="170.6726532" Activated="0" RealAddress="1EA200A8"/>
<LastState Value="727.7182007" Activated="0" RealAddress="1EA200A8"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>1359F00</Address>
@@ -1669,8 +1673,8 @@ movss [esi+00002504],xmm1
</CheatEntry>
<CheatEntry>
<ID>679</ID>
<Description>"Lock-On &amp; Direction Representation"</Description>
<LastState Value="00000001" Activated="0" RealAddress="1EA21C5C"/>
<Description>"Jump + Lock-On + Direction Signal"</Description>
<LastState Value="00000002" Activated="0" RealAddress="1EA21C5C"/>
<ShowAsHex>1</ShowAsHex>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
@@ -1789,7 +1793,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>308</ID>
<Description>"Animations/Attack(?) I.D"</Description>
<LastState Value="5" Activated="0" RealAddress="1EA21A64"/>
<LastState Value="19" Activated="0" RealAddress="1EA21A64"/>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
<Address>400000+f59f00</Address>
@@ -1801,7 +1805,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>309</ID>
<Description>"Animations/Attack(?) I.D"</Description>
<LastState Value="4" Activated="0" RealAddress="1EA21A68"/>
<LastState Value="18" Activated="0" RealAddress="1EA21A68"/>
<Color>80000008</Color>
<VariableType>4 Bytes</VariableType>
<Address>400000+f59f00</Address>
@@ -2032,7 +2036,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>321</ID>
<Description>"Delta Time"</Description>
<LastState Value="0.6923982501" Activated="0" RealAddress="1EA2007C"/>
<LastState Value="0.9693801999" Activated="0" RealAddress="1EA2007C"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>
@@ -2068,7 +2072,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>301</ID>
<Description>"Devil Trigger (or Burst Gauge if Lady)"</Description>
<LastState Value="3627.300293" Activated="0" RealAddress="1EA22564"/>
<LastState Value="10000" Activated="0" RealAddress="1EA22564"/>
<Color>800080</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>
@@ -2888,7 +2892,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>148</ID>
<Description>"Position X"</Description>
<LastState Value="0.3330117464" Activated="0" RealAddress="1EA300B4"/>
<LastState Value="0.3707778156" Activated="0" RealAddress="1EA300B4"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>
@@ -2900,7 +2904,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>150</ID>
<Description>"Position Y"</Description>
<LastState Value="0" Activated="0" RealAddress="1EA300B8"/>
<LastState Value="2.802596929E-45" Activated="0" RealAddress="1EA300B8"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>
@@ -2912,7 +2916,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>149</ID>
<Description>"Position Z"</Description>
<LastState Value="0.9429226518" Activated="0" RealAddress="1EA300BC"/>
<LastState Value="0.9287216067" Activated="0" RealAddress="1EA300BC"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>
@@ -3192,7 +3196,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>136</ID>
<Description>"Position X"</Description>
<LastState Value="-0.0184435267" Activated="0" RealAddress="1EAE00B4"/>
<LastState Value="0.2071972936" Activated="0" RealAddress="1EAE00B4"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>
@@ -3204,7 +3208,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>135</ID>
<Description>"Position Y"</Description>
<LastState Value="0" Activated="0" RealAddress="1EAE00B8"/>
<LastState Value="2.802596929E-45" Activated="0" RealAddress="1EAE00B8"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>
@@ -3216,7 +3220,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>134</ID>
<Description>"Position Z"</Description>
<LastState Value="0.9998298883" Activated="0" RealAddress="1EAE00BC"/>
<LastState Value="0.9782992005" Activated="0" RealAddress="1EAE00BC"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>
@@ -3900,7 +3904,7 @@ movss [esi+00002504],xmm1
<CheatEntry>
<ID>44</ID>
<Description>"In-Mission Time"</Description>
<LastState Value="62978.11719" Activated="0" RealAddress="1C488FC4"/>
<LastState Value="161300.4844" Activated="0" RealAddress="1C488FC4"/>
<Color>80000008</Color>
<VariableType>Float</VariableType>
<Address>400000+f59f00</Address>

Loading…
Cancel
Save