Automatically generate and save player settings for every game
This commit is contained in:
parent
8ba408385b
commit
71642f494f
|
@ -82,18 +82,19 @@ def page_not_found(err):
|
|||
|
||||
|
||||
games_list = {
|
||||
"zelda3": ("The Legend of Zelda: A Link to the Past",
|
||||
"""
|
||||
The Legend of Zelda: A Link to the Past is an action/adventure game. Take on the role of Link,
|
||||
a boy who is destined to save the land of Hyrule. Delve through three palaces and nine dungeons on
|
||||
your quest to rescue the descendents of the seven wise men and defeat the evil Ganon!"""),
|
||||
"factorio": ("Factorio",
|
||||
"A Link to the Past": ("The Legend of Zelda: A Link to the Past",
|
||||
"""
|
||||
The Legend of Zelda: A Link to the Past is an action/adventure game. Take on the role of
|
||||
Link, a boy who is destined to save the land of Hyrule. Delve through three palaces and nine
|
||||
dungeons on your quest to rescue the descendents of the seven wise men and defeat the evil
|
||||
Ganon!"""),
|
||||
"Factorio": ("Factorio",
|
||||
"""
|
||||
Factorio is a game about automation. You play as an engineer who has crash landed on the planet
|
||||
Nauvis, an inhospitable world filled with dangerous creatures called biters. Build a factory,
|
||||
research new technologies, and become more efficient in your quest to build a rocket and return home.
|
||||
"""),
|
||||
"minecraft": ("Minecraft",
|
||||
"Minecraft": ("Minecraft",
|
||||
"""
|
||||
Minecraft is a game about creativity. In a world made entirely of cubes, you explore, discover, mine,
|
||||
craft, and try not to explode. Delve deep into the earth and discover abandoned mines, ancient
|
||||
|
@ -102,6 +103,12 @@ games_list = {
|
|||
}
|
||||
|
||||
|
||||
# Player settings pages
|
||||
@app.route('/games/<string:game>/player-settings')
|
||||
def player_settings(game):
|
||||
return render_template(f"player-settings.html")
|
||||
|
||||
|
||||
# Game sub-pages
|
||||
@app.route('/games/<string:game>/<string:page>')
|
||||
def game_pages(game, page):
|
||||
|
@ -194,4 +201,5 @@ def favicon():
|
|||
|
||||
from WebHostLib.customserver import run_server_process
|
||||
from . import tracker, upload, landing, check, generate, downloads, api # to trigger app routing picking up on it
|
||||
|
||||
app.register_blueprint(api.api_endpoints)
|
||||
|
|
|
@ -20,11 +20,8 @@ def create():
|
|||
|
||||
# Generate JSON files for player-settings pages
|
||||
player_settings = {
|
||||
"readOnly": {
|
||||
"baseOptions": {
|
||||
"description": "Generated by https://archipelago.gg/",
|
||||
"game": game_name,
|
||||
},
|
||||
"generalOptions": {
|
||||
"name": "Player",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
let gameName = null;
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
Promise.all([fetchSettingData(), fetchSpriteData()]).then((results) => {
|
||||
const urlMatches = window.location.href.match(/^.*\/(.*)\/player-settings/);
|
||||
gameName = decodeURIComponent(urlMatches[1]);
|
||||
|
||||
// Update game name on page
|
||||
document.getElementById('game-name').innerHTML = gameName;
|
||||
|
||||
Promise.all([fetchSettingData()]).then((results) => {
|
||||
// Page setup
|
||||
createDefaultSettings(results[0]);
|
||||
buildUI(results[0]);
|
||||
|
@ -11,22 +19,10 @@ window.addEventListener('load', () => {
|
|||
document.getElementById('generate-game').addEventListener('click', () => generateGame());
|
||||
|
||||
// Name input field
|
||||
const playerSettings = JSON.parse(localStorage.getItem('playerSettings'));
|
||||
const playerSettings = JSON.parse(localStorage.getItem(gameName));
|
||||
const nameInput = document.getElementById('player-name');
|
||||
nameInput.addEventListener('keyup', (event) => updateSetting(event));
|
||||
nameInput.addEventListener('keyup', (event) => updateBaseSetting(event));
|
||||
nameInput.value = playerSettings.name;
|
||||
|
||||
// Sprite options
|
||||
const spriteData = JSON.parse(results[1]);
|
||||
const spriteSelect = document.getElementById('sprite');
|
||||
spriteData.sprites.forEach((sprite) => {
|
||||
if (sprite.name.trim().length === 0) { return; }
|
||||
const option = document.createElement('option');
|
||||
option.setAttribute('value', sprite.name.trim());
|
||||
if (playerSettings.rom.sprite === sprite.name.trim()) { option.selected = true; }
|
||||
option.innerText = sprite.name;
|
||||
spriteSelect.appendChild(option);
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
})
|
||||
|
@ -43,27 +39,22 @@ const fetchSettingData = () => new Promise((resolve, reject) => {
|
|||
try{ resolve(JSON.parse(ajax.responseText)); }
|
||||
catch(error){ reject(error); }
|
||||
};
|
||||
ajax.open('GET', `${window.location.origin}/static/static/playerSettings.json`, true);
|
||||
ajax.open('GET', `${window.location.origin}/static/generated/${gameName}.json`, true);
|
||||
ajax.send();
|
||||
});
|
||||
|
||||
const createDefaultSettings = (settingData) => {
|
||||
if (!localStorage.getItem('playerSettings')) {
|
||||
const newSettings = {};
|
||||
for (let roSetting of Object.keys(settingData.readOnly)){
|
||||
newSettings[roSetting] = settingData.readOnly[roSetting];
|
||||
}
|
||||
for (let generalOption of Object.keys(settingData.generalOptions)){
|
||||
newSettings[generalOption] = settingData.generalOptions[generalOption];
|
||||
if (!localStorage.getItem(gameName)) {
|
||||
const newSettings = {
|
||||
[gameName]: {},
|
||||
};
|
||||
for (let baseOption of Object.keys(settingData.baseOptions)){
|
||||
newSettings[baseOption] = settingData.baseOptions[baseOption];
|
||||
}
|
||||
for (let gameOption of Object.keys(settingData.gameOptions)){
|
||||
newSettings[gameOption] = settingData.gameOptions[gameOption].defaultValue;
|
||||
newSettings[gameName][gameOption] = settingData.gameOptions[gameOption].defaultValue;
|
||||
}
|
||||
newSettings.rom = {};
|
||||
for (let romOption of Object.keys(settingData.romOptions)){
|
||||
newSettings.rom[romOption] = settingData.romOptions[romOption].defaultValue;
|
||||
}
|
||||
localStorage.setItem('playerSettings', JSON.stringify(newSettings));
|
||||
localStorage.setItem(gameName, JSON.stringify(newSettings));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -77,20 +68,10 @@ const buildUI = (settingData) => {
|
|||
});
|
||||
document.getElementById('game-options-left').appendChild(buildOptionsTable(leftGameOpts));
|
||||
document.getElementById('game-options-right').appendChild(buildOptionsTable(rightGameOpts));
|
||||
|
||||
// ROM Options
|
||||
const leftRomOpts = {};
|
||||
const rightRomOpts = {};
|
||||
Object.keys(settingData.romOptions).forEach((key, index) => {
|
||||
if (index < Object.keys(settingData.romOptions).length / 2) { leftRomOpts[key] = settingData.romOptions[key]; }
|
||||
else { rightRomOpts[key] = settingData.romOptions[key]; }
|
||||
});
|
||||
document.getElementById('rom-options-left').appendChild(buildOptionsTable(leftRomOpts, true));
|
||||
document.getElementById('rom-options-right').appendChild(buildOptionsTable(rightRomOpts, true));
|
||||
};
|
||||
|
||||
const buildOptionsTable = (settings, romOpts = false) => {
|
||||
const currentSettings = JSON.parse(localStorage.getItem('playerSettings'));
|
||||
const currentSettings = JSON.parse(localStorage.getItem(gameName));
|
||||
const table = document.createElement('table');
|
||||
const tbody = document.createElement('tbody');
|
||||
|
||||
|
@ -122,7 +103,7 @@ const buildOptionsTable = (settings, romOpts = false) => {
|
|||
}
|
||||
select.appendChild(option);
|
||||
});
|
||||
select.addEventListener('change', (event) => updateSetting(event));
|
||||
select.addEventListener('change', (event) => updateGameSetting(event));
|
||||
tdr.appendChild(select);
|
||||
tr.appendChild(tdr);
|
||||
tbody.appendChild(tr);
|
||||
|
@ -132,20 +113,22 @@ const buildOptionsTable = (settings, romOpts = false) => {
|
|||
return table;
|
||||
};
|
||||
|
||||
const updateSetting = (event) => {
|
||||
const options = JSON.parse(localStorage.getItem('playerSettings'));
|
||||
if (event.target.getAttribute('data-romOpt')) {
|
||||
options.rom[event.target.getAttribute('data-key')] = isNaN(event.target.value) ?
|
||||
const updateBaseSetting = (event) => {
|
||||
const options = JSON.parse(localStorage.getItem(gameName));
|
||||
options[event.target.getAttribute('data-key')] = isNaN(event.target.value) ?
|
||||
event.target.value : parseInt(event.target.value);
|
||||
localStorage.setItem(gameName, JSON.stringify(options));
|
||||
};
|
||||
|
||||
const updateGameSetting = (event) => {
|
||||
const options = JSON.parse(localStorage.getItem(gameName));
|
||||
options[gameName][event.target.getAttribute('data-key')] = isNaN(event.target.value) ?
|
||||
event.target.value : parseInt(event.target.value, 10);
|
||||
} else {
|
||||
options[event.target.getAttribute('data-key')] = isNaN(event.target.value) ?
|
||||
event.target.value : parseInt(event.target.value, 10);
|
||||
}
|
||||
localStorage.setItem('playerSettings', JSON.stringify(options));
|
||||
localStorage.setItem(gameName, JSON.stringify(options));
|
||||
};
|
||||
|
||||
const exportSettings = () => {
|
||||
const settings = JSON.parse(localStorage.getItem('playerSettings'));
|
||||
const settings = JSON.parse(localStorage.getItem(gameName));
|
||||
if (!settings.name || settings.name.trim().length === 0) { settings.name = "noname"; }
|
||||
const yamlText = jsyaml.safeDump(settings, { noCompatMode: true }).replaceAll(/'(\d+)':/g, (x, y) => `${y}:`);
|
||||
download(`${document.getElementById('player-name').value}.yaml`, yamlText);
|
||||
|
@ -164,8 +147,8 @@ const download = (filename, text) => {
|
|||
|
||||
const generateGame = (raceMode = false) => {
|
||||
axios.post('/api/generate', {
|
||||
weights: { player: localStorage.getItem('playerSettings') },
|
||||
presetData: { player: localStorage.getItem('playerSettings') },
|
||||
weights: { player: localStorage.getItem(gameName) },
|
||||
presetData: { player: localStorage.getItem(gameName) },
|
||||
playerCount: 1,
|
||||
race: raceMode ? '1' : '0',
|
||||
}).then((response) => {
|
||||
|
@ -181,17 +164,3 @@ const generateGame = (raceMode = false) => {
|
|||
console.error(error);
|
||||
});
|
||||
};
|
||||
|
||||
const fetchSpriteData = () => new Promise((resolve, reject) => {
|
||||
const ajax = new XMLHttpRequest();
|
||||
ajax.onreadystatechange = () => {
|
||||
if (ajax.readyState !== 4) { return; }
|
||||
if (ajax.status !== 200) {
|
||||
reject('Unable to fetch sprite data.');
|
||||
return;
|
||||
}
|
||||
resolve(ajax.responseText);
|
||||
};
|
||||
ajax.open('GET', `${window.location.origin}/static/generated/spriteData.json`, true);
|
||||
ajax.send();
|
||||
});
|
|
@ -1,705 +0,0 @@
|
|||
{
|
||||
"readOnly": {
|
||||
"description": "Generated by MultiWorld website",
|
||||
"triforce_pieces_mode": "available",
|
||||
"triforce_pieces_available": 30,
|
||||
"triforce_pieces_required": 20,
|
||||
"shuffle_prizes": "none",
|
||||
"timer": "none",
|
||||
"glitch_boots": "on",
|
||||
"key_drop_shuffle": "off",
|
||||
"experimental": "off",
|
||||
"debug": "off"
|
||||
},
|
||||
"generalOptions": {
|
||||
"name": "PlayerName"
|
||||
},
|
||||
"gameOptions": {
|
||||
"goals": {
|
||||
"type": "select",
|
||||
"friendlyName": "Goal",
|
||||
"description": "Choose the condition for winning the game",
|
||||
"defaultValue": "ganon",
|
||||
"options": [
|
||||
{
|
||||
"name": "Kill Ganon",
|
||||
"value": "ganon"
|
||||
},
|
||||
{
|
||||
"name": "Fast Ganon (Pyramid Always Open)",
|
||||
"value": "crystals"
|
||||
},
|
||||
{
|
||||
"name": "All Bosses",
|
||||
"value": "bosses"
|
||||
},
|
||||
{
|
||||
"name": "Master Sword Pedestal",
|
||||
"value": "pedestal"
|
||||
},
|
||||
{
|
||||
"name": "Master Sword Pedestal + Ganon",
|
||||
"value": "ganon_pedestal"
|
||||
},
|
||||
{
|
||||
"name": "Triforce Hunt",
|
||||
"value": "triforce_hunt"
|
||||
},
|
||||
{
|
||||
"name": "Triforce Hunt + Ganon",
|
||||
"value": "ganon_triforce_hunt"
|
||||
},
|
||||
{
|
||||
"name": "Ice Rod Hunt",
|
||||
"value": "ice_rod_hunt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode": {
|
||||
"type": "select",
|
||||
"friendlyName": "World State",
|
||||
"description": "Choose the state of the game world",
|
||||
"defaultValue": "standard",
|
||||
"options": [
|
||||
{
|
||||
"name": "Standard",
|
||||
"value": "standard"
|
||||
},
|
||||
{
|
||||
"name": "Open",
|
||||
"value": "open"
|
||||
},
|
||||
{
|
||||
"name": "Inverted",
|
||||
"value": "inverted"
|
||||
}
|
||||
]
|
||||
},
|
||||
"accessibility": {
|
||||
"type": "select",
|
||||
"friendlyName": "Accessibility",
|
||||
"description": "Choose how much of the world will be available",
|
||||
"defaultValue": "locations",
|
||||
"options": [
|
||||
{
|
||||
"name": "Locations Guaranteed",
|
||||
"value": "locations"
|
||||
},
|
||||
{
|
||||
"name": "Items Guaranteed",
|
||||
"value": "items"
|
||||
},
|
||||
{
|
||||
"name": "Beatable Only",
|
||||
"value": "none"
|
||||
}
|
||||
]
|
||||
},
|
||||
"progressive": {
|
||||
"type": "select",
|
||||
"friendlyName": "Progressive Items",
|
||||
"description": "Turn progressive items on or off, or randomize them",
|
||||
"defaultValue": "on",
|
||||
"options": [
|
||||
{
|
||||
"name": "All Progressive",
|
||||
"value": "on"
|
||||
},
|
||||
{
|
||||
"name": "None Progressive",
|
||||
"value": "off"
|
||||
},
|
||||
{
|
||||
"name": "Randomize Each",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tower_open": {
|
||||
"type": "select",
|
||||
"friendlyName": "Ganon's Tower Access",
|
||||
"description": "Choose how many crystals are required to open Ganon's Tower",
|
||||
"defaultValue": 7,
|
||||
"options": [
|
||||
{
|
||||
"name": "7 Crystals",
|
||||
"value": 7
|
||||
},
|
||||
{
|
||||
"name": "6 Crystals",
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"name": "5 Crystals",
|
||||
"value": 5
|
||||
},
|
||||
{
|
||||
"name": "4 Crystals",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"name": "3 Crystals",
|
||||
"value": 3
|
||||
},
|
||||
{
|
||||
"name": "2 Crystals",
|
||||
"value": 2
|
||||
},
|
||||
{
|
||||
"name": "1 Crystals",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "0 Crystals",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "Random",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ganon_open": {
|
||||
"type": "select",
|
||||
"friendlyName": "Ganon Vulnerable",
|
||||
"description": "Choose how many crystals are required to kill Ganon",
|
||||
"defaultValue": 7,
|
||||
"options": [
|
||||
{
|
||||
"name": "7 Crystals",
|
||||
"value": 7
|
||||
},
|
||||
{
|
||||
"name": "6 Crystals",
|
||||
"value": 6
|
||||
},
|
||||
{
|
||||
"name": "5 Crystals",
|
||||
"value": 5
|
||||
},
|
||||
{
|
||||
"name": "4 Crystals",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"name": "3 Crystals",
|
||||
"value": 3
|
||||
},
|
||||
{
|
||||
"name": "2 Crystals",
|
||||
"value": 2
|
||||
},
|
||||
{
|
||||
"name": "1 Crystals",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "0 Crystals",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "Random",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"retro": {
|
||||
"type": "select",
|
||||
"friendlyName": "Retro Mode",
|
||||
"description": "Choose if you want to play in retro mode",
|
||||
"defaultValue": "off",
|
||||
"options": [
|
||||
{
|
||||
"name": "Disabled",
|
||||
"value": "off"
|
||||
},
|
||||
{
|
||||
"name": "Enabled",
|
||||
"value": "on"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hints": {
|
||||
"type": "select",
|
||||
"friendlyName": "Hints",
|
||||
"description": "Choose to enable or disable tile hints",
|
||||
"defaultValue": "on",
|
||||
"options": [
|
||||
{
|
||||
"name": "Enabled",
|
||||
"value": "on"
|
||||
},
|
||||
{
|
||||
"name": "Disabled",
|
||||
"value": "off"
|
||||
}
|
||||
]
|
||||
},
|
||||
"weapons": {
|
||||
"type": "select",
|
||||
"friendlyName": "Sword Locations",
|
||||
"description": "Choose where you will find your swords",
|
||||
"defaultValue": "assured",
|
||||
"options": [
|
||||
{
|
||||
"name": "Assured",
|
||||
"value": "assured"
|
||||
},
|
||||
{
|
||||
"name": "Vanilla",
|
||||
"value": "vanilla"
|
||||
},
|
||||
{
|
||||
"name": "Swordless",
|
||||
"value": "swordless"
|
||||
},
|
||||
{
|
||||
"name": "Randomized",
|
||||
"value": "randomized"
|
||||
}
|
||||
]
|
||||
},
|
||||
"glitches_required":{
|
||||
"type": "select",
|
||||
"friendlyName": "Glitches Required",
|
||||
"description": "Choose which glitches will be considered in-logic",
|
||||
"defaultValue": "none",
|
||||
"options": [
|
||||
{
|
||||
"name": "None",
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"name": "Minor Glitches",
|
||||
"value": "minor_glitches"
|
||||
},
|
||||
{
|
||||
"name": "Overworld Glitches",
|
||||
"value": "overworld_glitches"
|
||||
},
|
||||
{
|
||||
"name": "No Logic",
|
||||
"value": "no_logic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dark_room_logic": {
|
||||
"type": "select",
|
||||
"friendlyName": "Dark Room Logic",
|
||||
"description": "Choose your logical access to dark rooms",
|
||||
"defaultValue": "lamp",
|
||||
"options": [
|
||||
{
|
||||
"name": "Lamp Required",
|
||||
"value": "lamp"
|
||||
},
|
||||
{
|
||||
"name": "Torches Lightable",
|
||||
"value": "torches"
|
||||
},
|
||||
{
|
||||
"name": "Always In-Logic",
|
||||
"value": "none"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dungeon_items": {
|
||||
"type": "select",
|
||||
"friendlyName": "Dungeon Item Shuffle",
|
||||
"description": "Choose which dungeon items you want shuffled",
|
||||
"defaultValue": "none",
|
||||
"options": [
|
||||
{
|
||||
"name": "None",
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"name": "Map & Compass",
|
||||
"value": "mc"
|
||||
},
|
||||
{
|
||||
"name": "Small Keys Only",
|
||||
"value": "s"
|
||||
},
|
||||
{
|
||||
"name": "Big Keys Only",
|
||||
"value": "b"
|
||||
},
|
||||
{
|
||||
"name": "Small and Big Keys",
|
||||
"value": "sb"
|
||||
},
|
||||
{
|
||||
"name": "Full Keysanity",
|
||||
"value": "mscb"
|
||||
},
|
||||
{
|
||||
"name": "Universal Small Keys",
|
||||
"value": "u"
|
||||
}
|
||||
]
|
||||
},
|
||||
"entrance_shuffle": {
|
||||
"type": "select",
|
||||
"friendlyName": "Entrance Shuffle",
|
||||
"description": "Shuffles the game map. Not recommended for beginners",
|
||||
"defaultValue": "none",
|
||||
"options": [
|
||||
{
|
||||
"name": "None",
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"name": "Only Dungeons, Simple",
|
||||
"value": "dungeonssimple"
|
||||
},
|
||||
{
|
||||
"name": "Only Dungeons, Full",
|
||||
"value": "dungeonsfull"
|
||||
},
|
||||
{
|
||||
"name": "Simple",
|
||||
"value": "simple"
|
||||
},
|
||||
{
|
||||
"name": "Restricted",
|
||||
"value": "restricted"
|
||||
},
|
||||
{
|
||||
"name": "Full",
|
||||
"value": "full"
|
||||
},
|
||||
{
|
||||
"name": "Crossed",
|
||||
"value": "crossed"
|
||||
},
|
||||
{
|
||||
"name": "Insanity",
|
||||
"value": "insanity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"item_pool": {
|
||||
"type": "select",
|
||||
"friendlyName": "Item Pool",
|
||||
"description": "Changes the available upgrade items (1/2 Magic, hearts, sword upgrades, etc)",
|
||||
"defaultValue": "normal",
|
||||
"options": [
|
||||
{
|
||||
"name": "Easy",
|
||||
"value": "easy"
|
||||
},
|
||||
{
|
||||
"name": "Normal",
|
||||
"value": "normal"
|
||||
},
|
||||
{
|
||||
"name": "Hard",
|
||||
"value": "hard"
|
||||
},
|
||||
{
|
||||
"name": "Expert",
|
||||
"value": "expert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"item_functionality": {
|
||||
"type": "select",
|
||||
"friendlyName": "Item Functionality",
|
||||
"description": "Changes the abilities of your items",
|
||||
"defaultValue": "normal",
|
||||
"options": [
|
||||
{
|
||||
"name": "Easy",
|
||||
"value": "easy"
|
||||
},
|
||||
{
|
||||
"name": "Normal",
|
||||
"value": "normal"
|
||||
},
|
||||
{
|
||||
"name": "Hard",
|
||||
"value": "hard"
|
||||
},
|
||||
{
|
||||
"name": "Expert",
|
||||
"value": "expert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"enemy_shuffle": {
|
||||
"type": "select",
|
||||
"friendlyName": "Enemy Shuffle",
|
||||
"description": "Randomize the enemies which appear throughout the game",
|
||||
"defaultValue": "off",
|
||||
"options": [
|
||||
{
|
||||
"name": "Disabled",
|
||||
"value": "off"
|
||||
},
|
||||
{
|
||||
"name": "Enabled",
|
||||
"value": "on"
|
||||
}
|
||||
]
|
||||
},
|
||||
"boss_shuffle": {
|
||||
"type": "select",
|
||||
"friendlyName": "Boss Shuffle",
|
||||
"description": "Shuffle the bosses within dungeons",
|
||||
"defaultValue": "none",
|
||||
"options": [
|
||||
{
|
||||
"name": "Disabled",
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"name": "Simple",
|
||||
"value": "simple"
|
||||
},
|
||||
{
|
||||
"name": "Full",
|
||||
"value": "full"
|
||||
},
|
||||
{
|
||||
"name": "Singularity",
|
||||
"value": "singularity"
|
||||
},
|
||||
{
|
||||
"name": "Random",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shop_shuffle": {
|
||||
"type": "select",
|
||||
"friendlyName": "Shop Shuffle",
|
||||
"description": "Shuffles the content and prices of shops throughout Hyrule",
|
||||
"defaultValue": "none",
|
||||
"options": [
|
||||
{
|
||||
"name": "None",
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"name": "Inventory",
|
||||
"value": "f"
|
||||
},
|
||||
{
|
||||
"name": "Prices",
|
||||
"value": "p"
|
||||
},
|
||||
{
|
||||
"name": "Capacity Upgrades",
|
||||
"value": "u"
|
||||
},
|
||||
{
|
||||
"name": "Inventory and Prices",
|
||||
"value": "fp"
|
||||
},
|
||||
{
|
||||
"name": "Inventory, Prices, and Upgrades",
|
||||
"value": "fpu"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"romOptions": {
|
||||
"disablemusic": {
|
||||
"type": "select",
|
||||
"friendlyName": "Game Music",
|
||||
"description": "Choose to enable or disable in-game music",
|
||||
"defaultValue": "off",
|
||||
"options": [
|
||||
{
|
||||
"name": "Enabled",
|
||||
"value": "off"
|
||||
},
|
||||
{
|
||||
"name": "Disabled",
|
||||
"value": "on"
|
||||
}
|
||||
]
|
||||
},
|
||||
"quickswap": {
|
||||
"type": "select",
|
||||
"friendlyName": "Item Quick-Swap",
|
||||
"description": "Enable or disable quick-swap using the L+R buttons",
|
||||
"defaultValue": "on",
|
||||
"options": [
|
||||
{
|
||||
"name": "Enabled",
|
||||
"value": "on"
|
||||
},
|
||||
{
|
||||
"name": "Disabled",
|
||||
"value": "off"
|
||||
}
|
||||
]
|
||||
},
|
||||
"menuspeed": {
|
||||
"type": "select",
|
||||
"friendlyName": "Menu Speed",
|
||||
"description": "Changes the animation speed of the in-game menu",
|
||||
"defaultValue": "normal",
|
||||
"options": [
|
||||
{
|
||||
"name": "Normal",
|
||||
"value": "normal"
|
||||
},
|
||||
{
|
||||
"name": "Instant",
|
||||
"value": "instant"
|
||||
},
|
||||
{
|
||||
"name": "Double",
|
||||
"value": "double"
|
||||
},
|
||||
{
|
||||
"name": "Triple",
|
||||
"value": "triple"
|
||||
},
|
||||
{
|
||||
"name": "Quadruple",
|
||||
"value": "quadruple"
|
||||
},
|
||||
{
|
||||
"name": "Half-Speed",
|
||||
"value": "half"
|
||||
}
|
||||
]
|
||||
},
|
||||
"heartbeep": {
|
||||
"type": "select",
|
||||
"friendlyName": "Heart-Beep Speed",
|
||||
"description": "Change the frequency of the heart beep alert when you are at low health",
|
||||
"defaultValue": "normal",
|
||||
"options": [
|
||||
{
|
||||
"name": "Double Speed",
|
||||
"value": "double"
|
||||
},
|
||||
{
|
||||
"name": "Normal",
|
||||
"value": "normal"
|
||||
},
|
||||
{
|
||||
"name": "Half-Speed",
|
||||
"value": "half"
|
||||
},
|
||||
{
|
||||
"name": "Quarter-Speed",
|
||||
"value": "quarter"
|
||||
},
|
||||
{
|
||||
"name": "Disabled",
|
||||
"value": "off"
|
||||
}
|
||||
]
|
||||
},
|
||||
"heartcolor": {
|
||||
"type": "select",
|
||||
"friendlyName": "Heart Color",
|
||||
"description": "Change the color of your hearts in-game",
|
||||
"defaultValue": "red",
|
||||
"options": [
|
||||
{
|
||||
"name": "Red",
|
||||
"value": "red"
|
||||
},
|
||||
{
|
||||
"name": "Blue",
|
||||
"value": "blue"
|
||||
},
|
||||
{
|
||||
"name": "Green",
|
||||
"value": "green"
|
||||
},
|
||||
{
|
||||
"name": "Yellow",
|
||||
"value": "yellow"
|
||||
},
|
||||
{
|
||||
"name": "Random",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ow_palettes": {
|
||||
"type": "select",
|
||||
"friendlyName": "Overworld Palette",
|
||||
"description": "Change the colors of the overworld",
|
||||
"defaultValue": "default",
|
||||
"options": [
|
||||
{
|
||||
"name": "Vanilla",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"name": "Randomized",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"uw_palettes": {
|
||||
"type": "select",
|
||||
"friendlyName": "Underworld Palette",
|
||||
"description": "Change the colors of the underworld",
|
||||
"defaultValue": "default",
|
||||
"options": [
|
||||
{
|
||||
"name": "Vanilla",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"name": "Randomized",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hud_palettes": {
|
||||
"type": "select",
|
||||
"friendlyName": "HUD Palette",
|
||||
"description": "Change the colors of the user-interface",
|
||||
"defaultValue": "default",
|
||||
"options": [
|
||||
{
|
||||
"name": "Vanilla",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"name": "Randomized",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sword_palettes": {
|
||||
"type": "select",
|
||||
"friendlyName": "Sword Palette",
|
||||
"description": "Change the colors of the swords, within reason",
|
||||
"defaultValue": "default",
|
||||
"options": [
|
||||
{
|
||||
"name": "Vanilla",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"name": "Randomized",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sprite": {
|
||||
"type": "select",
|
||||
"friendlyName": "Sprite",
|
||||
"description": "Choose a sprite to play as!",
|
||||
"defaultValue": "link",
|
||||
"options": [
|
||||
{
|
||||
"name": "Random",
|
||||
"value": "random"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{% extends 'pageWrapper.html' %}
|
||||
|
||||
{% block head %}
|
||||
<title>Factorio Settings</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename="styles/factorio/player-settings.css") }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'header/grassHeader.html' %}
|
||||
<div id="player-settings">
|
||||
<div id="user-message"></div>
|
||||
<h1>Factorio Settings</h1>
|
||||
<p>Choose the options you would like to play with! You may generate a single-player game from this page,
|
||||
or download a settings file you can use to participate in a MultiWorld. If you would like to make
|
||||
your settings extra random, check out the advanced <a href="/weighted-settings">weighted settings</a>
|
||||
page. There, you will find examples of all available sprites as well.</p>
|
||||
|
||||
<p>A list of all games you have generated can be found <a href="/user-content">here</a>.</p>
|
||||
|
||||
<div>
|
||||
More content coming soon™.
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,24 +0,0 @@
|
|||
{% extends 'pageWrapper.html' %}
|
||||
|
||||
{% block head %}
|
||||
<title>Minecraft Settings</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename="styles/minecraft/player-settings.css") }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'header/grassHeader.html' %}
|
||||
<div id="player-settings">
|
||||
<div id="user-message"></div>
|
||||
<h1>Minecraft Settings</h1>
|
||||
<p>Choose the options you would like to play with! You may generate a single-player game from this page,
|
||||
or download a settings file you can use to participate in a MultiWorld. If you would like to make
|
||||
your settings extra random, check out the advanced <a href="/weighted-settings">weighted settings</a>
|
||||
page. There, you will find examples of all available sprites as well.</p>
|
||||
|
||||
<p>A list of all games you have generated can be found <a href="/user-content">here</a>.</p>
|
||||
|
||||
<div>
|
||||
More content coming soon™.
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -5,23 +5,23 @@
|
|||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename="styles/zelda3/player-settings.css") }}" />
|
||||
<script type="application/ecmascript" src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
||||
<script type="application/ecmascript" src="{{ url_for('static', filename="assets/js-yaml.min.js") }}"></script>
|
||||
<script type="application/ecmascript" src="{{ url_for('static', filename="assets/zelda3/player-settings.js") }}"></script>
|
||||
<script type="application/ecmascript" src="{{ url_for('static', filename="assets/player-settings.js") }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'header/grassHeader.html' %}
|
||||
<div id="player-settings">
|
||||
<div id="user-message"></div>
|
||||
<h1>A Link to the Past Settings</h1>
|
||||
<h1><span id="game-name">Player</span> Settings</h1>
|
||||
<p>Choose the options you would like to play with! You may generate a single-player game from this page,
|
||||
or download a settings file you can use to participate in a MultiWorld. If you would like to make
|
||||
your settings extra random, check out the advanced <a href="/weighted-settings">weighted settings</a>
|
||||
page. There, you will find examples of all available sprites as well.</p>
|
||||
page.</p>
|
||||
|
||||
<p>A list of all games you have generated can be found <a href="/user-content">here</a>.</p>
|
||||
|
||||
<p><label for="player-name">Please enter your player name. This will appear in-game as you send and receive
|
||||
items, if you are playing in a MultiWorld.</label><br />
|
||||
items if you are playing in a MultiWorld.</label><br />
|
||||
<input id="player-name" placeholder="Player Name" data-key="name" maxlength="16" />
|
||||
</p>
|
||||
|
||||
|
@ -31,12 +31,6 @@
|
|||
<div id="game-options-right" class="right"></div>
|
||||
</div>
|
||||
|
||||
<h2>ROM Options</h2>
|
||||
<div id="rom-options">
|
||||
<div id="rom-options-left" class="left"></div>
|
||||
<div id="rom-options-right" class="right"></div>
|
||||
</div>
|
||||
|
||||
<div id="player-settings-button-row">
|
||||
<button id="export-settings">Export Settings</button>
|
||||
<button id="generate-game">Generate Game</button>
|
Loading…
Reference in New Issue