Skip to content

Commit fa4d679

Browse files
committed
update options in game logic section with anchors
and clean up TAF cookbook as well
1 parent 60d9fd7 commit fa4d679

File tree

14 files changed

+196
-205
lines changed

14 files changed

+196
-205
lines changed

docs/cookbook/TAF_mansion_awards.md

Lines changed: 81 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -270,48 +270,48 @@ Stepping through how we're using each setting:
270270
271271
`show_tokens:`
272272

273-
: link this achievement to it's light on the playfield.
273+
link this achievement to it's light on the playfield.
274274

275-
`show_when_selected: flash`
275+
`show_when_selected: flash`:
276276

277-
: Plays the show called "flash" when this achievement is selected.
278-
Note that the default "flash" show is 1 sec on / 1 sec off. While
279-
you can play it faster, the original Addams Family flashed the
280-
lights more like .75s on / .25 off, so you'd probably want to
281-
create a custom version of the "flash" show for TAF that flashed
282-
them more like the original version.
277+
Plays the show called "flash" when this achievement is selected.
278+
Note that the default "flash" show is 1 sec on / 1 sec off. While
279+
you can play it faster, the original Addams Family flashed the
280+
lights more like .75s on / .25 off, so you'd probably want to
281+
create a custom version of the "flash" show for TAF that flashed
282+
them more like the original version.
283283

284-
`show_when_completed: on`
284+
`show_when_completed: on`:
285285

286-
: Plays the show called "on" when this achievement is complete
286+
Plays the show called "on" when this achievement is complete
287287

288-
`events_when_started: award_thing_multiball`
288+
`events_when_started: award_thing_multiball`:
289289

290-
: Posts an event called *award_thing_multiball* when this achievement
291-
is started. We'll use this as the start event for the Thing
292-
Multiball mode.
290+
Posts an event called *award_thing_multiball* when this achievement
291+
is started. We'll use this as the start event for the Thing
292+
Multiball mode.
293293

294-
`enable_events: initialize_mansion, reset_mansion`
294+
`enable_events: initialize_mansion, reset_mansion`:
295295

296-
: Enables this achievement when either of the events
297-
*initialize_mansion* or *reset_mansion* is posted. Prior to that,
298-
this achievement will be disabled.
296+
Enables this achievement when either of the events
297+
*initialize_mansion* or *reset_mansion* is posted. Prior to that,
298+
this achievement will be disabled.
299299

300-
`complete_events: award_thing_multiball`
300+
`complete_events: award_thing_multiball`:
301301

302-
: Watches for the event *award_thing_multiball*, and when it sees it,
303-
it marks this achievement as complete. Notice this is the same event
304-
that this achievement posts when it starts. In other words, we've
305-
configured it so the achievement is complete as soon as it starts!
306-
This is by design, because the rules state that once an achievement
307-
is awarded, the chair can be relit immediately, and it's possible
308-
to receive the next award even while the mode from the prior award
309-
is still running.
302+
Watches for the event *award_thing_multiball*, and when it sees it,
303+
it marks this achievement as complete. Notice this is the same event
304+
that this achievement posts when it starts. In other words, we've
305+
configured it so the achievement is complete as soon as it starts!
306+
This is by design, because the rules state that once an achievement
307+
is awarded, the chair can be relit immediately, and it's possible
308+
to receive the next award even while the mode from the prior award
309+
is still running.
310310

311-
`reset_events: reset_mansion`
311+
`reset_events: reset_mansion`:
312312

313-
: Watches for an event called *reset_mansion* that will reset this
314-
achievement back to its initial (disabled) state.
313+
Watches for an event called *reset_mansion* that will reset this
314+
achievement back to its initial (disabled) state.
315315

316316
This achievements configuration takes care of the following rules:
317317

@@ -383,80 +383,78 @@ achievement_groups:
383383

384384
Let's look at each of these settings:
385385

386-
`achievements:`
386+
`achievements:`:
387387

388-
: This is just the list of the 12 achievements that make up this
389-
group.
388+
This is just the list of the 12 achievements that make up this group.
390389

391-
`show_tokens:`
390+
`show_tokens:`:
392391

393-
: These are the show tokens for the group itself. In this case
394-
it's the yellow light on the electric chair, since this light
395-
turns on and off to indicate whether the chair or swamp can be shot
396-
to award the currently selected item.
392+
These are the show tokens for the group itself. In this case
393+
it's the yellow light on the electric chair, since this light
394+
turns on and off to indicate whether the chair or swamp can be shot
395+
to award the currently selected item.
397396

398-
`auto_select: yes`
397+
`auto_select: yes`:
399398

400-
: This is used to make sure that one achievement is selected at all
401-
times. If the currently selected achievement is completed, the
402-
achievement group will notice that there is no currently selected
403-
achievement and it will pick one from random from the remaining
404-
achievements (those that are "enabled").
399+
This is used to make sure that one achievement is selected at all
400+
times. If the currently selected achievement is completed, the
401+
achievement group will notice that there is no currently selected
402+
achievement and it will pick one from random from the remaining
403+
achievements (those that are "enabled").
405404

406-
`events_when_all_completed: select_tour_mansion`
405+
`events_when_all_completed: select_tour_mansion`:
407406

408-
: Posts an event called *select_tour_mansion* once all 12 achievements
409-
in this group in complete. We'll use this later to light the "tour
410-
mansion" award.
407+
Posts an event called *select_tour_mansion* once all 12 achievements
408+
in this group in complete. We'll use this later to light the "tour
409+
mansion" award.
411410

412-
`enable_while_no_achievement_started: no`
411+
`enable_while_no_achievement_started: no`:
413412

414-
: In our case, we do not want to automatically enable the achievement
415-
group when no achievement is started, because the rules for Addams
416-
Family say that the player has to shoot the center ramp or right
417-
inlane to light the chair (which is enabling this achievement
418-
group).
413+
In our case, we do not want to automatically enable the achievement
414+
group when no achievement is started, because the rules for Addams
415+
Family say that the player has to shoot the center ramp or right
416+
inlane to light the chair (which is enabling this achievement group).
419417

420-
`show_when_enabled: on`
418+
`show_when_enabled: on`:
421419

422-
: This plays the show called "on" when the achievement group is in
423-
the enabled state. This will have the effect of turning on the
424-
yellow chair light (from the `show_tokens:` section) when the
425-
achievement group is enabled and the selected item can be awarded.
420+
This plays the show called "on" when the achievement group is in
421+
the enabled state. This will have the effect of turning on the
422+
yellow chair light (from the `show_tokens:` section) when the
423+
achievement group is enabled and the selected item can be awarded.
426424

427-
`select_random_achievement_events: sw_jet`
425+
`select_random_achievement_events: sw_jet`:
428426

429-
: In Addams Family, each pop bumper hit changes the currently selected
430-
mansion award. To make this happen, we added a tag called "jet" to
431-
the five pop bumper switches. (That will post an event called
432-
*sw_jet* any time one of these switches is hit. Then we add that
433-
event name here which will cause this achievement group to change
434-
the currently selected award.
427+
In Addams Family, each pop bumper hit changes the currently selected
428+
mansion award. To make this happen, we added a tag called "jet" to
429+
the five pop bumper switches. (That will post an event called
430+
*sw_jet* any time one of these switches is hit. Then we add that
431+
event name here which will cause this achievement group to change
432+
the currently selected award.
435433

436-
`allow_selection_change_while_disabled: yes`
434+
`allow_selection_change_while_disabled: yes`:
437435

438-
: The pop bumper hits to change the current selection happens
439-
regardless of whether the group is enabled (e.g. the chair is lit)
440-
or not, so we use this setting to allow that selection change to
441-
happen at any time.
436+
The pop bumper hits to change the current selection happens
437+
regardless of whether the group is enabled (e.g. the chair is lit)
438+
or not, so we use this setting to allow that selection change to
439+
happen at any time.
442440

443-
`start_selected_events: balldevice_electric_chair_ball_enter, balldevice_swamp_kickout_ball_enter, award_mansion_from_bear`
441+
`start_selected_events: balldevice_electric_chair_ball_enter, balldevice_swamp_kickout_ball_enter, award_mansion_from_bear`:
444442

445-
: A shot to either the electric chair or the swamp kickout will award
446-
the selected achievement.
443+
A shot to either the electric chair or the swamp kickout will award
444+
the selected achievement.
447445

448-
`enable_events: light_chair`
446+
`enable_events: light_chair`:
449447

450-
: When an event called *light_chair* is posted, this achievement group
451-
will be enabled (which will turn on the chair light and allow the
452-
selected achievement to be started via the `start_selected_events:`.
448+
When an event called *light_chair* is posted, this achievement group
449+
will be enabled (which will turn on the chair light and allow the
450+
selected achievement to be started via the `start_selected_events:`.
453451

454-
`disable_events: unlight_chair`
452+
`disable_events: unlight_chair`:
455453

456-
: When an event called *unlight_chair* is posted, this achievement group
457-
will be disabled. The chair light will turn off, and the
458-
`start_selected_events:` will not cause the current selected
459-
achievement to start.
454+
When an event called *unlight_chair* is posted, this achievement group
455+
will be disabled. The chair light will turn off, and the
456+
`start_selected_events:` will not cause the current selected
457+
achievement to start.
460458

461459
This step takes care of:
462460

docs/game_logic/achievements/achievement_groups.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,14 @@ For
5656
[conditional events](../../events/overview/conditional.md), the prefix for achievement groups is
5757
`device.achievement_groups.(name)`.
5858

59-
*enabled*
59+
### *enabled*:
6060

61-
: Boolean (true/false) as to whether this achievement group is
62-
enabled.
61+
Boolean (true/false) as to whether this achievement group is enabled.
6362

64-
*selected_member*
63+
### *selected_member*:
6564

66-
: The achievement in the group that is currently in the selected
67-
state, or *None* if no achievement is selected.
65+
The achievement in the group that is currently in the selected
66+
state, or *None* if no achievement is selected.
6867

6968
## Related How To guides
7069

docs/game_logic/ball_holds.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ For
3636
[dynamic values](../config/instructions/dynamic_values.md) and
3737
[conditional events](../events/overview/conditional.md), the prefix for ball holds is `device.ball_holds.(name)`.
3838

39-
*balls_held*
39+
### *balls_held*:
4040

41-
: The number of balls this ball hold is currently holding
41+
The number of balls this ball hold is currently holding
4242

43-
*enabled*
43+
### *enabled*:
4444

45-
: Boolean (true/false) which shows whether this ball hold is enabled.
45+
Boolean (true/false) which shows whether this ball hold is enabled.
4646

4747
## Related How To guides
4848

docs/game_logic/combo_switches.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ For
110110
[conditional events](../events/overview/conditional.md), the prefix for combo switches is
111111
`device.combo_switches.(name)`.
112112

113-
*state*
113+
### *state*:
114114

115-
: String which reflects what state this combo switch is in. Options
116-
wil be one of the following: *inactive*, *both* or *one*.
115+
String which reflects what state this combo switch is in. Options
116+
wil be one of the following: *inactive*, *both* or *one*.
117117

118118
## Related How To guides
119119

docs/game_logic/logic_blocks/accruals.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,21 @@ For
7171
[dynamic values](../../config/instructions/dynamic_values.md) and
7272
[conditional events](../../events/overview/conditional.md), the prefix for accruals is `device.accruals.(name)`.
7373

74-
*value*
74+
### *value*:
7575

76-
: The state of this accrual as list. There will be one entry for every
77-
element in the accrual. For instance, if your accrual has three
78-
elements if will be a list of len three with index 0 for the status
79-
of your first element, 1 for the seconds and 2 for the third
80-
element. Elements will be 0 at the beginning and turn to 1 when
81-
completed.
76+
The state of this accrual as list. There will be one entry for every
77+
element in the accrual. For instance, if your accrual has three
78+
elements if will be a list of len three with index 0 for the status
79+
of your first element, 1 for the seconds and 2 for the third
80+
element. Elements will be 0 at the beginning and turn to 1 when completed.
8281

83-
*enabled*
82+
### *enabled*:
8483

85-
: Boolean (true/false) which shows whether this accrual is enabled.
84+
Boolean (true/false) which shows whether this accrual is enabled.
8685

87-
*completed*
86+
### *completed*:
8887

89-
: True if the block is completed. Otherwise False.
88+
True if the block is completed. Otherwise False.
9089

9190
This is an example:
9291

docs/game_logic/logic_blocks/counters.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@ For
7272
[dynamic values](../../config/instructions/dynamic_values.md) and
7373
[conditional events](../../events/overview/conditional.md), the prefix for counters is `device.counters.(name)`.
7474

75-
*value*
75+
### *value*:
7676

77-
: The count of this counter.
77+
The count of this counter.
7878

79-
*enabled*
79+
### *enabled*:
8080

81-
: Boolean (true/false) which shows whether this counter is enabled.
81+
Boolean (true/false) which shows whether this counter is enabled.
8282

83-
*completed*
83+
### *completed*:
8484

85-
: True if the block is completed. Otherwise False.
85+
True if the block is completed. Otherwise False.
8686

8787
This is an example:
8888

docs/game_logic/logic_blocks/index.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,24 @@ achievements, and other parts of your game logic.
1212

1313
There are four types of logic blocks in MPF:
1414

15-
[Counter Logic Blocks](counters.md)
15+
## [Counter Logic Blocks](counters.md)
1616

17-
: Count the number of times an event happens, and when a certain
18-
number is hit, a "complete" event is posted.
17+
Count the number of times an event happens, and when a certain
18+
number is hit, a "complete" event is posted.
1919

20-
[Accrual Logic Blocks](accruals.md)
20+
## [Accrual Logic Blocks](accruals.md)
2121

22-
: Watch for several different events to occur, and once they all do
23-
(no matter what order they happen in), a "complete" event is
24-
posted.
22+
Watch for several different events to occur, and once they all do
23+
(no matter what order they happen in), a "complete" event is posted.
2524

26-
[Sequence Logic Blocks](sequences.md)
25+
## [Sequence Logic Blocks](sequences.md)
2726

28-
: Watch for several different events that need to occur *in a specific
29-
order*, and once they do, a "complete" event is posted.
27+
Watch for several different events that need to occur *in a specific
28+
order*, and once they do, a "complete" event is posted.
3029

31-
[State Machine Logic Block](state_machines.md)
30+
## [State Machine Logic Block](state_machines.md)
3231

33-
: A generic state machine with arbitrary state transitions and state.
32+
A generic state machine with arbitrary state transitions and state.
3433

3534
Logic blocks can be configured to store their state in player variables,
3635
meaning that each logic block will remember where it was from

docs/game_logic/logic_blocks/sequences.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,22 @@ For
6565
[dynamic values](../../config/instructions/dynamic_values.md) and
6666
[conditional events](../../events/overview/conditional.md), the prefix for sequences is `device.sequences.(name)`.
6767

68-
*value*
68+
### *value*:
6969

70-
: The state of this sequence as list. There will be one entry for
71-
every element in the sequence. For instance, if your sequence has
72-
three elements if will be a list of len three with index 0 for the
73-
status of your first element, 1 for the seconds and 2 for the third
74-
element. Elements will be 0 at the beginning and turn to 1 when
75-
completed.
70+
The state of this sequence as list. There will be one entry for
71+
every element in the sequence. For instance, if your sequence has
72+
three elements if will be a list of len three with index 0 for the
73+
status of your first element, 1 for the seconds and 2 for the third
74+
element. Elements will be 0 at the beginning and turn to 1 when
75+
completed.
7676

77-
*enabled*
77+
### *enabled*:
7878

79-
: Boolean (true/false) which shows whether this sequence is enabled.
79+
Boolean (true/false) which shows whether this sequence is enabled.
8080

81-
*completed*
81+
### *completed*:
8282

83-
: True if the block is completed. Otherwise False.
83+
True if the block is completed. Otherwise False.
8484

8585
This is an example:
8686

0 commit comments

Comments
 (0)