Easiest way to update while keeping Preferences?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
DesertBus
Engineer
Engineer
Posts: 17
Joined: 03 Jul 2018 03:33

Easiest way to update while keeping Preferences?

Post by DesertBus »

How do you guys usually update? Do you set up all the preferences back again from scratch? Or do you copy the config file text? Is there a hassle-free way of keeping my preferences? (text size, individual window default sizes, game options, downloaded AI, etc)
I would use the Windows version under Wine but it doesn't work for me. So at the moment I'm stuck with the regular Linux version.
"Watch that s***, cowboy"
User avatar
kamnet
Moderator
Moderator
Posts: 8588
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Easiest way to update while keeping Preferences?

Post by kamnet »

IIRC even on Linux the config files are kept in a shared directory. You should be able to install each version of OpenTTD in different directories and as long as they can access the shared directory, your config files will keep in-tact.

If not, it's just a couple of .cfg files to copy over.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Easiest way to update while keeping Preferences?

Post by planetmaker »

DesertBus wrote: 24 Nov 2019 23:36 How do you guys usually update? Do you set up all the preferences back again from scratch? Or do you copy the config file text? Is there a hassle-free way of keeping my preferences? (text size, individual window default sizes, game options, downloaded AI, etc)
I would use the Windows version under Wine but it doesn't work for me. So at the moment I'm stuck with the regular Linux version.
Config files are not overwritten on update. They reside in your own personal home directory which OpenTTD does not write new files to except savegames and those which you download via ingame content download.

Checkout https://github.com/OpenTTD/OpenTTD/blob ... ructure.md

On my linux .openttd has the config file which originated from a decade ago. Starting a newer version of OpenTTD it will read it, and add the settings with a default which newer versions have, but old ones didn't - but only those and it will keep the settings as-is which were already there before. It will write-back the config file with all changes you made in the start screen settings during your OpenTTD session
User avatar
DesertBus
Engineer
Engineer
Posts: 17
Joined: 03 Jul 2018 03:33

Re: Easiest way to update while keeping Preferences?

Post by DesertBus »

In the past (if I recall correcly) I was able to find a Tarball with the game files all contained in a single directory (not a DEB package)

This time around, I couldn't find it so I downloaded the DEB package and extracted it manually. Then, I ran the game the first time. Closed it without doing anything. (so it creates the initial config file) Then, moved all files from /home/myname/.openttd to the game's directory (where the executable is) In the end, I have a "portable" game once again. Now for the final step I will try migrating all my AI and Game Scripts without having to re-download them again. (and keep their settings too)

I always let the game create a brand new fresh Config file in case there's some new variables that didn't exist in older versions.
It was quicker to do all this than I was anticipating, but I remember all this process to a beginner being kind of a nightmare when I first did it.

I think it would be much better to offer a "portable" option in the site, with all the game files contained in the same directory (not installed to the system inside of /usr/share/games) But then every "portable" version would have to be tailored for each specific system? I can see that becoming a problem in itself. I'm glad the executable can recognize the game files in its directory like that, shows great level of care.
"Watch that s***, cowboy"
User avatar
odisseus
Director
Director
Posts: 568
Joined: 01 Nov 2017 21:19

Re: Easiest way to update while keeping Preferences?

Post by odisseus »

Over the last few years I have used several distributions of Linux, and I never ran into configuration problems. The settings, GRFs etc. always survived the upgrades.

If you want to be absolutely certain your settings are safe from accidents, create a backup and store it somewhere else, but IMO that's a huge overkill.

From what I gather, you try to perform the upgrades manually, with manual merging of the config file. Why don't you just let the package manager do its job?
User avatar
DesertBus
Engineer
Engineer
Posts: 17
Joined: 03 Jul 2018 03:33

Re: Easiest way to update while keeping Preferences?

Post by DesertBus »

Well, I should have phrased it better, a bit confusing on my part I will admit, my main focus was really keeping a "portable" install of OpenTTD (the whole app contained within a single directory)
But I'm glad to know now, thanks to you guys, that the updated game will recognize my "config" and my "windows.cfg" files between versions without problems, so I don't have to manually re-set all my preferences next time.
"Watch that s***, cowboy"
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 37 guests