Programmatically resolving version aliases like stable/console/switch into version numbers?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
jeff.s
Inserter
Inserter
Posts: 22
Joined: Thu Jan 10, 2019 10:49 pm
Contact:

Programmatically resolving version aliases like stable/console/switch into version numbers?

Post by jeff.s »

Is there some endpoint to programmatically resolve Factorio version aliases like

Code: Select all

stable
or

Code: Select all

experimental
or

Code: Select all

console
into firm version numbers like

Code: Select all

1.1.74
?

I know there are these aliases on Steam but that information doesn't seem to be readily consumable by code. I'm looking to offer hosting for Switch players and would like to be able to automatically rebuild server images to keep up with the software running on their consoles.

An example of the type of thing I'm looking for:

Code: Select all

GET https://www.factorio.com/get-download/<ALIAS>/version.txt
returning a response like

Code: Select all

1.1.74
. Or just a fixed-url

Code: Select all

versions.json
with something like

Code: Select all

{"stable":"1.1.74", "console":"1.1.70"}
, or really anything that would be automation-friendly and not a burden to serve.

Thanks!
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Programmatically resolving version aliases like stable/console/switch into version numbers?

Post by Bilka »

You can get experimental and stable from https://factorio.com/api/latest-releases. Console should be the same as stable, but there is no guarantee that it is. I don't know of any place other than the steam branch that currently indicates the console version.
jeff.s wrote: Sat Dec 17, 2022 4:03 pm I'm looking to offer hosting for Switch players and would like to be able to automatically rebuild server images
Out of personal curiosity, how do you plan to deal with the fact that headless servers are not listed in the browse multiplayer game GUIs on switch?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
jeff.s
Inserter
Inserter
Posts: 22
Joined: Thu Jan 10, 2019 10:49 pm
Contact:

Re: Programmatically resolving version aliases like stable/console/switch into version numbers?

Post by jeff.s »

Thanks for that link, that's great to know about. Is it possible for that to list the console version too, or is the Switch side of the release process less automated (due to review policies / etc, no need to get detailed) and that tag is just manually updated on Steam?

If not, since updates are fairly infrequent these days, I imagine I can get away pretty well with monitoring logs for version mismatch errors and making it easy for players to tell me via a side channel as well.
Bilka wrote: Sat Dec 17, 2022 5:41 pm Out of personal curiosity, how do you plan to deal with the fact that headless servers are not listed in the browse multiplayer game GUIs on switch?
I'll give them a host/port to connect to directly, which I assume still works on the Switch. Not an ideal user experience but as long as they _can_ connect directly to a server it will work for what I'm trying to do.
Post Reply

Return to “Technical Help”