|
1 |
| -# What is this file? |
2 |
| -# This file contains options which allow you to configure your multiworld experience while allowing others |
3 |
| -# to play how they want as well. |
4 |
| - |
5 |
| -# How do I use it? |
6 |
| -# The options in this file are weighted. This means the higher number you assign to a value, the more |
7 |
| -# chances you have for that option to be chosen. For example, an option like this: |
| 1 | +# Q. What is this file? |
| 2 | +# A. This file contains options which allow you to configure your multiworld experience while allowing |
| 3 | +# others to play how they want as well. |
| 4 | +# |
| 5 | +# Q. How do I use it? |
| 6 | +# A. The options in this file are weighted. This means the higher number you assign to a value, the |
| 7 | +# more chances you have for that option to be chosen. For example, an option like this: |
| 8 | +# |
| 9 | +# map_shuffle: |
| 10 | +# on: 5 |
| 11 | +# off: 15 |
8 | 12 | #
|
9 |
| -# map_shuffle: |
10 |
| -# on: 5 |
11 |
| -# off: 15 |
| 13 | +# Means you have 5 chances for map shuffle to occur, and 15 chances for map shuffle to be turned |
| 14 | +# off. |
12 | 15 | #
|
13 |
| -# Means you have 5 chances for map shuffle to occur, and 15 chances for map shuffle to be turned off |
14 |
| - |
15 |
| -# I've never seen a file like this before. What characters am I allowed to use? |
16 |
| -# This is a .yaml file. You are allowed to use most characters. |
17 |
| -# To test if your yaml is valid or not, you can use this website: |
18 |
| -# http://www.yamllint.com/ |
19 |
| - |
20 |
| -description: Default {{ game }} Template # Used to describe your yaml. Useful if you have multiple files |
21 |
| -# Your name in-game. Spaces will be replaced with underscores and there is a 16 character limit |
22 |
| -name: YourName{number} |
23 |
| -#{player} will be replaced with the player's slot number. |
24 |
| -#{PLAYER} will be replaced with the player's slot number if that slot number is greater than 1. |
25 |
| -#{number} will be replaced with the counter value of the name. |
26 |
| -#{NUMBER} will be replaced with the counter value of the name if the counter value is greater than 1. |
27 |
| -game: |
28 |
| - {{ game }}: 1 |
| 16 | +# Q. I've never seen a file like this before. What characters am I allowed to use? |
| 17 | +# A. This is a .yaml file. You are allowed to use most characters. |
| 18 | +# To test if your yaml is valid or not, you can use this website: |
| 19 | +# http://www.yamllint.com/ |
| 20 | +# You can also verify your Archipelago settings are valid at this site: |
| 21 | +# https://archipelago.gg/check |
| 22 | + |
| 23 | +# Your name in-game. Spaces will be replaced with underscores and there is a 16-character limit. |
| 24 | +# {player} will be replaced with the player's slot number. |
| 25 | +# {PLAYER} will be replaced with the player's slot number, if that slot number is greater than 1. |
| 26 | +# {number} will be replaced with the counter value of the name. |
| 27 | +# {NUMBER} will be replaced with the counter value of the name, if the counter value is greater than 1. |
| 28 | +name: Player{number} |
| 29 | + |
| 30 | +# Used to describe your yaml. Useful if you have multiple files. |
| 31 | +description: Default {{ game }} Template |
| 32 | + |
| 33 | +game: {{ game }} |
29 | 34 | requires:
|
30 | 35 | version: {{ __version__ }} # Version of Archipelago required for this yaml to work as expected.
|
31 |
| -# Shared Options supported by all games: |
32 | 36 |
|
33 | 37 | {%- macro range_option(option) %}
|
34 |
| - # you can add additional values between minimum and maximum |
| 38 | + # You can define additional values between the minimum and maximum values. |
| 39 | + # Minimum value is {{ option.range_start }} |
| 40 | + # Maximum value is {{ option.range_end }} |
35 | 41 | {%- set data, notes = dictify_range(option) %}
|
36 | 42 | {%- for entry, default in data.items() %}
|
37 | 43 | {{ entry }}: {{ default }}{% if notes[entry] %} # {{ notes[entry] }}{% endif %}
|
38 | 44 | {%- endfor -%}
|
39 | 45 | {% endmacro %}
|
| 46 | + |
40 | 47 | {{ game }}:
|
41 | 48 | {%- for option_key, option in options.items() %}
|
42 |
| - {{ option_key }}:{% if option.__doc__ %} # {{ option.__doc__ | replace('\n', '\n#') | indent(4, first=False) }}{% endif %} |
| 49 | + {{ option_key }}: |
| 50 | + {%- if option.__doc__ %} |
| 51 | + # {{ option.__doc__ |
| 52 | + | trim |
| 53 | + | wordwrap(112, wrapstring="\n# ") |
| 54 | + | replace(' ', '') |
| 55 | + | replace('\n ', '\n# ') |
| 56 | + | indent(4, first=False) |
| 57 | + }} |
| 58 | + {%- endif -%} |
| 59 | + |
| 60 | + {%- if option.__doc__ and option.range_start is defined %} |
| 61 | + # |
| 62 | + {%- endif -%} |
| 63 | + |
43 | 64 | {%- if option.range_start is defined and option.range_start is number %}
|
44 | 65 | {{- range_option(option) -}}
|
| 66 | + |
45 | 67 | {%- elif option.options -%}
|
46 |
| - {%- for suboption_option_id, sub_option_name in option.name_lookup.items() %} |
| 68 | + {%- for suboption_option_id, sub_option_name in option.name_lookup.items() %} |
47 | 69 | {{ sub_option_name }}: {% if suboption_option_id == option.default %}50{% else %}0{% endif %}
|
48 |
| - {%- endfor -%} |
49 |
| - {% if option.name_lookup[option.default] not in option.options %} |
| 70 | + {%- endfor -%} |
| 71 | + |
| 72 | + {%- if option.name_lookup[option.default] not in option.options %} |
50 | 73 | {{ option.default }}: 50
|
51 |
| - {%- endif -%} |
| 74 | + {%- endif -%} |
| 75 | + |
52 | 76 | {%- elif option.default is string %}
|
53 | 77 | {{ option.default }}: 50
|
| 78 | + |
54 | 79 | {%- elif option.default is iterable and option.default is not mapping %}
|
55 | 80 | {{ option.default | list }}
|
| 81 | + |
56 | 82 | {%- else %}
|
57 |
| - {{ yaml_dump(option.default) | indent(4, first=false) }} |
| 83 | + {{ yaml_dump(option.default) | trim | indent(4, first=false) }} |
58 | 84 | {%- endif -%}
|
59 | 85 | {%- endfor %}
|
60 |
| - {% if not options %}{}{% endif %} |
| 86 | + |
0 commit comments