Levels autosplitter
1 year ago

Hello runners. I've spent a bit of time working on autosplitter for this game (PC version at least).

Right now it starts RTA as soon as the game loads into the level, but starts IGT after countdown. There is a setting for IL runs that would start RTA time after countdown as well (disabled by default).

So far it seems to be in sync with the race time displayed in game itself - it treats menuing and race countdown/after finish as loading, but keeps counting during pause and splits at the end of the race.

Just a convenience tool, while it has been consistent for me please still check whether time displayed after the race matches segment time.

Code is avalable on GitHub https://github.com/uspeek/road_rash_autosplitter/blob/main/ROADRASH.asl download the file and add it into Scriptable Auto Splitter (Controls section) in your layout. If moderators are okay with it, I will do a pull request for the autosplitter to be added as default one for the game (the one available in Splits Editor window).

Have a nice day :)

Molotok and JwFu like this
Germany

Hi and nice work! I will test it this weekend and post results later.

Netherlands

So far in my testing (mainly lvl 5) its off by ~100ms at times (compared to what the game sais), but still far more consistent then manual splitting!

I like it for convenience sake, and a reference point for myself and ofcourse the pacepals that are watching, or jump in mid run. But I'll still recalculate end time with my excel sheet :P

Germany

The ingame time is not accurate unfortunately, but I found another address which gave pretty accurate times now. Also removed the delay.

Script: state("ROADRASH"){ byte hasFinished : 0xC3DFC; //byte hasFinished2 : 0x6D980; //byte hasStarted2 : 0xC7498; byte raceStarted : 0xB7ECC; byte isPaused : 0x753B8; byte levelId : 0x6A660; }

startup { settings.Add("startOnLevelLoad", true, "Start on level load"); settings.SetToolTip("startOnLevelLoad", "When disabled timer will start after pre-race countdown ends which is useful for ILs.\n" + "When enabled timer will start as soon as any game level loads." );

settings.Add("removeLoadingChecks", false, "Remove loading checks"); settings.SetToolTip("removeLoadingChecks", "Current Big Game mode ruleset states that RTA is to be used\n" + "This setting will treat RTA as IGT to account for that without layout changes\n" + "Or just use Real Time comparison in LiveSplit settings" ); }

init { vars.inLevel = false; vars.raceFinished = false; vars.raceActive = false; }

update { vars.inLevel = current.levelId < 6 && current.levelId > 0; vars.raceFinished = (old.hasFinished != current.hasFinished) && current.hasFinished == 1; vars.startedIngame = old.raceStarted == 2 && current.raceStarted != 2;

if (vars.startedIngame)
	vars.raceActive = true;
if (!vars.inLevel)
	vars.raceActive = false;

}

isLoading { if(settings["removeLoadingChecks"]) return false; if(!vars.raceActive || current.hasFinished == 1) return true;

return false;

}

start { if(vars.inLevel) { if(vars.startedIngame) return true; if(settings["startOnLevelLoad"] && vars.inLevel) return true; } }

split { if(vars.inLevel && vars.raceFinished) return true; }

Edited by the author 1 year ago
Germany

Forgot to mention, it looks like the ingame time in RR gets rounded which Livesplit doesn't. Also a time with e.g. .35 could end up being either .3 or .4 because of tiny difference. If we could find the address of the RR-ingame timer that would be nice..

Another problem was that if you activate the RTA setting, it always adds a small chunck of time to the game time..

Don't know what to do about it, the isLoading() seems to come after so always a bit of time will pass before the time is paused.

Edited by the author 1 year ago

If we could find the address of the RR-ingame timer that would be nice..

NVM this seems to be the 1st place in race (so technically it would work as long as you finish all races in the 1st place), next places are located with every 76 bytes in memory from that offset

keeps being at 0xFFFFFFFF during the race, updates as you cross the finish line so I am rewriting everything right now for it to add up correctly

I have also found a way to check for Thrash/Big Game mode so I am probably able to do auto-reset function for Thrash mode (which in my current guess is any case where you exit the race via busted/wrecked screen)

edit: updated code at https://github.com/uspeek/road_rash_autosplitter/blob/main/ROADRASH.asl with recent findings and your edits (the way I was working towards was so overly complicated, but your solution for splitting seems much simpler and straightforward)

Edited by the author 1 year ago
Germany

Sounds good, so we have the offset if we know the placement (which is in address 0x9e114). :)

Now if we can get the addresses for the actual loading screens (not menu and end results etc.) and pause timer during those loading screens, we would get a "perfect" loadless timer for full-game runs. And then we can ignore the ingame-time altogether, maybe just keep it for the sake of it..

Game stats
Followers
35
Runs
105
Players
21
Latest threads
Posted 20 days ago
18 replies
Posted 20 days ago
2 replies
Posted 5 months ago
2 replies
Posted 1 year ago
6 replies