OTS Autosplitter Script
7 years ago

Hey guys,

I recently played through OTS and had a lot of fun, so I casually started doing some faster runs through it. I know that it is timed by using the IGT, but in order to see my improvements, I made an Autosplitter Script for Livesplit for OTS.

You can find it here: http://www.mediafire.com/download/omj1d9m8kk5mw5r/OutThereSomewhereV2.asl

IMPORTANT EDIT: The old version (without the abandoned core / checkpoint splitting functions) can still be found here:

http://www.mediafire.com/download/fpd334qdi494c4a/OutThereSomewhere.asl

In order to use it, you can basically just follow the Instructions for the Autosplitter Component of Livesplit on

https://github.com/LiveSplit/LiveSplit/blob/master/Documentation/Auto-Splitters.md

You also need to change the script to point it to your speedrunning-savefile of OTS.

In order to do this, open the .asl Script file with any text editor and change the following line:

var path = "YOUR_SAVEFILE_PATH";

Put the full path to your OTS savefile there. The script will automatically check if the File exists or not, and start the run-timer as soon as the save file is created. This will cause runs to start after the shmup-section in the beginning. (Which is not equal to the IGT, but since the splits are only used to show differences in runs and not for timing, that doesn't really matter.)

It also automatically resets your run if you delete your savefile.

The script will split every time the savefile changes, e.g. when using a checkpoint or picking up an alien artifact.

In the new versions, you can configure your savefile by editing the .asl file.

You can change and modify the following things to your liking:

vars.splitEveryNSaves = 1;

vars.splitEveryNSaves determines after how many save file changes the program should split, if the 'Split every N Saves' option is enabled in the layout settings. For 1, it splits every time the file changes. For 2, every other time...

vars.splitStrings = new string[] {"lava", "getAbandonedCore", "gauss", "autofire", "FIRST_HEART", "LINK_TO_THE_HEART", "SKIP_TREEMAN_DOMAIN", "getLightorb"};

vars.splitStrings contains the strings found in the save file which the program should split. Make sure the syntax stays correct here.

vars.splitAbandonedCores = new int[] {1, 3, 5, 9, 11};

vars.splitAbandonedCores contains a "Split list" for the amount of abandoned cores you collected. In this case, it would split when 1, 3, 5, 9 and 11 cores are collected.

vars.splitCPXCoordinates = new int[] {7, 8}; vars.splitCPYCoordinates = new int[] {5, 5};

The coordinates are a little more advances, as they require some knowledge on the internals of the game. On "Crash Site", the checkpoint/level coordinates start at X = 5 and Y = 5. Going right increases the X value, while going left decreases it. Similar behavior for the Y coordinate. If you want, you can use these checkpoint coordinates to specify custom checkpoints where you want to split.

I hope some of you find it useful, it's at least a lot of fun to casually play it that way :-)

EDIT: fixed a bug where the script splitted instantly, that was not supposed to happen ;) Newer version can be downloaded at the same link.

EDIT2: More bugfixes. Didn't actually test what happens if you pick up artifacts or kill enemies. Should work now. The splitter now should split whenever the savefile changes.

EDIT3: ¤sigh¤ should work now. I finished a whole run with correctly detected splits, hopefully it works for all categories :-)

Edited by the author 7 years ago
thisishowmymindworks, PrettzL and 3 others like this
Rhône-Alpes, France

Wow it's very cool :) Thanks !

This should make collectibles% better to run and easier to confirm.

I should probably also mention one thing: You need to split after the final shmup boss fight yourself, since the savefile doesn't change afterwards. I don't think there is an "easy" way for me to add the final split, since the memory adresses of the game change dynamically every time it is loaded (flash/adobe air is just in time compiled). I might take a look at it again though. Same also goes for the start of the timer, since the savefile is created when entering "Crash site".

If anybody wants it, I can make the timer start configurable, so you have to manually start/reset it. That way you could manually start the timer upon "New Game". Just tell me what you guys need and I'll try to add it ;-)

EDIT: Just saw that you can already do that. If you want to manually start/reset the timer, just untick the "Start" and "Reset" Options in the Scriptable Auto Splitter Settings in your Livesplit Layout.

Edited by the author 7 years ago
PrettzL likes this
Bretagne, France

That works really great! Unfortunately, because there are several checkpoints that i don't always activate i'm still unsure about using it or not. I'll try and see for myself.

Also, checking every savepoint is a little too much. Maybe there would be a way to save every 2-3 checkpoints? That would allow to spread the split a little more.

Finally, i wondered, would there be a way to check the content of the savefile for certain string? Because the game write some when certain events are activated. For example, it writes "gauss" when you get the gun. It writes "autofire" when you get the upgrade. It writes "FIRST_HEART" when you get the first alien artifact and "LINK_TO_THE_HEART" when you get all of them. It also writes "SKIP_TREEMAN_DOMAIN" when you take the shortcut to the alien city and each time there is a "cutscene" the game write it's name too. If we could use this maybe we could make a more customable autosplitter.

PrettzL and MIDIbusker like this

Glad you like it!

As far as I know, Livesplit does not allow for anything else than simple checkboxes for "true or false" configuration inside the settings, so everything you mentioned would have to be customized inside the script file itself.

Should be very well possible though!

The idea with the strings from the save file is great, I think I'll just make a customizable list inside the script containing all strings you want to split for. Then you can just add the strings you want and choose if you want it to split there or not.

Regarding the "split every N checkpoints" thing - this is also easy. I will probably add these things in in a day or two.

PrettzL likes this

I updated the script, it is found at the same link. I hope doubleposting is okay in this case ;-)

Both of rezoons' suggestions made it in. You can now customize the autosplitter a little bit more.

In the "Scriptable Auto Spliter" Layout Settings you can now enable/disable "Split every N Saves" and "Split on Save String". For "Split every N Saves", it basically splits every N times the save file is changed (autosave, save and exit, etc.). For "Split on Save String" it splits when the save file is changed and contains specific configurable strings found in the save file.

You can configure these options in more detail inside the script itself.

In line 27, you find the following:

vars.splitEveryNSaves = 1;

You can change this value to your liking, making it split every 1, 2, ... , N times the save file is changed. This was rezoons' first suggestion.

For the save string part, you have to change stuff in line 81:

vars.splitStrings = new string[] {"lava", "getAbandonedCore", "gauss", "autofire", "FIRST_HEART", "LINK_TO_THE_HEART", "SKIP_TREEMAN_DOMAIN", "getLightorb"};

In this line, you can add/remove as many strings which are found in the save file as you like. The ones I added by default are just examples I was using for testing. Make sure that the syntax is correct, each item has to be written inside double quotes, separated by a comma. The last item does not have a comma at the end.

You can also combine both splitting methods. As an example: you could split every 3 checkpoints or whenever a specific save string is found.

Keep in mind that it is still only possible to split when the game saves, so even if you, for example, collect the light orb and use the "getLightorb" string to split, it will still only split the next time the game is saved.

Hope you guys enjoy the better customization options!

PrettzL likes this
Bretagne, France

That's awesome! I had to uncheck "Split every N Saves" in order to make it works but otherwise everything worked perfectly.

I used this set of strings for my collectible% splits {"gauss", "autofire", "FIRST_HEART", "LINK_TO_THE_HEART", "alien15_28_6", "alien16_29_6", "traitorDone", "grigoriGreetings", "getLightorb"} and each one worked perfectly giving me this.

http://puu.sh/oWZnN/9caa6f6cf8.png

Of course, because we can only autosplit when the game saves, the events "Passing the first gate", "passing the second gate" and "grigori (first/second fight)" correspond to their respective checkpoint associated. Also, the event "All core given to the tratoir" trigger when savewarping and only actiavtes if you got ALL the cores making it the best way to be sure we indeed got all the cores in our run (very useful to avoid false hope or during races). Finally i unchecked "start" and "reset" in the layout setting in order to trigger manually the beggining and end as it was discussed before.

Thank you very much, it's really awesome and i'm definitely gonna use it for all my run using external timers. I will also later make a list of all the different strings we can put and what they trigger if people want to configure they split differently. Unfortunately, there are still some limitations so everything isn't possible yet but in the current state it's REALLY useful.

PrettzL likes this
Bretagne, France

Here is a non exhaustive list of strings for triggering splits. I remind everyone that the autosplitter can only check at every savepoint meaning that the timer will split the next time the game saves after the different events are done. I put in bold the events that are done at the same time as the game saves (meaning that the split is instantaneous for them) and i put an asterisk in front of the one i used for my collectible% splits.

Cutscenes: These correspond to the pop-up message you get at the beggining of some levels.

"greetings" : Correspond to Crash Site (5_5) "lava" : Correspond to Spaceship Graveyard (6_5) "teleportGun" : Correspond to Red Lake (7_5) "fallFast : Correspond to Lava Pits (8_5) "notPacific" : Correspond to Block Chompers (10_6) "momentum" : Correspond to Up Hill (13_6) "intelligentLife" : Correspond to Up Down Jonction (14_5) "weirdBeam" : Correspond to Alien outpost (15_5) "doorTutorial" : Correspond to Ancient Well (17_6) "momentumFall" : Correspond to Ancient Well too (17_6) "oneMore" : Correspond to a level not in the game. I'm curious now! (20_6) "greenBeam" : Correspond to Up Beam (1_15) "tower" : Correspond to Grigori's Tower (36_5)

NPC: These correspond to the NPC you talked to. I won't put all them that would be useless. The only one we need to talk to are:

¤ "alien15_28_6" : The alien guard opening the first gate. (28_6) ¤ "alien16_29_6" : The alien guard opening the second gate. (29_6) ¤ "grigoriGreetings" : Talking with grigori before the first boss fight.

Game Trigger:

¤ "gauss" : You got the gauss gun. ¤ "autofire" : You got the gun upgrade. ¤ "lightOrb" : You got the light orb. "traitorIntro" : You talked to the traitor "traitorBig" : You got the big upgrade from the traitor. ¤ "traitorDone" : You gave the 11 cores to the traitor. "grigoriDefeat" : You beat the first fight with Grigori. "grigDead" : Same.

Achievement Related: Unfortunately, the game doesn't take into account ALL the achievements.

"CLOSE_ENCOUNTERS" : Talk to an alien. "TALK_TO_CITY_ALIENS" : Talk to all aliens in the city. "DIPLOMAT" : Talk to all 21 aliens. "SECTOR_CLEAR" : >=15 unique screens traveled. "TRUTH_OUT_THERE" : >=50 unique screens traveled. "ALL_YOUR_BASE" : >=75 unique screens traveled. "WHERE_NO_MAN_HAS_GONE" : >=81 unique screens traveled. "107_PERCENT" : >=87 unique screens traveled. "KILL_ALL_MONSTERS" : Take a guess. ¤ "FIRST_HEART" : Get an alien artifact. ¤ "LINK_TO_THE_HEART" : Get all alien artifact. "THE_DIG" : Break ten breakable blocks. "SKIP_TREEMAN_DOMAIN" : Use the shortcut to the alien city. "AUTOFIRE" : Get the gauss sun. "TELEJUMP" : Jump after being teleported 5 times in less than 8 seconds. "GRIGORI_WITHOUT_TELEPORTS" : Beat grigori without using the teleport gun.

Misc.: "death_crush" : Get killed by the block with the spikes. "death_enemy" : Get killed by an enemy. "death_lava" : Get killed by lava.

Hopefully this will help everybody to customize their autosplitter as much as we can currently do. Thank you again for Thomadin for making it!

Edited by the author 7 years ago

Thanks for the list! If anyone encounters bugs with any of these, feel free to post them. (Although I'm not sure how fast I'll be able to fix occuring bugs, still got lots of other stuff to do as well ;-) )

I might take another look at the save file - I know that things such as the last Checkpoint position and probably other stuff such as the amount of abandoned cores collected are also in the save file. I've also made pretty good progress in analyzing the full save file structure.

Would anybody have interest in splits after a certain amount of cores are colected, for example?

Edited by the author 7 years ago
PrettzL likes this

I managed to do that thing with the abandoned cores. You can now customize splits for specific amounts of abandoned cores collected. Since the game autosaves when you collect a core, this might be pretty useful. While digging through the save file, I also added the possibility to split at specific checkpoint coordinates, although I don't have all the coordinates. If you want, you can dig through the game or the save file and customize your splits even more.

vars.splitAbandonedCores = new int[] {1, 3, 5, 9, 11};

vars.splitAbandonedCores contains a "Split list" for the amount of abandoned cores you collected. In this case, it would split when 1, 3, 5, 9 and 11 cores are collected.

vars.splitCPXCoordinates = new int[] {7, 8}; vars.splitCPYCoordinates = new int[] {5, 5};

The coordinates are a little more advances, as they require some knowledge on the internals of the game. On "Crash Site", the checkpoint/level coordinates start at X = 5 and Y = 5. Going right increases the X value, while going left decreases it. Similar behavior for the Y coordinate. If you want, you can use these checkpoint coordinates to specify custom checkpoints where you want to split.

Also, I'm terribly sorry for the messy code, the .asl scripting stuff doesn't let me define my own functions, so everything is pretty cluttered in the script. Still, I'm glad you're having fun with it.

PrettzL likes this
Bretagne, France

I know i'm repeating myself but that's really awesome. I've tested it and it seems to work really well. You can now pretty much customize it nearly as much as you want.

If you want the coordinate of a specific checkpoint you can checkout the map edit Timbouton made a while ago with all the coordinate of the levels https://www.dropbox.com/s/5dmvb0e2uh6vywq/OTS-Map_num.png?dl=0 .

Of course, if some people are a little confused by all this you can always ask here or on the discord chat if you want help to setup your autosplit.

Thank you again Thomadin. ;)

PrettzL likes this
France

That works really well, thanks !

Game stats
Followers
105
Runs
428
Players
109
Latest threads
Posted 2 years ago
27 replies
Posted 6 years ago
1 reply
Posted 7 years ago
4 replies
Posted 7 years ago
21 replies