Copyright (C) 2000-2012 |
GNU Info (heroes.info)heroesrc`~/.heroes/heroesrc' ==================== Each time you start heroes, it tries to read the system-wide configuration file `heroesrc' (in the `$datadir/heroes/etc/' directory) and from the `~/.heroes/heroesrc' in your home directory. `option:' --------- You can specify options in that file, they will be processed before any options given on the command line. Put the word `Options:' in front of a line, and write the options after (separated by spaces, as on the command line, except that there is no quoting or variable substitution). For example, if you want that Heroes always skip the introduction, and swap the player sides, add the following line to your `~/.heroes/heroesrc': Options: -g -s Multiple `Options:' lines can be given, they are processed in order. `setenv:' --------- You can also have line starting with `setenv:', followed by a variable name and a value (the rest of the line, after the variable name is taken as the value). This will setup the corresponding environment variable. This provide a way to configure the used libraries. For example, to instruct SDL to use its DGA driver, use the following line: setenv: SDL_VIDEODRIVER dga This may seam redundant with `--gfx-options' and `--driver' but can be used to configure other libraries. For example, setup GGI or SDL to use AAlib (the ASCII art rendering library) and configure AAlib via its `AAOPTS' variable. `extradir:' ----------- Lines starting with `extradir:' are used to specify additional extra levels directories. `soundconf:' ------------ The `soundconf:' lines are used to introduce configuration files defining the sound tracks played by the game. The format of such files is as follow: ALIAS:FILENAME:TITLE:AUTHOR ... Where `ALIAS' is the name of the sound track used internally by Heroes, `FILENAME' is the filename of the sound track you want to be loaded, `TITLE' is the title of the sound track, and `AUTHOR' is the person who tracked that music. You may give several definitions for the same alias, in which case only the latest will be used (and of course your configuration file is read after heroes has setup its default aliases so you can overwrite them). Presently the set of used aliases include `INTRO',`MENU',`HEROES01',`HEROES02',...,`HEROES10', and `ENDSCROLL'. You can overwrite them, but you can also define your own aliases: they will be available in the jukebox menu. To give one full example, imagine you want to hear `/music/2nd-reality.s3m' when you are playing Heroes in the second world (desert and pyramids). What you do is this % cd ~/.heroes % echo "HEROES02:/music/2nd-reality.s3m:\ Second Reality:Purple Motion" > mymod % echo "soundconf: /home/adl/.heroes/mymod" >> heroesrc In this example, the configuration file has been put in the `~/.heroes' directory but you can put it anywhere provided the filename given after `soundconf:' points to it. All that sound configuration stuff should allow you to make drop-in replacement for heroes modules. You just make a set of modules available with a configuration file that any user can get read from its `~/.heroes/heroesrc'. You can run `heroes --list=sound-tracks' to print the list of sound-tracks used by heroes, and hence verify the correctness of your configuration. `setrsc:' --------- This follow the same format as `setenv' but is used to overwrite some filenames used by the game. Heroes internally handles file or directory names using name aliases called file resources whose values (actual filenames) can be overwritten by `setrsc' and are subject to variable expansion. The command `heroes --list=resources' will list all the resources used by the game. `data-dir' is a special resource which content is setup from the `HEROES_DATA_DIR' environment variable, or from the path used to install the files when the game was built. `home-dir' is initialized from the `HOME' environment variable. An example of `setrsc:' usage is to run the game with an alternate picture file. Say you are working on a modified version of the main font used in the game, you can override the installed picture by yours with the following line. setrsc: main-font /home/adl/heroes-dev/tmp/fontem.pcx `keepsgid:' and `keepsuid:' --------------------------- By default, if Heroes has a sgid-bit or suid-bit, it will drop all privileges once the score and saved games are open. This happens before the user configuration is read, and therefore before the display and sound are initialized. Sometime you do not want these privileges to be dropped because your setup requires them. For instance your display driver might require read/write access to /dev/mem, or a similar requirement may exist for the sound library). `keepsgid: yes' and `keepsuid: yes' can be used to instruct Heroes to keep the s-bit privileges for its whole life. These commands can only be used in the system-wide configuration file. automatically generated by info2www version 1.2.2.9 |