GRFIO, a MATLAB library which reads or writes a GRF file containing information about an abstract graph. The file includes information about adjacency, that is, which nodes are connected to a given node;; embedding, that is, how to place each node in the unit square so that a drawing of the graph is visually pleasing and 'readable'. GRF file extension is used by operating systems to recognize files with content of type GRF. Here is some information which will get you started. How to Open GRF file. To see if you have an application which support GRF file format you need to double click on the file. This will either open it with matching application or Windows will suggest. 1) Download all 8 files: data.grf parts 1-4, rdata.grf parts 1-2, BGM.zip and the dll exe pack which also contain the RSU patchers. The data.grf and rdata.grf is also available in one file below. 2) After you got all the files, put them in one folder and extract all the.zip files (normally at C:Program FilesGravityRO).
GRF is a data directory which contains examples of GRF files. GRF files are used to store an embedding of an abstract graph. The abstract graph comprises a set of nodes, and edges that connect some pairs of nodes. The embedding assigns a position to each node, and draws edges as straight lines between the nodes.
The original format derives from the SPREMB package developed at the University of Queensland, Australia.
There are three variations on the file format. For all the formats, lines beginning with the '#' character are comment lines (this is a modification I added, but it's easy to strip such lines out if you don't want them.) We assume that the nodes of the graph are numbered, with a typical node numbered I. Information about node I is stored on the I-th noncomment line of the file. (It is not actually necessary that the I-th node be listed on the I-th noncomment line, but it is customary.) Edges of the graph that begin at node I will be described by listing the nodes at the terminal end of the edge. Thus, if there are edges from node I to nodes J(1), J(2), .., J(K), then these nodes will be listed.
The I-th noncomment line of the file is where X(I) and Y(I) are the coordinates of a point used to represent the node in a drawing. All point coordinates should be between 0 and 1.
Licensing:
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
Related Data and Programs:
GRAFFITI, a dataset directory which contains 195 abstract graphs, with adjacency and embedding information, stored in the GRF format.
GRAPH_REPRESENTATION, a data directory which contains examples of ways of representing abstract mathematical graphs
GRF_DISPLAY, a MATLAB program which reads a GRF file defining a mathematical graph and displays it in the MATLAB graphics window.
GRF_DISPLAY_OPENGL, a C++ program which reads a GRF file defining a mathematical graph and displays it in an OpenGL graphics window.
GRF_IO, a C++ library which reads or writes a GRF file;
GRF_IO, a FORTRAN90 library which reads or writes a GRF file;
GRF_IO, a MATLAB library which reads or writes a GRF file;
GRF_TO_EPS, a FORTRAN90 program which converts a GRF file to EPS format;
GRF_TO_XYL, a FORTRAN90 program which converts information describing the adjacency and embedding of an abstract graph from GRF to XYL format.
Reference:
- Peter Eades, Ian Fogg, David Kelly,
SPREMB: A System for Developing Graph Algorithms,
Congressus Numerantium,
Volume 66, December 1988, pages 123-140. - Stephen Skiena,
Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica,
Addison Wesley, 1990,
ISBN: 0201509431,
LC: QA164.S56.
Sample files:
- coxeter.grf, the Coxeter graph;
- coxeter.png, a PNG image.
- cyclegroup.grf, the cycle group graph;
- cyclegroup.png, a PNG image.
- dodecahedron.grf, the dodecahedron graph;
- dodecahedron.png, a PNG image.
- folkman.grf, the Folkman graph;
- folkman.png, a PNG image.
- franklin.grf, the Franklin graph;
- franklin.png, a PNG image.
- frucht.grf, the Frucht graph;
- frucht.png, a PNG image.
- grotztsch.grf, the Grotztsch graph;
- grotztsch.png, a PNG image.
- heawood.grf, the Heawood graph;
- heawood.png, a PNG image.
- herschel.grf, the Herschel graph;
- herschel.png, a PNG image.
- icosahedron.grf, the icosahedron graph;
- icosahedron.png, a PNG image.
- k5.grf, the complete graph on 5 vertices;
- k5.png, a PNG image.
- knightstour.grf, image of a knight's tour on a chess board;
- knightstour.png, a PNG image.
- n1234.grf, the n1234 graph;
- n1234.png, a PNG image.
- n5.grf, the n5 graph;
- n5.png, a PNG image.
- nomatching.grf, the nomatching graph;
- nomatching.png, a PNG image.
- nonlinegraphs.grf, the nonlinegraphs graph;
- nonlinegraphs.png, a PNG image.
- petersen.grf, the Petersen graph, which is not Hamiltonian;
- petersen.png, a PNG image.
- tutte.grf, the Tutte graph;
- tutte.png, a PNG image.
- unique3colorable.grf, the unique3colorable graph;
- unique3colorable.png, a PNG image.
- walther.grf, the Walther graph;
- walther.png, a PNG image.
You can go up one level to the DATA page.
Last revised on 19 January 2011. FR
PL
Base graphics are a set of graphic files that OpenTTD requires to be a game.
|
Available base graphics sets
There are two types of base graphics sets: the TTD base graphics and alternative base graphics sets. Ever since OpenTTD was created, it used Transport Tycoon's graphics. Since svn r14197 the game has the ability to load base graphics sets other than the ones from TTD. The first stable release with this ability is OpenTTD 0.7.0.
TTD base graphics
The TTD base graphics set refer to the original graphics of Transport Tycoon Deluxe and comes in two flavours: the Windows and the DOS version. The Windows version obviously originates from the Windows version of TTD; the DOS version from the DOS version of TTD. It doesn't matter which operating system you're running, both versions will work regardless of their names: the TTD DOS base graphics work on a Windows system just as well as the TTD Windows base graphics work on a Mac or Linux.
original_windows
The Original Transport Tycoon Deluxe Windows edition base graphics set consists out of the following files:
- trg1r.grf
- trgcr.grf
- trghr.grf
- trgir.grf
- trgtr.grf
- openttdw.grf (distributed with OpenTTD)
- orig_win.obg (distributed with OpenTTD)
original_dos
The Original Transport Tycoon Deluxe DOS edition base graphics set consists out of the following files:
- trg1.grf
- trgc.grf
- trgh.grf
- trgi.grf
- trgt.grf
- openttdd.grf (distributed with OpenTTD)
- orig_dos.obg (distributed with OpenTTD)
Trivia: The toyland grf file (trgt.grf) of the German TTD DOS CD contains one broken sprite. Therefore an extra obg-file (orig_dos_de.obg) is distributed with OpenTTD.
Alternative base graphics
As of August 31st 2008, OpenTTD can load base graphics sets other than the ones from TTD.
List of alternative base graphics
Currently, there are two alternative base graphics sets.
Installing a base graphics set
Alternative base graphics sets are usually distributed as tar files. The only thing you have to do to install a base graphics set is to place it in the OpenTTD /data directory. Your OpenTTD data directory is either located in:
- An OpenTTD folder in your user account's home directory
- The OpenTTD installation directory.
TTD base graphics sets are not tarred. If you have one flavour of TTD base graphics set installed, there's absolutely no point in installing the other flavour of TTD base graphics set, as they will look the same.If you haven't installed a TTD base graphics set while installing OpenTTD and you want to install it afterwards, just copy the files listed above (the ones that are not distributed with OpenTTD that is) to the OpenTTD /data directory.
Switching between base graphics sets
Only one base graphics set can be active at any time. If you have multiple base graphics sets installed, there are several ways to switch between them.
Ingame selection
One way to switch between base graphics sets is using the ingame feature.
- In the main menu of the game, click the Game Options button. The Game Options dialog will appear.
- Select the preferred base graphics set from the drop-down list below Base graphics set (in the middle of the window).
- Close the window using the × in the upper left corner to activate your selection.
Editing the config file
Another way to switch between base graphics sets is to edit the config file.
- Locate and open openttd.cfg using your favourite plain text editor.
- Locate the [misc] section and add the following (or edit the existing) line to the end of that section:
- The name of the base graphics set is listed in it's obg-file and may or may not be identical to the obg's file name.
- Save the changes you made and run OpenTTD.
Grf File Has Problem Ragnarok
Starting OpenTTD from the command line
The third way to select a certain base graphics set is starting the game from the commandline, adding a parameter option.
- The name of the base graphics set is listed in it's obg-file and may or may not be identical to the obg's file name.
Grf File Converter
Creating a base graphics set
Apart from the actual drawing and aligning of sprites, creating a base graphics set that can be used by OpenTTD is fairly easy. A base graphics set consist of the following files:
- Exactly 6 .grf files;
- Exactly 1 .obg file.
It's useful to pack all files of a base graphics set as a tar file. This keeps all files from one base graphics set neatly together. OpenTTD can read tar files, so there's no need for the user to extract it.
The .grf files
- Five of the six .grf files have exactly the same format as the five .grf files from the original TTD cd, having exactly as many sprites as the TTD .grf files in exactly the same order and cannot contain any NewGRF actions.
- One .grf file has the same format as openttd[w|d].grf containing all NewGRF Action 5s. This file can also contain some other NewGRF actions, as long as they are static and do not change game properties (1, 5, 6, 7, 8, 9, A, C, 10, 12, possibly some static features from 0 and 2). This file has to have a GRF ID which starts with FF 'OT'. The fourth letter may be freely chosen. 'D' and 'W' are taken by openttdw.grf and openttdd.grf respectively, 01 is taken by OpenGFX.
Grf File Viewer
The .obg file
The .obg file is what links all .grf files together and is essentially the base of a base graphics set. The .obg file is a plain text file and has the following format (example taken from orig_win.obg):
[metadata]
- name: The name of the base graphics set as it will be displayed ingame.
- shortname: A unique four character string, similar to the GRFID in NewGRFs.
- version: An integer value indicating the version of the base graphics set. If two sets with the same shortname are available, this interger indicated the newer version.
- description: A short description of your base graphics set.
- palette: The colour palette used for the .grf files. Can be either Windows or DOS.
[files]
A list of the six different grf file features together with the file names of the six .grf files in the base graphics set.
[md5s]
A list of the exact same filenames as per [files] together with their MD5 hashes.
[origin]
Grf Files
A list of the exact same filenames as per [files] together with an error message text that is shown if one of the .grf files from the base graphics set is missing or corrupted. You can only specify default if you want the error text to be the same for all files, and/or list each file with a specific error text.
Grf Editor Download
Retrieved from 'https://wiki.openttd.org/?title=Base_graphics&oldid=96987'