Graphic file availability at start

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Graphic file availability at start

Post by Baldy's Boss »

I have put off upgrading OpenTTD for a while since the inflation availability dates got locked,but have started/shelved some games under older versions I hope I can work with without their being affected by this.

I recently upgraded my OS in a somewhat messy way,though I made backups of lots of data...after upgrading OpenTTD would coredump and crash instead of starting.

I finally upgraded OpenTTD to 12.2 and now it doesn't crash,it says that it is missing graphics files it needs and asks if I should download them or exit.
I am pretty sure I have whatever files it needs in backups even if I didn't put them where they're needed after the OS upgrade,so would rather not re-download.
What files trigger that message,so I can look for them and copy them where they're needed?
skc
Traffic Manager
Traffic Manager
Posts: 214
Joined: 17 Sep 2022 02:02

Re: Graphic file availability at start

Post by skc »

If you open a terminal or command prompt and run OpenTTD that way, you may get some error messages appear which will give you a good place to start.
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Re: Graphic file availability at start

Post by Baldy's Boss »

If I do it in the window manager I just get that window asking me to download graphics,if I do plain "openttd" at a command prompt instead of "xinit openttd" I get a bunch of characters surrounding text making various complaints.

I checked my backup's .openttd directory for my current .openttd directory for my account and found almost nothing (just save) in the current,and copied over the bulk of the other subdirectories (ai,content_download,baseset,newgrf,and more) and now the game launches,but if I ask it to load a game it now looks for a .local/share/openttd/save directory in my home directory rather than .openttd/save
(this is not the systemwide /usr/local/share directory).
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Graphic file availability at start

Post by Eddi »

the ~/.openttd directory is deprecated, and the newer xdg guidelines are used, if the directory isn't present on first startup.
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Re: Graphic file availability at start

Post by Baldy's Boss »

Eddi wrote: 12 Dec 2022 08:36 the ~/.openttd directory is deprecated, and the newer xdg guidelines are used, if the directory isn't present on first startup.
My home directory had the .openttd directory in it before I upgraded so why does v12 think my savegames would be elsewhere?
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Graphic file availability at start

Post by Eddi »

maybe the openttd.cfg file was missing. you mentioned your copy was incomplete
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Re: Graphic file availability at start

Post by Baldy's Boss »

Eddi wrote: 13 Dec 2022 15:00 maybe the openttd.cfg file was missing. you mentioned your copy was incomplete
Well,it's there now.
(I don't see a directory-selection section?)
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Graphic file availability at start

Post by Eddi »

check this out:

Code: Select all

> ./openttd -d misc=3
dbg: [misc] /home/johannes/.openttd/ found as config directory
dbg: [misc] /home/johannes/.openttd/ found as personal directory
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Re: Graphic file availability at start

Post by Baldy's Boss »

What I get in response to that is

bash: .openttd: Is a directory

or

bash: ./openttd: Is a directory

depending on whether I put the / in in the > line.

The openttd.cfg starts with a [misc] section that starts with display_opt and ends with video_vsync with no directory related content.
skc
Traffic Manager
Traffic Manager
Posts: 214
Joined: 17 Sep 2022 02:02

Re: Graphic file availability at start

Post by skc »

Baldy's Boss wrote: 15 Dec 2022 01:56 What I get in response to that is

bash: .openttd: Is a directory

or

bash: ./openttd: Is a directory

depending on whether I put the / in in the > line.

The openttd.cfg starts with a [misc] section that starts with display_opt and ends with video_vsync with no directory related content.
What Eddi's done, is he's cd'd to the directory where the openttd executable is.
If you've got openttd correctly installed and the directory it's located in is contained in the PATH environment variable, you should be able to run it by omitting the '.' and the '/'. I.e.

Code: Select all

openttd -d misc=3
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Re: Graphic file availability at start

Post by Baldy's Boss »

The executable in the path is in /usr/local/bin,I believe, as opposed to anything under my personal home directory.
Any user on the system (there are few) should be able to launch it and have a personal .openttd directory...not share all savegames.
User avatar
jfs
Tycoon
Tycoon
Posts: 1867
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Graphic file availability at start

Post by jfs »

If you move your ~/.local/share/openttd/openttd.cfg file to ~/.openttd/openttd.cfg then the game should start looking in ~/.openttd/ for its settings and data.
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Re: Graphic file availability at start

Post by Baldy's Boss »

There's an openttd.cfg in .openttd already,
the .local/share/openttd directory does not have an openttd.cfg in it.
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Re: Graphic file availability at start

Post by Baldy's Boss »

I don't think I've resolved this,I have scarcely played since,and my system wants to upgrade me from 13.0_2 to 13.4 at the next opportunity...but I noticed another broken config issue,although I'm sure there must be revisions of many things since I last updated,"Check online content" does nothing now.
Is there a new place to look for that that my game doesn't know?
User avatar
jfs
Tycoon
Tycoon
Posts: 1867
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Graphic file availability at start

Post by jfs »

Try opening the in-game console and enter the command:

Code: Select all

list_dirs newgrf
It should then show you all the paths the game will look for NewGRF files in, with the current game configuration.

(There are also several other categories of dirs you can get that command to list.)
Baldy's Boss
Tycoon
Tycoon
Posts: 1397
Joined: 23 Feb 2014 22:02

Re: Graphic file availability at start

Post by Baldy's Boss »

OK,now I have upgraded my OS again (fairly smoothly though the window manager took a while to settle,and its issues appear to linger with openttd,see below)...my installed version of OpenTTD has gone up to 14.1 and I see that the /usr/local/share directory now includes an openttd directory including subdirectories ai,baseset,game,lang,and scripts.
my own home directory where I'm used to having things has an openttd directory including ai,baseset,and game,but not lang or scripts,AND newgrf,save,scenario,and screenshot directories as well as a content_download,some personally created stuff,an hs.dat file,and .cfg files for hotkeys,openttd,private,secrets,and windows.

When I try "xinit openttd" (my preferred option is to launch the game from a prompt as fullscreen) I am now hijacked into my window manager (now Xfce4,and I normally start it with startx) with its remembered windows.If I try to launch OpenTTD from a terminal window prompt I get a message saying it needs graphics to run and can't find them and asks to download and install them.
I do have lots of stuff (both baseset and NewGRF) so how do I tell the program where to find them?
markzl
Engineer
Engineer
Posts: 35
Joined: 20 Jan 2009 01:58

Re: Graphic file availability at start

Post by markzl »

Since you've been trying to fix this over several years, I'll post what I did when I had this very similar situation...

When I had problems switching between linux & windows versions I would search for all openttd folders & rename them to openttd22 (by this I mean that I would regularly multi-boot between several OS's) --> i would then unzip openttd (NOT "install"), but I would copy over the graphics & sound files from the renamed openttd22 folders as i wanted to be sure that the files were not corrupt --> run the game, save a game (with a name easily searched) AND download a random file VIA the "Online Content" button --> I would then search for both the download & save file name

This gave me a starting base to see if it was worth using "shared folders" or to keep all versions separate (I forgot to mention that I would use several Openttd versions: either official & not) ... also, this info was in the readme files back in the day & may work as a guide: https://andythenorth.github.io/OpenTTD/ ... cture.html (I don't know why they still call it a "readme" file if there is nothing there that requires reading as there is no help there)
markzl
Engineer
Engineer
Posts: 35
Joined: 20 Jan 2009 01:58

Re: Graphic file availability at start

Post by markzl »

Again, the info back in the day was super: https://web.archive.org/web/20090525065 ... ding_Tools
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 4 guests