Skip to content

Commit 980be2f

Browse files
papajefelincoln-lm
andauthored
FRLG Wild (lincoln-lm#3)
* Add Show Seeds Button Added button to show seeds in g3-calibration, and required functions to g3-calibration.py * Change button Altered button location, changed formatting, updated comments. * Add fetch_default_seed Adds function to insert a default seed from index 50 of the seed list for the selected settings, whenever settings are changed. * Add System Selector for Seed ms Offsets Added system offsets to ten lines and g3-calibration. Tested URL parameter passing as well, appeared to be working. Compared results to live to ensure I didn't break RTC/Painting MS values. Also tested/compared live timings to the new offset timings to make sure it matched expected values. Should give much more accurate 1st attempts at calibration. * The Jefe Update 1. Add Wild to G3 Calibration 2. Implement System ms Offsets to Ten Lines & G3 Calibration 3. Add Shiny Filter/Any Nature Search to G3 Calibration 4. Slight tweaks to build.py for accurate frame standarization across sheets * Update build.py Slight adjustments to seed frame standardization for japanese seed lists, based on testing * Fix weird merge artifacts i don't understand wtf was this * use None as default nature filter & formatting * less generic exception * filter based on search nature and not final nature * clean up calc_encslot * reorder imports * move "No seed found." handling to fetch_default_seed & formatting * remove excess comments * black formatting * fix double & when forwarded params is empty * only add the & when params is not empty * include KeyError in fetch_default_seed --------- Co-authored-by: Lincoln-LM <[email protected]>
1 parent 0fff8fc commit 980be2f

File tree

6 files changed

+573
-92
lines changed

6 files changed

+573
-92
lines changed

build.py

Lines changed: 123 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,104 @@
2525
}
2626

2727
ENG_OFFSETS = {
28-
"la": {"startup_select": -1, "startup_a": -8, "blackout_r": -23, "blackout_a": -31, "blackout_l": 2, "blackout_al": -33, "none": 0},
29-
"help": {"startup_select": 7, "startup_a": 3, "blackout_r": -23, "blackout_a": -23, "none": 0},
30-
"lr": {"startup_select": -1, "startup_a": -18, "blackout_r": -23, "blackout_a": -39, "none": 0},
28+
"la": {
29+
"startup_select": -1,
30+
"startup_a": -8,
31+
"blackout_r": -23,
32+
"blackout_a": -31,
33+
"blackout_l": 2,
34+
"blackout_al": -33,
35+
"none": 0,
36+
},
37+
"help": {
38+
"startup_select": 7,
39+
"startup_a": 3,
40+
"blackout_r": -23,
41+
"blackout_a": -23,
42+
"none": 0,
43+
},
44+
"lr": {
45+
"startup_select": -1,
46+
"startup_a": -18,
47+
"blackout_r": -23,
48+
"blackout_a": -39,
49+
"none": 0,
50+
},
3151
}
3252

3353
FR_JPN_1_0_OFFSETS = {
34-
"la": {"startup_select": -1, "startup_a": 1, "blackout_r": -10, "blackout_a": -18, "blackout_l": -3, "none": 0},
35-
"help": {"startup_select": 7, "startup_a": 3, "blackout_r": -27, "blackout_a": -24, "none": 0},
36-
"lr": {"startup_select": 0, "startup_a": -18, "blackout_r": -23, "blackout_a": -40, "none": 0},
54+
"la": {
55+
"startup_select": -1,
56+
"startup_a": 1,
57+
"blackout_r": -10,
58+
"blackout_a": -18,
59+
"blackout_l": -3,
60+
"none": 0,
61+
},
62+
"help": {
63+
"startup_select": 7,
64+
"startup_a": 3,
65+
"blackout_r": -27,
66+
"blackout_a": -24,
67+
"none": 0,
68+
},
69+
"lr": {
70+
"startup_select": 0,
71+
"startup_a": -18,
72+
"blackout_r": -23,
73+
"blackout_a": -40,
74+
"none": 0,
75+
},
3776
}
3877

3978
FR_JPN_1_1_OFFSETS = {
40-
"la": {"startup_select": 10, "startup_a": -9, "blackout_r": -23, "blackout_a": -31, "blackout_l": 6, "none": 0},
41-
"help": {"startup_select": -7, "startup_a": -19, "blackout_r": -21, "blackout_a": -29, "none": 0},
42-
"lr": {"startup_select": -7, "startup_a": -4, "blackout_r": -29, "blackout_a": -38, "none": 0},
79+
"la": {
80+
"startup_select": 10,
81+
"startup_a": -9,
82+
"blackout_r": -23,
83+
"blackout_a": -31,
84+
"blackout_l": 6,
85+
"none": 0,
86+
},
87+
"help": {
88+
"startup_select": -7,
89+
"startup_a": -19,
90+
"blackout_r": -21,
91+
"blackout_a": -29,
92+
"none": 0,
93+
},
94+
"lr": {
95+
"startup_select": -7,
96+
"startup_a": -4,
97+
"blackout_r": -29,
98+
"blackout_a": -38,
99+
"none": 0,
100+
},
43101
}
44102

45103
LG_JPN_OFFSETS = {
46-
"la": {"startup_select": -1, "startup_a": -9, "blackout_r": -22, "blackout_a": -40, "blackout_l": -7, "none": 0},
47-
"help": {"startup_select": -1, "startup_a": -18, "blackout_r": -23, "blackout_a": -31, "none": 0},
48-
"lr": {"startup_select": -1, "startup_a": -23, "blackout_r": -23, "blackout_a": -39, "none": 0},
104+
"la": {
105+
"startup_select": -1,
106+
"startup_a": -9,
107+
"blackout_r": -22,
108+
"blackout_a": -40,
109+
"blackout_l": -7,
110+
"none": 0,
111+
},
112+
"help": {
113+
"startup_select": -1,
114+
"startup_a": -18,
115+
"blackout_r": -23,
116+
"blackout_a": -31,
117+
"none": 0,
118+
},
119+
"lr": {
120+
"startup_select": -1,
121+
"startup_a": -23,
122+
"blackout_r": -23,
123+
"blackout_a": -39,
124+
"none": 0,
125+
},
49126
}
50127

51128

@@ -58,7 +135,28 @@ def pull_frlg_seeds():
58135
game: {
59136
sound: {
60137
l: {
61-
button: {held: {} for held in (("none", "startup_select") if game in ("fr_eu", "lg_eu") else (("none", "startup_select", "startup_a", "blackout_r", "blackout_a") + (("blackout_l",) + (("blackout_al",) if game in ("fr", "lg") else ()) if l == "la" else ())))}
138+
button: {
139+
held: {}
140+
for held in (
141+
("none", "startup_select")
142+
if game in ("fr_eu", "lg_eu")
143+
else (
144+
(
145+
"none",
146+
"startup_select",
147+
"startup_a",
148+
"blackout_r",
149+
"blackout_a",
150+
)
151+
+ (
152+
("blackout_l",)
153+
+ (("blackout_al",) if game in ("fr", "lg") else ())
154+
if l == "la"
155+
else ()
156+
)
157+
)
158+
)
159+
}
62160
for button in ("a", "start") + (("l",) if l == "la" else ())
63161
}
64162
for l in ("la", "help", "lr")
@@ -144,14 +242,16 @@ def add_seed(col, sound, l, button):
144242
if i < 3:
145243
continue
146244
if row[0]:
147-
frame = int(row[0]) - 40
245+
frame = int(row[0]) - 45
148246

149247
def add_seed(col, sound, l, button):
150248
if row[col]:
151249
seed = int(row[col], 16)
152250
jpn_fr_1_0 = frlg_seeds["fr_jpn_1_0"][sound][l][button]
153251
for held in jpn_fr_1_0.keys():
154-
jpn_fr_1_0[held][(seed + FR_JPN_1_0_OFFSETS[l][held]) & 0xFFFF] = frame
252+
jpn_fr_1_0[held][
253+
(seed + FR_JPN_1_0_OFFSETS[l][held]) & 0xFFFF
254+
] = frame
155255

156256
add_seed(1, "mono", "lr", "a")
157257
add_seed(2, "mono", "la", "a")
@@ -169,14 +269,16 @@ def add_seed(col, sound, l, button):
169269
if i < 3:
170270
continue
171271
if row[0]:
172-
frame = int(row[0]) - 40
272+
frame = int(row[0]) - 45
173273

174274
def add_seed(col, sound, l, button):
175275
if row[col]:
176276
seed = int(row[col], 16)
177277
jpn_fr_1_1 = frlg_seeds["fr_jpn_1_1"][sound][l][button]
178278
for held in jpn_fr_1_1.keys():
179-
jpn_fr_1_1[held][(seed + FR_JPN_1_1_OFFSETS[l][held]) & 0xFFFF] = frame
279+
jpn_fr_1_1[held][
280+
(seed + FR_JPN_1_1_OFFSETS[l][held]) & 0xFFFF
281+
] = frame
180282

181283
add_seed(1, "mono", "lr", "a")
182284
add_seed(2, "mono", "la", "a")
@@ -194,7 +296,7 @@ def add_seed(col, sound, l, button):
194296
if i < 3:
195297
continue
196298
if row[0]:
197-
frame = int(row[0]) - 40
299+
frame = int(row[0]) - 41
198300

199301
def add_seed(col, sound, l, button):
200302
if row[col]:
@@ -219,7 +321,9 @@ def add_seed(col, sound, l, button):
219321
for held in data.keys():
220322
data[held] = {
221323
seed: (frame, i)
222-
for i, (seed, frame) in enumerate(sorted(data[held].items(), key=lambda x: x[1]))
324+
for i, (seed, frame) in enumerate(
325+
sorted(data[held].items(), key=lambda x: x[1])
326+
)
223327
}
224328

225329
with gzip.open(

css/main.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ body {
2929
position: relative;
3030
top: 1px;
3131
}
32+
.button-1:disabled {
33+
display: none;
34+
}
3235
.button-2 {
3336
background-color: var(--btn-bg);
3437
border-radius: 3px;

0 commit comments

Comments
 (0)