Skip to content

prevent random boss + Unlock Kefka requirements from softlocks#10

Merged
beauxq merged 7 commits intobeauxq:ff6wcfrom
BriGuy7727:ff6wc
May 24, 2025
Merged

prevent random boss + Unlock Kefka requirements from softlocks#10
beauxq merged 7 commits intobeauxq:ff6wcfrom
BriGuy7727:ff6wc

Conversation

@BriGuy7727
Copy link

@BriGuy7727 BriGuy7727 commented May 16, 2025

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:

        print(len(required_boss_formations))
        print(len(required_statue_formations))
        for boss in required_boss_formations:
            print(bosses.normal_formation_name[boss])
        for boss in required_statue_formations:
            print(bosses.normal_formation_name[boss])

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

@BriGuy7727 BriGuy7727 marked this pull request as ready for review May 16, 2025 02:59
- 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 beauxq merged commit eb671de into beauxq:ff6wc May 24, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants