abesto / ams2-career

https://ams2-career.abesto.net
The Unlicense
6 stars 1 forks source link

Configure simulator from the app #44

Open abesto opened 2 years ago

abesto commented 2 years ago

Having to input each race option into AMS2 is kind of a pain. After about 30 mins of looking around, I think the race setup is stored in %userprofile%\documents\Automobilista 2\savegame\[some numeric id]\automobilista 2\careersaves\.sav, but that's a binary file I failed to analyse.

In practice, this would probably take the shape of "download this file and stick it in the right place"; I don't think AMS2 actually exposes a runtime API.

I guess one could also experiment with faking inputs and setting up the app that way (possibly based on some exported data from the app).

SvenTheBread commented 2 years ago

I analyzed the save behaviour of all files contained in %userprofile%\documents\Automobilista 2\savegame\[some numeric id]\automobilista 2. It seems that the mentioned career save file is currently created initially, but not changed. The only file, that changed by altering the race setup, was default.sav within profiles. This file, however, will contain way more information than needed (like name and country settings of the profile). There is a save file for championships at the moment. It seems the scope of this file is way better suited.

Using save files would include the use of a tool or tools to decode/decrypt as well as encode/encrypt save files. Reiza would be the one to provide those. (I doubt they would even consider that, but hey, you never know).

It should be possible to generate/create all needed save files by creating championships and providing them. This solution would include creating every possible combination of track, car, length and so on. We would probably need a tool for generating those by faking inputs, since that would be a massive undertaking. At that point, it would be more sensible to use it for the race setup directly, instead of using save files.

As a side note, for faking inputs. Some game files suggest that CSS (or some other format of style sheets) could be used for the UI. If HTML is used as well, there is a possibility that modified testing tools like selenium could do the trick without much work. But that is just a guess, since I haven't looked into that.