Triforce v0.8.5

A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-28 10:54:41 -06:00
parent 2df08c751e
commit b527e29adb
203 changed files with 18821 additions and 2051 deletions

View File

@@ -107,8 +107,40 @@
}
}, 100);
}
// ((Triforce, 11-25) the Randomizer page: a few of OOTRR's settings, sample seeds, a pretend download and seed)
const RS = { have: false, frac: 0, busy: false, seeds: [{ id: 'Randomizer K7QW2MPA', seed: 'K7QW2MPA', on: true, sub: 'On · made 24 Nov 2026, 21:10 · OOTRR 0.8.2', settings: 'OOTRR1-AMAQAJQBAETQCAJ', spoiler: true, cos: '' }],
seed: 'R4TN8XQE', cos: { music: 'off', sfx: 'off', colors: 'off', title: true }, preset: 'default',
v: { open_forest: 'closed', zora_fountain: 'closed', shuffle_songs: 'off', shuffle_smallkeys: 'dungeon', bridge: 'vanilla', bridge_rewards: 9, skip_ganon_trials: false, trials: 6, starting_hearts: 3, starting_items: [], enemy_damage: 100, no_heart_drops: false } };
const RSCHEMA = { prefix: 'OOTRR1-', groups: [{ id: 'world', label: 'World', tip: 'How the world starts.' }, { id: 'shuffle', label: 'Shuffles', tip: '' }, { id: 'keys', label: 'Keys', tip: '' }, { id: 'goal', label: 'Goals', tip: '' }, { id: 'starting', label: 'Starting items', tip: '' }, { id: 'difficulty', label: 'Difficulty', tip: 'All off unless you turn them on.' }],
presets: [{ id: 'default', name: 'Default', tip: 'OOTRR\'s defaults.' }, { id: 'easy', name: 'Easy', tip: 'Keys are removed, the world is mostly open and the goals are short.' }, { id: 'keysanity', name: 'Keysanity', tip: 'Keys anywhere.' }],
settings: [
{ id: 'open_forest', label: 'Kokiri Forest', group: 'world', kind: 'choice', tip: 'Whether Mido lets you out of the forest from the start.', choices: [{ id: 'open', label: 'Open', tip: '' }, { id: 'closed', label: 'Closed', tip: '' }] },
{ id: 'zora_fountain', label: "Zora's Fountain", group: 'world', kind: 'choice', tip: 'Whether King Zora starts moved aside.', choices: [{ id: 'closed', label: 'Closed', tip: '' }, { id: 'adult', label: 'Open for adult', tip: '' }, { id: 'open', label: 'Open', tip: '' }] },
{ id: 'shuffle_songs', label: 'Songs', group: 'shuffle', kind: 'choice', tip: 'Where the songs are taught.', choices: [{ id: 'off', label: 'Vanilla', tip: '' }, { id: 'own', label: 'Among the song teachers', tip: '' }, { id: 'anywhere', label: 'Anywhere', tip: '' }] },
{ id: 'shuffle_smallkeys', label: 'Small keys', group: 'keys', kind: 'choice', tip: 'Where small keys can be.', choices: [{ id: 'remove', label: 'Removed', tip: '' }, { id: 'vanilla', label: 'Vanilla', tip: '' }, { id: 'dungeon', label: 'Own dungeon', tip: '' }, { id: 'keysanity', label: 'Anywhere', tip: '' }] },
{ id: 'bridge', label: 'Rainbow Bridge', group: 'goal', kind: 'choice', tip: 'What opens the bridge to Ganon\'s Castle.', choices: [{ id: 'open', label: 'Open', tip: '' }, { id: 'vanilla', label: 'Vanilla', tip: '' }, { id: 'dungeons', label: 'Dungeon rewards', tip: '' }] },
{ id: 'bridge_rewards', label: 'Rewards for the bridge', group: 'goal', kind: 'number', tip: 'How many Stones and Medallions open the bridge.', min: 0, max: 9, step: 1 },
{ id: 'skip_ganon_trials', label: "Skip Ganon's Trials", group: 'goal', kind: 'toggle', tip: 'The barrier is down from the start.' },
{ id: 'trials', label: 'Trials to clear', group: 'goal', kind: 'number', tip: 'How many of the six trials count.', min: 0, max: 6, step: 1 },
{ id: 'starting_hearts', label: 'Starting hearts', group: 'starting', kind: 'number', tip: 'Hearts at the start of a new game.', min: 1, max: 20, step: 1 },
{ id: 'starting_items', label: 'Starting items', group: 'starting', kind: 'multi', tip: 'Items you begin the game with.', choices: [{ id: 'ocarina', label: 'Ocarina', tip: '' }, { id: 'bow', label: 'Bow', tip: '' }, { id: 'hookshot', label: 'Hookshot', tip: '' }, { id: 'hover_boots', label: 'Hover Boots', tip: '' }] },
{ id: 'enemy_damage', label: 'Enemy damage', group: 'difficulty', kind: 'number', tip: 'How hard enemies hit, from 0.5x to 5x.', min: 50, max: 500, step: 25, times: 100 },
{ id: 'no_heart_drops', label: 'No heart drops', group: 'difficulty', kind: 'toggle', tip: 'Enemies and grass drop no hearts.' },
] };
function rshow(x, v) { return x.kind === 'toggle' ? (v ? 'On' : 'Off') : x.kind === 'choice' ? (x.choices.find(c => c.id === v) || {}).label : x.kind === 'multi' ? (v.length ? v.map(i => (x.choices.find(c => c.id === i) || {}).label).join(', ') : 'None') : String(v); }
function rando(withSchema) {
const rows = {};
for (const x of RSCHEMA.settings) {
const hide = (x.id === 'bridge_rewards' && RS.v.bridge !== 'dungeons') || (x.id === 'trials' && RS.v.skip_ganon_trials);
rows[x.id] = { st: hide ? 'hidden' : 'open', v: RS.v[x.id], show: rshow(x, RS.v[x.id]) };
}
const r = { tool: { have: RS.have, version: '0.8.2', size: '4.5 MB', busy: RS.busy && !RS.have, frac: RS.frac, line: RS.busy ? 'Downloading, ' + Math.round(RS.frac * 100) + ' %' : '' },
game: true, busy: RS.have && RS.busy, line: RS.line || '', seed: RS.seed, cos: RS.cos, preset: RS.preset, changed: RS.preset ? 0 : 3, rows, seeds: RS.seeds, note: '' };
if (withSchema) r.schema = RSCHEMA;
emit({ t: 'state', rando: r });
}
window.DEMO = {
jumps: [['welcome', 'First run: welcome'], ['reveal', 'First run: game found'], ['build', 'First run: building'], ['fail', 'Build failed'], ['done', 'First run: ready'], ['home', 'Home'], ['update', 'Home with an update ready'], ['saves', 'Saves'], ['mods', 'Mods'], ['settings', 'Settings'], ['bench', 'Benchmark']],
jumps: [['welcome', 'First run: welcome'], ['reveal', 'First run: game found'], ['build', 'First run: building'], ['fail', 'Build failed'], ['done', 'First run: ready'], ['home', 'Home'], ['update', 'Home with an update ready'], ['saves', 'Saves'], ['mods', 'Mods'], ['rando', 'Randomizer'], ['settings', 'Settings'], ['bench', 'Benchmark']],
jump(j, fn) {
out = fn; clearInterval(st.timer);
if (j === 'welcome') { emit({ t: 'state', media: { art: false, music: false, sfx: true } }); emit({ t: 'go', s: 'welcome' }); }
@@ -161,6 +193,36 @@
else if (c === 'texpackstop') { clearInterval(st.packTimer); st.pack.busy = false; st.pack.have = 'partial'; emit({ t: 'toast', html: 'Download stopped · it goes on where it stopped next time' }); emit(home()); }
else if (c === 'setting' && m.id === 'uninstall') emit({ t: 'ask', title: 'Uninstall Triforce?', html: '<p>Removes the launcher, its tools and the built game.</p><p>Your saves and mods stay in a backup folder.</p>', reply: 'uninstall', buttons: [{ id: 'no', label: 'Keep it' }, { id: 'yes', label: 'Uninstall', main: true }] });
else if (c === 'setting') emit({ t: 'toast', html: m.id + ' <span style="color:var(--text3)">· the launcher does this</span>' });
else if (c === 'rando.open') rando(true);
else if (c === 'rando.install' || c === 'rando.install.go') { RS.busy = true; clearInterval(st.packTimer); st.packTimer = setInterval(() => { RS.frac = Math.min(1, RS.frac + .1); if (RS.frac >= 1) { clearInterval(st.packTimer); RS.have = true; RS.busy = false; emit({ t: 'toast', html: '<b>&#9670;</b> The randomizer is ready · OOTRR 0.8.2', sfx: 'success' }); } rando(RS.have); }, 150); }
else if (c === 'rando.set') { RS.v[m.id] = m.value; RS.preset = null; rando(); }
else if (c === 'rando.pick') { RS.v[m.ctx] = m.id; RS.preset = null; rando(); }
else if (c === 'rando.preset.pick') { RS.preset = m.id; rando(); }
else if (c === 'rando.cos.pick') { RS.cos[m.ctx] = m.id; rando(); }
else if (c === 'rando.cos') { RS.cos.title = m.value === 'on'; rando(); }
else if (c === 'rando.seed') { RS.seed = m.text; rando(); }
else if (c === 'rando.reseed') { RS.seed = Math.random().toString(36).slice(2, 10).toUpperCase(); rando(); }
else if (c === 'rando.decode') { RS.preset = null; emit({ t: 'toast', html: 'Settings taken from the string', sfx: 'success' }); rando(); }
else if (c === 'rando.make') {
RS.busy = true; const lines = ['Placing the items', 'Writing the seed’s game files', 'Title logo: written', 'changed 156 of 236 placed chests']; let i = 0; clearInterval(st.packTimer);
st.packTimer = setInterval(() => {
RS.line = lines[i++];
if (i > lines.length) {
clearInterval(st.packTimer); RS.busy = false; RS.line = ''; RS.seeds.forEach(x => { x.on = false; x.sub = x.sub.replace(/^On/, 'Off'); });
RS.seeds.unshift({ id: 'Randomizer ' + RS.seed, seed: RS.seed, on: true, sub: 'On · made just now · OOTRR 0.8.2', settings: 'OOTRR1-AMAQ', spoiler: true, cos: '' });
emit({ t: 'toast', html: '<b>&#9670;</b> Seed <b>' + RS.seed + '</b> is on · start a <b>new game</b> in an empty file', sfx: 'success' });
RS.seed = Math.random().toString(36).slice(2, 10).toUpperCase(); emit({ t: 'state', randoMade: 1 });
}
rando();
}, 700);
rando();
}
else if (c === 'rando.stop') { clearInterval(st.packTimer); RS.busy = false; RS.line = ''; emit({ t: 'toast', html: 'Stopped · no seed was made' }); rando(); }
else if (c === 'rando.use') { RS.seeds.forEach(x => { x.on = x.id === m.id; x.sub = x.sub.replace(/^(On|Off)/, x.on ? 'On' : 'Off'); }); rando(); }
else if (c === 'rando.off') { RS.seeds.forEach(x => { x.on = false; x.sub = x.sub.replace(/^On/, 'Off'); }); rando(); }
else if (c === 'rando.remove') { RS.seeds = RS.seeds.filter(x => x.id !== m.id); rando(); }
else if (c === 'rando.spoiler') emit({ t: 'ask', title: 'Open the spoiler log?', html: '<p>It lists where every item of this seed is, and one way through the game. Open it only if you want to know.</p>', reply: 'rando.spoiler.go', buttons: [{ id: 'no', label: 'Keep it closed' }, { id: 'go', label: 'Open it', main: true }], ctx: m.id });
else if (c.startsWith('rando.')) emit({ t: 'toast', html: c + ' <span style="color:var(--text3)">· the launcher does this</span>' });
else if (c === 'bench') bench();
else if (c === 'benchstop') { clearInterval(st.timer); emit({ t: 'bench', phase: 'stopped' }); }
else if (c === 'benchapply') { emit({ t: 'go', s: 'settings' }); emit({ t: 'toast', html: '<b>&#9670;</b> Applied · they take effect the next time you play', sfx: 'success' }); }