Mutagen-Modding / Mutagen

A .NET library for analyzing, creating, and manipulating Bethesda mods
GNU General Public License v3.0
123 stars 32 forks source link

Fo4 ChanceNone incorrect #548

Closed Noggog closed 2 months ago

Noggog commented 2 months ago
var lvli = state.PatchMod.LeveledItems.AddNew();
var pct = new Percent(0.29);
Console.WriteLine($"Pct {pct}");
lvli.Entries ??= new();
lvli.Entries.Add(new LeveledItemEntry()
{
    Data = new LeveledItemEntryData()
    {
        ChanceNone = pct
    }
});

image

Error is that the byte should be scaled from values 0 to 100, rather than 0 to 255, which it's currently set to do