Triforce v0.9.0

Character tab, faster renderer defaults, HD rumble shipped, and the 11-30 bug pass: ending softlock below 60 fps, adult first-night lock, Intel Arc robust buffers, adult map, randomizer load order.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-30 20:55:14 -06:00
parent 8cb23131f9
commit 822ee913bc
86 changed files with 8128 additions and 438 deletions

View File

@@ -4,6 +4,11 @@
// <game>\mods\Randomizer <seed>\ootrr\seed.ootrr the seed file (its settings string inside), spoiler.txt, settings.json
// <game>\mods\Randomizer <seed>\triforce_rando.json what the page lists it by: seed, settings string, OOTRR's version
// <game>\mods\Randomizer <seed>\triforce_mod.json its name, author and page on the Mods page
// ((Triforce, 11-30) The folder is "~Randomizer <seed>": the ~ sorts the seed after every other mod (host/mods.c: of two mods
// that carry a file, the one whose name sorts last wins it). A seed's event tables (RSDB EventSetting, GameAnalyzedEventInfo)
// register the events its chests, boss keys and Epona run; a mod that carried its own copies and sorted after "Randomizer" took
// them over, and the seed's chests did not open and its boss warp did nothing (ticket 1576351134820470917, "Song of Time Age
// Swap"). A seed made before is "Randomizer <seed>": Use gives it the ~ when it switches it on.)
// The game reads only romfs (and exefs, cheats) under a mod, so the other files lie there unread. One seed is on at a time: making
// or choosing one switches the others off (ModManager's rename, "-" in front). Nothing is made while the game runs.
using System.Security.Cryptography;
@@ -45,6 +50,9 @@ public sealed class Randomizer
public const string Marker = "triforce_rando.json";
public const string FilesFolder = "ootrr";
public const string Prefix = "Randomizer ";
/// <summary>In front of a seed's folder: it sorts after every other mod's (~ comes after the letters and digits, as the game
/// compares names).</summary>
public const string Last = "~";
readonly TriforceContext ctx;
public Ootrr Tool { get; }
@@ -189,10 +197,19 @@ public sealed class Randomizer
var clean = string.Join(" ", new string(chars).Split(' ', StringSplitOptions.RemoveEmptyEntries)).Trim('-', ' ');
while (clean.Contains("--")) clean = clean.Replace("--", "-");
if (clean.Length == 0) clean = "seed";
var name = Prefix + clean;
var name = Last + Prefix + clean;
return name.Length <= 60 ? name : name.Substring(0, 60).TrimEnd(' ', '-');
}
/// <summary>The name a seed's folder takes when it is switched on: a seed made before 11-30 ("Randomizer &lt;seed&gt;", which
/// another mod could sort after) gets the ~ in front; null for one that keeps its name (one that has it, or one numbered on
/// the Mods page: that order is the player's).</summary>
public static string? OnName(string folder)
{
var (_, number, name) = Mods.Parse(folder);
return number == null && name.StartsWith(Prefix, StringComparison.Ordinal) ? Last + name : null;
}
/// <summary>A folder name for a new seed that no folder of the mods folder has yet, on or off (" 2", " 3" ... after it).</summary>
internal static string FreeName(string mods, string name)
{
@@ -367,7 +384,7 @@ public sealed class Randomizer
foreach (var other in Seeds(game).Where(x => x.Mod.On && x.Mod.Rel != seed.Mod.Rel)) Manager.SetOn(mods, other.Mod, false);
// (switching the others off renames only their folders: this one is where it was)
var now = Seeds(game).FirstOrDefault(x => x.Mod.Rel == seed.Mod.Rel) ?? seed;
return now.Mod.On ? now.Mod.Path : Manager.SetOn(mods, now.Mod, true);
return now.Mod.On ? now.Mod.Path : Manager.SetOn(mods, now.Mod, true, OnName(now.Mod.Folder));
}
/// <summary>Switches every seed off: the game is the plain game again.</summary>