原文: https://github.com/crawl/crawl/blob/master/crawl-ref/docs/options_guide.txt

* 0- 設定一般 [#za07925c]
// * 0-  Generalities on options.

** 0-a 標準または追加の設定ファイル [#oa75b8cf]
// ** 0-a     Standard and additional option files.
Dungeon Crawl Stone Stop(以下DCSS)は下記のうち最初に見つかったファイルを設定ファイルとして取り扱う。
- setting/init.txt
- init.txt(DCSS実行ファイルと同一ディレクトリ)
- .crawlrc(Unixホームディレクトリ内)

 -rc <file>
スタート画面において、どの設定ファイルが読み込まれたか表示される。((訳注: スタンドアロン版の場合。))

// Crawl uses the first file of the following list as its option file:
// * settings/init.txt
// * init.txt (in the Crawl directory)
// * .crawlrc (in the Unix home directory)
// Alternatively, you can use the command line option
//     -rc <file>
// which tells Crawl to use precisely that file.
// On the starting screen, Crawl tells you which init file it uses, if any.


 include = <file>

Note that these are treated as if their content was entered verbatim in the options file. ~
初期状態では、DCSSプログラムは追加読み込みするファイルを settings/ ディレクトリから検索するが、以下のように特定のディレクトリをコマンドラインオプションで指定することもできる。

 -rcdir <dir>

// It is possible to include additional files within the options file via
//     include = <file>
// Note that these are treated as if their content was entered verbatim
// in the options file. By default, Crawl searches for all these included
// files in the settings/ directory but you can specify a special folder
// using the command line option
//     -rcdir <dir>

また、settings/ ディレクトリに含まれる追加の設定ファイルを用いて古いバージョンのモンスター文字を初期設定として指定することもできる。~

// External option files have several uses: They allow quick customisation
// of Crawl's general appearance (colouring/suppression of messages, and
// the inventory style). More elaborate option magic (usually containing
// lua) can also be conveniently hidden this way. Finally, there are some
// additional option files in the settings/ directory; these allow setting
// some options and monster glyphs to their defaults from older versions.
// See the header of the default init.txt for more details.

** 0-b コマンドラインからのオプション指定 [#ac9cd63e]
// ** 0-b     Options on the command line.

ちょっとした設定変更を設定ファイルの切り替えなしに行う簡単な方法はコマンドラインオプション -extra-opt-first および -extra-opt-lastである。~

     -extra-opt-last wiz_mode=yes

~-extra-opt-first および -extra-opt-lastは同一コマンドラインにおいて複数回指定することができる。

// A quick way to make small changes to the options, without having to
// switch to a different option file, is to use the command line options
// -extra-opt-first or -extra-opt-last, which make it as if the given
// option was (respectively) at the top or bottom of the option file. For
// example,
//     -extra-opt-last wiz_mode=yes
// will cause any new game to start in wizard mode. -extra-opt-first and
// -extra-opt-last can be used multiple times on the same command line.

** 0-c オプションの設定のしかた [#qf4e1786]
// ** 0-c     Options and how to set them.


- true / false (真偽値)
- 任意の文字列指定
- 設定値のリスト


// There are three broad types of Crawl options: true/false values
// (booleans), arbitrary values, and lists of values. In this document,
// options are usually described with their default values (if there is a
// default); this should also explain which of the above-mentioned types
// it is. Each option should have some remarks on how it's typically used
// - but keep in mind that the options you want to use depend on your
// playing style and sometimes also on your operating system.


     remember_name  = true
     explore_greedy = false
     confirm_butcher= never

     OPTION = remember_name, !explore_greedy, confirm_butcher:never

後者は簡単な設定を少ない行で書くのに向いているが、リスト値を対象に取る設定(例: autopickup_exception)に対して使うことはできない。

// There are two styles you can use to set options. The classic
// name=value syntax, one option per-line:
//     remember_name  = true
//     explore_greedy = false
//     confirm_butcher= never
// And the NetHack-style combined option line:
//     OPTION = remember_name, !explore_greedy, confirm_butcher:never
// The second style is useful to specify simple options in a few lines,
// but it cannot be used for options that take complex lists of values
// (such as the autopickup_exceptions option).

また、別のオプションは正規表現を引数に取れる。here you can simply use ordinary strings, adapt the suggested regexes to your needs or search the internet for regex syntax.

// Some options need a path as an argument; here you have to use a
// filesystem path suitable for your system. Other options accept regular
// expressions (regexes): here you can simply use ordinary strings, adapt
// the suggested regexes to your needs or search the internet for regex
// syntax.

This concerns the following options, and their enforced setting for tutorial games are as follows:~
    clear_messages      = true
    weapon              = hand axe, for Berserkers in hints mode
    tile_tag_pref       = tutorial

// Note that in the tutorial and hints modes, some of your options settings may
// get overwritten to facilitate the explanations. This concerns the following
// options, and their enforced setting for tutorial games are as follows:
//    clear_messages      = true
//    weapon              = hand axe, for Berserkers in hints mode
// and, for Tiles,
//    tile_tag_pref       = tutorial

** 0-d 設定のリスト [#b58bde38]
// ** 0-d     List options.


         drop_filter += useless, enchant
         drop_filter ^= fobidden
         drop_filter -= enchant
         drop_filter = bad_item, dangerous_item
         drop_filter =

// A number of options can have a list of values. Most but not all of these
// options allow setting multiple values in a single line, separated by commas.
// It is possible to reset, add items to, or remove items from such an option.
//    Add values to the end of the list (append):
//       drop_filter += useless, enchant
//    Add values to the beginning of the list (prepend):
//       drop_filter ^= forbidden
//    Remove values from the list (exact match only):
//       drop_filter -= enchant
//    Reset the list:
//       drop_filter = bad_item, dangerous_item
//    Empty the list:
//       drop_filter =

"listopt = value" 文はまずリストを空にし、値を追加する。In previous versions of Crawl it was a synonym for +=, and only bare "listopt =" cleared the list.

// The "listopt = value" syntax first clears the list, then adds values. In
// previous versions of Crawl it was a synonym for +=, and only bare
// "listopt =" cleared the list.

drop_filterを初めとして、実際のところ前追加(prepend)と後追加(append)に違いがないオプションが多い。しかし、message_colourのように値の並びが意味を持つオプションもあり、これらは解説文に「順序付きリストオプション(Ordered list options)」と書かれている。~
多くの場合、頭の方の設定値が後のものより優先されるため、+= は既存値の方を優先するのに対し、^= はそれらを上書きする。.~

    message_colour  = cyan:hits
    message_colour ^= red:crimson
    message_colour += yellow:killer

"The crimson imp hits you!" というメッセージは赤く表示されるが、"The killer bee hits you!" というメッセージは水色(cyan)で表示される。

// For many options, such as drop_filter, there is effectively no difference
// between appending and prepending. However, other options, such as
// message_colour, do care about the order of items; these will be noted as
// "Ordered list options" in their descriptions. In most cases, earlier items
// take precedence over later ones, so += defers to existing matches (including
// defaults) while ^= overrides them. So, for example, with the sequence of
// options:
//    message_colour  = cyan:hits
//    message_colour ^= red:crimson
//    message_colour += yellow:killer
// the message "The crimson imp hits you!" will be displayed in red, while "The
// killer bee hits you!" will be displayed in cyan.

** 0-e 別名と変数 [#rc852b1f]
// ** 0-e     Aliases and variables.

// ** 0-e     Aliases and variables.


     alias := long_option_name


     ae := autopickup_exceptions

以後は "ae" を "autopickup_exceptions" の代わりにして用いることができる。

     ae += >uselessness, >inaccuracy

// For long option names, you can define option aliases by doing:
//     alias := long_option_name
// For instance, you can use:
//     ae := autopickup_exceptions
// and thereafter use "ae" instead of "autopickup_exceptions":
//     ae += >uselessness, >inaccuracy


     $useless := darkgrey
     menu_colour += $useless:random uselessness

// You can define shortcuts for option values (variables). For example,
//     $useless := darkgrey
// could be used in conjunction with
//     menu_colour += $useless:random uselessness


     constant = useless


// To prevent a variable from being changed you can make it a constant:
//     constant = useless
// This is useful if you wish to prevent an included file from altering
// a variable.

別名と変数値の使用の実例として[[dat/defaults/standard_colours.txt>https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/defaults/standard_colours.txt]] および [[dat/defaults/food_colouring.txt>https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/defaults/food_colouring.txt]]が参考になる。~

// See dat/defaults/standard_colours.txt and dat/defaults/food_colouring.txt
// for usage of aliases and variables. Note that changing the variables defined
// in these files will only affect your own configuration file, as the default
// options will have already been loaded. If you want to change them, you will
// have to override the options themselves.

* 1- 起動オプション [#df68a67b]
// * 1-  Starting Screen.

// The following options are a convenience to help you quickly start your game of Crawl.

- name = Delilah ~
//        If set, that's the name all your Crawl characters will get.

- remember_name = true ~
//         Crawl remembers the options (species, background etc.) you used
//         to create your last character. You may recycle them in the
//         starting screen for a new character. If this option is set to
//         true, Crawl will also remember the last name you used.
//         If you use this option and want to enter a name _after_
//         choosing your species and background, you must enter . at the
//         initial name prompt - hitting Enter at the name prompt will
//         simply reuse your old name if remember_name is set.

- weapon += (short sword |...| unarmed | random | viable), <weapon>, ... ~
//         (List option)
//         Specifying the weapon option allows you to bypass the weapon
//         selection screen. Tridents, flails, cutlasses, long swords, and war
//         axes are restricted to fighters and gladiators only, quarterstaves
//         are restricted to gladiators, and unarmed is restricted to races
//         with claws. The standard weapon prompt will be shown if an illegal
//         choice for the selected background is specified. The "viable" option
//         makes a random choice from among the "good" weapons for the chosen
//         character. Specifying more than one option causes the game to
//         randomly select a weapon from the given list. The combo option
//         overrides (and is overriden by) this option.

- species += (Human |...| Vampire | random | viable), <species>, ... ~
//         (List option)
//         The usual abbreviations (Hu, HE, etc.) work. "viable" will choose a
//         viable species for a given background if the background is chosen
//         first. Specifying multiple species causes one to be selected at
//         random from the given species. The combo option overrides (and is
//         overridden by) this option.

- background += (Fighter |...| Wanderer | random | viable), <background>, ... ~
//         (List option)
//         Here again the abbreviations (Fi, Wz, AK, etc.) can be used. The same
//         caveat applies to "viable": it is only really meaningful if the
//         species option is also set. Specifying multiple backgrounds causes
//         one to be selected at random from the given species. The combo option
//         overrides (and is overridden by) this option.

- combo += (HuFi . short sword | Human Monk | ...), <combo>, ... ~
//         (List option)
//         Specifies a complete set of species, background, and (where
//         applicable) weapon. If a combo requires a weapon choice and one isn't
//         specified, it is prompted for. Combos may be abbreviated or specified
//         in full. If multiple combos are specified, one is selected randomly
//         from the specified combos. The weapon, species, and background
//         options are overriden by (and override) this option.

- random_pick = false ~
//         The random_pick option will randomly generate a character.
//         The above options (weapons and species/background options) will
//         override where appropriate.

- good_random = true ~
//         Whenever random_pick is used, species or background are set
//         random, or a remembered random choice is executed in the character
//         selection, the game will only pick good (viable) combinations.

- restart_after_game = true/false ~
//         When a game ends, Crawl will return to the main menu if
//         restart_after_game is set. This option is enabled by default
//         for tiles builds and disabled by default for other builds.

- restart_after_save = false ~
//         When the game is saved, return to the main menu. This option
//         has no effect unless restart_after_game is also enabled.

- default_manual_training = false ~
//         When set to true, new characters will start with skill training
//         set to manual mode instead of automatic mode.

- autopickup_starting_ammo = true ~
//         When set, at game start, autopickup is forced on (as per the \
//         menu) for the player's starting ammunition type (including stones
//         for Earth Elementalists and arrows for Transmuters). Even when this
//         option is set, autopickup of those items can be disabled from the
//         \ menu once the game has begun.

* 2- ディレクトリ設定 [#nd8e1ef7]
// * 2-  File System.

- crawl_dir = <path> ~
//         The path used for the relative paths when looking for other
//         files. Defaults to the directory that contains the Crawl
//         executable.

- morgue_dir = morgue ~
//         Directory where morgue dumps files (morgue*.txt and
//         morgue*.lst) as well as character dumps files are written.

- save_dir = saves ~
セーブファイルおよびboneファイルが保存されるディレクトリである。この設定はコンパイル時の設定により無視されるかもしれないが、should be honoured for the official Crawl binaries.
//         Directory where saves and bones are stored. This option may be
//         ignored depending on the settings used to compile Crawl, but
//         should be honoured for the official Crawl binaries.

- macro_dir = settings/ ~
//         Directory for reading macro.txt.
//         For tile games, wininit.txt will also be stored here.
//         It should end with the path delimiter.

- sound ^= <regex>:<path to sound file>, <regex>:<path>, ... ~
指定した正規表現がマッチするメッセージが表示された際に音声ファイルを再生する。正規表現パターンにカンマ ',' およびコロン ':' を含んではならない。例えば:

     sound += LOW HITPOINT WARNING:sound\sounds2\danger3.wav

//         (Ordered list option)
//         Plays the sound file if a message contains regex. The regex
//         should not include commas or colons. For example
//              sound += LOW HITPOINT WARNING:sound\sounds2\danger3.wav

* 3- ゲームインターフェイス [#o1a98ecf]
// * 3-  Interface.

** 3-a 自動拾い [#dfec6cb3]
// ** 3-a     Picking up and Dropping.
- autopickup = $?!+"/%
$?!+"/% がデフォルトの自動拾い設定である。有効な記号は以下の通り:
        )       武器
        (       矢・弾・飛び道具
        [       防具
        /       杖
        %       食料
        ?       巻物
        " or =  装身具
        !       水薬
        + or :  本
        |       杖
        \       ロッド
        0       オーブ
        }       その他
        X       死体
        $       金貨


//        Note that _whether_ items are picked up automatically or not, is
//        controlled by the in-game toggle Ctrl-A. Also note that picking
//        up takes a turn, but only one turn (regardless of the number of
//        items). If you teleport or blink onto a square with interesting
//        items, these will not be picked up.

- autopickup_exceptions ^= <pickup-regex, >don't-pickup-regex, ...
//        (Ordered list option)
//        A set of regexes that force matching items to be picked up (if
//        prefixed with <), or never picked up (if prefixed with >).
//        Excludes (>) take precedence over includes (<), so if the same
//        item is matched by both an exclude and an include, it will not
//        be subject to autopickup.
//        An example:
//             autopickup_exceptions += <curare-tipped needle
//        Forces autopickup to grab all curare-tipped needles, even if
//        missiles are not set in the "autopickup" option.
//        Whitespace between <> and the match expression is significant,
//        so the following won't work:
//             autopickup_exceptions += <   ebony casket
//        autopickup_exceptions replace the older ban_pickup. Using
//             autopickup_exceptions += >uselessness, >inaccuracy
//        is the same as using
//             ban_pickup += uselessness, inaccuracy
//        If the regexes are not prefixed with < or >, > is implied, so
//        the option setting above can also be written as
//             autopickup_exceptions += uselessness, inaccuracy
//        You can use multiple autopickup_exceptions lines. Some examples:
//             autopickup_exceptions += inaccuracy, scrolls? of paper
//             autopickup_exceptions += immolation, curse (armour|weapon)
//             autopickup_exceptions += uselessness, noise, torment
//        Unless you clear the list of exceptions, you won't need to set
//        autopickup exceptions for potions except maybe for very special
//        cases.

- default_autopickup = true ~
//        When set to false, the game starts with autopickup turned off.
//        You can still toggle autopickup in-game with Ctrl-A.

- pickup_thrown = true ~
//        pickup_thrown = true causes autopickup to pick up thrown/fired
//        missiles, which can make life much easier for hunter types. Be
//        aware that autopickup uses a turn, though it won't trigger if
//        there are hostile monsters in sight.

- assign_item_slot = (forward | backward) ~
//        When picking up items, the inventory slot into which the item
//        goes is normally the first free slot from a-zA-Z (this is the
//        default "forward" behaviour). Setting assign_item_slot to
//        "backward" changes the slot assignment to the first letter after
//        the last slot.
//        For instance, if you have items on 'a' and 'c', then with
//          assign_item_slot = forward, the next item will go into 'b',
//          assign_item_slot = backward, the next item will go to 'd'
//        instead.
//        With "backward", items dropped/fired and picked up later are
//        more likely to get their old slot back.

- pickup_menu_limit = 1 ~
//        If there are more items than this on your square, a menu will be
//        displayed when picking up multiple items instead of prompting for each
//        item. If zero, never use the menu. If negative, use the value of
//        item_stack_summary_minimum - 1, instead.
//        Note that no matter the vaulue of the option, picking up will always
//        take one turn.

- drop_filter += <regex>, <regex>, ... ~
//        (List option)
//        When selecting items using the global (de)select keys (',' or
//        '-') in a multidrop menu, you can choose to select only items
//        that match a search regex using this option.
//        For instance, to quickly select items forbidden by your god, you could
//        use:
//             drop_filter += forbidden
//        Other choices can come in handy as well, e.g. if you want to
//        regularly sacrifice all weapons except axes, use:
//             drop_filter += axe, broadaxe
//        drop_filter will match against the same keywords menu_colour uses,
//        except that it lacks identification status and chunk information. It
//        defaults to useless_item.
//        When a drop_filter is set, using the select/deselect keys will
//        set/clear selection of items that match the filter
//        expression(s).

** 3-b 既知の怪物またはアイテムの表示 [#d457b4aa]
// ** 3-b     Passive Sightings (detected or remembered entities).

- detected_monster_colour = lightred ~
//         Detected monsters will be given this colour.

- detected_item_colour = green ~
//         Detected items will be given this colour.

- remembered_monster_colour = darkgrey ~
//         The colour for monsters you have seen before.

** 3-c 怪物またはアイテムの強調表示 [#bfb1db93]
// ** 3-c     Branding (Item and monster highlighting).

** 3-d 階層に関する設定 [#w752e2ee]
// ** 3-d     Level Map Functions.

** 3-e Viewport Display Options. [#pe8e68d5]
// ** 3-e     Viewport Display Options.

** 3-f 自動探索関連設定 [#uafd96f9]
// ** 3-f     Travel and Exploration.

** 3-g コマンド関連設定 [#rc2fa6a0]
// **  3-g     Command Enhancements.

** 3-h メッセージ表示関連設定 [#t921f03d]
// ** 3-h     Messages and Display Enhancements.

** 3-i メッセージ及びメニューの色設定 [#k84ddd6e]
// ** 3-i     Colours (messages and menus)

** 3-j 飛び道具 [#xd598d1a]
// ** 3-j     Missiles.

** 3-k メッセージ欄 [#o467762e]
// ** 3-k     Message Channels.

** 3-l 銘 [#i22bf9f5]
// ** 3-l     Inscriptions.

** 3-m マクロ関連設定 [#m070a606]
// ** 3-m     Macro related Options.

** 3-n タイル関連設定 [#e9cb7303]
// ** 3-n     Tiles Options.

* 4- キャラクターダンプ [#u8d304f9]
// * 4-  Character Dump.

** 4-a ダンプ保存 [#tcd3d0d1]
// ** 4-a     Saving.

** 4-b アイテムおよび殺害数 [#zf3fa4f5]
// ** 4-b     Items and Kills.

** 4-c 注釈 [#bdcff1a4]
// ** 4-c     Notes.

* 5- その他 [#g1480daa]
// * 5-  Miscellaneous.

** 5-a 全OS対象 [#m75f3646]
// ** 5-a     All OS.

** 5-b DOSおよびWindows [#o9c468b3]
// ** 5-b     DOS and Windows.

** 5-c Unix [#v06abb97]
// ** 5-c     Unix.

* 6- Lua [#v5c39187]
// * 6-  Lua.

** 6-a luaファイルの読み込み [#u0928d37]
// ** 6-a  Including lua files.

// Lua files are scripts which can provide existing commands with a new
// meaning or create new commands (to be used in macros). To use Lua
// files, Crawl needs to be compiled with support for user Lua scripts.
// You can if your Crawl has Lua support by hitting ?V in-game. The list
// of features Crawl displays should include "Lua user scripts".

// Lua files are included using the lua_file option (one file per line):

// lua_file = <path/name.lua>

// Lua functions can be macroed in-game by setting the macro action to "===",
// followed by the function name.

// The wizard-mode Lua interpreter (&^T) will, the first time it's invoked,
// load all of the files that are specified with the terp_file option:

// terp_file = <path/name.lua>

// The Lua in these files will have access to all of the Crawl Lua internals
// (that is, will be run in the context of dlua, not clua).

** 6-b 組み込みluaの実行 [#ad364f95]
// ** 6-b     Executing inline lua.

// Lua code can be used directly in your init.txt/.crawlrc. You can
// execute Lua code using the following syntax.

// : Single line of lua code

// < Possibly multi-line
//   Lua code >

// { Possibly multi-line
//   Lua code }

// In the second and third cases, the restriction is that the delimiter
// characters appear at the beginning and end of a line, respectively.
// The difference between the <> and {} is when the code gets executed.
// Code {}, it is executed right away. Other Lua code is executed only
// after the entire init file is read in.

// Examples:

// # Print a welcome message
// : crawl.mpr("Hello " .. you.name())

// <
// -- Another welcome message (lua code uses lua comments)
// crawl.mpr("Hi there")
// >

// {
// function ch_autopickup(it) [ ... body omitted ... ] end
// }

** 6-c 条件付き設定 [#j5fd326c]
// ** 6-c     Conditional options.

// You can use Lua to selectively include parts of your init.txt (based
// on character type, for instance) using the same syntax.

// Example:

// : if you.race() == "Mummy" then
// autopickup = $?+"/
// : else
// autopickup = $?+"/!%
// : end

// Options can be referenced by lua via "options.option_name". For
// example:

// :if string.find(options.autopickup, "!") then
// # Do something here if potions are included in autopickup
// :end

// "options.option_name" can even be used for options that crawl itself
// doesn't recognize. This can be combined with setting options on the
// command line (see section 0-b) to use the command line to control
// conditionalization of options in the options files. For example, on the
// command line you could set the option "foobar" with "-extra-opt-first
// foobar=true", and then do:

// :if options.foobar then
// # Do things here
// :end

** 6-d 条件付き設定の注意 [#q757c7ce]
// ** 6-d     Conditional option caveats.

// Note that none of the options listed under "Starting Screen" (section 1)
// can be set conditionally. This is because the options files are
// actually read in twice: once before character creation with Lua turned
// off, and a second time after character creation with Lua turned on. If
// you attempt to set a starting-screen option conditionally then the value
// furthest down in the options file will be used regardless of what
// conditions you set.
// The above caveat applies to the "wiz_mode" option as well. Instead of
// conditionalized wiz_mode, you can add to the command line
// "-extra-opt-last wiz_mode=yes" to make any new game start in wizard
// mode.

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS