Snapshot for release 2026.10.13.1 (internal d2b5fb3)

This commit is contained in:
Tom Bohar 2026-10-13 14:25:49 -04:00
commit 319740ff5d
291 changed files with 58505 additions and 2107 deletions

View file

@ -422,6 +422,7 @@ public sealed class LootEditSession
/// </summary>
public bool Save(bool force = false)
{
_writeError = null;
if (!IsOpen) return Fail("No profile open.");
if (_utl == null) return Fail(_readOnlyReason);
try
@ -441,16 +442,49 @@ public sealed class LootEditSession
}
catch (Exception ex)
{
_writeError = ex;
return Fail($"Save failed: {ex.Message}");
}
}
/// <summary>
/// The exception of the last save that threw (folder not writable, file in use, ...), once:
/// the in-game bridge hands it to RynthAi's save-failure report (2026-10-13). Null when
/// the last save failed for another reason or succeeded.
/// </summary>
public Exception? TakeWriteError()
{
Exception? e = _writeError;
_writeError = null;
return e;
}
private Exception? _writeError;
/// <summary>
/// Clears the ReadOnly attribute of a file we are about to replace (a read-only profile,
/// its .bak or a stale .tmp can't be overwritten). Never throws.
/// </summary>
internal static void ClearReadOnly(string path)
{
try
{
if (!File.Exists(path)) return;
FileAttributes a = File.GetAttributes(path);
if ((a & FileAttributes.ReadOnly) != 0) File.SetAttributes(path, a & ~FileAttributes.ReadOnly);
}
catch { }
}
/// <summary>Writes a temp file and swaps it in, the old file kept as .bak.</summary>
private static void WriteFile(string path, byte[] bytes)
{
string? dir = System.IO.Path.GetDirectoryName(path);
if (!string.IsNullOrEmpty(dir)) Directory.CreateDirectory(dir);
string tmp = path + ".tmp";
ClearReadOnly(tmp);
ClearReadOnly(path);
ClearReadOnly(path + ".bak");
File.WriteAllBytes(tmp, bytes);
if (File.Exists(path))
{
@ -549,6 +583,7 @@ public sealed class LootEditSession
private bool InsertJson(LootRule native, int index)
{
_writeError = null;
try
{
byte[] bytes = File.ReadAllBytes(_path);
@ -570,6 +605,7 @@ public sealed class LootEditSession
}
catch (Exception ex)
{
_writeError = ex;
return Fail($"Not added: {ex.Message}");
}
}

View file

@ -60,8 +60,8 @@ public sealed class LootItemRuleOptions
/// <summary>Null or blank: "Keep Copper Pea" and the like.</summary>
public string? RuleName { get; set; }
/// <summary>
/// Also require the item's T11 attributes (tier, grade, damage %, each modifier, slot
/// special, Cast on Strike), each at least as good as this item's. Works with any match.
/// Also require the item's T11 attributes (tier, weapon / gear grade, damage %, each modifier,
/// slot special, Cast on Strike), each at least as good as this item's. Works with any match.
/// </summary>
public bool IncludeT11 { get; set; }
}
@ -263,12 +263,13 @@ public static class LootItemRules
}
/// <summary>
/// The T11 conditions, on RynthAi's virtual T11 keys: Is T11, then tier, grade, damage %,
/// every catalogued modifier, slot special and Cast on Strike count, each at least this
/// item's. Left out on purpose: Can Wield (the character, not the item), Zone Locked
/// (where it was appraised), the wield gates (they follow from the tier) and the modifier
/// count / rating total / roll % (they follow from the per-modifier values).
/// How many it added.
/// The T11 conditions, on RynthAi's virtual T11 keys: Is T11, then tier (the server's
/// stamped tier when sent), weapon grade, damage %, gear grade, every catalogued modifier,
/// slot special and Cast on Strike count, each at least this item's. Left out on purpose:
/// Can Wield (the character, not the item), Zone Locked (where it was appraised), the wield
/// gates (they follow from the tier), the modifier count / rating total / roll % (they
/// follow from the per-modifier values), and the property slots and Tainted (bag state,
/// not quality). How many it added.
/// </summary>
private static int AddT11Conditions(VTankLootRule rule, LootItemFacts f, List<string> notes)
{
@ -290,9 +291,10 @@ public static class LootItemRules
return rule.Conditions.Count - n;
}
AtLeast(T11Keys.EstimatedTier, t.EstimatedTier);
AtLeast(T11Keys.EstimatedTier, t.Tier);
AtLeast(T11Keys.WeaponGrade, t.GradeRank);
AtLeast(T11Keys.DamagePercent, t.DamagePercent);
AtLeast(T11Keys.GearGrade, t.GearGradeRank);
bool valuelessSpecial = false;
var unknown = new List<string>();

View file

@ -63,6 +63,10 @@ public static class LootRuleText
(0x0D00001A, "Category"), (0x0D00001F, "WeapSpeed"), (0x0D000020, "EquipSkill"),
(0x0D000021, "DamageType (Decal)"), (0x0D000022, "MaxDamage"),
(0x0D000029, "IconOverlay"), (0x0D00002A, "IconUnderlay"),
// ACECustom T11 properties sent in the appraisal: real keys, so VTank reads them too.
(T11.T11Catalog.PropWeaponAugScaleQuality, "WeaponAugScaleQuality"),
(T11.T11Catalog.PropWeaponAugScaleTier, "WeaponAugScaleTier"),
(T11.T11Catalog.PropZcTier, "ZcTier"),
};
keys.AddRange(T11.T11Keys.Names());
return keys.ToArray();
@ -166,6 +170,7 @@ public static class LootRuleText
158 => WieldRequirements,
159 => Skills,
T11.T11Keys.WeaponGrade => T11.T11Catalog.Grades,
T11.T11Keys.GearGrade => T11.T11Catalog.Grades,
_ => null,
};
@ -173,7 +178,7 @@ public static class LootRuleText
public static bool ValueTableIsFlags(int longKey) => longKey is 45 or 0x0D000021;
/// <summary>The long keys that have a value table, for the vocabulary.</summary>
public static readonly int[] KeysWithValueTables = { 45, 48, 131, 158, 159, 0x0D000020, 0x0D000021, T11.T11Keys.WeaponGrade };
public static readonly int[] KeysWithValueTables = { 45, 48, 131, 158, 159, 0x0D000020, 0x0D000021, T11.T11Keys.WeaponGrade, T11.T11Keys.GearGrade };
/// <summary>
/// True for the conditions whose value is picked by name when the key has a