Skip to content

Instant Fusion Reload #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ settings:
DEFICKLE: # Defickle Fusers
on: 75
off: 25
INSTANT_FUSION_RELOAD: # Instant Fusion Reload
on: 75
off: 25
FUSION_SKIPS: # Skip Fusion Cutscenes
NO_FUSION_SKIP: 0 # Never
ALLOW_FUSION_SKIPS: 100 # Choose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ settings:
DEFICKLE: # Defickle Fusers
on: 100
off: 0
INSTANT_FUSION_RELOAD: # Instant Fusion Reload
on: 100
off: 0
FUSION_SKIPS: # Skip Fusion Cutscenes
NO_FUSION_SKIP: 0 # Never
ALLOW_FUSION_SKIPS: 100 # Choose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ settings:
DEFICKLE: # Defickle Fusers
on: 75
off: 25
INSTANT_FUSION_RELOAD: # Instant Fusion Reload
on: 75
off: 25
FUSION_SKIPS: # Skip Fusion Cutscenes
NO_FUSION_SKIP: 0 # Never
ALLOW_FUSION_SKIPS: 100 # Choose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ settings:
DEFICKLE: # Defickle Fusers
on: 1
off: 1
INSTANT_FUSION_RELOAD: # Instant Fusion Reload
on: 1
off: 1
FUSION_SKIPS: # Skip Fusion Cutscenes
NO_FUSION_SKIP: 1 # Never
ALLOW_FUSION_SKIPS: 1 # Choose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: NO_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: INSTANT_SKIP # Skip Fusion Cutscenes
SHOW_MAP: on # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: OPEN_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: NO_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: VANILLA_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: OPEN_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: OPEN_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: VANILLA_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: on # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: NO_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: COMBINED_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: OPEN_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: OPEN_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: OPEN_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: OPEN_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ settings:
GREEN_FUSION_SETTING: NO_GREEN_FUSIONS # Green Fusions are
SEEDED_SHARED: on # Order Shared Fusions
DEFICKLE: on # Defickle Fusers
INSTANT_FUSION_RELOAD: on # Instant Fusion Reload
FUSION_SKIPS: ALLOW_FUSION_SKIPS # Skip Fusion Cutscenes
SHOW_MAP: off # Always Show Map
# Speed Up:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.thumb
ldr r0, =#0x3003DF0
mov r2, #0xF1
add r0, #0x8

@ store in r6 whether we cannot safely reload fusions for fusers offering the just completed fusion
mov r6, #1
cmp r4, #0x21 @ Percy (leaves house after this fusion)
beq loop
cmp r4, #0x25 @ 2nd Goron
beq loop
cmp r4, #0x26 @ 4th Goron
beq loop
cmp r4, #0x29 @ 1st Goron
beq loop
cmp r4, #0x2A @ 3rd Goron
beq loop
cmp r4, #0x2B @ 5th Goron
beq loop
cmp r4, #0x2F @ 6th Goron
beq loop

ldr r3, =#0x2002B35
ldrb r3, [r3]
and r3, r6
cmp r3, #1
beq hasMagicBoomerang

cmp r4, #0x59 @ first Tingle fusion
beq loop
cmp r4, #0x5A @ first David Jr. fusion
beq loop

hasMagicBoomerang:
mov r6, #0

loop:
ldrb r3, [r0, #3]
cmp r4, r3
bne continue

@ mark fuser as having its current fusion completed (same as vanilla)
strb r2, [r0, #3]

@ check if we can safely reload the available fusion
cmp r6, #0
bne continue

push {r0-r2}
mov r5, r0
ldr r0, [r0, #8]
cmp r0, #0
beq noEntity

@ GetFusionToOffer
ldr r3, =#0x801E99C
mov lr, r3
.short 0xF800
strb r0, [r5, #3]

noEntity:
pop {r0-r2}

continue:
add r0, #12
add r1, #1
cmp r1, #0x1F
bls loop

pop {r4-r6, pc}
8 changes: 8 additions & 0 deletions RandomizerCore/Resources/Patches/improvements/installer.event
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,14 @@ cafe:
POP
#endif

//fusers update their offered fusion after completing one without needing to reload the room
#ifdef instantFusionReload
PUSH; ORG $1E744; jumpToHack(fastFusionReload); POP
ALIGN 4
fastFusionReload:
#incbin "asm/fastFusionReload.dmp"
#endif

//shared fusions are done in a fixed order
#ifdef seededSharedFusions
PUSH
Expand Down
5 changes: 5 additions & 0 deletions RandomizerCore/Resources/default.logic
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
!dropdown - World Settings - Setting - Fusions - GREEN_FUSION_SETTING - Green Fusions are - Green Kinstones come in 3 shapes, Fusions can be found everywhere and a large amount are shared between many people.\nThere are 49 Fusions in total, There are more Kinstones in the pool than fusions available just to be generous. - NO_GREEN_FUSIONS - Removed (Closed) - NO_GREEN_FUSIONS - 'Removed': All the Green Kinstones are removed from the pool, and the fusions are unable to be completed. - Vanilla - VANILLA_GREEN_FUSIONS - 'Vanilla': This shuffles the 3 different shaped Green Kinstones into the pool, the exact amount needed to do every available fusion, the locations of the fusions and what shape they ask for are not shuffled. - Combined - COMBINED_GREEN_FUSIONS - 'Combined': This converts the different shaped Green Kinstones into a single Green shape. The locations of the fusions are not shuffled and all ask for the same shape. - Completed (Open) - OPEN_GREEN_FUSIONS - 'Completed': All the Green Kinstones are removed from the pool, and all the fusions are already completed.
!flag - World Settings - Setting - Fusions - SEEDED_SHARED - Order Shared Fusions - There is a Pool of 18 Shared Fusions in the Game: 16 Green, 1 Blue and 1 Red. These Fusions are randomly selected by an NPC who offers Shared Fusions when you enter the room they are in.\n\nIf this setting is enabled then the seed generates a listed order these NPCs offer the Fusions in. This makes different people playing the same seed have the same Fusions available which is useful for races. - true
!flag - World Settings - Setting - Fusions - DEFICKLE - Defickle Fusers - Many NPCs who offer fusions are considered 'Fickle', this means they can randomly decide to NOT offer their fusion.\n\nEnable this to make them ALWAYS offer a fusion. - true
!flag - World Settings - Setting - Fusions - INSTANT_FUSION_RELOAD - Instant Fusion Reload - If enabled eliminates the need to reload a room after a fusion to make fusers offer their next fusion. - true
!dropdown - World Settings - Setting - Fusions - FUSION_SKIPS - Skip Fusion Cutscenes - When doing a Kinstone Fusion you get a cutscene aftewards to show you what the fusion activated, and then a Map indicator spawns. - ALLOW_FUSION_SKIPS - Never - NO_FUSION_SKIP - 'Never': The cutscene is never able to be skipped by the player. - Choose - ALLOW_FUSION_SKIPS - 'Choose': If you hold a button prior to the start of the cutscene, then the cutscene is skipped, otherwise the cutscene plays normally.\n If 'Show Map' is enabled then only the cutscene is skipped, but the map screen is still shown. - Always - INSTANT_SKIP - 'Always': The cutscene is always skipped without player input.\n If 'Show Map' is enabled then it will always show the map screen.
!flag - World Settings - Setting - Fusions - SHOW_MAP - Always Show Map - If enabled, it will always show the map screen at the end of a cutscene, even if the cutscene is skipped.

Expand Down Expand Up @@ -1388,6 +1389,10 @@
!eventdefine - removeFickleness
!endif

!ifdef - INSTANT_FUSION_RELOAD
!eventdefine - instantFusionReload
!endif

!ifdef - GLITCHLESS
!eventdefine - glitchless # if defined, loads various hacks to disable the use of some speedrun glitches
!endif
Expand Down