Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Commit 78f5754

Browse files
committed
0.7.2 - fix spawnings, keydoor, bob secret coin formations, warp shuffle inside castle, spoiler log clear on new rom
1 parent 9c23c0d commit 78f5754

File tree

7 files changed

+62
-48
lines changed

7 files changed

+62
-48
lines changed

CLI.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ def run_with_parsed_args(opt_args : argparse.Namespace):
167167
stardoor_randomizer.open_level_stardoors()
168168
elif opt_args.stardoor_requirements == "random":
169169
stardoor_randomizer.shuffle_level_stardoors()
170+
if opt_args.keydoor_requirements is not "vanilla":
171+
stardoor_randomizer.open_keydoors()
170172

171173
#stardoor_randomizer
172174

Config/randomizeObjects/objects.json

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,4 @@
11
[
2-
{
3-
"name": "Coins (Line Formation)",
4-
"match": { "behaviour": "0x130008EC", "bparam2": 0 },
5-
"rules": {
6-
"BOUNDING_BOX": { "length": 1000, "width": 100, "height": 100 }
7-
}
8-
},
9-
{
10-
"name": "Coins (Upward Coin Formation)",
11-
"match": { "behaviour": "0x130008EC", "bparam2": 1 },
12-
"rules": {
13-
"BOUNDING_BOX": { "length": 100, "width": 100, "height": 1000 }
14-
}
15-
},
16-
{
17-
"name": "Coins (Circle)",
18-
"match": { "behaviour": "0x130008EC", "bparam2": 2 },
19-
"rules": {
20-
"BOUNDING_BOX": { "length": 100, "width": 1000, "height": 1000 }
21-
}
22-
},
23-
{
24-
"name": "Coins (Ring)",
25-
"match": { "behaviour": "0x130008EC", "bparam2": 3 },
26-
"rules": {
27-
"BOUNDING_BOX": { "length": 1000, "width": 1000, "height": 100 }
28-
}
29-
},
30-
{
31-
"name": "Coins (Arrow)",
32-
"match": { "behaviour": "0x130008EC", "bparam2": 4 },
33-
"rules": {
34-
"BOUNDING_BOX": { "length": 100, "width": 1000, "height": 1000 }
35-
}
36-
},
372
{
383
"name": "Coin (Type 1)",
394
"match": { "model_id": "0x74" }

Config/randomizeObjects/special.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
"MAX_SLOPE": 0.99
1818
}
1919
},
20+
{
21+
"name": "Warp (Mario Start 2)",
22+
"match": { "behaviour": "0x13002F64", "course_id": "0x06" },
23+
"rules": {
24+
"DISABLE": true
25+
}
26+
},
2027
{
2128
"name": "Warp (Mario Start 1)",
2229
"match": { "behaviour": "0x13002F74" },
@@ -108,6 +115,14 @@
108115
"NO_FLOOR_REQUIRED": true
109116
}
110117
},
118+
{
119+
"name": "BOB: Disable Coin Formation randomization",
120+
"match": { "behaviour": "0x130008EC", "course_id": "0x09", "bparam2": "0x13" },
121+
"rules": {
122+
"DISABLE": true
123+
},
124+
"priority": 15
125+
},
111126
{
112127
"name": "WC: Red Coins Wingcap",
113128
"match": { "behaviour": "0x13003EAC", "course_id": "0x1D" },
@@ -149,6 +164,36 @@
149164
},
150165
"priority": 5
151166
},
167+
{
168+
"name": "WMotR: Red Coins Spawn everywhere",
169+
"match": { "behaviour": "0x13003EAC", "course_id": "0x1F" },
170+
"rules": {
171+
"MIN_Y": -2500,
172+
"MAX_Y": 4880,
173+
"DISTANCE_TO": { "origin": [0, 1900, 0], "max_distance": 5000 },
174+
"NO_FLOOR_REQUIRED": true
175+
},
176+
"priority": 10
177+
},
178+
{
179+
"name": "WMotR: Coin Formations Spawn everywhere",
180+
"match": { "behaviour": "0x130008EC", "course_id": "0x1F" },
181+
"rules": {
182+
"MIN_Y": -2500,
183+
"MAX_Y": 4880,
184+
"DISTANCE_TO": { "origin": [0, 1900, 0], "max_distance": 5000 },
185+
"NO_FLOOR_REQUIRED": true
186+
},
187+
"priority": 10
188+
},
189+
{
190+
"name": "WMotR: Itembox Disabled",
191+
"match": { "behaviour": "0x13002250", "course_id": "0x1F" },
192+
"rules": {
193+
"DISABLE": true
194+
},
195+
"priority": 10
196+
},
152197
{
153198
"name": "JRB: Itembox in Ship can spawn in Water",
154199
"match": { "course_id": "0x0C", "area_id": "0x2" },

Enhancements/GameplayEnhancements.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ def __init__(self, rom : 'ROM'):
66
self.tweaking = Tweaking(rom)
77

88
def disable_all_cutscenes(self):
9-
self.tweaking.add_asm_patch(
10-
[
11-
(0x6BD4, bytes([0x24, 0x00])), # Peach Cutscene
12-
(0x6D90, bytes([0x24, 0x10, 0x00, 0x00])), # Lakitu Cutscene
13-
(0x4B7C, bytes([0x24, 0x00])), # Level Intros #1
14-
(0x4924, bytes([0x10, 0x00])), # Level Intros #2
15-
(0x123F8, bytes([0x10, 0x00])), # Disable "Milestone" Messages
16-
]
17-
)
9+
if self.rom.region in ['NORTH_AMERICA', 'EUROPE']:
10+
self.tweaking.add_asm_patch(
11+
[
12+
(0x6BD4, bytes([0x24, 0x00])), # Peach Cutscene
13+
(0x6D90, bytes([0x24, 0x10, 0x00, 0x00])), # Lakitu Cutscene
14+
(0x4B7C, bytes([0x24, 0x00])), # Level Intros #1
15+
(0x4924, bytes([0x10, 0x00])), # Level Intros #2
16+
(0x123F8, bytes([0x10, 0x00])), # Disable "Milestone" Messages
17+
]
18+
)
1819

1920
def disable_starwarp(self):
2021
self.tweaking.add_asm_patch(

Parsers/LevelScript.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,9 @@ def process_macro_objects(self, start, end):
390390
else:
391391
preset = preset_table[preset_id]
392392
position = (self.rom.read_integer(None, 2, True), self.rom.read_integer(None, 2, True), self.rom.read_integer(None, 2, True))
393-
(bparam1, bparam2) = (self.rom.read_integer(None, 1), self.rom.read_integer(None, 1))
394-
object3d = Object3D("MACRO_OBJ", self.current_area, preset.model_id, position, self.level, (None, rot_y, None), preset.behaviour_addr, mem_address = cursor, bparams=[bparam1, bparam2])
393+
bparam1 = self.rom.read_integer(None, 1)
394+
bparam2 = self.rom.read_integer(None, 1)
395+
object3d = Object3D("MACRO_OBJ", self.current_area, preset.model_id, position, self.level, (None, rot_y, None), preset.behaviour_addr, mem_address = cursor, bparams=[bparam1 if bparam1 > 0 else preset.default_b1, bparam2 if bparam2 > 0 else preset.default_b2])
395396
objects_found.append(object3d)
396397
macro_table["entries"].append(dict(
397398
object3d=object3d,

Spoiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def add_entry(module : str, value : str):
1212

1313
@staticmethod
1414
def output():
15-
with open('sm64_rando_spoiler.log', 'w') as spoiler_log_file:
15+
with open('sm64_rando_spoiler.log', 'w+') as spoiler_log_file:
1616
for module in list(SpoilerLog.entries.keys()):
1717
spoiler_log_file.write(module.upper().center(40, '-') + '\n')
1818
for entry in SpoilerLog.entries[module]:

__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.7.1'
1+
__version__ = '0.7.2'

0 commit comments

Comments
 (0)