Encounter Randomization Flags By World#138
Conversation
JackQuincy
commented
May 5, 2026
- 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
|
/gemini review |
There was a problem hiding this comment.
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.
| elif args.fixed_encounters_world_random is not None: | ||
| flags += f" -rewr {args.fixed_encounters_world_random}" |
There was a problem hiding this comment.
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.
| 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}" |
| elif args.fixed_encounters_world_random is not None: | ||
| random_encounters = "WRandom" |
There was a problem hiding this comment.
The code is checking args.fixed_encounters_world_random instead of args.random_encounters_world_random to set the random_encounters display string.
| elif args.fixed_encounters_world_random is not None: | |
| random_encounters = "WRandom" | |
| elif args.random_encounters_world_random is not None: | |
| random_encounters = "WRandom" |
| elif args.fixed_encounters_world_random is not None: | ||
| result.append(("Boss Percent", f"{args.fixed_encounters_world_random}%", "fixed_encounters_world_random")) |
There was a problem hiding this comment.
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.
| 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")) |
| 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 |
There was a problem hiding this comment.
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.
| 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 |
| 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 |
There was a problem hiding this comment.
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.
| 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 |