GTA2 Replay Runner?

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

GTA2 Replay Runner?

Post by Sektor »

Just an idea for a program. I might make it myself if no one else makes it and I get sick of GH coding:

replayrunner.exe c:\temp\bestshotever.rep

You could associate .rep extension with replayrunner.exe, so you can view replays with doubleclick.

Step 1:
Make backup of gta2\test\replay.rep to replayXX.rep
Copy c:\temp\bestshotever.rep to gta2\test\replay.rep
Create registry key HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\play_replay REG_DWORD, value 0
Create registry key HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\skip_frontend

Optional Step 2:
Create registry key HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\ignore_replay_header
Read the header of c:\temp\bestshotever.rep to get the gmp, sty and scr
Create registry keys:
HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\mapname
HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\scriptname
HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\styname

Step 3:
Run gta2\gta2.exe
Delete registry key HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\play_replay
Delete registry key HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\skip_frontend

edit:
GTA2 has command line options for replays. It would be better to use them instead of writing to GTA2 registry keys.

Run replay.rep: gta2.exe -r
Record replay.rep: gta2.exe -q

Replay filename is limited to 106 characters:

gta2 -r vike.rep will playback vike.rep in single player
gta2 -r 'vike smells.rep' -n will playback vike smells.rep in multiplayer
gta2 -r "vike roooocks.rep" will playback vike roooocks.rep in single player
gta2 -r -n will playback replay.rep in multiplayer.

It always looks relative to the GTA2\test\ folder. If the replay is outside that folder then you can use "..\replay.rep" to look in a lower folder.
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

Give me few hours.
Im searching for "sideprojects" like crazy.

This one seems good.
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

Im almost done.
BTW, if you use Power Manager, alot of stuff is actually in HKEY_LOCAL_MACHINE.
Not in USER. I think i should write everything there. I tested and GTA2 accepts it.

But what about GTA2 v11.x?


Im confused.
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Replay Runner?

Post by Sektor »

Yeah sorry, I should have mentioned that 9.6F/gta2 manager.exe use HKLM. It's just v11.3/manager-hkcu.exe that uses HKCU.
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

So for 11.3 and better i must use another location?
So, i guess this needs detection of GTA2 version..

But if there is more than one GTA2 installed or used by user things get complicated.
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Replay Runner?

Post by Sektor »

It's one of the reasons that GH v1.5 no longer supports older than v11.3.
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

OK, here is first beta.

http://www.gta2madness.co.cc/click.php?id=10


Read the readme file, take your rep and execute it.


Please post any bugs here. I really would like to make it as bug free as possible.
And its not final yet. GTA2 11.2 isn't supported yet.

Edit. Don't try to run just exe. Execute rep file by double clicking on it.
Razor
Lunatic
Lunatic
Posts: 456
Joined: 19 Jul 2008, 14:14
GH nick: Razor, R
Location: Poland / Szczecin
Contact:

Re: GTA2 Replay Runner?

Post by Razor »

it just run and closeing instantly :O
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

Don't try to run just exe. Execute your REP file by double clicking on it.
Uruchom plik REP przez dwukrotne kliknięcie na niego
Razor
Lunatic
Lunatic
Posts: 456
Joined: 19 Jul 2008, 14:14
GH nick: Razor, R
Location: Poland / Szczecin
Contact:

Re: GTA2 Replay Runner?

Post by Razor »

works fine would you like to add fature

when your software is running ang gta2 + recording... after finished game your softwre will change replay to replay-date-number and transfer to replys folder (software will create it)

also your software should create test folder if it doesnt exist :)
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Replay Runner?

Post by Sektor »

I also had to manually associate or "open with" but that's fine.

GTA2 v9.6 didn't like most of my replay files (read failure), so I had to record some new ones. It's also not copying c:\temp\replay.rep to my gta2\test folder, not sure where it is putting it.

I can make GH backup your replay files each time it says "GTA2 was running for ..."

When I said replayXX.rep , I mean if replay01.rep exists then create replay02.rep but date and time is probably better.
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

Hmm.

Did you run the exe and it didn't associated the rep files?
It checks if it is already associated with rep files, and if not then it does it.

I wonder why you had to manually do this?

If you double click on rep file, it automatically copies this to GTA2\test as replay.rep
No matter what your original file is. It ends up as replay.rep in GTA2\test folder.

Thanks for that XX bug. I will implement it.


EDIT: if i will complete this tool, then im gonna post the full sourcecode of it.
At the moment it's pointless.



Razor. How you associated the REP files?



Also by hand?
Razor
Lunatic
Lunatic
Posts: 456
Joined: 19 Jul 2008, 14:14
GH nick: Razor, R
Location: Poland / Szczecin
Contact:

Re: GTA2 Replay Runner?

Post by Razor »

here works fine, just the same xx bug :)
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

OK, new version.
When you first run it, it will associate the rep files with it.
Even if you move your exe around, it will do it again. Because it must know where the exe itself is.

Link is same.
http://www.gta2madness.co.cc/click.php?id=10

Readme.txt has the changes made.

+ fixed my mistake. The file located on C:\ drive was hardcoded into app. I forgot to change
it. So that's why you Sektor probably noticed this.

Sorry. My fault.

Razor, i added the feature you asked but it is actually useful?
I mean, you only can run this if you double click on REP files.
And if you run rep then it means you are replaying rep files.

But can you actually record also new one at the same time?
Backups now contain date and time. I can change the format of this actually, if you don't like it.


Please test it, people.
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Replay Runner?

Post by Sektor »

It is possible to play a replay and continue recording but not sure if it works with the options you write to the registry. Still testing.

edit: I downloaded it again and now it copies correctly.
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

OK Sektor.
I did few modifications, fixed some stuff (hopefully) and reuploaded.
Same link:
http://www.gta2madness.co.cc/click.php?id=10

Download again, delete the old one.

Also do as earlier, delete all the rep stuff from registry first, try to execute rep file by double clicking on it. What it says?

And only then run this new uploaded version.

Before im gonna install Vista and 7, let me know if it changed anything.

If not, i will install them tomorrow.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Replay Runner?

Post by Cuban-Pete »

I never used rep stuff. How do I delete the old register rep things?
"Mmmm, your eyes are so beautiful."
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

First try if it even works for you?
Did you executed the tool already?

There is nothing to delete, except file extension .rep.
Look into
C:\Program Files\Rockstar Games\GTA2\data\attract


What do you see there? Do you see 4 files with small hospital icons?

If yes, just double click on any of them, GTA2 should launch and show the replay.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Replay Runner?

Post by Cuban-Pete »

I ran your program once (old one) but not much happened. Now I ran it again (new one) in that folder (attract) and the .rep files have a white building as icon and when I click on it something pops up to select a folder and then says "ping" and is gone... :(
"Mmmm, your eyes are so beautiful."
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Replay Runner?

Post by B-$hep »

Seems a bug. Sorry. I will fix it tomorrow, im sleepy at the moment.
But whats your GTA2 path then?

It doesn't find your GTA2 path.
Post Reply