Skip to content

Encounter Randomization Flags By World#138

Open
JackQuincy wants to merge 3 commits into
ff6wc:mainfrom
JackQuincy:enemies-by-world
Open

Encounter Randomization Flags By World#138
JackQuincy wants to merge 3 commits into
ff6wc:mainfrom
JackQuincy:enemies-by-world

Conversation

@JackQuincy

Copy link
Copy Markdown
  • Adding flag -rews which shuffles random encounters in 2 separate pools for the world the encounter is in.
    • One pool for World of Balance
    • One pool for World Of Ruin
    • Random Boss% encounters will pull from the world the location is in
  • Adding flag -rewr which randomizes random encounters pulling encounters from world the encounter is in
    • World of Balance random encounters will get a random World of Balance enemy formation
    • World of Ruin random encounters will get a random World of Ruin enemy formation
  • Adding flag -fewr which randomizes fixed encounters pulling encounters from world the encounter is in
    • World of Balance fixed encounters will get a random World of Balance enemy formation
    • World of Ruin fixed encounters will get a random World of Ruin enemy formation

@wrjones104

Copy link
Copy Markdown
Collaborator

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces features to shuffle and randomize encounters by world (World of Balance vs. World of Ruin), adding new command-line arguments and backend logic to handle world-specific enemy formations and packs. The review feedback highlights several copy-paste errors in args/encounters.py where args.fixed_encounters_world_random was incorrectly used instead of args.random_encounters_world_random for setting flags, display strings, and boss percentages. Additionally, in data/enemy_packs.py, the reviewer pointed out that owzer_mansion was missing from the self.fixed list and was incorrectly included in the World of Balance safe list (wob_phunbaba3_safe) despite being a World of Ruin location.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread args/encounters.py
Comment on lines +51 to +52
elif args.fixed_encounters_world_random is not None:
flags += f" -rewr {args.fixed_encounters_world_random}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There is a copy-paste error here. The code is checking args.fixed_encounters_world_random and appending its value to the -rewr flag (which is for random encounters by world). It should instead check and append args.random_encounters_world_random.

Suggested change
elif args.fixed_encounters_world_random is not None:
flags += f" -rewr {args.fixed_encounters_world_random}"
elif args.random_encounters_world_random is not None:
flags += f" -rewr {args.random_encounters_world_random}"

Comment thread args/encounters.py
Comment on lines +77 to +78
elif args.fixed_encounters_world_random is not None:
random_encounters = "WRandom"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The code is checking args.fixed_encounters_world_random instead of args.random_encounters_world_random to set the random_encounters display string.

Suggested change
elif args.fixed_encounters_world_random is not None:
random_encounters = "WRandom"
elif args.random_encounters_world_random is not None:
random_encounters = "WRandom"

Comment thread args/encounters.py
Comment on lines +83 to +84
elif args.fixed_encounters_world_random is not None:
result.append(("Boss Percent", f"{args.fixed_encounters_world_random}%", "fixed_encounters_world_random"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The code is checking args.fixed_encounters_world_random and appending it to the random_encounters results list. It should instead check and append args.random_encounters_world_random.

Additionally, the boss percent for fixed_encounters_world_random should be handled under the "Fixed Encounters" section (around line 93) rather than here.

Suggested change
elif args.fixed_encounters_world_random is not None:
result.append(("Boss Percent", f"{args.fixed_encounters_world_random}%", "fixed_encounters_world_random"))
elif args.random_encounters_world_random is not None:
result.append(("Boss Percent", f"{args.random_encounters_world_random}%", "random_encounters_world_random"))

Comment thread data/enemy_packs.py
Comment on lines +388 to +389
self.fixed = lete_river + imperial_camp + doma_wob + phantom_train + serpent_trench + narshe_battle + opera_house + vector
self.fixed += mine_cart + imperial_base + sealed_cave + burning_house + iaf + floating_continent_escape + moogle_defense

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

owzer_mansion is missing from self.fixed in randomize_fixed_by_world(), whereas it is included in randomize_fixed(). It should be added to self.fixed to ensure consistency.

Suggested change
self.fixed = lete_river + imperial_camp + doma_wob + phantom_train + serpent_trench + narshe_battle + opera_house + vector
self.fixed += mine_cart + imperial_base + sealed_cave + burning_house + iaf + floating_continent_escape + moogle_defense
self.fixed = lete_river + imperial_camp + doma_wob + phantom_train + serpent_trench + narshe_battle + opera_house + vector
self.fixed += mine_cart + imperial_base + sealed_cave + burning_house + iaf + floating_continent_escape + owzer_mansion + moogle_defense

Comment thread data/enemy_packs.py
Comment on lines +394 to +395
wob_phunbaba3_safe = imperial_camp + doma_wob + phantom_train + vector + imperial_base + sealed_cave
wob_phunbaba3_safe += burning_house + iaf + floating_continent_escape + owzer_mansion

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

owzer_mansion is a World of Ruin (WoR) location, but it is being added to wob_phunbaba3_safe. Since it is already correctly assigned to wor_phunbaba3_safe on line 396, including it in wob_phunbaba3_safe causes it to be randomized twice (first with WoB pools, then immediately overwritten with WoR pools). It should be removed from wob_phunbaba3_safe.

Suggested change
wob_phunbaba3_safe = imperial_camp + doma_wob + phantom_train + vector + imperial_base + sealed_cave
wob_phunbaba3_safe += burning_house + iaf + floating_continent_escape + owzer_mansion
wob_phunbaba3_safe = imperial_camp + doma_wob + phantom_train + vector + imperial_base + sealed_cave
wob_phunbaba3_safe += burning_house + iaf + floating_continent_escape

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