prevent random boss + Unlock Kefka requirements from softlocks#10
Merged
beauxq merged 7 commits intobeauxq:ff6wcfrom May 24, 2025
Merged
prevent random boss + Unlock Kefka requirements from softlocks#10beauxq merged 7 commits intobeauxq:ff6wcfrom
beauxq merged 7 commits intobeauxq:ff6wcfrom
Conversation
- Don't separate `if` from `elif` by a comment at the same indentation. - Indentation should be multiple of 4 - Lines shouldn't be longer than 120 characters.
beauxq
reviewed
May 16, 2025
beauxq
reviewed
May 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
Dragon softlock prevention was already in place, but somehow bosses/statues were left out. This PR attempts to prevent a scenario where the Bosses = Random (-bbr flag) and Kefka requires a specific number of bosses for unlock. If this number is very high, there is a possibility that the randomizer doesn't put in enough unique bosses to actually beat the game by unlocking Kefka objective remaining incomplete. We have seen this issue come up in the AP version of the game, which is why there was a workaround in place to limit the boss count to 18 at maximum.
How was this tested?
Wrote code in data/enemy_packs.py to print out the required boss & statue fights:
Final Kefka objective = 4 bosses + Doom required
wc.py -i FinalFantasyIII.smc -o ff3b.smc -cg -oa 2.4.4.2.12.12.4.24.24.8.4.4.9.6 -ob 3.1.1.2.9.9.4.12.12.10.21.21 -oc 30.8.8.1.1.11.8 -od 59.1.1.11.31 -oe 3.1.1.9.6 -sc1 randomngu -sal -sn -eu -csrp 85 130 -fst -brl -slr 3 5 -lmprp 75 125 -lel -srr 25 30 -rnl -rnc -sdr 1 1 -das -dda -dns -sch -scis -com 98989898989898989898989898 -rec1 28 -rec2 27 -rec3 6 -rec4 24 -rec5 97 -xpm 4 -mpm 4 -gpm 4 -nxppd -lsbd 3 -hmbd 2.5 -xgbd 2 -ase 2 -msl 97 -sed -sfb -bbr -drloc mix -stloc shuffle -be -res -fer 0 -escr 100 -dgne -mmnu -cmd -esr 2 4 -elrt -ebr 80 -emprp 75 125 -emi -nm1 random -rnl1 -rns1 -nm2 random -rnl2 -rns2 -nmmi -mmprp 75 125 -gp 5000 -smc 1 -sto 1 -ieor 40 -ieror 40 -ir standard -csb 20 20 -mca -stra -saw -sisr 15 -sprp 75 120 -sdm 5 -npi -snbr -sebr -snes -snsb -sesb -snee -snil -ccsr 15 -chrm 5 5 -cms -frw -wmhc -ahtc -cor 80 -crr 80 -crvr 100 120 -crm -cnee -cnil -ari -anca -adeh -ame 1 -nmc -nil -noshoes -u254 -nfps -fs -fe -fvd -fr -fj -fbs -fedc -fc -ond -scan -etn -ymain
Required Bosses: 3
Required Statues: 1
Vargas
Rizopas
Dullahan
Doom
Final Kefka objective = 34 bosses + Air Force + Goddess (ensure 1 non-statue boss & 1 statue boss)
wc.py -i FinalFantasyIII.smc -o ff3b.smc -cg -oa 2.5.5.2.12.12.4.24.24.8.34.34.9.0.9.11 -ob 3.1.1.2.9.9.4.12.12.10.21.21 -oc 30.8.8.1.1.11.8 -od 59.1.1.11.31 -oe 3.1.1.9.6 -sc1 randomngu -sal -sn -eu -csrp 85 130 -fst -brl -slr 3 5 -lmprp 75 125 -lel -srr 25 30 -rnl -rnc -sdr 1 1 -das -dda -dns -sch -scis -com 98989898989898989898989898 -rec1 28 -rec2 27 -rec3 6 -rec4 24 -rec5 97 -xpm 4 -mpm 4 -gpm 4 -nxppd -lsbd 3 -hmbd 2.5 -xgbd 2 -ase 2 -msl 97 -sed -sfb -bbr -drloc mix -stloc shuffle -be -res -fer 0 -escr 100 -dgne -mmnu -cmd -esr 2 4 -elrt -ebr 80 -emprp 75 125 -emi -nm1 random -rnl1 -rns1 -nm2 random -rnl2 -rns2 -nmmi -mmprp 75 125 -gp 5000 -smc 1 -sto 1 -ieor 40 -ieror 40 -ir standard -csb 20 20 -mca -stra -saw -sisr 15 -sprp 75 120 -sdm 5 -npi -snbr -sebr -snes -snsb -sesb -snee -snil -ccsr 15 -chrm 5 5 -cms -frw -wmhc -ahtc -cor 80 -crr 80 -crvr 100 120 -crm -cnee -cnil -ari -anca -adeh -ame 1 -nmc -nil -noshoes -u254 -nfps -fs -fe -fvd -fr -fj -fbs -fedc -fc -ond -scan -etn -ymain
Required Bosses: 31
Required Statues: 3
Marshal
Phunbaba 3
Phunbaba 4
Whelk
Vargas
TunnelArmr
GhostTrain
Dadaluma
Ifrit/Shiva
Cranes
Number 024
Number 128
Umaro
Guardian
FlameEater
Nerapa
SrBehemoth
Tentacles
Dullahan
Chadarnook
Air Force
Wrexsoul
Rizopas
Hidon
Doom Gaze
Ultros 1
Ultros/Chupon
Atma
MagiMaster
Tritoch
Kefka (Narshe)
Doom
Goddess
Poltrgeist
Doing it another time gave me 32/2:
32
2
Ultros 3
Leader
Phunbaba 3
Phunbaba 4
Whelk
TunnelArmr
GhostTrain
Dadaluma
Ifrit/Shiva
Cranes
Number 024
Number 128
Umaro
Guardian
FlameEater
Nerapa
SrBehemoth
Tentacles
Dullahan
Air Force
Stooges
Wrexsoul
Doom Gaze
Rizopas
Hidon
Ultros 1
Ultros 2
Ultros/Chupon
MagiMaster
Inferno
Tritoch
Kefka (Narshe)
Doom
Goddess
Final Kefka objective = 2 bosses + Guardian + Dadaluma + Poltrgeist (# bosses < # named bosses)
wc.py -i FinalFantasyIII.smc -o ff3b.smc -cg -oa 2.6.6.2.12.12.4.24.24.8.2.2.9.5.9.24.9.12 -ob 3.1.1.2.9.9.4.12.12.10.21.21 -oc 30.8.8.1.1.11.8 -od 59.1.1.11.31 -sc1 randomngu -sal -sn -eu -csrp 85 130 -fst -brl -slr 3 5 -lmprp 75 125 -lel -srr 25 30 -rnl -rnc -sdr 1 1 -das -dda -dns -sch -scis -com 98989898989898989898989898 -rec1 28 -rec2 27 -rec3 6 -rec4 24 -rec5 97 -xpm 4 -mpm 4 -gpm 4 -nxppd -lsbd 3 -hmbd 2.5 -xgbd 2 -ase 2 -msl 97 -sed -sfb -bbr -drloc mix -stloc shuffle -be -res -fer 0 -escr 100 -dgne -mmnu -cmd -esr 2 4 -elrt -ebr 80 -emprp 75 125 -emi -nm1 random -rnl1 -rns1 -nm2 random -rnl2 -rns2 -nmmi -mmprp 75 125 -gp 5000 -smc 1 -sto 1 -ieor 40 -ieror 40 -ir standard -csb 20 20 -mca -stra -saw -sisr 15 -sprp 75 120 -sdm 5 -npi -snbr -sebr -snes -snsb -sesb -snee -snil -ccsr 15 -chrm 5 5 -cms -frw -wmhc -ahtc -cor 80 -crr 80 -crvr 100 120 -crm -cnee -cnil -ari -anca -adeh -ame 1 -nmc -nil -noshoes -u254 -nfps -fs -fe -fvd -fr -fj -fbs -fedc -fc -ond -scan -etn -ymain
2
1
Guardian
Dadaluma
Poltrgeist