There are (quite) a few cases where openttd-start.sh does not find the graphics files even when OpenTTD finds them.

First of all OpenTTD also allows the fully uppercase version of the file names, i.e. data/SAMPLE.CAT data/TRG1R.GRF etc. In the case you copy the file from an old? Windows/DOS partition you might have capitalized file names.

Secondly OpenTTD allows the graphics from both the DOS and Windows versions of Transport Tycoon Deluxe. The script only looks for the Windows files. The DOS files do not have the middle R in the file name, i.e. if Windows it would be TRG1R.GRF it would be TRG1.GRF for DOS. Again both fully uppercase and fully lowercase file names are allowed.

The third thing, although related to the second, is that OpenTTD allows other base graphics sets that do not call their file names like the original Transport Tycoon Deluxe did. For this it searches for files with the extension ".obg". These files contain the meta data to tell where the files can be found. An example of this is OpenGFX, a project that replaces the copyrighted Transport Tycoon Deluxe graphics. However said project is not completed and as a result it shows many black boxes when playing the game. Eventually I would advice to bundle this, but not until they have completed their work, i.e. all graphics have been drawn.

The fourth thing is that OpenTTD supports reading within tar files, meaning that you can package the original Transport Tycoon Deluxe grahpics in a tar file and openttd-start.sh will not find it.

The fifth thing is that OpenTTD searches for the graphics files (and ".obg" files) in the following directories (described in readme.txt):
- the 'normal' data directory
  /usr/share/games/openttd/data
  /usr/share/games/openttd/content_download/data
- the home directory
  ~/.openttd/data
  ~/.openttd/content_download/data
- the current working directory
  `pwd`/data
  `pwd`/content_download/data
- the directory where the binary is
  `location of openttd binary`/data
  `location of openttd binary`/content_download/data
For the music files replace the "data" with "gm". For the ".obg" files it will look at all sub directories and tar files within those directories.

In my opinion openttd-start.sh should not complain about missing the graphics as long as OpenTTD is able to find one. You can (fairly) easily determine whether OpenTTD has found a suitable set of graphics by looking at the "List of graphics sets" returned by `openttd -h`. If there is at least one graphics set without missing files it is likely that the required graphics files have been installed, although one might still be missing "sample.cat". However, then one already found out how to install the graphics files but (s)he just forgot one file.

I think that eventually "sample.cat" and the "gm/" files will work in a similar manner as how the graphics system works, so you would eventually be able to detect using `openttd -h` whether required things are missing. On the other hand when/if OpenTTD gets fully free sound and music the problem basically goes away because one doesn't need to install the Transport Tycoon Deluxe graphics, sounds and music anymore.


I really like the idea of this script and it might be useful to add something like this, or at least the better notification that one is missing files, to the stock OpenTTD. However, that would need to be something that is more cross platform than this script is; it didn't even run on my Debian SID install because I didn't have ssft installed. The major problem in making this cross platform is finding a way to actually show the error message. The thing I could imagine were:
- use something qt-ish (KDE): not everyone has qt installed
- use something gtk-ish (Gnome): not everyone has gtk installed
- use SDL: means drawing glyphs yourself, thus forces compilation with
  freetype which again not everyone has installed (the more exotic SDL
  platforms)
- use x-terminal-emulator: again not something that is available on all
  platforms that support SDL
This basically makes it very difficult to actually show the error message in a cross-platform manner.

Or does one of you have a brilliant idea how to solve it?



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to