Coding

 Reply to this postStart new topic

[Tut] Making Ryosukes Missiles CLEO 4-Compatible!

Deji
post Oct 25 2010, 09:57 PM
Post #1


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Ryosukes Missile script can be fixed by following these simple steps:

Find
SANNY
0A9A: 32@ = openfile "cleo\missile.dat" mode 0x6272  // IF and SET
for 33@ = 0 to 29
    0AA7: call_function 0x536F80 num_params 1 pop 1 32@ 11@
    0A8D: 12@ = read_memory 11@ size 1 virtual_protect 0
    if
    0039:   12@ == 0
    then
        break
    end
    if
    0039:   12@ == 0x3B
    then
        000E: 33@ -= 1
        continue
    end
    0AA5: call 3@(3@,1i) num_params 3 pop 3 11@ 13@ 14@
    000A: 14@ += 0xA0
end
0A9B: closefile 32@

Replace With
SANNY
0A9A: 32@ = openfile "cleo\missile.dat" mode "rt"  // IF and SET
for 33@ = 0 to 29
    //0AA7: call_function 0x536F80 num_params 1 pop 1 32@ 11@
    0AB1: call_scm_func @GetConfigLine 1 32@ 11@
    0A8D: 12@ = read_memory 11@ size 1 virtual_protect 0
    if
    0039:   12@ == 0
    then
        break
    end
    if
    0039:   12@ == 0x3B
    then
        000E: 33@ -= 1
        continue
    end
    0AA5: call 3@(3@,1i) num_params 3 pop 3 11@ 13@ 14@
    000A: 14@ += 0xA0
end
0A9B: closefile 32@

Find
SANNY
:SSCANF_FORMAT
hex
"%d" 20 "%d" 20 "%d" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%d" 20 "%f" 20 "%f" 20 "%f" 20 "%d" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%d" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%d" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%f" 20 "%d" 20 "%f" 20 "%d" 20 "%x" 00
end

Add Above
SANNY
:GetConfigLine
0A8C: write_memory 0xB71848 size 0x200 value 0 virtual_protect 0
while 0AD7:   read_string_from_file 0@ to 0xB71848 size 0x200
    0A8D: 2@ = read_memory 0xB71848 size 1 virtual_protect 0
    if and
        8039:   not 2@ == 0xA
        8039:   not 2@ == 0xD
        8039:   not 2@ == 0x20
        8039:   not 2@ == 0x23
        8039:   not 2@ == 0x3B
    then
        0AA7: call_function 0x69DB50 num_params 1 pop 1 0xB71848 2@
        000A: 2@ += 1
        0A8E: 3@ = 0xB71848 + 2@
        0A8C: write_memory 3@ size 1 value 0 virtual_protect 0
    end
end
0AB2: ret 1 0xB71848


If there's any other CLEO 3 scripts that don't work in CLEO 4, post about the problem here and I'll look into how to get it fixed wink.gif


--------------------
Go to the top of the page
 
+Quote Post
Adler
post Oct 26 2010, 06:31 AM
Post #2


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



Errmmm well it works... but then again it doesn't work. The game no longer crashes at startup because of the mod but the mod just doesn't work. confused.gif

This post has been edited by Adler: Oct 26 2010, 06:32 AM


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Oct 26 2010, 12:21 PM
Post #3


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Hmm.. I didn't quite know what effects to expect from the mod.

I believe it is working partially. But I am noticing a crash when firing missiles at other hydras.

I'll try and see what the problem is. Could be something to do with the aDMA used...


--------------------
Go to the top of the page
 
+Quote Post
Adler
post Oct 27 2010, 12:52 AM
Post #4


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



Ryosuke has this video demonstrating what the mod does:



For my SA the missiles are just normal when I tested on the Hydra and Hunter but I didn't have a crash so far.

This post has been edited by Adler: Oct 27 2010, 12:52 AM


--------------------
Go to the top of the page
 
+Quote Post
Deji
post Oct 27 2010, 01:00 AM
Post #5


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



I get the crash when I target lock onto a hydra, then fire.

So far I'm thinking that crash is near line 816. Still gotta do some more testing.


--------------------
Go to the top of the page
 
+Quote Post
Adler
post Oct 27 2010, 03:47 AM
Post #6


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



Oh I haven't tried locking on to planes yet so that's why I didn't get the crash.


--------------------
Go to the top of the page
 
+Quote Post
methodunderg
post Jun 5 2011, 06:13 AM
Post #7


Ameteur Member

Posts: 38
Joined: 16-January 11



QUOTE (Deji @ Oct 27 2010, 01:00 PM) *
I get the crash when I target lock onto a hydra, then fire.

So far I'm thinking that crash is near line 816. Still gotta do some more testing.


Sorry for the bump; but did you end up finding a fix Deji?
Go to the top of the page
 
+Quote Post
Deji
post Jun 5 2011, 07:27 PM
Post #8


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



QUOTE (methodunderg @ Jun 5 2011, 07:13 AM) *
Sorry for the bump; but did you end up finding a fix Deji?


The latest version of CLEO 4 can run the Missile scripts. However, it is still partially buggy.


--------------------
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: