Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
      3. The Armadillo Inn *Spoilers*
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
Sektor

GTA2 speedrun timer livesplit script

Recommended Posts

Sektor

I started writing a GTA2 speedrun timer but then I looked at livesplit and wondered why there wasn't a GTA2 livesplit ASL script. I made a simple one that starts the timer when in game and pauses timer on menu. It would be better to only pause timer on area complete/game complete but menu was easier to find.

 

While looking to see if livesplit could download the GTA2 level records (it can't without making a custom component, it only downloads full game records), I found GTA2 Check, a GTA2 checklist and speedrun tool created by Molotok! Nice program, please share the memory addresses if you still have them, it might save some time. Did you post about GTA2 Check anywhere? It would still be cool to add something like that to the radar with route logs.

 

I'm not actually sure what 0x1EE068 is supposed to store but it seems to be 0 on menu and 1 when in game. I have the frame count address, dividing that by 30 should return time in seconds.

 

This version should reset timer when you start a level (only useful for individual level timing) and pause timer when on menu.

 

edit: outdated script removed

 

Save as gta2.asl, run livesplit, right click, choose edit layout, load gta2.asl as an auto split file and set timer to game time since real time doesn't pause.

 

I haven't submitted it to github yet since I'm still updating it.

Edited by Sektor

Share this post


Link to post
Share on other sites
Molotok

About the gta2 check program I did that 3 years ago and the timer there is messed up (I think I used clock time which was not very smart :miranda: )... but as a checklist it works preperly. Of course I lost the file with the addresses which Lighnator from speedrun.com gave me, so I asked him again and here they are:

 

kgIiw7L.png

 

I will try to test your script when I figure out how to do it. Thanks for your efforts in advance!

Edited by Sektor

Share this post


Link to post
Share on other sites
Molotok

Kinda forgot, but a more useful explanation on the address stuff:

 

Main mission script start pointer contains the value with the base address to which you need to add some offsets to get the address for some other values like jobs done etc.

mission_script_ptr = 0x006644BC // or gta2.exe + 2644BCmission_script_val = mission_script_ptr*xy_address = mission_script_val + offset // see below for the different offsetsoffset = 0x0310 // required score* = 0x0328 // total jobs done* = 0x032C // gang1* = 0x0330 // gang2* = 0x0334 // gang3* = 0x0338 // frenzies// token adress0x005EC5E4 // or gta2.exe + 1EC5E4 // player pointerplayer_ptr = 0x005E3CC4 // or gta2.exe + 1E3CC4// moneymoney = player_ptr* + 0x188

Edit: I made a mistake, this values work only in the 9.6 version, the splitter doesn´t work with 9.6 version, only on 11.44. Must be another address for 9.6.

Edit2: Replaced the picture in the previous post while running the 9.6 version, so all the values can be seen.

Edited by Molotok

Share this post


Link to post
Share on other sites
Sektor

This livesplit script should work on the free v9.6 and 11.44 version but it's only useful for individual level runs since it resets timer on levelstart and pauses on levelend.

 

edit: script removed. Molotok has a better script.

Edited by Sektor

Share this post


Link to post
Share on other sites
Molotok

Yes, it works nicely. I figured it also works with the main script pointer since the address is 0 if you are not ingame. Would be good to have it split after each job complete and only reset when you start a new game (checking the money value would solve it). I played around a bit and with tokens it is easy as you only have just one offset but so far didn´t find a way to get to the other values yet.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.