Posts: 101
Threads: 5
Joined: Mar 2009
03-25-2009, 04:41 PM
(This post was last modified: 03-26-2009, 02:11 AM by genevrier.)
I tried the range AI.
Quote:In rarara.Asm:
include range.inc
......
invoke JmpPatch, 0040AE1Ah, addr Range1
invoke WriteMem, 0040AE1Fh, addr FourNOP,4
invoke JmpPatch, 0040B227h, addr Range2
invoke JmpPatch, 0040B2DBh, addr Range3
invoke JmpPatch, 0040B393h, addr Range4
invoke JmpPatch, 00403878h, addr Deep_Ball
invoke WriteMem, 0040387Dh, addr doubleNOP,2
Quote:In range.inc
.Data
Range1_1 dd 0040AF5Dh
Range1_2 dd 0040AE35h
Range2_1 dd 0040B236h
Range2_2 dd 0040B23Bh
Range3_1 dd 0040B2EEh
Range3_2 dd 0040B374h
Range4_1 dd 0040B3ABh
Range4_2 dd 0040B5D8h
.Code
Range1 proc
cmp ecx,4
je short return
;cmp ecx,ID
;je short return
jmp dword ptr [Range1_2]
return: jmp dword ptr [Range1_1]
Range1 endp
Range2 proc
cmp eax,4
je short return
;cmp eax,ID
;je short return
jmp dword ptr [Range2_2]
return: jmp dword ptr [Range2_1]
Range2 endp
Range3 proc
cmp eax,4
je short return
;cmp eax,ID
;je short return
jmp dword ptr [Range3_2]
return: jmp dword ptr [Range3_1]
Range3 endp
Range4 proc
cmp eax,4
je short return
;cmp eax,ID
;je short return
jmp dword ptr [Range4_2]
return: jmp dword ptr [Range4_1]
Range4 endp
Now I am dealing with the part of Deep D>A.
The part for Deep D>A (D>A range AI):
Deep_Ball_1 dd 00403885h
Deep_Ball_2 dd 0040392Eh
Deep_Ball_3 dd 004038DCh
Deep_Ball_4 dd 0040392Eh
Deep_Ball_C1 dd 004451C0h
Deep_Ball_C2 dd 00403270h Deep_Ball proc
cmp dword ptr ds:[ecx+6F4h],1 ; check if ID is 1
je short return ; go to the normal D>A AI for Deep
cmp dword ptr ds:[ecx+6F4h],55 ; check if ID is 55 (your character)
je short Range_Other ; go to Range_Other part if ID is 55
jmp dword ptr [Deep_Ball_2]
return:
jmp dword ptr [Deep_Ball_1]
Range_Other:
mov edx,dword ptr ss:[esp+14h]
mov ebp,dword ptr ds:[esi+edx*4+194h]
fld qword ptr ss:[ebp+40h]
mov ebx,dword ptr ds:[eax+10h]
call dword ptr [Deep_Ball_C1]
mov ecx,dword ptr ss:[ebp+10h]
lea edx,dword ptr ds:[ecx+eax*2]
sub edx,ebx
push edx
call dword ptr [Deep_Ball_C2]
add esp,4
cmp eax,100 ; lower boundary 100
jle short Out_of_range ; won't use D>A when <= 100
mov eax,dword ptr ss:[esp+14h]
mov ebp,dword ptr ds:[esi+eax*4+194h]
fld qword ptr ss:[ebp+40h]
call dword ptr [Deep_Ball_C1]
mov ecx,dword ptr ss:[ebp+10h]
lea edx,dword ptr ds:[ecx+eax*2]
sub edx,ebx
push edx
call dword ptr [Deep_Ball_C2]
add esp,4
cmp eax,300 ; upper boundary 300
jge short Out_of_range ; won't use D>A when >= 300
jmp dword ptr [Deep_Ball_3]
Out_of_range:
jmp dword ptr [Deep_Ball_4]
Deep_Ball endp (Have not been checked)
Edit: The code is OK.
Thanks given by:
Posts: 1,018
Threads: 60
Joined: Mar 2008
Forgot to bump . Bump
Update 28/3/09:
Loading text can be manipulated from dll
Range AI (thanks to genevrier)
Deep Ball AI(thanks to genevrier)
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ʟᴇᴇᴘ.
Thanks given by:
Posts: 101
Threads: 5
Joined: Mar 2009
03-29-2009, 10:34 AM
(This post was last modified: 03-29-2009, 10:34 AM by genevrier.)
I have a question. Is it in some way not very complicated we can change the gravity for specific BG?
http://www.lf-empire.de/forum/showthread.php?tid=2398
see this post will know why I want to do so.
Thanks given by:
Posts: 134
Threads: 20
Joined: Jul 2008
03-29-2009, 11:48 AM
(This post was last modified: 03-29-2009, 11:51 AM by Yinseko.)
if i change any pictures in this exe with Resource Hacker , exe isn't work..
write that exe cant found dll what cab i do for change pics in exe without crashing?
Thanks given by:
Posts: 1,018
Threads: 60
Joined: Mar 2008
Upload your exe.
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ʟᴇᴇᴘ.
Thanks given by:
Posts: 134
Threads: 20
Joined: Jul 2008
Lord Silva, it's not offtop) i talk about your exe (with reading dll). just if i try chnge any sprite inside exe with Respurce Hacker, exe crashes and can't be lunch (
this is ploblem, cuz mod-creators try to change desing of exe for their mods. but it impossible((
Thanks given by:
Posts: 1,018
Threads: 60
Joined: Mar 2008
(03-31-2009, 03:31 PM)Lord Silva Wrote: Upload your exe.
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ʟᴇᴇᴘ.
Thanks given by:
Posts: 134
Threads: 20
Joined: Jul 2008
my exe with changed pictures (based on original LF2 exe; it works):
http://www.mediafire.com/?3mymzorwg2y
my exe with changed pictures (based on your LF2 DLL Framwork; it doesnt work):
http://www.mediafire.com/?z2m2yzdjzjy
Thanks given by:
Posts: 1,018
Threads: 60
Joined: Mar 2008
Bah, olly can't even open the exe so I can't see whats wrong with it... I'll create a tutorial later showing how to manually patch the exe to get it to load your dll.
PS: You're exe is stupidly big, save your images at a lower bit depth with indexed colors.
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ʟᴇᴇᴘ.
Thanks given by:
Posts: 134
Threads: 20
Joined: Jul 2008
Quote:PS: You're exe is stupidly big, save your images at a lower bit depth with indexed colors.
yea, i know ^^'' but with original exe it isn't so problem...
fix it later with index.
Quote:I'll create a tutorial later showing how to manually patch the exe to get it to load your dll.
thanks to you)
Thanks given by:
|