Skip to content

Commit 8949265

Browse files
authored
Merge pull request #623 from bosh/var_reference_refactor
Var reference refactor
2 parents 44c3a96 + 3b8ca13 commit 8949265

File tree

2 files changed

+50
-20
lines changed

2 files changed

+50
-20
lines changed

docs/machine_vars/index.md

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: Machine Variables
44

55
# Machine Variables
66

7-
87
MPF uses the concept of *machine variables* to track dynamically-created
98
variables that apply on a machine-wide basis. Machine variables are
109
similar in concept to
@@ -41,48 +40,75 @@ with your variable name. If you want to access the machine variable in a player,
4140
`{machine.my_var_name}`. In other words, when using the the first notation with the pipe symbol you access the value of the variable
4241
as a string, in the latter case using the dot notation you access the value itself.
4342

44-
Video about player and machine variables:
43+
### Video about machine and [player variables](../player_vars/index.md):
4544

4645
<div class="video-wrapper">
4746
<iframe width="560" height="315" src="https://www.youtube.com/embed/PUxEsNUGXPY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
4847
</div>
4948

49+
## Related Configs
50+
51+
* [machine_vars: Config Reference](../config/machine_vars.md)
52+
* [variable_player: Config Reference](../config/variable_player.md)
53+
54+
## Built-in Machine Variables
55+
5056
You can create your own machine variables in your configs. There are
5157
also several machine variables that are automatically created. Here's a
5258
list of the machine variables that are "built in" and available for
53-
use in your configs:
59+
use in your configs, grouped by feature set:
60+
61+
#### MPF general info
62+
63+
* [mpf_extended_version](mpf_extended_version.md)
64+
* [mpf_version](mpf_version.md)
65+
* [python_version](python_version.md)
66+
* [platform](platform.md)
67+
* [platform_machine](platform_machine.md)
68+
* [platform_release](platform_release.md)
69+
* [platform_system](platform_system.md)
70+
* [platform_version](platform_version.md)
71+
72+
#### Previous game scores
73+
74+
* [player(x)_score](playerx_score.md)
75+
76+
#### High scores
77+
78+
* [(high_score_category)(position)_label](high_score_categoryposition_label.md)
79+
* [(high_score_category)(position)_name](high_score_categoryposition_name.md)
80+
* [(high_score_category)(position)_value](high_score_categoryposition_value.md)
81+
* [(high_score_category)(position)\_(variable_type)_(variable)](high_score_categoryposition_variabletype_variable.md)
82+
83+
#### Credit management (if not on free play)
5484

5585
* [credit_units](credit_units.md)
5686
* [credits_denominator](credits_denominator.md)
5787
* [credits_numerator](credits_numerator.md)
5888
* [credits_string](credits_string.md)
5989
* [credits_value](credits_value.md)
6090
* [credits_whole_num](credits_whole_num.md)
91+
92+
#### MPF-MC version information (pre-MPF 0.80)
93+
94+
* [mc_extended_version](mc_extended_version.md)
95+
* [mc_version](mc_version.md)
96+
97+
## Platform-specific machine variables
98+
99+
Some platforms will also add additional machine variables based on
100+
how they are set up. Some examples:
101+
61102
* [fast_(x)_firmware](fast_x_firmware.md)
62103
* [fast_(x)_model](fast_x_model.md)
63-
* [(high_score_category)(position)_label](high_score_categoryposition_label.md)
64-
* [(high_score_category)(position)_name](high_score_categoryposition_name.md)
65-
* [(high_score_category)(position)_value](high_score_categoryposition_value.md)
66-
* [(high_score_category)(position)\_(variable_type)_(variable)](high_score_categoryposition_variabletype_variable.md)
67104
* [lisy_api_version](lisy_api_version.md)
68105
* [lisy_hardware](lisy_hardware.md)
69106
* [lisy_version](lisy_version.md)
70-
* [mc_extended_version](mc_extended_version.md)
71-
* [mc_version](mc_version.md)
72-
* [mpf_extended_version](mpf_extended_version.md)
73-
* [mpf_version](mpf_version.md)
74107
* [p_roc_hardware_version](p_roc_hardware_version.md)
75108
* [p_roc_revision](p_roc_revision.md)
76109
* [p_roc_version](p_roc_version.md)
77110
* [pkone_firmware](pkone_firmware.md)
78111
* [pkone_hardware](pkone_hardware.md)
79-
* [platform](platform.md)
80-
* [platform_machine](platform_machine.md)
81-
* [platform_release](platform_release.md)
82-
* [platform_system](platform_system.md)
83-
* [platform_version](platform_version.md)
84-
* [player(x)_score](playerx_score.md)
85-
* [python_version](python_version.md)
86112

87113
## Related Events
88114

docs/player_vars/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ title: Player Variables Reference
44

55
# Player Variables Reference
66

7-
87
Here's a list of all the different "built in"
98
[player variables](../game_logic/players.md) that MPF uses.
109

1110
You can use these in your config files to trigger game logic or to
1211
display as text on your display.
1312

14-
Video about player and machine variables:
13+
### Video about player and [machine variables](../machine_vars/index.md):
1514

1615
<div class="video-wrapper">
1716
<iframe width="560" height="315" src="https://www.youtube.com/embed/PUxEsNUGXPY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
1817
</div>
1918

19+
## Related Configs
20+
21+
* [player_vars: Config Reference](../config/player_vars.md)
22+
* [variable_player: Config Reference](../config/variable_player.md)
23+
2024
Note that you can also create your own player variables in your configs,
2125
and most likely your machine will have several orders of magnitude more
2226
player variables than this list here.

0 commit comments

Comments
 (0)