Skip to content
Permalink
Browse files

document tilt with service mode

  • Loading branch information...
jabdoa2 committed May 5, 2019
1 parent 744f29f commit 8e05a161cfc21141a1e961f2a65ad8fa5b214d4c
Showing with 103 additions and 2 deletions.
  1. +25 −2 _doc_tools/build_config_reference_docs.py
  2. +78 −0 game_logic/tilt/index.rst
@@ -453,22 +453,45 @@ def _get_spec_string(self, num, stype, default=None):
elif stype == 'float':
ftype = '``number`` (will be converted to floating point)'

elif stype == 'template_float':
ftype = '``number`` or ``template`` (will be converted to floating point; ' \
':doc:`Instructions for entering templates ' \
'</config/instructions/dynamic_values>`)'

elif stype == 'int':
ftype = '``integer``'

elif stype == 'template_int':
ftype = '``integer`` or ``template`` (:doc:`Instructions for entering templates ' \
'</config/instructions/dynamic_values>`)'

elif stype == 'num':
ftype = '``number`` (can be integer or floating point)'

elif stype == 'bool' or stype == 'boolean' or stype == 'bool_int':
ftype = '``boolean`` (Yes/No or True/False)'

elif stype == 'template_bool':
ftype = '``boolean`` or ``template`` (Yes/No or True/False; :doc:`Instructions for entering templates ' \
'</config/instructions/dynamic_values>`)'

elif stype == 'secs':
ftype = '``time string (secs)`` (:doc:`Instructions for entering '\
'time strings </config/instructions/time_strings>`) '
'time strings </config/instructions/time_strings>`)'

elif stype == 'template_secs':
ftype = '``time string (secs) or template`` (:doc:`Instructions for entering '\
'time strings </config/instructions/time_strings>` and :doc:`Instructions for entering templates ' \
'</config/instructions/dynamic_values>`)'

elif stype == 'ms':
ftype = '``time string (ms)`` (:doc:`Instructions for entering '\
'time strings </config/instructions/time_strings>`) '
'time strings </config/instructions/time_strings>`)'

elif stype == 'template_ms':
ftype = '``time string (ms) or template`` (:doc:`Instructions for entering '\
'time strings </config/instructions/time_strings>` and :doc:`Instructions for entering templates ' \
'</config/instructions/dynamic_values>`)'

elif stype == 'list':
ftype = '``list`` (:doc:`Instructions ' \
@@ -34,6 +34,84 @@ mess with them using :doc:`/config_players/variable_player` if you like.
Instant tilt is rarely used in normal machines but it might be useful for
custom tilt logic or special modes.

Minimal config
--------------

The minimal example is to just load the default ``tilt`` mode:

.. code-block:: mpf-config

modes:
- tilt

Change defaults
---------------

If you want to customize the mode you can also create a tilt mode inside your
mode folder (config would be in ``modes/tilt/config/tilt.yaml``):

.. code-block:: mpf-config

# in your machine config
modes:
- tilt

##! mode: tilt
# in your tilt mode
tilt: # the following are the defaults only copy those if you want to change them
multiple_hit_window: 300ms
settle_time: 5s
warnings_to_tilt: 3

Add operator settings to service mode
-------------------------------------

.. code-block:: mpf-config

# in your machine config
modes:
- tilt

settings:
warnings_to_tilt:
label: Number of tilt warnings
values:
0: "no warnings"
1: "1"
2: "2"
3: "3"
5: "5"
10: "10"
default: 3
key_type: int
sort: 600
settle_time:
label: Time to wait on tilt to settle bob
values:
3000: "3s"
5000: "5s"
10000: "10s"
default: 5000
key_type: int
sort: 610
multiple_hit_window:
label: Tilt sensitivity
values:
150: "sensitive"
300: "normal"
500: "insensitive"
1000: "very insensitive"
default: 300
key_type: int
sort: 620

##! mode: tilt
# in your tilt mode
tilt:
multiple_hit_window: settings.multiple_hit_window
settle_time: settings.settle_time
warnings_to_tilt: settings.warnings_to_tilt

The tilt modes contains default slides but you can
:doc:`change them <overwrite_tilt_slides>`.

0 comments on commit 8e05a16

Please sign in to comment.
You can’t perform that action at this time.