rat
Module: rat — animal_ratExplosion.lua
What it does
Triggers a rat (or mouse) explosion near the local player. A random offset within 10 tiles is chosen as the blast center. A pipe-bomb explosion sound plays there, a circular burn radius (3 tiles) of scorched-floor tiles is stamped onto the ground, and a configurable number of small animals are scattered across the blast zone. The animals spawned are chosen randomly from grey rat, white rat, golden mouse, deer mouse, and white mouse. Optionally, actual fire can be ignited on every tile within the burn radius.
Trigger type
rat
Parameters
| Parameter | Type | Default | Valid Values | Description |
|---|---|---|---|---|
type |
string | required | "rat" |
Must exactly match the module name. |
number |
number | 10 |
Any positive integer | How many animals to spawn inside the blast zone. |
fire |
boolean | false |
true, false |
When true, sets every tile in the burn radius on fire in addition to stamping the scorched texture. |
Examples
Minimal: 10 animals, no fire
{ type="rat" }
Fiery swarm: 25 animals with active fire on the blast tiles
{ type="rat", number=25, fire=true }
Small quiet explosion: 5 animals, scorch marks only
{ type="rat", number=5, fire=false }