Tutorials

 Reply to this postStart new topic

[CLEO 4|Mem|Tut] Modifying Race Checkpoints For Funzies

Deji
post Jun 6 2010, 04:29 AM
Post #1


Coding like a Rockstar!

Group Icon

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



Modifying Race Checkpoints For Funzies


Since I've been away for a while, I got something really special smile.gif


Using this technique you should pick up on how to change the properties of certain things by using memory. Even for things you couldn't usually change.



Let's start off by looking at the address of the Race Checkpoints pool: 0xC7F15C

The address above points directly to the "first" checkpoint in the pool. Each block is 38 bytes, so to get to the next checkpoint we add 38 to the starting address like so:

SANNY
0006: 0@ = 0xC7F15C
000A: 0@ += 38


To scan for ALL checkpoints (e.g: in order to find the RIGHT ONE) we need a for loop.


SANNY
{$CLEO}
0000:

:CheckpointMeddle
wait 0
if
0AB0:   key_pressed 0x9
else_jump @CheckpointMeddle
// Create a checkpoint to meddle with.
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 5.0 0.0
06D5: 0@ = create_racing_checkpoint_at 1@ 2@ 3@ point_to 1@ 2@ 3@ type 0 radius 1.0
// Find the pointer of the checkpoint.
for 1@ = 0xC7F15C to 0xC7F824 step 0x38
    0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
    if
        003B:   0@ == 2@
    then
        0ACA: show_text_box "Pointer found!"
    end
end


Start the game and press TAB. A checkpoint should be created before the player and "Pointer found!" should be printed.


Now we can add stuff to replace our "Pointer found!" text and mess with the checkpoint.


--------------------
Go to the top of the page
 
+Quote Post
DK22
post Aug 14 2010, 03:48 PM
Post #2


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



I saw that at Japan CLEOwiki=) Do we can make the same with particles?
Go to the top of the page
 
+Quote Post
Deji
post Aug 14 2010, 04:22 PM
Post #3


Coding like a Rockstar!

Group Icon

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



Depends which kind of particles you're talking about smile.gif

I've made some leanway on particles, but nothing groundbreaking as of yet... I'm still looking, though.

For example:

Car Skid Mark Size
CODE
0x87111C [float]


The amount of rubber car wheels leave behind when skidding. This will look unrealistic if changed much.

Particle Handles
CODE
Base: 0xA44110
Size: 0x20


Seems to be the start of a block of memory containing a bunch of handles for scripted particles... Or maybe pointers to memory locations of the particles?


--------------------
Go to the top of the page
 
+Quote Post
DK22
post Aug 14 2010, 05:32 PM
Post #4


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



Hmmm... I want to find all particels that was created (ohh, not all, only with some type).
For example: I want to change a color for all smoke particles that create during the game, is it possible?
Go to the top of the page
 
+Quote Post
Deji
post Aug 14 2010, 05:54 PM
Post #5


Coding like a Rockstar!

Group Icon

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



Maybe... I'm not sure. Still digging into that.

I'll have a go at trying to document what I can.


--------------------
Go to the top of the page
 
+Quote Post
chaterbox0
post Oct 10 2013, 04:00 PM
Post #6


The New Guy!

Posts: 4
Joined: 25-April 13



Much love, been looking for this. But I seem to crash whenever I press tab, any ideas?
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

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