How to handle unit lifecycle and stats in tracker events
masterWhen processing tracker events, keep the following logic in mind:
Unit Lifecycle
- Construction:
NNet.Replay.Tracker.SUnitInitEventindicates a unit is under construction. ANNet.Replay.Tracker.SUnitDoneEventwith the same tag follows when complete. - Creation:
NNet.Replay.Tracker.SUnitBornEventindicates a unit was created fully constructed. - Death: A
NNet.Replay.Tracker.SUnitDiedEventmay follow either aUnitInitorUnitBornevent. - Unit Tags: To convert unit tag index/recycle pairs into unit tags, use
protocol.unit_tag(index, recycle).
Player Stats
- In
NNet.Replay.Tracker.SPlayerStatsEvent, the fieldsm_scoreValueFoodUsedandm_scoreValueFoodMadeare in fixed point. Divide them by4096to get the integer values. All other values are integers.
Known Limitations
- Revived units are not currently tracked.
- Placeholder units track death but not birth.