Author Topic: Replay File/Memory documentation  (Read 4473 times)

0 Members and 1 Guest are viewing this topic.

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Replay File/Memory documentation
« on: May 03, 2006, 09:03:14 AM »
Hi guys. I think the only way of improving the original Replay in San Andreas is by collecting all the data we know in a thread. When you know something please post the information here.

I have just started searching data. So when I m sure that the data is correct I will add them here.

Memory (Running Process)

Current Replay

-/-

Replay in memory

-/-

File (gta_sa.exe)

-/-

File (replay.rep)

Frame size=344 ??

Unknown Frame base
+0 = Pos (Matrix)

Misc

Matrix
+0 = X (float)
+4 = Y (float)
+8 = Z (float)

Released Patches

-/-
« Last Edit: July 05, 2006, 10:31:25 AM by Fox »

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Replay File/Memory documentation
« Reply #1 on: May 03, 2006, 09:10:15 AM »
dec 84 in replay.rep seems to store the base coords... So actually this points out if GTA saves each Frame or use one base adress

Frame Tech.:

1 second - 2015.0 150.0 26.5
2 second - 2016.0 151.6 26.5

Header Tech.:

Header - 2015.0 150.0 26.5
1 second - 0.0 0.0 0.0
2 second - 1.0 1.6 0.0

So this finding seems to be really important because when i change it the whole replay is messed up. So it shows me that the 2nd way (Header Tech.) is used

//Edit:

dec 268 in replay.rep stores coords too... Unused?

//Edit2:

The game updates the replay engine only when the camera is moved:



This is my 1st hacked replay. Maybe you notice that i m standing in mid air due the hack! My hex editor replaced 37 findings for a 3 second replay which means that 1 frame ~ 100 ms - is that correct or did my brain hoax again?

//Edit3:

There is an PED pool at the end of the file i think...  When no PEDs are lpaded the data is zero. When there are PED atleast the Model ID is saved there
« Last Edit: May 03, 2006, 09:40:11 AM by Fox »

Offline marklund

  • Posts: 6166
    • View Profile
    • http://
Replay File/Memory documentation
« Reply #2 on: May 03, 2006, 10:29:03 AM »
Hey Fox, great work! Good luck on finding more valuable values from the .rep files, this may become a big discover.

:)

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Replay File/Memory documentation
« Reply #3 on: May 03, 2006, 10:33:39 AM »
It became allready:

Pos, Rot, ModelID, Time, Weather is known right know. I just started on a tool which is reading all data using special plugins. So we can find things much easier and scan the unknown offsets for values only :)

Offline Juan

  • Veteran Member
  • Posts: 5956
  • TMS
    • View Profile
Replay File/Memory documentation
« Reply #4 on: May 03, 2006, 11:20:10 AM »
Quote
It became allready:

Pos, Rot, ModelID, Time, Weather is known right know. I just started on a tool which is reading all data using special plugins. So we can find things much easier and scan the unknown offsets for values only :)
Keep working brother, cause if you ever make a tool that allows you to change the fps from 25 to thirty, or allow you to change the weather, bike color, skin texture, etc, you will be god. :D  

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Replay File/Memory documentation
« Reply #5 on: May 03, 2006, 11:33:04 AM »
Thats possible allready (Have a look at gtaf - Documenting SA memory addresses in modding/misc section) . What i do is trying to understand the replay format rockstar made so i can make bike wheel spins etc...

//Late edit:

Think i missunderstood you - trying exactly what you said now
« Last Edit: July 05, 2006, 10:32:30 AM by Fox »

Offline Daffy

  • V.I.P. Member
  • Posts: 13506
  • WH & NU Founder
    • View Profile
Replay File/Memory documentation
« Reply #6 on: May 03, 2006, 11:37:48 AM »
Repediting is something i think should remain untoched, i don't want to see fabricated stunts...

Offline Nitzkit

  • Moderator
  • Posts: 7183
    • View Profile
Replay File/Memory documentation
« Reply #7 on: May 03, 2006, 11:44:26 AM »
O_O fabricated?....that would be the end of stunting....imo

Offline Daffy

  • V.I.P. Member
  • Posts: 13506
  • WH & NU Founder
    • View Profile
Replay File/Memory documentation
« Reply #8 on: May 03, 2006, 11:47:17 AM »
Excactly my point.

Offline gunner

  • Senior Member
  • Posts: 2721
    • View Profile
    • ZeroLives.com
Replay File/Memory documentation
« Reply #9 on: May 03, 2006, 01:14:54 PM »
already found by someone, it was useless tho :P and it would be much more interesting if you posted this on gtaforums.com then on a stunting forum... almost no one knows what to do with those offsets..
« Last Edit: May 03, 2006, 01:17:18 PM by gunner »

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Replay File/Memory documentation
« Reply #10 on: May 03, 2006, 11:21:52 PM »
Daffy and Nitzkit:

fabricated? That is not the thing i want to point at... But it has been my bad i should have explained more detailed:

I want to IMPROVE the replay code rockstar made! Add spark, wheels spinning etc... There are different ways of doing this. I start in the saved replay files to find out in which order and how it is saved. Then i will have a look at the functions (in the running GTA Process) which are writing and reading from it. When i know how that works i could hook the function so it would at my data too (Particles for spark as sample).

I found out that when i record a replay using a car and change the car id to 522 (NRG) in replay.rep the replay will show me a NRG with spinning seat! Thats logic due the model format. But i m sure there is a way to change the part which should be rotated so the wheels are spinning. I got the wheels spinning on XBox allready using a simple default.xbe crack (xbe = xbox executable)

Gunner:

First: Thanks for your reply. Its been the first respectfull in a long time :)
You are right maybe... But the thread on GTAF has been closed cause it has been a Question - not a Project or sthin. There was the same topic in the Memory doc. But it wasnt explained good and also it has just been sum RAM findings.
Maybe some guys dont know what to do with the stuff i post here. But there are others like you and Marklund who should know this.


So all i want to do is improve and explore the R* replay format. Fabricating stunts using hacks is nearly impossible cause Replay files can be about 5 mb sometimes... This would mean 1000s (!) of bytes. We would need to know them all. (And it has never been my idea to do that ;) )

Offline Dannye

  • Veteran Member
  • Posts: 3588
    • View Profile
Replay File/Memory documentation
« Reply #11 on: May 04, 2006, 04:09:56 AM »
Sounds like a nice idea dude.

And although i dont know much (at all) about how you are doing it, its still nice to read your updates as you make them  :)  

Offline Urban Legend

  • f*ck phone books
  • Veteran Member
  • Posts: 5365
  • I ❤ VC
    • View Profile
Replay File/Memory documentation
« Reply #12 on: May 04, 2006, 07:06:40 AM »
keep it up dude, looks like you've made good progress eh?

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Replay File/Memory documentation
« Reply #13 on: May 04, 2006, 07:29:04 AM »
Allrite... The plugin loader is nearly completed. My tool loads a class.ini with the following data:

[Class]
ped=0
car=1
bike=2
heli=3
boat=4
plane=5
pushbike=6

The tool compares the current object type with the id's - then it will load the correct file ("PED.ini" as sample) that file looks like this:

[Plugin]
Name=Pedistrian
Author=J-Fox
Size=100
[Data0]
Name=ModelID
Type=1
Offset=1
[Line]
[Data1]
Name=Position X
Type=4
Offset=4
[Data2]
Name=Position Y
Type=4
Offset=8
[Data3]
Name=Position Z
Type=4
Offset=12


So it shows me the position and model ID in a table. The size is used to generate the offset where the next block starts. Also the tool will create a list in the future showing me all Objects and Frames found in the file. So i can easily add new values i found and update the ini! When i know the whole file format it shouldnt be the problem to create a dll which gets inprocess with GTA and pushes my code to the orig. function which saves or loads replays. By that i could add extra data like particles etc without screwing up the orig. replay.

//Edit:

Screeny :P

« Last Edit: May 04, 2006, 07:48:12 AM by Fox »

Offline The Antidote

  • Veteran Member
  • Posts: 1641
    • View Profile
    • http://
Replay File/Memory documentation
« Reply #14 on: May 04, 2006, 08:38:31 AM »
Quote
O_O fabricated?....that would be the end of stunting....imo
lol I think thats a very long way off.

 

SimplePortal 2.3.7 © 2008-2025, SimplePortal