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

Commit

Permalink
0.7.2 - fix spawnings, keydoor, bob secret coin formations, warp shuf…
Browse files Browse the repository at this point in the history
…fle inside castle, spoiler log clear on new rom
  • Loading branch information
andre-meyer committed Jun 25, 2019
1 parent 9c23c0d commit 78f5754
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 48 deletions.
2 changes: 2 additions & 0 deletions CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def run_with_parsed_args(opt_args : argparse.Namespace):
stardoor_randomizer.open_level_stardoors()
elif opt_args.stardoor_requirements == "random":
stardoor_randomizer.shuffle_level_stardoors()
if opt_args.keydoor_requirements is not "vanilla":
stardoor_randomizer.open_keydoors()

#stardoor_randomizer

Expand Down
35 changes: 0 additions & 35 deletions Config/randomizeObjects/objects.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,4 @@
[
{
"name": "Coins (Line Formation)",
"match": { "behaviour": "0x130008EC", "bparam2": 0 },
"rules": {
"BOUNDING_BOX": { "length": 1000, "width": 100, "height": 100 }
}
},
{
"name": "Coins (Upward Coin Formation)",
"match": { "behaviour": "0x130008EC", "bparam2": 1 },
"rules": {
"BOUNDING_BOX": { "length": 100, "width": 100, "height": 1000 }
}
},
{
"name": "Coins (Circle)",
"match": { "behaviour": "0x130008EC", "bparam2": 2 },
"rules": {
"BOUNDING_BOX": { "length": 100, "width": 1000, "height": 1000 }
}
},
{
"name": "Coins (Ring)",
"match": { "behaviour": "0x130008EC", "bparam2": 3 },
"rules": {
"BOUNDING_BOX": { "length": 1000, "width": 1000, "height": 100 }
}
},
{
"name": "Coins (Arrow)",
"match": { "behaviour": "0x130008EC", "bparam2": 4 },
"rules": {
"BOUNDING_BOX": { "length": 100, "width": 1000, "height": 1000 }
}
},
{
"name": "Coin (Type 1)",
"match": { "model_id": "0x74" }
Expand Down
45 changes: 45 additions & 0 deletions Config/randomizeObjects/special.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
"MAX_SLOPE": 0.99
}
},
{
"name": "Warp (Mario Start 2)",
"match": { "behaviour": "0x13002F64", "course_id": "0x06" },
"rules": {
"DISABLE": true
}
},
{
"name": "Warp (Mario Start 1)",
"match": { "behaviour": "0x13002F74" },
Expand Down Expand Up @@ -108,6 +115,14 @@
"NO_FLOOR_REQUIRED": true
}
},
{
"name": "BOB: Disable Coin Formation randomization",
"match": { "behaviour": "0x130008EC", "course_id": "0x09", "bparam2": "0x13" },
"rules": {
"DISABLE": true
},
"priority": 15
},
{
"name": "WC: Red Coins Wingcap",
"match": { "behaviour": "0x13003EAC", "course_id": "0x1D" },
Expand Down Expand Up @@ -149,6 +164,36 @@
},
"priority": 5
},
{
"name": "WMotR: Red Coins Spawn everywhere",
"match": { "behaviour": "0x13003EAC", "course_id": "0x1F" },
"rules": {
"MIN_Y": -2500,
"MAX_Y": 4880,
"DISTANCE_TO": { "origin": [0, 1900, 0], "max_distance": 5000 },
"NO_FLOOR_REQUIRED": true
},
"priority": 10
},
{
"name": "WMotR: Coin Formations Spawn everywhere",
"match": { "behaviour": "0x130008EC", "course_id": "0x1F" },
"rules": {
"MIN_Y": -2500,
"MAX_Y": 4880,
"DISTANCE_TO": { "origin": [0, 1900, 0], "max_distance": 5000 },
"NO_FLOOR_REQUIRED": true
},
"priority": 10
},
{
"name": "WMotR: Itembox Disabled",
"match": { "behaviour": "0x13002250", "course_id": "0x1F" },
"rules": {
"DISABLE": true
},
"priority": 10
},
{
"name": "JRB: Itembox in Ship can spawn in Water",
"match": { "course_id": "0x0C", "area_id": "0x2" },
Expand Down
19 changes: 10 additions & 9 deletions Enhancements/GameplayEnhancements.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ def __init__(self, rom : 'ROM'):
self.tweaking = Tweaking(rom)

def disable_all_cutscenes(self):
self.tweaking.add_asm_patch(
[
(0x6BD4, bytes([0x24, 0x00])), # Peach Cutscene
(0x6D90, bytes([0x24, 0x10, 0x00, 0x00])), # Lakitu Cutscene
(0x4B7C, bytes([0x24, 0x00])), # Level Intros #1
(0x4924, bytes([0x10, 0x00])), # Level Intros #2
(0x123F8, bytes([0x10, 0x00])), # Disable "Milestone" Messages
]
)
if self.rom.region in ['NORTH_AMERICA', 'EUROPE']:
self.tweaking.add_asm_patch(
[
(0x6BD4, bytes([0x24, 0x00])), # Peach Cutscene
(0x6D90, bytes([0x24, 0x10, 0x00, 0x00])), # Lakitu Cutscene
(0x4B7C, bytes([0x24, 0x00])), # Level Intros #1
(0x4924, bytes([0x10, 0x00])), # Level Intros #2
(0x123F8, bytes([0x10, 0x00])), # Disable "Milestone" Messages
]
)

def disable_starwarp(self):
self.tweaking.add_asm_patch(
Expand Down
5 changes: 3 additions & 2 deletions Parsers/LevelScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,9 @@ def process_macro_objects(self, start, end):
else:
preset = preset_table[preset_id]
position = (self.rom.read_integer(None, 2, True), self.rom.read_integer(None, 2, True), self.rom.read_integer(None, 2, True))
(bparam1, bparam2) = (self.rom.read_integer(None, 1), self.rom.read_integer(None, 1))
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])
bparam1 = self.rom.read_integer(None, 1)
bparam2 = self.rom.read_integer(None, 1)
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])
objects_found.append(object3d)
macro_table["entries"].append(dict(
object3d=object3d,
Expand Down
2 changes: 1 addition & 1 deletion Spoiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def add_entry(module : str, value : str):

@staticmethod
def output():
with open('sm64_rando_spoiler.log', 'w') as spoiler_log_file:
with open('sm64_rando_spoiler.log', 'w+') as spoiler_log_file:
for module in list(SpoilerLog.entries.keys()):
spoiler_log_file.write(module.upper().center(40, '-') + '\n')
for entry in SpoilerLog.entries[module]:
Expand Down
2 changes: 1 addition & 1 deletion __version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.7.1'
__version__ = '0.7.2'

0 comments on commit 78f5754

Please sign in to comment.