OpenTTD Savegame for dedicated Server

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
bimbam2103
Engineer
Engineer
Posts: 2
Joined: 11 Feb 2017 17:58

OpenTTD Savegame for dedicated Server

Post by bimbam2103 »

Hello everybody.

I have a little problem that took the entire day to fix. I have a dedicated Server with openttd running. Now i have the problem that everytime the machine reboots the server creates a new map. That's not really good because there are many people they want to play from where they are.

I also noticed the load method (-g) for the server but the autosave creates everytime new files like autosave0.sav autosave1.sav and so on.

Is there a possibility to set the server on a fixed savegame name like mysave.sav that i can load everytime the server will be started ?

I searched the entire internet and found only the manual load method for dynamic savegames. That is not what i want.

I have also a portal named OGP (OpenGamePanel). There i can also install openttd and get it running without problems. The only problem is as i said the savegame option.

Please help me. Thank you

Greetings

bimbam2103
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: OpenTTD Savegame for dedicated Server

Post by Sylf »

If you're on a Linux server, with bash shell, you can use a script like this to start openttd at boot time

Code: Select all

ls -t /home/openttd/.openttd/save/autosave/ | head -n1 | $(awk '{printf("openttd -g autosave/%s",$0);}')
ls -t lists files in a directory, sorted by last modified time
head -n1 prints the first word in the list
awk takes the output from the previous command, and formats a command line,
and $() executes the command formatted by awk.
bimbam2103
Engineer
Engineer
Posts: 2
Joined: 11 Feb 2017 17:58

Re: OpenTTD Savegame for dedicated Server

Post by bimbam2103 »

Thank you for your fast reply. I will test this.

For my OGP (OpenGamePanel) i do not have this setting. Is there no server switch or a config setting to set the savegame-name or anything else ?

I like OpenTTD really. It is really funny and in Multiplayer really really nice. But the fact that Serverproviders do have problems with a savegame is really hard for me.

I will test several methods and i will ask in OGP-Forum for poissibilities in OGP.

Thank you for your time

Greetings

bimbam2103
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 5 guests