Heroes.LocaleText
1.0.0-beta.1
See the version list below for details.
dotnet add package Heroes.LocaleText --version 1.0.0-beta.1
NuGet\Install-Package Heroes.LocaleText -Version 1.0.0-beta.1
<PackageReference Include="Heroes.LocaleText" Version="1.0.0-beta.1" />
paket add Heroes.LocaleText --version 1.0.0-beta.1
#r "nuget: Heroes.LocaleText, 1.0.0-beta.1"
// Install Heroes.LocaleText as a Cake Addin #addin nuget:?package=Heroes.LocaleText&version=1.0.0-beta.1&prerelease // Install Heroes.LocaleText as a Cake Tool #tool nuget:?package=Heroes.LocaleText&version=1.0.0-beta.1&prerelease
Heroes Locale Text
Heroes Locale Text is a .NET library used to parse tooltip descriptions and provide readable friendly verbiage. Descriptions must already be xml parsed out and it's values computed.
Valid descriptions are the gamestrings from heroes-data.
Usage
Parse a provided gamestring using TooltipDescription
and call one of the properties.
TooltipDescription tooltipDescription = new("Spawn a mine that becomes active after a short time. Deals <c val=\"bfd4fd\">153~~0.04~~</c> damage and reveals the enemy for <c val=\"bfd4fd\">4</c> seconds. Lasts <c val=\"bfd4fd\">90</c> seconds.<n/><n/>Stores up to <c val=\"bfd4fd\">3</c> charges.");
string a = tooltipDescription.RawDescription;
string b = tooltipDescription.PlainText;
string d = tooltipDescription.PlainTextWithNewlines;
string c = tooltipDescription.PlainTextWithScaling;
string e = tooltipDescription.PlainTextWithScalingWithNewlines;
string f = tooltipDescription.ColoredText;
string g = tooltipDescription.ColoredTextWithScaling;
// a: "Spawn a mine that becomes active after a short time. Deals <c val=\"bfd4fd\">153~~0.04~~</c> damage and reveals the enemy for <c val=\"bfd4fd\">4</c> seconds. Lasts <c val=\"bfd4fd\">90</c> seconds.<n/><n/>Stores up to <c val=\"bfd4fd\">3</c> charges."
// b: "Spawn a mine that becomes active after a short time. Deals 153 damage and reveals the enemy for 4 seconds. Lasts 90 seconds. Stores up to 3 charges."
// c: "Spawn a mine that becomes active after a short time. Deals 153 damage and reveals the enemy for 4 seconds. Lasts 90 seconds.<n/><n/>Stores up to 3 charges."
// d: "Spawn a mine that becomes active after a short time. Deals 153 (+4% per level) damage and reveals the enemy for 4 seconds. Lasts 90 seconds. Stores up to 3 charges."
// e: "Spawn a mine that becomes active after a short time. Deals 153 (+4% per level) damage and reveals the enemy for 4 seconds. Lasts 90 seconds.<n/><n/>Stores up to 3 charges."
// f: "Spawn a mine that becomes active after a short time. Deals <c val=\"bfd4fd\">153</c> damage and reveals the enemy for <c val=\"bfd4fd\">4</c> seconds. Lasts <c val=\"bfd4fd\">90</c> seconds.<n/><n/>Stores up to <c val=\"bfd4fd\">3</c> charges."
// g: "Spawn a mine that becomes active after a short time. Deals <c val=\"bfd4fd\">153 (+4% per level)</c> damage and reveals the enemy for <c val=\"bfd4fd\">4</c> seconds. Lasts <c val=\"bfd4fd\">90</c> seconds.<n/><n/>Stores up to <c val=\"bfd4fd\">3</c> charges."
The localization of the gamestring can also be passed in using StormLocale
. By default it is ENUS.
TooltipDescription tooltipDescription = new("Feuert drei Geschosse auf ein Zielgebiet, die dem ersten getroffenen Gegner jeweils <c val=\"bfd4fd\">147~~0.035~~</c> Schaden zuf�gen. Die Geschosse f�gen Geb�uden <c val=\"bfd4fd\">50%</c> des Schadens zu.", StormLocale.DEDE);
string result = tooltipDescription.PlainTextWithScaling;
// result: "Feuert drei Geschosse auf ein Zielgebiet, die dem ersten getroffenen Gegner jeweils 147 (+3,5% pro Stufe) Schaden zuf�gen. Die Geschosse f�gen Geb�uden 50% des Schadens zu."
Developing
To build and compile the code, it is recommended to use the latest version of Visual Studio 2022 or Visual Studio Code.
Another option is to use the dotnet CLI tools from the .NET Core 8.0 SDK.
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Heroes.LocaleText:
Package | Downloads |
---|---|
Heroes.XmlData
Library to directly parse the Heroes of the Storm game data. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-beta.3 | 59 | 11/21/2024 |
1.0.0-beta.2 | 459 | 6/17/2024 |
1.0.0-beta.1 | 93 | 2/29/2024 |