

later on we need the korean localization, so the gamestrings need to be updated heroesDataDirectory.

GetHeroById( "Alarak ", true, true, true, true) now the hero data for Alarak can be obtained Hero alarakData = dataDocument. HeroData( new HeroesDataVersion(2, 49, 4, 78679), true, Localization. get the hero data document using HeroDataDocument heroDataDocument = heroesDataDirectory. by default, this will look into the heroesdata directory, otherwise provide the name of the directory HeroesDataDirectory heroesDataDirectory = new HeroesDataDirectory() It does not matter if the existing data is parsed from a localized or non-localized json file. The method only accepts a GameStringDocument argument (since the gamestrings are just being updated, not all the data). This method is available on all the data objects. To update an object's gamestrings to a different localization without having to parse all of the data again is provided through the use of the extension method UpdateGameStrings. GetAbility( new AbilityTalentId( "AlarakDeadl圜hargeActivate ", "AlarakDeadl圜harge ") get a specific ability Ability heroicAbility = alarakData. his abilities List abilities = alarakData. his rarity Rarity rarity = alarakData. get Alarak's attribute id string att = alarakData. get hero data for Alarak // all four booleans are set to true to obtain his abilities, subAbilities, talents, and hero units Hero alarakData = heroDataDocument. parse the json file using HeroDataDocument heroDataDocument = HeroDataDocument. Each provide static multiple Parse methods to parse the json files.Įxample usage for parsing a non-localized json data file. There is a DataDocument class for each json data file. If using localized-text, the command localized-json must be used to convert the gamestring text files into json files.Īnother choice instead of using HDP is to use the already extracted data files at heroes-data. If there is only going to be one supported locale, then have HDP leave it as is, otherwise include the option -localized-text. The gamestrings can be either part of the json data files or be in localized form. NET library that parses the json data extracted from Heroes Data Parser and provides objects to easily access the data along with multi-localization support.
