Thread Rating:
  • 8 Vote(s) - 3.88 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[14/08/09] LF2 DLL Framework
#41
Of course :).
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#42
Bah, I got bored and decided to learn some ASM coding on my own (I'm getting tired of depending on Silva :D).

I managed to code the 'Itr: Effect' of '7XXXYYY' onto the DLL effects. I hope this helps DCers...

ID Dependent Itr/Effect:

    ASM-Code:
cmp eax,7000000
jl short r2
cmp eax,7400000
jl dependent         ; Note: Place these four lines under 'ie0' in the 'itr_effect' procedure
 
dependent:
	sub eax,7000000
	mov ebx,1000
	mov edx,0
	idiv ebx
	xor ebx,ebx
	mov ebx,eax
	xor eax,eax
	mov eax,edx
	xor edx,edx
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h] 
	cmp dword ptr ds:[edx+6F4h],eax
	jnz r2
	xor eax,eax
	mov eax,ebx
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov dword ptr ds:[ecx+70h],eax
	jmp r2


Copy+Paste all that junk except for the first four lines onto the 'Itr_Effect' Procedure under the 'generic.inc' file :D.

Paste the first four lines under 'ie0' in the 'itr_effect' procedure, in between the lines 'jl transform' and 'cmp eax,1000000000'.

So the 'ie0' should look something like this:

    ASM-Code:
ie0:
        cmp eax,6400
	jl short frame
	cmp eax,8000
	jl short r2
	cmp eax,9000
	jl transform
	cmp eax,7000000
	jl short r2
	cmp eax,7400000
	jl dependent
	cmp eax,1000000000
	jl short r2
	cmp eax,1400000000
	jl general	
	cmp eax,1999000000
	jl short r2
	cmp eax,2000000000
	jl general
	jmp short r2



Alright, now for the explanation:

7=Lead Number
XXX=Frame Number (0-399 only)
YYY=ID Number

Basically, the Itr will bring the enemy to the specified frame number ONLY if they are of the specified ID.

Again, I hope this brings some convenience to DCers (I'm sure it does, actually, because now you dont' have to copy+paste special bodies to like, every freaking frame :D).

Again, the itr/effect number is '7XXXYYY'.

HAHAHA, First Unaided DLL Edit (even though I admit it was easy)!! In your face, Silva!

@Silva's Signature: Hey, that's not cool, Silva. That's really not nice. I had a feeling BP's siggy was sarcastic.

_______________________________________________________________________________________________________________________


EDIT: Arrrgh, I have to end this post with another plea for help :D.

Frame Dependent Itr/Effect:

    ASM-Code:
cmp eax,8000000
jl short r2
cmp eax,8400000   ; 'Eax' limits
 
frame_dependent:
	sub eax,8000000   ; take off the '8' in front :D
	mov ebx,1000
	mov edx,0
	idiv ebx
	xor ebx,ebx
	mov ebx,eax
	xor eax,eax
	mov eax,edx
	xor edx,edx  ; separate number #8XXXYYY into #XXX, #YYY. #XXX is stored in ebx, #YYY is stored in eax, EDX is cleared.
	mov ecx,dword ptr ds:[esi+edi*4+194h] 
	mov edx,dword ptr ds:[ecx+368h]
	cmp dword ptr ds:[edx+6F8h],0
	jnz r2
	mov ecx,dword ptr ds:[ecx+78h]
	imul ecx,ecx,178 
	cmp dword ptr ds:[ecx+edx+7ACh],eax
	jnz r2                                                 ; detect if frame is at indicated number #YYY. If not, normalize.
	xor eax,eax
	mov eax,ebx
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov dword ptr ds:[ecx+70h],eax             ; if frame is at indicated number, move character to frame at indicated number #XXX.
	jmp r2


^ I checked the coding above over 20 times. I never got it to work completely. If I specify 'state: 0', then no matter what state the character was in, the effect is triggered. If I specify any other 'state', then nothing happens (even when the character is in specified state number). I'm in serious need of help :D.

Again, the itr/effect number is '8xxxyyy'.

Combination Frame/ID Dependent Itr/Effect:

    ASM-Code:
cmp eax,2000000000
jl general    ; Genevrier's Itr/Effect '1xxxyyyzzz'
cmp eax,3400000000    ; 'Eax' limits
jl superdependent
 
superdependent:
	mov ebx,1000000000
	mov edx,0
	idiv ebx
	xor ebx,ebx
	push edx     ;  separates frame AXXXYYYZZZ into 'A, XXXYYYZZZ'. Remainder 'XXXYYYZZZ' is "pushed" into temporary memory.
	cmp eax,3   
	je s1
	cmp eax,2
	je d1          ; compare A. If A=2, go to case 1. If A=3 go to case 2.
	jmp r2
 
s1:                    ; beginning of case 1 (requirements to activate effect are both 'Frame' and 'ID')
	xor eax,eax  ; clear eax (in case)
	pop eax      ; retrieve number #XXXYYYZZZ. Store into 'EAX' variable/register.
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
	push eax                          ; separate number #XXXYYYZZZ into #XXXYYY and #ZZZ. "Push" number #XXXYYY into system memory.
	xor eax,eax
	mov eax,edx
	xor edx,edx                       ; move number #ZZZ into eax. Clear 'EDX' (in case).
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h] 
	cmp dword ptr ds:[edx+6F4h],eax     ; check ID with #ZZZ, if no match then normalize.
	jnz r2                                            
        cmp eax, 999     ; check for #999, if match then omit feature by auto-enabling effect (first by going to s2 for state check).
        jnz r2
	jmp s2
 
s2:
	xor eax,eax        ; clear 'Eax'
	xor ebx,ebx
	xor edx,edx
	xor ecx,ecx
	pop eax           ; retrieve number #XXXYYY and store in 'Eax'
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
	push eax           ; separate number #XXXYYY into #XXX and #YYY. "Push" number #XXX into system memory.
	xor eax,eax
	mov eax,edx     
	xor edx,edx        ; move #YYY into 'Eax, and clear 'Edx'
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]	
	mov ecx,dword ptr ds:[ecx+78h]
	imul ecx,ecx,178
	cmp dword ptr ds:[ecx+edx+7ACh],eax  ; check state against number #YYY, if no match then normalize.
	jnz r2
        cmp eax, 999                                 ; check for 999, if match then omit feature by auto-enabling the effect
        jnz r2
	jmp s3
 
s3:
	pop eax                                              ; retrieve number #XXX and store in 'Eax'
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov dword ptr ds:[ecx+70h],eax               ; move character to frame indicated by #XXX
	jmp r2
 
d1:              ; beginning of case 2 (requirements to activate effect are both 'Frame' or 'ID')
    xor eax,eax              ; clear 'Eax (in case)
    pop eax                   ; retrieve number #XXXYYYZZZ and store in 'Eax'
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
        push eax
	mov eax,edx
	xor edx,edx           ; separate into #XXXYYY and #ZZZ, store #ZZZ in 'Eax' and "push" #XXXYYY, clear 'Edx'
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h] 
	cmp dword ptr ds:[edx+6F4h],eax        ; check ID against #ZZZ, if no match then check state, otherwise enable effect (or)
	je d4
        cmp eax, 999     ; check for #999, if match then omit feature by auto-enabling effect (first by going to d3 for state check).
        je d3
	jmp d2
 
d2:
	xor eax,eax    ; clear 'Eax' (again :D)
	xor edx,edx
	xor ecx,ecx
	xor ebx,ebx
	pop eax        ; retrieve #XXXYYY and store in 'Eax'
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
	push eax
	mov eax,edx
	xor edx,edx            ; separate #XXXYYY into #XXX and #YYY, store #YYY in 'Eax' and "push" #XXX into system memory. Clear 'Edx'.
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]	
	mov ecx,dword ptr ds:[ecx+78h]
	imul ecx,ecx,178
	cmp dword ptr ds:[ecx+edx+7ACh],eax     ; checking State against number #YYY, if no match then normalize
	je d4
	jmp r2
 
d3:
	xor eax,eax          ; clear 'Eax', 'Edx', 'Ecx', 'Ebx'
	xor edx,edx
	xor ecx,ecx
	xor ebx,ebx
	pop eax                ; retrieve #XXXYYY and store into 'Eax'
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
	push eax
	mov eax,edx        
	xor edx,edx            ; separating #XXXYYY into #XXX and #YYY. #YYY stored in 'Eax'. #XXX "pushed" to temporary memory.
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]
	mov ecx,dword ptr ds:[ecx+78h]
	imul ecx,ecx,178
	cmp dword ptr ds:[ecx+edx+7ACh],eax     ; checking state against #YYY, if no match then normalize, otherwise enable effect (or)
	je d4
        cmp eax, 999                ; check for #999, if match then omit feature by auto-enabling effect, otherwise normalize
        je d4
	jmp r2
 
d4:
	pop eax                          ; retrieve number #XXX
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov dword ptr ds:[ecx+70h],eax                  ; moving character to indicated frame #XXX
	jmp r2


^ I must've checked this coding above over 100 times. I never got it to work at all. I'm in serious need of help :D.

Again, the itr/effect number is '2xxxyyyzzz' or '3xxxyyyzzz'.

These two itr/effects are definitely coded right by my concepts. I checked them over 20 times. I need a second eye on them. Silva, can you lend a hand (again :D)? I included explanations with the coding.

BTW, since we're on the 'request' topic, have you made any headway on my request?
Have you managed to copy the itr/kind 8 effect onto 'centery' as well as 'centerx' <-- (ok, I officially posted this request on the forum as a question, happy?)

Oh, and update the DLL, Silva, will you? The last update was at April (2 months ago), and we've had some DLL developments since then (like itr/effect 9, and my new itr/effect 7xxxyyyzzz).

Thanks...


~Solomon Leung
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by:
#43
Hello Everybody,

First off, I would like to apologize sincerely for the double post. This post is regarding a completely different issue/feature :D.

I managed to 'master' the itr/kind8 feature in the source code. (with Nave's and Lord Silva's help, of course :D). As a result, I elaborated on it, and created a bunch more effects (included to the ones that Nave already created). But first, the coding and installation.

    ASM-Code:
;Startup (DLL Startup proc) (rarara.asm)
 
;No-Num Version
 
invoke JmpPatch, 00430CECh, addr itr_kind8
	invoke JmpPatch, 004176CCh, addr itr_kind8_2
 
 
;Num-Original Version
 
   invoke JmpPatch, 00430D5Ch, addr itr_kind8
	invoke JmpPatch, 0041773Ch, addr itr_kind8_2


    ASM-Code:
;Head (.Data) (Generic.inc)
;No-Num Version
 
;itr/kind8
ik8_pos1	dd 00430CECh
ik8_pos2	dd 00430D4Bh
ik8_pos3	dd 004318DAh
ik8_pos4	dd 00447A00h
;itr/kind8_2
ik8_other1	dd 004176EBh
ik8_other2	dd 00417F7Dh
 
 
;Num-Original Version
 
;itr/kind8
ik8_pos1	dd 00430D5Ch
ik8_pos2	dd 00430DBBh
ik8_pos3	dd 0043194Ah
ik8_pos4	dd 00447A08h
;itr/kind8_2
ik8_other1	dd 0041775Bh
ik8_other2	dd 00417FEDh


    ASM-Code:
;Body Part 1  (.Code) (Generic.inc)
 
itr_kind8 proc
 
	CMP EDX,8
	JE kind8
	CMP EDX,80
	JE kind80
	CMP EDX,81
	JE kind81
	CMP EDX,82
	JE kind82
	CMP EDX,83
	JE kind83
	CMP EDX,84
	JE kind84
	CMP EDX,85
	JE kind85
	CMP EDX,86
	JE kind80
	CMP EDX,87
	JE kind81
	CMP EDX,88
	JE kind82
	CMP EDX,89
	JE kind83
	CMP EDX,800
	JE kind84
	CMP EDX,801
	JE kind85
	CMP EDX,802
	JE kind80
	CMP EDX,803
	JE kind81
	CMP EDX,804
	JE kind82
	CMP EDX,805
	JE kind83
	CMP EDX,806
	JE kind84
	CMP EDX,807
	JE kind85
	CMP EDX,808
	JE kind8
	CMP EDX,809
	JE kind8
	CMP EDX,810
	JE kind8
	CMP EDX,811
	JE kind80
	CMP EDX,812
	JE kind81
	CMP EDX,813
	JE kind82
	CMP EDX,814
	JE kind83
	CMP EDX,815
	JE kind84
	CMP EDX,816
	JE kind85
	CMP EDX,817
	JE kind8
	CMP EDX,818
	JE kind80
	CMP EDX,819
	JE kind81
	CMP EDX,820
	JE kind82
	CMP EDX,821
	JE kind83
	CMP EDX,822
	JE kind84
	CMP EDX,823
	JE kind85
	JMP ik8_pos2
 
kind8:
	MOV EAX,DWORD PTR SS:[ESP+0Ch]
	MOV EDX,DWORD PTR DS:[EAX+44h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	ADD EDX,3E8h
	MOV DWORD PTR DS:[ECX+0E0h],EDX
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[EAX+14h]
	MOV DWORD PTR DS:[EDX+70h],EAX
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+58h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+58h]
	MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[EAX+68h]
	MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
	FADD QWORD PTR DS:[ik8_pos4]
	FSTP QWORD PTR DS:[ECX+68h]
	JMP ik8_pos3
 
kind80:
	MOV EAX,DWORD PTR SS:[ESP+0Ch]
	MOV EDX,DWORD PTR DS:[EAX+44h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	ADD EDX,3E8h
	MOV DWORD PTR DS:[ECX+0E0h],EDX
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[EAX+14h]
	MOV DWORD PTR DS:[EDX+70h],EAX
	JMP ik8_pos3
 
kind81:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+58h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+58h]
	MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[EAX+68h]
	MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
	FADD QWORD PTR DS:[ik8_pos4]
	FSTP QWORD PTR DS:[ECX+68h]
	JMP ik8_pos3
 
kind82:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+60h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+60h]
	MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[EAX+68h]
	MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
	FADD QWORD PTR DS:[ik8_pos4]
	FSTP QWORD PTR DS:[ECX+68h]
	JMP ik8_pos3
 
kind83:
	MOV EAX,DWORD PTR SS:[ESP+0Ch]
	MOV EDX,DWORD PTR DS:[EAX+44h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	ADD EDX,3E8h
	MOV DWORD PTR DS:[ECX+0E0h],EDX
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[EAX+14h]
	MOV DWORD PTR DS:[EDX+70h],EAX
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+60h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+60h]
	MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[EAX+68h]
	MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
	FADD QWORD PTR DS:[ik8_pos4]
	FSTP QWORD PTR DS:[ECX+68h]
	JMP ik8_pos3
 
kind84:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+58h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+58h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+60h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+60h]
	MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[EAX+68h]
	MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
	FADD QWORD PTR DS:[ik8_pos4]
	FSTP QWORD PTR DS:[ECX+68h]
	JMP ik8_pos3
 
kind85:
	MOV EAX,DWORD PTR SS:[ESP+0Ch]
	MOV EDX,DWORD PTR DS:[EAX+44h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	ADD EDX,3E8h
	MOV DWORD PTR DS:[ECX+0E0h],EDX
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[EAX+14h]
	MOV DWORD PTR DS:[EDX+70h],EAX
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+58h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+58h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+60h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+60h]
	MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[EAX+68h]
	MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
	FADD QWORD PTR DS:[ik8_pos4]
	FSTP QWORD PTR DS:[ECX+68h]
	JMP ik8_pos3
 
itr_kind8 endp


    ASM-Code:
;Body Part 2 (.Code) (Generic.inc)
 
itr_kind8_2 proc
 
	CMP EDX,8
	JE kind8
	CMP EDX,80
	JE kind8
	CMP EDX,81
	JE kind8
	CMP EDX,82
	JE kind82
	CMP EDX,83
	JE kind8
	CMP EDX,84
	JE kind8
	CMP EDX,85
	JE kind8
	CMP EDX,86
	JE kind84
	CMP EDX,87
	JE kind84
	CMP EDX,88
	JE kind84
	CMP EDX,89
	JE kind84
	CMP EDX,800
	JE kind84
	CMP EDX,801
	JE kind84
	CMP EDX,802
	JE kind85
	CMP EDX,803
	JE kind85
	CMP EDX,804
	JE kind85
	CMP EDX,805
	JE kind85
	CMP EDX,806
	JE kind85
	CMP EDX,807
	JE kind85
	CMP EDX,808
	JE kind84
	CMP EDX,809
	JE kind85
	CMP EDX,810
	JE kind86
	CMP EDX,811
	JE kind86
	CMP EDX,812
	JE kind86
	CMP EDX,813
	JE kind86
	CMP EDX,814
	JE kind86
	CMP EDX,815
	JE kind86
	CMP EDX,816
	JE kind86
	CMP EDX,817
	JE kind87
	CMP EDX,818
	JE kind87
	CMP EDX,819
	JE kind87
	CMP EDX,820
	JE kind87
	CMP EDX,821
	JE kind87
	CMP EDX,822
	JE kind87
	CMP EDX,823
	JE kind87
	JMP ik8_other1
 
kind8:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],0
	JNE skip
	JMP ik8_other1
 
kind82:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],0
	JNE skip
	JMP ik8_other1
 
kind83:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],0
	JE skip
	JMP ik8_other1	
 
kind84:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],3
	JNE skip
	JMP ik8_other1	
 
kind85:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],0
	JMP ik8_other1
 
kind86:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],1
	JE kind86a
	CMP DWORD PTR DS:[EAX+6F8h],2
	JE kind86a
	CMP DWORD PTR DS:[EAX+6F8h],4
	JE kind86a
	CMP DWORD PTR DS:[EAX+6F8h],6
	JE kind86a
	JMP skip
 
kind86a:
	JMP ik8_other1
 
kind87:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],1
	JNE skip
	JMP ik8_other1
 
skip:
	JMP ik8_other2
 
itr_kind8_2 endp


_________________________________________________________________________________

Ok, now for the explanation :D.

First of all, a key:

Key:

dvx= Itr/Kind8 Frame Tracking
centerx='Centerx' Auto-Alignment
centery='Centery' Auto-Alignment
Type#=ID Type of Body Requirement(s)

---

Now for the list of effects.

Type 0:

Itr/kind8: dvx, centerx

Itr/kind 80: dvx

Itr/kind 81: centerx

Itr/kind 82: centery

Itr/kind 83: dvx, centery

Itr/kind 84: centerx, centery

Itr/kind 85: centerx, centery, dvx



Type 3:

Itr/kind808: dvx, centerx

Itr/kind 86: dvx

Itr/kind 87: centerx

Itr/kind 88: centery

Itr/kind 89: dvx, centery

Itr/kind 800: centerx, centery

Itr/kind 801: centerx, centery, dvx



All Types:

Itr/kind809: dvx, centerx

Itr/kind 802: dvx

Itr/kind 803: centerx

Itr/kind 804: centery

Itr/kind 805: dvx, centery

Itr/kind 806: centerx, centery

Itr/kind 807: centerx, centery, dvx

______________________________________________________________________________________________________________________________________

EDIT: Added new ones :D.

Item Types (Type 1, Type 2, Type 4, Type 6):

Itr/kind810: dvx, centerx

Itr/kind 811: dvx

Itr/kind 812: centerx

Itr/kind 813: centery

Itr/kind 814: dvx, centery

Itr/kind 815: centerx, centery

Itr/kind 816: centerx, centery, dvx


Type 1:

Itr/kind817: dvx, centerx

Itr/kind 818: dvx

Itr/kind 819: centerx

Itr/kind 820: centery

Itr/kind 821: dvx, centery

Itr/kind 822: centerx, centery

Itr/kind 823: centerx, centery, dvx

_______________________________________________________________________________________________


Well, that's about it. Hope these effects prove useful to DCers (who are willing to patch the DLL, of course :D), and I hope you guys can keep track of the looong list of Itr/kind Numbers. If not, you can always use this post as your reference :D.

---

Enjoy, and Happy Coding :D


~Solomon Leung
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by:
#44
Someone has to go and put some thought into how to organise this. It is becoming ridiculous now... There are so many edits it is hard to keep track of it.

I was thinking about releasing a clean version(which includes only the detours), and then people release the add-on code separately and people that want to use it can just add it to their dll.

What do you guys think about this? Also, all the stuff has to be moved out of the generic.inc and moved to separate sections. Then the dll main stuff has to be cleaned up as well, well commented and everything.

Someone should start working on this straight away :p.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#45
silva you and nave made a special state so can you post that code
im collecting each and every code and oging to upload it



edit: silva this one - nave said "I(with Silva's help ofc) also hex'ed a new state which allows the character to jmp to a certain frame by pressing > or <, that's how the walking and running works, 'nd also another state for the stop running by pressing backwards"


edit 2: ok then can you find a way to add the perspective tag to the framework please? i neeed it for dangerous traps

edit3: ok this is the last one - is there any way to create a "mp parasite" itr (a itr effect or kind which takes away mp instead of hp)
Reply
Thanks given by:
#46
m.. i tried the state: 40XX thing
but the character gone to some unknow frames and just left a shadow
you can still press up,down,left,right,etc and you will be back to the character you want to trasform
no matter what i type in the (next: XXX) frame it still hidden
i tried next: 999 , 0 ,and other frames but it doesn`t work
Reply
Thanks given by:
#47
Just tested, works fine.

Would just like to confirm that we have the same code (incase someone changed it between releases):

Code:
State8xxx proc
        CMP EAX,1F40h
        jl state4xxx
        CMP EAX,2328h
        jge state4xxx
        jmp Transform1
        
state4xxx:
;I didn't bother really understanding the code, just copied it
;there is only 1 line you should edit, I commented it :p

        CMP EAX,0FA0h
        jl return
        CMP EAX,1388h
        jge return
        MOV ECX,DWORD PTR DS:[EBX+7D4h]
        LEA EDX,DWORD PTR DS:[EAX-0FA0h]
        XOR EAX,EAX
        CMP DWORD PTR DS:[ECX+4D82380h],EAX
        JLE a
d:        MOV ESI,DWORD PTR DS:[ECX]
        CMP DWORD PTR DS:[ESI+6F4h],EDX
        JE b
        MOV ESI,DWORD PTR DS:[EBX+7D4h]
        ADD EAX,1
        ADD ECX,4
        CMP EAX,DWORD PTR DS:[ESI+4D82380h]
        JL d
        JMP a
b:        MOV ECX,DWORD PTR DS:[EBX+7D4h]
        MOV ECX,DWORD PTR DS:[ECX+EAX*4h]
        MOV EAX,DWORD PTR DS:[EBX+EDI*4+194h]
        MOV DWORD PTR DS:[EAX+368h],ECX

a:        MOV EDX,DWORD PTR DS:[EBX+EDI*4+194h]
        MOV DWORD PTR DS:[EDX+70h],0 ; this line sets your frame number to 0, remove it if you want
        MOV EAX,DWORD PTR DS:[EBX+EDI*4+194h]
        
return: jmp Transform2
                
        
State8xxx endp

Also, did you remove that line? If you did, that means when you transform, you stay at the same frame. So if you transform on frame 330 to ID 10, you will be woody on frame 330.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#48
I updated the exe to load the dll. Now the exe won't die when you edit the resources :).

( http://www.mediafire.com/?qzkzzvhfvdv )
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#49
awesome i just tryed it and it works 0.o

how did you do it!?!?!?!??


I read about the structure of the import table, read a bunch of other stuff, then I just replaced the IsDebuggerPresent API with LoadLibraryA in the import table. That way the import table stays the same size :) ~ Silva
Reply
Thanks given by:
#50
he's Silva, no explanation needed
Reply
Thanks given by: snorsorbet




Users browsing this thread: 1 Guest(s)