@@ -4,7 +4,6 @@ title: Machine Variables
4
4
5
5
# Machine Variables
6
6
7
-
8
7
MPF uses the concept of * machine variables* to track dynamically-created
9
8
variables that apply on a machine-wide basis. Machine variables are
10
9
similar in concept to
@@ -41,48 +40,75 @@ with your variable name. If you want to access the machine variable in a player,
41
40
` {machine.my_var_name} ` . In other words, when using the the first notation with the pipe symbol you access the value of the variable
42
41
as a string, in the latter case using the dot notation you access the value itself.
43
42
44
- Video about player and machine variables:
43
+ ### Video about machine and [ player variables] ( ../player_vars/index.md ) :
45
44
46
45
<div class =" video-wrapper " >
47
46
<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 >
48
47
</div >
49
48
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
+
50
56
You can create your own machine variables in your configs. There are
51
57
also several machine variables that are automatically created. Here's a
52
58
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)
54
84
55
85
* [ credit_units] ( credit_units.md )
56
86
* [ credits_denominator] ( credits_denominator.md )
57
87
* [ credits_numerator] ( credits_numerator.md )
58
88
* [ credits_string] ( credits_string.md )
59
89
* [ credits_value] ( credits_value.md )
60
90
* [ 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
+
61
102
* [ fast_ (x)_ firmware] ( fast_x_firmware.md )
62
103
* [ 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 )
67
104
* [ lisy_api_version] ( lisy_api_version.md )
68
105
* [ lisy_hardware] ( lisy_hardware.md )
69
106
* [ 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 )
74
107
* [ p_roc_hardware_version] ( p_roc_hardware_version.md )
75
108
* [ p_roc_revision] ( p_roc_revision.md )
76
109
* [ p_roc_version] ( p_roc_version.md )
77
110
* [ pkone_firmware] ( pkone_firmware.md )
78
111
* [ 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 )
86
112
87
113
## Related Events
88
114
0 commit comments