KillerStockID Showing 0 For Each Entry

So I am working on my entry for the Halo API Hackathon, and I’ve noticed that KillerStockID is always showing 0. I went into a custom game with a friend, and he killed me with several different weapons (including a grenade I believe), and his KillerStockID never changed. I’ve attached the json data for the game’s stats.

Here is a Gist for reference: MatchStats.json · GitHub

I was about to post the same observation. VictimStockID seems to be populating, but I am also seeing KillerStockID as 0 for all events.

EDIT: Actually, I was wrong. VictimStockID is returning as 3168248199 (Spartan) for all kills in the events log. Does the weapon tracking only work for Warzone?

Hey PyroSquirrel,

Thanks for reporting this issue, we found the problem and will deploy the fix soon.
In addition we realized that the way we named the fields is somewhat confusing so decided to make a small (breaking) change to the field names.
We’ve renamed KillerAttachmentIds to KillerWeaponAttachmentIds and KillerStockId to KillerWeaponStockId.
This is in order to clarify that that these IDs relate to the killer’s weapon rather than to the killer.

In regards to the victim’s attachment and stock IDs, those will only be populated if the victim was an AI.

We will deploy the fix and API change around 5PM PST today.
We apologize for the inconvenience this change might cause. We’ll also update the API documentation to reflect this.

> 2533274936405956;3:
> We will deploy the fix and API change around 5PM PST today.

That’s a fantastic turnaround time, thanks for getting back to us so quickly!

> 2533274936405956;3:
> We will deploy the fix and API change around 5PM PST today.
> We apologize for the inconvenience this change might cause. We’ll also update the API documentation to reflect this.

You guys are awesome. Thanks so much SpartanCat!

So I’m seeing some changes. Not sure if it’s what I was expecting:

KillerAttachmentIds changed to KillerWeaponAttachmentIds
KillerStockId changed to KillerWeaponStockId

VictimAttachmentIds unchanged.
VictimStockId unchanged.

Edit: Is the VictimStockId not related to weapons**?**

Edit: Also on the back of this. There doesn’t seem to be a way to uniquely identify and event. If I was to have saved the events (pre-update), I’d have some concerns doing updating my local copy with remote changes (post-update).

Can we get something like an EventId added to the event?

Hi everybody! Sorry about all of the confusion on the naming of these fields. I’ll try to shed some light on these. Please let us know if further explanation is necessary.

First, let’s pick apart KillerWeaponStockId. KillerWeaponStockId is specific to the weapon that was used to cause the kill. In most cases, this is the actual weapon that was used in combat. For example, if a player was killed with an Assault Rifle, KillerWeaponStockId will be for an Assault Rifle. However, players can be killed with things that aren’t strictly weapons. In this case, KillerWeaponStockId will be the “Stock ID” of the thing that did the kill. The naming here is misleading, so some examples will hopefully clarify things. If a player was killed with the melee attack of another player, KillerWeaponStockId will be the StockId of Spartan. Going one step further, if a player was killed by the melee attack of an AI, KillerWeaponStockId will be the Stock ID of the AI object (Hunter, Elite, etc.). The takeaway here is that to understand the meaning of KillerWeaponStockId, which informs you what a player was killed by, you will need to try to resolve the KillerWeaponStockId against the Enemy, Vehicle, and Weapon Metadata APIs.

Next, let’s pick apart VictimStockId. “StockId” is a bit misleading here. This is actually the ID of the object that was killed. In a “normal” kill on a non-AI player, this will just be 0. However, when an AI is killed, this will be the ID of the AI object that was killed (Hunter, Elite, etc.). Like before, you will need to resolve these IDs against the Enemy, Vehicle, and Weapon Metadata APIs.

KillerWeaponAttachmentIds and VictimAttachmentIds aren’t very relevant because attachments aren’t currently available via the Metadata APIs.

Let’s summarize this information a different way because this is still pretty confusing. By looking at a raw kill event, you can glean a few pieces of information:

  • From KillerWeaponStockId, you know what weapon was used to kill a player. - If an AI killed the player, you can sometimes figure out what the type of the AI was if a melee attack was used by using KillerWeaponStockId. However, if a weapon was used, you won’t know what type of AI killed the player. Side note: You might be able to infer it based on the weapon type, but that would be an approximation. - If a player killed another Player, VictimStockId will be 0. - If a player killed an AI, from VictimStockId, you know the type of the AI that was killed.We’ll put a work item on the team to update the documentation in an attempt to make this clearer and more concise.

> 2533274803816431;7:
> - If an AI killed the player, you can sometimes figure out what the type of the AI was if a melee attack was used by using KillerWeaponStockId. However, if a weapon was used, you won’t know what type of AI killed the player. Side note: You might be able to infer it based on the weapon type, but that would be an approximation.

Are you planning on updating the API to add the AI type? I would much rather know the type of the AI than the weapon. Both would be even better. Couldn’t you put it in the killer property? You would know whether to look for the gamertag or the stock id based on the killerAgent. Or add KillerStockId like with VictimStockId. This would be very helpful to what I am using it for.

Thanks!

> 2533274831354147;8:
> > 2533274803816431;7:
> > - If an AI killed the player, you can sometimes figure out what the type of the AI was if a melee attack was used by using KillerWeaponStockId. However, if a weapon was used, you won’t know what type of AI killed the player. Side note: You might be able to infer it based on the weapon type, but that would be an approximation.
>
>
> Are you planning on updating the API to add the AI type? I would much rather know the type of the AI than the weapon. Both would be even better. Couldn’t you put it in the killer property? You would know whether to look for the gamertag or the stock id based on the killerAgent. Or add KillerStockId like with VictimStockId. This would be very helpful to what I am using it for.
>
> Thanks!

Hi Barnyard Gnome! Thanks for the suggestion. This is something we’ll keep in mind in the future, and will look into it after the Hackathon contest has ended.