Add seed post-gen settings
This commit is contained in:
@@ -12,3 +12,7 @@
|
||||
text-align: center;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
margin-top: 0.35em;
|
||||
}
|
||||
|
||||
45
src/components/BackgroundMusicPicker.vue
Normal file
45
src/components/BackgroundMusicPicker.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import localforage from "localforage";
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
bgm: true,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
const savedvalue = await localforage.getItem("bgm");
|
||||
if (savedvalue != null) {
|
||||
this.bgm = savedvalue;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
patch(rom) {
|
||||
if (this.bgm) {
|
||||
rom[0x18021A] = 0x00;
|
||||
} else {
|
||||
rom[0x0CFE18] = 0x00;
|
||||
rom[0x0CFEC1] = 0x00;
|
||||
rom[0x0D0000] = 0x00;
|
||||
rom[0x0D0001] = 0x00;
|
||||
rom[0x0D00E7] = 0xC4;
|
||||
rom[0x0D00E8] = 0x58;
|
||||
rom[0x18021A] = 0x01;
|
||||
}
|
||||
},
|
||||
async change() {
|
||||
await localforage.setItem("bgm", this.bgm);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="form-check form-switch">
|
||||
<input type="checkbox" class="form-check-input toggle" id="bgm"
|
||||
role="switch" v-model="bgm" @change="change" checked />
|
||||
<label class="form-check-label" for="bgm">Background Music</label>
|
||||
</div>
|
||||
</template>
|
||||
66
src/components/HeartBeepPicker.vue
Normal file
66
src/components/HeartBeepPicker.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import localforage from "localforage";
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
heartbeep: null,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
const savedvalue = await localforage.getItem("heartbeep");
|
||||
if (savedvalue) {
|
||||
this.heartbeep = savedvalue;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
patch(rom) {
|
||||
switch (this.heartbeep) {
|
||||
case "double":
|
||||
rom[0x180033] = 0x10;
|
||||
break;
|
||||
case "normal":
|
||||
rom[0x180033] = 0x20;
|
||||
break;
|
||||
case "half":
|
||||
rom[0x180033] = 0x40;
|
||||
break;
|
||||
case "quarter":
|
||||
rom[0x180033] = 0x80;
|
||||
break;
|
||||
case "off":
|
||||
rom[0x180033] = 0x00;
|
||||
break;
|
||||
}
|
||||
},
|
||||
async change() {
|
||||
await localforage.setItem("heartbeep", this.heartbeep);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
Heart Beep Speed:
|
||||
</div>
|
||||
<div class="btn-group mt-2" role="group">
|
||||
<input type="radio" class="btn-check" name="heartbeep" id="heartbeep_normal"
|
||||
autocomplete="off" value="normal" v-model="heartbeep" @change="change" />
|
||||
<label class="btn btn-outline-primary" for="heartbeep_normal">Normal</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="heartbeep" id="heartbeep_half"
|
||||
autocomplete="off" value="half" v-model="heartbeep" @change="change" />
|
||||
<label class="btn btn-outline-primary" for="heartbeep_half">Half</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="heartbeep" id="heartbeep_quarter"
|
||||
autocomplete="off" value="quarter" v-model="heartbeep" @change="change" />
|
||||
<label class="btn btn-outline-primary" for="heartbeep_quarter">Quarter</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="heartbeep" id="heartbeep_off"
|
||||
autocomplete="off" value="off" v-model="heartbeep" @change="change" />
|
||||
<label class="btn btn-outline-primary" for="heartbeep_off">Off</label>
|
||||
</div>
|
||||
</template>
|
||||
63
src/components/HeartColorPicker.vue
Normal file
63
src/components/HeartColorPicker.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import localforage from "localforage";
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
heartcolor: null,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
const savedvalue = await localforage.getItem("heartcolor");
|
||||
if (savedvalue) {
|
||||
this.heartcolor = savedvalue;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
patch(rom) {
|
||||
switch (this.heartcolor) {
|
||||
case "red":
|
||||
rom[0x187020] = 0;
|
||||
break;
|
||||
case "blue":
|
||||
rom[0x187020] = 1;
|
||||
break;
|
||||
case "green":
|
||||
rom[0x187020] = 2;
|
||||
break;
|
||||
case "yellow":
|
||||
rom[0x187020] = 3;
|
||||
break;
|
||||
}
|
||||
},
|
||||
async change() {
|
||||
await localforage.setItem("heartcolor", this.heartcolor);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
Heart Color:
|
||||
</div>
|
||||
<div class="btn-group mt-2" role="group">
|
||||
<input type="radio" class="btn-check" name="heartcolor" id="heartcolor_red"
|
||||
autocomplete="off" value="red" v-model="heartcolor" @change="change" />
|
||||
<label class="btn btn-outline-danger" for="heartcolor_red">Red</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="heartcolor" id="heartcolor_blue"
|
||||
autocomplete="off" value="blue" v-model="heartcolor" @change="change" />
|
||||
<label class="btn btn-outline-primary" for="heartcolor_blue">Blue</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="heartcolor" id="heartcolor_green"
|
||||
autocomplete="off" value="green" v-model="heartcolor" @change="change" />
|
||||
<label class="btn btn-outline-success" for="heartcolor_green">Green</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="heartcolor" id="heartcolor_yellow"
|
||||
autocomplete="off" value="yellow" v-model="heartcolor" @change="change" />
|
||||
<label class="btn btn-outline-warning" for="heartcolor_yellow">Yellow</label>
|
||||
</div>
|
||||
</template>
|
||||
41
src/components/MsuResumePicker.vue
Normal file
41
src/components/MsuResumePicker.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import localforage from "localforage";
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
msu_resume: true,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
const savedvalue = await localforage.getItem("msu_resume");
|
||||
if (savedvalue != null) {
|
||||
this.msu_resume = savedvalue;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
patch(rom) {
|
||||
if (this.msu_resume) {
|
||||
rom[0x18021D] = 0x08;
|
||||
rom[0x18021E] = 0x07;
|
||||
} else {
|
||||
rom[0x18021D] = 0x00;
|
||||
rom[0x18021E] = 0x00;
|
||||
}
|
||||
},
|
||||
async change() {
|
||||
await localforage.setItem("msu_resume", this.msu_resume);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="form-check form-switch">
|
||||
<input type="checkbox" class="form-check-input toggle" id="msu_resume"
|
||||
role="switch" v-model="msu_resume" @change="change" checked />
|
||||
<label class="form-check-label" for="msu_resume">MSU-1 Resume</label>
|
||||
</div>
|
||||
</template>
|
||||
39
src/components/QuickswapPicker.vue
Normal file
39
src/components/QuickswapPicker.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import localforage from "localforage";
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
quickswap: true,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
const savedvalue = await localforage.getItem("quickswap");
|
||||
if (savedvalue != null) {
|
||||
this.quickswap = savedvalue;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
patch(rom) {
|
||||
if (this.quickswap) {
|
||||
rom[0x18004B] = 0x01;
|
||||
} else {
|
||||
rom[0x18004B] = 0x00;
|
||||
}
|
||||
},
|
||||
async change() {
|
||||
await localforage.setItem("quickswap", this.quickswap);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="form-check form-switch">
|
||||
<input type="checkbox" class="form-check-input toggle" id="quickswap"
|
||||
role="switch" v-model="quickswap" @change="change" />
|
||||
<label class="form-check-label" for="quickswap">Quickswap</label>
|
||||
</div>
|
||||
</template>
|
||||
39
src/components/ReduceFlashingPicker.vue
Normal file
39
src/components/ReduceFlashingPicker.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import localforage from "localforage";
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
reduce_flashing: true,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
const savedvalue = await localforage.getItem("reduce_flashing");
|
||||
if (savedvalue != null) {
|
||||
this.reduce_flashing = savedvalue;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
patch(rom) {
|
||||
if (this.reduce_flashing) {
|
||||
rom[0x18017F] = 0x01;
|
||||
} else {
|
||||
rom[0x18017F] = 0x00;
|
||||
}
|
||||
},
|
||||
async change() {
|
||||
await localforage.setItem("reduce_flashing", this.reduce_flashing);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="form-check form-switch">
|
||||
<input type="checkbox" class="form-check-input toggle" id="reduce_flashing"
|
||||
role="switch" v-model="reduce_flashing" @change="change" checked />
|
||||
<label class="form-check-label" for="reduce_flashing">Reduce Flashing</label>
|
||||
</div>
|
||||
</template>
|
||||
@@ -2,6 +2,13 @@
|
||||
import { defineComponent } from "vue";
|
||||
|
||||
import SpritePicker from "@/components/SpritePicker.vue";
|
||||
import HeartBeepPicker from "@/components/HeartBeepPicker.vue";
|
||||
import HeartColorPicker from "@/components/HeartColorPicker.vue";
|
||||
import QuickswapPicker from "@/components/QuickswapPicker.vue";
|
||||
import ReduceFlashingPicker from "@/components/ReduceFlashingPicker.vue";
|
||||
import BackgroundMusicPicker from "@/components/BackgroundMusicPicker.vue";
|
||||
import MsuResumePicker from "@/components/MsuResumePicker.vue";
|
||||
|
||||
import SeedSettings from "@/components/SeedSettings.vue";
|
||||
|
||||
import { Base64 } from "js-base64";
|
||||
@@ -14,6 +21,12 @@ export default defineComponent({
|
||||
components: {
|
||||
SeedSettings,
|
||||
SpritePicker,
|
||||
HeartBeepPicker,
|
||||
HeartColorPicker,
|
||||
QuickswapPicker,
|
||||
ReduceFlashingPicker,
|
||||
BackgroundMusicPicker,
|
||||
MsuResumePicker,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -118,6 +131,13 @@ export default defineComponent({
|
||||
this.sprite.apply(rom);
|
||||
}
|
||||
|
||||
this.$refs.heartbeep.patch(rom);
|
||||
this.$refs.heartcolor.patch(rom);
|
||||
this.$refs.msu_resume.patch(rom);
|
||||
this.$refs.bgm.patch(rom);
|
||||
this.$refs.reduce_flashing.patch(rom);
|
||||
this.$refs.quickswap.patch(rom);
|
||||
|
||||
// Fix Checksum
|
||||
const sum = rom.reduce(function(sum, mbyte, i) {
|
||||
if (i >= 0x7fdc && i < 0x7fe0) {
|
||||
@@ -167,6 +187,24 @@ export default defineComponent({
|
||||
<SpritePicker @spriteUpdate="spriteUpdate" />
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="mb-2">
|
||||
<HeartBeepPicker ref="heartbeep" />
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="mb-2">
|
||||
<HeartColorPicker ref="heartcolor" />
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div>
|
||||
<BackgroundMusicPicker ref="bgm" />
|
||||
<MsuResumePicker ref="msu_resume" />
|
||||
<ReduceFlashingPicker ref="reduce_flashing" />
|
||||
<QuickswapPicker ref="quickswap" />
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<button type="submit" class="btn btn-primary submit-btn" :disabled="!baserom || !patch" @click="patchRom">
|
||||
Download Seed!
|
||||
|
||||
@@ -26,6 +26,10 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="settings.randomizer && settingsDisplay.randomizer[settings.randomizer]">
|
||||
{{ settingsDisplay.randomizer[settings.randomizer] }}
|
||||
<hr>
|
||||
</div>
|
||||
<div v-if="settings.goal">
|
||||
Goal: {{ settingsDisplay.goal[settings.goal] }}
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
randomizer:
|
||||
apr2025: April 2025 Special Randomizer
|
||||
goal:
|
||||
ganon: "{{ crystals_ganon }} Crystal Ganon"
|
||||
fast_ganon: "{{ crystals_ganon }} Crystal Fast Ganon"
|
||||
|
||||
Reference in New Issue
Block a user