Update Player Settings page to include new yaml options. Event sprite options are forthcoming.
This commit is contained in:
parent
6c575f555c
commit
008f38400d
|
@ -26,6 +26,7 @@ window.addEventListener('load', () => {
|
|||
gameSettings.addEventListener('keyup', handleOptionChange);
|
||||
|
||||
document.getElementById('export-button').addEventListener('click', exportSettings);
|
||||
document.getElementById('reset-to-default').addEventListener('click', resetToDefaults);
|
||||
}).catch((error) => {
|
||||
gameSettings.innerHTML = `
|
||||
<h2>Something went wrong while loading your game settings page.</h2>
|
||||
|
@ -150,6 +151,11 @@ const exportSettings = () => {
|
|||
download(`${settings.description}.yaml`, yamlText);
|
||||
};
|
||||
|
||||
const resetToDefaults = () => {
|
||||
[1, 2, 3].forEach((presetNumber) => localStorage.removeItem(`playerSettings${presetNumber}`));
|
||||
location.reload();
|
||||
};
|
||||
|
||||
/** Create an anchor and trigger a download of a text file. */
|
||||
const download = (filename, text) => {
|
||||
const downloadLink = document.createElement('a');
|
||||
|
@ -220,8 +226,12 @@ const buildUI = (settings) => {
|
|||
const currentPreset = document.getElementById('preset-number').value;
|
||||
const playerSettings = JSON.parse(localStorage.getItem(`playerSettings${currentPreset}`));
|
||||
|
||||
// Manually add a row for random sprites
|
||||
addSpriteRow(tbody, playerSettings, 'random');
|
||||
|
||||
// Add a row for each sprite currently present in the player's settings
|
||||
Object.keys(playerSettings.rom.sprite).forEach((spriteName) => {
|
||||
if(['random'].indexOf(spriteName) > -1) return;
|
||||
addSpriteRow(tbody, playerSettings, spriteName)
|
||||
});
|
||||
|
||||
|
@ -320,7 +330,7 @@ const addSpriteRow = (tbody, playerSettings, spriteName) => {
|
|||
label.innerText = spriteName;
|
||||
optionName.appendChild(label);
|
||||
|
||||
if(['random', 'randomonhit'].indexOf(spriteName) === -1) {
|
||||
if(['random', 'random_sprite_on_event'].indexOf(spriteName) === -1) {
|
||||
const deleteButton = document.createElement('span');
|
||||
deleteButton.setAttribute('data-sprite', spriteName);
|
||||
deleteButton.setAttribute('data-row-id', rowId);
|
||||
|
|
|
@ -46,6 +46,32 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"dark_room_logic": {
|
||||
"keyString": "dark_room_logic",
|
||||
"friendlyName": "Dark Room Logic",
|
||||
"description": "Logic to use for dark rooms.",
|
||||
"inputType": "range",
|
||||
"subOptions": {
|
||||
"lamp": {
|
||||
"keyString": "dark_room_logic.lamp",
|
||||
"friendlyName": "Lamp Required",
|
||||
"description": "The lamp is required for dark rooms to be considered in logic.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"torches": {
|
||||
"keyString": "dark_room_logic.torches",
|
||||
"friendlyName": "Lamp or Torches",
|
||||
"description": "In addition to the lamp, a fire rod and accessible torches may put dark rooms into logic.",
|
||||
"defaultValue": 0
|
||||
},
|
||||
"none": {
|
||||
"keyString": "dark_room_logic.none",
|
||||
"friendlyName": "Always in Logic",
|
||||
"description": "Dark rooms are always considered in logic, which may require you to navigate rooms in complete darkness.",
|
||||
"defaultValue": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"map_shuffle": {
|
||||
"keyString": "map_shuffle",
|
||||
"friendlyName": "Map Shuffle",
|
||||
|
@ -353,37 +379,75 @@
|
|||
"defaultValue": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"triforce_pieces_required": {
|
||||
"keyString": "triforce_pieces_required",
|
||||
"friendlyName": "Triforce Pieces Required",
|
||||
"description": "Determines the total number of Triforce pieces required before speaking with Murahadala",
|
||||
"inputType": "range",
|
||||
"subOptions": {
|
||||
"15": {
|
||||
"keyString": "triforce_pieces_required.15",
|
||||
"friendlyName": 15,
|
||||
"description": "15 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 0
|
||||
},
|
||||
"20": {
|
||||
"keyString": "triforce_pieces_required.20",
|
||||
"friendlyName": 20,
|
||||
"description": "20 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"30": {
|
||||
"keyString": "triforce_pieces_required.30",
|
||||
"friendlyName": 30,
|
||||
"description": "30 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"40": {
|
||||
"keyString": "triforce_pieces_required.40",
|
||||
"friendlyName": 40,
|
||||
"description": "40 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"50": {
|
||||
"keyString": "triforce_pieces_required.50",
|
||||
"friendlyName": 50,
|
||||
"description": "50 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 50
|
||||
}
|
||||
}
|
||||
},
|
||||
"triforce_pieces_mode": {
|
||||
"keyString": "triforce_pieces_mode",
|
||||
"friendlyName": "Triforce Pieces Mode",
|
||||
"description": "Determines how to determine how many extra Triforce pieces will be available",
|
||||
"friendlyName": "Triforce Piece Availability Mode",
|
||||
"description": "Determines which of the following three options will be used to determine the total available triforce pieces.",
|
||||
"inputType": "range",
|
||||
"subOptions": {
|
||||
"available": {
|
||||
"keyString": "triforce_pieces_mode.available",
|
||||
"friendlyName": "Available",
|
||||
"description": "Determine the total number of pieces available in \"Triforce pieces available\"",
|
||||
"friendlyName": "Exact Number",
|
||||
"description": "Explicitly tell the generator how many triforce pieces to place throughout Hyrule.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"extra": {
|
||||
"keyString": "triforce_pieces_mode.extra",
|
||||
"friendlyName": "Extra",
|
||||
"description": "Determine how many extra pieces will be available in \"Extra Triforce pieces quantity\"",
|
||||
"friendlyName": "Required Plus",
|
||||
"description": "Set the number of triforce pieces in Hyrule equal to the number of required pieces plus a number specified by this option.",
|
||||
"defaultValue": 0
|
||||
},
|
||||
"percentage": {
|
||||
"keyString": "triforce_pieces_mode.percentage",
|
||||
"friendlyName": "Percentage",
|
||||
"description": "Determine the available pieces using a percentage of the required ones using the \"Extra Triforce pieces percentage\"",
|
||||
"description": "Set the number of triforce pieces in Hyrule equal to the number of required pieces plus a percentage specified by this option.",
|
||||
"defaultValue": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"triforce_pieces_available": {
|
||||
"keyString": "triforce_pieces_available",
|
||||
"friendlyName": "Triforce Pieces Available",
|
||||
"description": "Determines the total number of Triforce pieces hidden throughout Hyrule",
|
||||
"friendlyName": "Exact Number (Triforce Hunt)",
|
||||
"description": "Only used if enabled in Triforce Piece Availability Mode.",
|
||||
"inputType": "range",
|
||||
"subOptions": {
|
||||
"25": {
|
||||
|
@ -414,8 +478,8 @@
|
|||
},
|
||||
"triforce_pieces_extra": {
|
||||
"keyString": "triforce_pieces_extra",
|
||||
"friendlyName": "Extra Triforce Pieces",
|
||||
"description": "Determine how many extra pieces will be available",
|
||||
"friendlyName": "Required Plus (Triforce Hunt)",
|
||||
"description": "Only used if enabled in Triforce Piece Availability Mode.",
|
||||
"inputType": "range",
|
||||
"subOptions": {
|
||||
"0": {
|
||||
|
@ -452,68 +516,30 @@
|
|||
},
|
||||
"triforce_pieces_percentage": {
|
||||
"keyString": "triforce_pieces_percentage",
|
||||
"friendlyName": "Extra Triforce Pieces Percentage",
|
||||
"description": "Determine how many extra pieces will be available, according to a percentage of the required ones",
|
||||
"friendlyName": "Percentage (Triforce Hunt)",
|
||||
"description": "Only used if enabled in Triforce Piece Availability Mode.",
|
||||
"inputType": "range",
|
||||
"subOptions": {
|
||||
"100": {
|
||||
"keyString": "triforce_pieces_percentage.100",
|
||||
"friendlyName": "100%",
|
||||
"friendlyName": "0%",
|
||||
"description": "No extra Triforce pieces will be hidden throughout Hyrule",
|
||||
"defaultValue": 0
|
||||
},
|
||||
"150": {
|
||||
"keyString": "triforce_pieces_percentage.150",
|
||||
"friendlyName": "150%",
|
||||
"description": "Half the required Triforce pieces will be added",
|
||||
"friendlyName": "50%",
|
||||
"description": "50% more triforce pieces than required will be placed throughout Hyrule.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"200": {
|
||||
"keyString": "triforce_pieces_percentage.200",
|
||||
"friendlyName": "200%",
|
||||
"description": "The double of the required Triforce pieces will be hidden throughout Hyrule",
|
||||
"friendlyName": "100%",
|
||||
"description": "50% more triforce pieces than required will be placed throughout Hyrule.",
|
||||
"defaultValue": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"triforce_pieces_required": {
|
||||
"keyString": "triforce_pieces_required",
|
||||
"friendlyName": "Triforce Pieces Required",
|
||||
"description": "Determines the total number of Triforce pieces required before speaking with Murahadala",
|
||||
"inputType": "range",
|
||||
"subOptions": {
|
||||
"15": {
|
||||
"keyString": "triforce_pieces_required.15",
|
||||
"friendlyName": 15,
|
||||
"description": "15 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 0
|
||||
},
|
||||
"20": {
|
||||
"keyString": "triforce_pieces_required.20",
|
||||
"friendlyName": 20,
|
||||
"description": "20 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"30": {
|
||||
"keyString": "triforce_pieces_required.30",
|
||||
"friendlyName": 30,
|
||||
"description": "30 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"40": {
|
||||
"keyString": "triforce_pieces_required.40",
|
||||
"friendlyName": 40,
|
||||
"description": "40 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 50
|
||||
},
|
||||
"50": {
|
||||
"keyString": "triforce_pieces_required.50",
|
||||
"friendlyName": 50,
|
||||
"description": "50 Triforce pieces are required before speaking with Murahadala.",
|
||||
"defaultValue": 50
|
||||
}
|
||||
}
|
||||
},
|
||||
"tower_open": {
|
||||
"keyString": "tower_open",
|
||||
"friendlyName": "GT Crystals",
|
||||
|
@ -1257,26 +1283,6 @@
|
|||
"defaultValue": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"experimental": {
|
||||
"keyString": "experimental",
|
||||
"friendlyName": "Door Shuffle Experimental Options",
|
||||
"description": "Specifies whether to try out experimental things. What it does is subject to change.",
|
||||
"inputType": "range",
|
||||
"subOptions": {
|
||||
"on": {
|
||||
"keyString": "experimental.on",
|
||||
"friendlyName": "On",
|
||||
"description": "Enable experimental door features.",
|
||||
"defaultValue": 0
|
||||
},
|
||||
"off": {
|
||||
"keyString": "experimental.off",
|
||||
"friendlyName": "Off",
|
||||
"description": "Disable experimental door features.",
|
||||
"defaultValue": 50
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"romOptions": {
|
||||
|
|
|
@ -19,12 +19,21 @@
|
|||
|
||||
description: Template Name # Used to describe your yaml. Useful if you have multiple files
|
||||
name: YourName # Your name in-game. Spaces will be replaced with underscores and there is a 16 character limit
|
||||
### Logic Section ###
|
||||
glitches_required: # Determine the logic required to complete the seed
|
||||
none: 50 # No glitches required
|
||||
minor_glitches: 0 # Puts fake flipper, waterwalk, super bunny shenanigans, and etc into logic
|
||||
overworld_glitches: 0 # Assumes the player has knowledge of both overworld major glitches (boots clips, mirror clips) and minor glitches (fake flipper, super bunny shenanigans, water walk and etc.)
|
||||
no_logic: 0 # Your own items are placed with no regard to any logic; such as your Fire Rod can be on your Trinexx.
|
||||
# Other players items are placed into your world under OWG logic
|
||||
dark_room_logic: # Logic for unlit dark rooms
|
||||
lamp: 50 # require the Lamp for these rooms to be considered accessible.
|
||||
torches: 0 # in addition to lamp, allow the fire rod and presence of easily accessible torches for access
|
||||
none: 0 # all dark rooms are always considered doable, meaning this may force completion of rooms in complete darkness
|
||||
restrict_dungeon_item_on_boss: # aka ambrosia boss items
|
||||
on: 0 # prevents unshuffled compasses, maps and keys to be boss drops, they can still drop keysanity and other players' items
|
||||
off: 50
|
||||
### End of Logic Section ###
|
||||
meta_ignore: # Nullify options specified in the meta.yaml file. Adding an option here guarantees it will not occur in your seed, even if the .yaml file specifies it
|
||||
mode:
|
||||
- inverted # Never play inverted seeds
|
||||
|
@ -236,6 +245,41 @@ timer:
|
|||
glitch_boots:
|
||||
on: 50 # Start with Pegasus Boots in any glitched logic mode that makes use of them
|
||||
off: 0
|
||||
linked_options:
|
||||
- name: crosskeys
|
||||
options: # These overwrite earlier options if the percentage chance triggers
|
||||
entrance_shuffle: crossed
|
||||
bigkey_shuffle: true
|
||||
compass_shuffle: true
|
||||
map_shuffle: true
|
||||
smallkey_shuffle: true
|
||||
percentage: 0 # Set this to the percentage chance you want crosskeys
|
||||
- name: localcrosskeys
|
||||
options: # These overwrite earlier options if the percentage chance triggers
|
||||
entrance_shuffle: crossed
|
||||
bigkey_shuffle: true
|
||||
compass_shuffle: true
|
||||
map_shuffle: true
|
||||
smallkey_shuffle: true
|
||||
local_items: # Forces keys to be local to your own world
|
||||
- "Small Keys"
|
||||
- "Big Keys"
|
||||
percentage: 0 # Set this to the percentage chance you want local crosskeys
|
||||
- name: enemizer
|
||||
options:
|
||||
boss_shuffle: # Subchances can be injected too, which then get rolled
|
||||
simple: 1
|
||||
full: 1
|
||||
random: 1
|
||||
singularity: 1
|
||||
enemy_damage:
|
||||
shuffled: 1
|
||||
random: 1
|
||||
enemy_health:
|
||||
easy: 1
|
||||
hard: 1
|
||||
expert: 1
|
||||
percentage: 0 # Set this to the percentage chance you want enemizer
|
||||
door_shuffle: # Only available if the host uses the doors branch, it is ignored otherwise
|
||||
vanilla: 50 # Everything should be like in vanilla
|
||||
basic: 0 # Dungeons are shuffled within themselves
|
||||
|
@ -243,22 +287,51 @@ door_shuffle: # Only available if the host uses the doors branch, it is ignored
|
|||
intensity: # Only available if the host uses the doors branch, it is ignored otherwise
|
||||
1: 50 # Shuffles normal doors and spiral staircases
|
||||
2: 0 # And shuffles open edges and straight staircases
|
||||
3: 0 # (Coming soon) And shuffles dungeon lobbies
|
||||
3: 0 # And shuffles dungeon lobbies
|
||||
random: 0 # Picks one of those at random
|
||||
experimental: # Only available if the host uses the doors branch, it is ignored otherwise
|
||||
on: 0 # Enables experimental features. Currently, this is just the dungeon keys in chest counter.
|
||||
off: 50
|
||||
debug: # Only available if the host uses the doors branch, it is ignored otherwise
|
||||
on: 0 # Enables debugging features. Currently, these are the Item collection counter. (overwrites total triforce pieces) and Castle Gate closed indicator.
|
||||
off: 50
|
||||
rom:
|
||||
random_sprite_on_event: # An alternative to specifying randomonhit / randomonexit / etc... in sprite down below.
|
||||
enabled: # If enabled, sprite down below is ignored completely, (although it may become the sprite pool)
|
||||
on: 0
|
||||
off: 1
|
||||
on_hit: # Random sprite on hit. Being hit by things that cause 0 damage still counts.
|
||||
on: 0
|
||||
off: 1
|
||||
on_enter: # Random sprite on underworld entry. Note that entering hobo counts.
|
||||
on: 0
|
||||
off: 1
|
||||
on_exit: # Random sprite on underworld exit. Exiting hobo does not count.
|
||||
on: 0
|
||||
off: 1
|
||||
on_slash: # Random sprite on sword slash. Note, it still counts if you attempt to slash while swordless.
|
||||
on: 0
|
||||
off: 1
|
||||
on_item: # Random sprite on getting an item. Anything that causes you to hold an item above your head counts.
|
||||
on: 0
|
||||
off: 1
|
||||
on_bonk: # Random sprite on bonk.
|
||||
on: 0
|
||||
off: 1
|
||||
#sprite_pool: # When specified, limits the pool of sprites used for randomon-event to the specified pool. Uncomment to use this.
|
||||
# - link
|
||||
# - pride link
|
||||
# - penguin link
|
||||
# - random # You can specify random multiple times for however many potentially unique random sprites you want in your pool.
|
||||
sprite: # Enter the name of your preferred sprite and weight it appropriately
|
||||
random: 0
|
||||
randomonhit: 0
|
||||
random: 0 # Choose a sprite at random
|
||||
Link: 50 # To add other sprites: open the gui/Creator, go to adjust, select a sprite and write down the name the gui calls it
|
||||
disablemusic: # If "on", all in-game music will be disabled
|
||||
on: 0
|
||||
off: 50
|
||||
quickswap: # Enable switching items by pressing the L+R shoulder buttons
|
||||
on: 0
|
||||
off: 50
|
||||
on: 50
|
||||
off: 0
|
||||
menuspeed: # Controls how fast the item menu opens and closes
|
||||
normal: 50
|
||||
instant: 0
|
||||
|
|
|
@ -82,6 +82,8 @@
|
|||
}
|
||||
|
||||
#game-settings #game-settings-button-row{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<div id="game-settings-button-row">
|
||||
<button id="reset-to-default">Reset to Defaults</button>
|
||||
<button id="export-button">Export Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue