How kamikaze unit behavior works in BAR modding
Setting up self-destructing units with target-seeking behavior using the Spring RTS engine UnitDefs in Beyond All Reason.
Tags: beyond all reason, kamikaze, unit behavior, modding, unitdefs, custom units
The kamikaze UnitDef flag
The Spring RTS engine supports kamikaze behavior through a boolean flag in unit definitions. Setting it to true makes the unit charge toward a target and detonate on contact. This covers everything from explosive scouts to drone swarms.
The documentation lives in the Spring RTS UnitDefs reference. The flag controls whether the unit pursues targets aggressively rather than sitting in defensive positions.
Making kamikaze units seek specific targets
Players building custom scenarios sometimes want kamikaze units to prioritize certain targets. The chase behavior ties into the unit's movement class and weapon targeting logic. Adjusting the target selection rules alongside the kamikaze flag determines what the unit goes after.
Unit movement properties like turn rate, speed, and acceleration heavily influence how a kamikaze feels. Fast units with low turn rates drift wide on approach. Snappy turn rates make them feel like guided munitions.
Private server tweak command limits
BAR's Teiserver lobby enforces a character limit on tweak commands passed through the lobby. The limit sits around 16k characters per tweak string, with a maximum of 10 tweak commands in total. That means roughly 160,000 characters of total tweak data available.
For most custom unit setups and scenario modifications, the 10 command ceiling provides ample room. If a setup genuinely needs more, the server operator can modify the limit in Teiserver source code, though this only affects private servers running custom builds.
Reading the engine documentation
The Spring RTS wiki contains the authoritative UnitDef and WeaponDef references. Going through the original documentation catches behavioral assumptions that turn out wrong. Even after reading all the code, certain unit behaviors make more sense after testing on the actual battlefield than on paper.
Creed of Champions
Understanding the technical side of unit behavior deepens game knowledge. Players who dig into UnitDef flags make better split-second decisions about target priorities and unit compositions. A community that supports technical learning builds better teams:
[Crd] Gaming actually fulfills a human purpose here - cooperation, mutual upbuilding, fun and striving for greatness together. Instead of random anonymity, you meet, learn from, and enjoy real people.