SimcProfileParser 2.0.4

dotnet add package SimcProfileParser --version 2.0.4                
NuGet\Install-Package SimcProfileParser -Version 2.0.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SimcProfileParser" Version="2.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SimcProfileParser --version 2.0.4                
#r "nuget: SimcProfileParser, 2.0.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SimcProfileParser as a Cake Addin
#addin nuget:?package=SimcProfileParser&version=2.0.4

// Install SimcProfileParser as a Cake Tool
#tool nuget:?package=SimcProfileParser&version=2.0.4                

Simc Profile Parser

Appveyor Build Status Publish to nuget Build & Run Tests (.NET Core)

A library to parse items in the simc import format into functional objects.

PLEASE NOTE: This library is still a work in progress and is being created to support another project. Please raise an issue if something isn't working as you would expect or throws a NotYetImplemented exception and it may be prioritised.

Usage

Initialising

Instance Creation

A new instance can be manually created.

ISimcGenerationService sgs = new SimcGenerationService();

To provide logging to the new instance and its children, supply an ILoggerFactory:

ISimcGenerationService sgs = new SimcGenerationService(myLoggerFactory);
Using Dependency Injection

To implement this using Dependency Injection register it alongside your other services configuration using the AddSimcProfileParser() extension method when configuring your DI services:

public void ConfigureServices(IServiceCollection services)
{
    services.AddSimcProfileParser();
}

Then you request an instance of ISimcGenerationService through DI in your class constructors:

class MyClass
{
    private readonly ISimcGenerationService _simcGenerationService;

    public MyClass(ISimcGenerationService simcGenerationService)
    {
        _simcGenerationService = simcGenerationService;
    }
}

Examples

Parsing profile files/strings

Generating a profile object from a simc import file named import.simc:

ISimcGenerationService sgs = new SimcGenerationService();

// Using async
var profile = await sgs.GenerateProfileAsync(File.ReadAllText("import.simc"));

Console.WriteLine($"Profile object created for player {profile.Name}.");

You can also generate a profile object from individual lines of an import file:

ISimcGenerationService sgs = new SimcGenerationService();

var lines = new List<string>()
{
    "level=70",
    "main_hand=,id=178473,bonus_id=6774/1504/6646"
};

var profile = await sgs.GenerateProfileAsync(lines);

Console.WriteLine($"Profile object created for a level {profile.Level}");
Console.WriteLine($"They are weilding {profile.Items.FirstOrDefault().Name}.");
Creating a single item

There are some basic options to manually create an item using ISimcGenerationService.GenerateItemAsync.

ISimcGenerationService sgs = new SimcGenerationService();

var itemOptions = new SimcItemOptions()
{
    ItemId = 177813,
    Quality = ItemQuality.ITEM_QUALITY_EPIC,
    ItemLevel = 226
};

var item = await sgs.GenerateItemAsync(spellOptions);

There are other options that can be set, including bonus ids, gems and the original drop level:

public uint ItemId { get; set; }
public int ItemLevel { get; set; }
public IList<int> BonusIds { get; set; }
public IList<int> GemIds { get; set; }
public ItemQuality Quality { get; set; }
public int DropLevel { get; set; }
Creating a single spell

There are some basic options to manually create a spell using ISimcGenerationService.GenerateSpellAsync.

There are two types of generatable spells:

  • Player Scaling: the type that scale with the player level / class, such as racials.
  • Item Scaling: the type that scales with the item quality/level, such as trinkets.

Generating an item scaling spell (id 343538) for a rare trinket at ilvl 226:

ISimcGenerationService sgs = new SimcGenerationService();

var spellOptions = new SimcSpellOptions()
{
    ItemLevel = 226,
    SpellId = 343538,
    ItemQuality = ItemQuality.ITEM_QUALITY_EPIC,
    ItemInventoryType = InventoryType.INVTYPE_TRINKET
};

var spell = await sgs.GenerateSpellAsync(spellOptions);

Generating an player scaling spell (id 274740):

ISimcGenerationService sgs = new SimcGenerationService();

var spellOptions = new SimcSpellOptions()
{
    SpellId = 274740,
    PlayerLevel = 70
};

var spell = await sgs.GenerateSpellAsync(spellOptions);

The spell object has a property ScaleBudget which can be multiplied with a coeffecient from a spells effect if required. Otherwise typically the BaseValue/ScaledValue of the effect will be what you're looking for.

Support

For bugs please search issues then create a new issue if needed.

For help using this library, please check the wiki or visit discord.

Product 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.4 63 2/12/2025
2.0.3 60 2/12/2025
2.0.2 67 2/12/2025
2.0.1 66 2/12/2025
2.0.0 63 2/12/2025
1.7.1 64 2/12/2025
1.7.0 62 1/24/2025
1.6.0 118 8/6/2024
1.5.0 164 9/22/2023
1.4.1 131 9/22/2023
1.3.1 336 1/4/2023
1.3.0 425 10/19/2022
1.2.0 682 9/17/2022
1.1.0 420 9/12/2022
1.0.0 437 9/7/2022
0.5.3.1 481 8/16/2022
0.5.3 417 8/16/2022
0.5.2 404 8/16/2022
0.5.1 368 8/19/2021
0.5.0 403 7/29/2021
0.4.0 530 12/6/2020
0.3.6 443 12/3/2020
0.3.5 414 11/16/2020
0.3.4 401 11/16/2020
0.3.3 418 11/13/2020
0.3.2 489 11/8/2020
0.3.1 442 11/5/2020
0.3.0 436 11/1/2020
0.2.2 582 10/28/2020
0.2.1 490 10/26/2020
0.2.0 490 10/26/2020
0.1.6 494 10/26/2020
0.1.5 472 10/18/2020
0.1.4 524 10/17/2020
0.1.3 470 10/17/2020
0.1.2 442 10/15/2020
0.1.1 428 10/15/2020
0.1.0 401 10/15/2020
0.0.6 542 10/11/2020
0.0.5 448 10/8/2020
0.0.4 446 10/7/2020
0.0.3 462 9/28/2020
0.0.2 485 9/26/2020
0.0.1 491 9/26/2020