Rocket League changed the demolition data structure in September 2024 (v2.43+), from DemolishFx to DemolishExtended. This library automatically detects and supports both formats.
| Format | RL Version | Attribute Key | Actor ID Access |
|---|---|---|---|
DemolishFx |
Pre-Sept 2024 | ReplicatedDemolishGoalExplosion |
attacker, victim |
DemolishExtended |
Sept 2024+ | ReplicatedDemolishExtended |
attacker.actor, victim.actor |
- Detection: On first demolition, checks all car actors for either attribute key (tries Extended first)
- Caching: Detected format is cached in
processor.demolish_format - Collection:
get_active_demos()uses the cached format exclusively
// Format is auto-detected during processing
processor.process(&mut collector).unwrap();
// Check detected format (optional)
match processor.get_demolish_format() {
Some(DemolishFormat::Extended) => println!("New format"),
Some(DemolishFormat::Fx) => println!("Old format"),
None => println!("No demolitions yet"),
}
// DemolishAttribute provides unified access
for demo in processor.get_active_demos()? {
let attacker = demo.attacker_actor_id();
let victim = demo.victim_actor_id();
let attacker_vel = demo.attacker_velocity();
let victim_vel = demo.victim_velocity();
}- Add constant for new attribute key in
constants.rs - Add variant to
DemolishFormatandDemolishAttributeenums - Update
detect_demolish_format()andget_active_demos() - Implement accessor methods on
DemolishAttribute