I might be seeing this wrong but when you call for the Spartan Ranks some of the ranks do not match. The very first one you see is rank 26, but where it shows the rank it does not say rank 26. Instead it shows rank 25. This happens on a bunch of them, but not all. Some are the same so that is why i am confused. Also it seems they are only off by -1 each time it occurs, never more than that.
Weird. There’s three places the rank is displayed:
- rank.View.Title - rank.View.HW2SpartanRank.RankNumber - rank.View.HW2SpartanRank.DisplayInfo.View.TitleThe third appears to be showing odd-numbered ranks only, so for the even ranks (like 26) it’ll show the rank below instead. I wonder what’s causing it.
But unless you need localisation, you could use option 1 for now?
Hi Lil0Jigsaw. Thanks for bringing this to our attention – the metadata for Halo Wars 2 Spartan Ranks is really misleading! I’ll admit that I did a double take when I first looked at the data. On further inspection, it appears that the data returned isn’t incorrect, just misleading.
Thanks, Forza Win, for taking a shot at this over the weekend. Forza Win’s analysis is spot on, you can safely use Rank.View.Title or Rank.View.HW2SpartanRank.RankNumber to represent the numerical value of the Spartan Rank.
I’ll do my best to provide some additional information.
In Halo Wars 2, multiple Spartan Ranks may have the same name displayed in-game. For instance, players that are Spartan Rank 3 or Spartan Rank 4 are both considered to be “Apprentices”. This is modeled in the metadata by using the same Display Info, which is where these discrepancies sneak in. To add to the confusion, the Display Info content items have misleading titles – they are named after the first Spartan Rank content item that uses them.
Let’s inspect the Spartan Rank content items for Spartan Rank 3 and 4 from above.
For Spartan Rank 3, we see the following metadata:
Rank.View.Identity = befe3c1a30c14088bca4cdeedfe8232a
Rank.View.Title = “Rank 3”
Rank.View.HW2SpartanRank.RankNumber = 3
Rank.View.HW2SpartanRank.DisplayInfo.Identity = b8c9f2c8f69a4ac0aba4d67dcad6b32e
Rank.View.HW2SpartanRank.DisplayInfo.View.Title = “Rank 3”
Rank.View.HW2SpartanRank.DisplayInfo.View.HW2SpartanRankDisplayInfo.Name = “Apprentice”
For Spartan Rank 4, we see the following metadata:
Rank.View.Identity = 0a981f1049f74275bee74d8eac882ae4
Rank.View.Title = “Rank 4”
Rank.View.HW2SpartanRank.RankNumber = 4
Rank.View.HW2SpartanRank.DisplayInfo.Identity = b8c9f2c8f69a4ac0aba4d67dcad6b32e
Rank.View.HW2SpartanRank.DisplayInfo.View.Title = “Rank 3”
Rank.View.HW2SpartanRank.DisplayInfo.View.HW2SpartanRankDisplayInfo.Name = “Apprentice”
The Spartan Rank 3 and Spartan Rank 4 content items are using the same Display Info content item, which is indicated by the fact that the Identity in Rank.View.HW2SpartanRank.DisplayInfo.Identity is identical. Since Spartan Rank 3 is the first Spartan Rank content item to use the Display Info content item, the Display Info content item misleadingly assumes the title “Rank 3”. Therefore, with this in mind, we suggest you don’t use Rank.View.HW2SpartanRank.DisplayInfo.Title.
At a global level, we see that this pattern is consistent across all Spartan Ranks. Below is a table of all the Spartan Ranks returned via the metadata, summarized and sorted by Rank Number (Title = Rank.View.Title, RankNumber = Rank.View.HW2SpartanRank.RankNumber, StartXP = Rank.View.HW2SpartanRank.StartXP, DisplayInfoTitle = Rank.View.HW2SpartanRank.DisplayInfo.View.Title, DisplayInfoName = Rank.View.HW2SpartanRank.DisplayInfo.View.HW2SpartanRankDisplayInfo).
With this in mind, we recommend the following:
- As Forza Win suggested, use Rank.View.Title or Rank.View.HW2SpartanRank.RankNumber to represent the numerical value of the Spartan Rank. - Use Rank.View.HW2SpartanRank.DisplayInfo.View.HW2SpartanRankDisplayInfo.Name to represent the in-game name of the Spartan Rank.I’ve also updated the Halo Wars 2 Spartan Ranks documentation in the developer portal to hopefully clarify some of the more confusing points. Thanks again for pointing this out. Let us know if you have any more questions.
Oh wow thanks for the clarification.