Playfield Multipliers
Playfield Multipliers
A playfield multiplier (2X, 3X, …) scales a swath of scoring at once. The trick is to keep the multiplier in a single variable and have every affected rule reference it, so raising the multiplier instantly boosts all of them.
A shared multiplier
Multiply each rule’s points expression by the same variable. Every rule then scales by whatever that variable currently holds:
score "event" "ramps_multiplied" {
when = tag.ramp_entries.activated
points = 100 * var.playfield_multiplier
}
score "event" "bumpers_multiplied" {
when = tag.pop_bumpers.activated
points = 10 * var.playfield_multiplier
}Here ramp_entries is a tag both ramp-entry switches declare (tags = ["ramp_entries"] on their device blocks). Binding the tag group keeps one
rule per concept — adding a third ramp later is a one-line tags edit, not a
new scoring rule.
Raising and resetting it
Drive the multiplier from gameplay — light it on a qualifying shot, drop it back at ball end:
event_handler "raise_multiplier" {
when = shot.multiplier_lane.complete
condition = var.playfield_multiplier < 3
actions {
increment = "playfield_multiplier"
}
}
event_handler "reset_multiplier" {
when = system.ball.end
actions {
set_variable {
name = "playfield_multiplier"
value = 1
}
}
}How it works
Because every rule reads the same variable, you change the multiplier in one place and the whole group follows. This pairs naturally with modes — a mode can raise the multiplier while it’s active and a score "modifier" can gate other bonuses on mode.<name>.active. See Organizing Modes into Modules.