Files
Grinch-AP/worlds/jakanddaxter/rules.py

271 lines
13 KiB
Python
Raw Permalink Normal View History

import logging
import math
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
import typing
from BaseClasses import CollectionState
from Options import OptionError
from .options import (EnableOrbsanity,
GlobalOrbsanityBundleSize,
PerLevelOrbsanityBundleSize,
FireCanyonCellCount,
MountainPassCellCount,
LavaTubeCellCount,
CitizenOrbTradeAmount,
OracleOrbTradeAmount)
from .locs import cell_locations as cells
from .locations import location_table
from .levels import level_table
if typing.TYPE_CHECKING:
from . import JakAndDaxterWorld
def set_orb_trade_rule(world: "JakAndDaxterWorld"):
options = world.options
player = world.player
if options.enable_orbsanity == EnableOrbsanity.option_off:
world.can_trade = lambda state, required_orbs, required_previous_trade: (
can_trade_vanilla(state, player, world, required_orbs, required_previous_trade))
else:
world.can_trade = lambda state, required_orbs, required_previous_trade: (
can_trade_orbsanity(state, player, world, required_orbs, required_previous_trade))
def recalculate_reachable_orbs(state: CollectionState, player: int, world: "JakAndDaxterWorld") -> None:
# Recalculate every level, every time the cache is stale, because you don't know
# when a specific bundle of orbs in one level may unlock access to another.
accessible_total_orbs = 0
for level in level_table:
accessible_level_orbs = count_reachable_orbs_level(state, world, level)
accessible_total_orbs += accessible_level_orbs
state.prog_items[player][f"{level} Reachable Orbs".lstrip()] = accessible_level_orbs
# Also recalculate the global count, still used even when Orbsanity is Off.
state.prog_items[player]["Reachable Orbs"] = accessible_total_orbs
state.prog_items[player]["Reachable Orbs Fresh"] = True
def count_reachable_orbs_global(state: CollectionState,
world: "JakAndDaxterWorld") -> int:
accessible_orbs = 0
for level_regions in world.level_to_orb_regions.values():
for region in level_regions:
if region.can_reach(state):
accessible_orbs += region.orb_count
return accessible_orbs
def count_reachable_orbs_level(state: CollectionState,
world: "JakAndDaxterWorld",
level_name: str = "") -> int:
accessible_orbs = 0
for region in world.level_to_orb_regions[level_name]:
if region.can_reach(state):
accessible_orbs += region.orb_count
return accessible_orbs
def can_reach_orbs_global(state: CollectionState,
player: int,
world: "JakAndDaxterWorld",
orb_amount: int) -> bool:
if not state.prog_items[player]["Reachable Orbs Fresh"]:
recalculate_reachable_orbs(state, player, world)
return state.has("Reachable Orbs", player, orb_amount)
def can_reach_orbs_level(state: CollectionState,
player: int,
world: "JakAndDaxterWorld",
level_name: str,
orb_amount: int) -> bool:
if not state.prog_items[player]["Reachable Orbs Fresh"]:
recalculate_reachable_orbs(state, player, world)
return state.has(f"{level_name} Reachable Orbs", player, orb_amount)
def can_trade_vanilla(state: CollectionState,
player: int,
world: "JakAndDaxterWorld",
required_orbs: int,
required_previous_trade: typing.Optional[int] = None) -> bool:
# With Orbsanity Off, Reachable Orbs are in fact Tradeable Orbs.
if not state.prog_items[player]["Reachable Orbs Fresh"]:
recalculate_reachable_orbs(state, player, world)
if required_previous_trade:
name_of_previous_trade = location_table[cells.to_ap_id(required_previous_trade)]
return (state.has("Reachable Orbs", player, required_orbs)
and state.can_reach_location(name_of_previous_trade, player=player))
return state.has("Reachable Orbs", player, required_orbs)
def can_trade_orbsanity(state: CollectionState,
player: int,
world: "JakAndDaxterWorld",
required_orbs: int,
required_previous_trade: typing.Optional[int] = None) -> bool:
# Yes, even Orbsanity trades may unlock access to new Reachable Orbs.
if not state.prog_items[player]["Reachable Orbs Fresh"]:
recalculate_reachable_orbs(state, player, world)
if required_previous_trade:
name_of_previous_trade = location_table[cells.to_ap_id(required_previous_trade)]
return (state.has("Tradeable Orbs", player, required_orbs)
and state.can_reach_location(name_of_previous_trade, player=player))
return state.has("Tradeable Orbs", player, required_orbs)
def can_free_scout_flies(state: CollectionState, player: int) -> bool:
return state.has("Jump Dive", player) or state.has_all({"Crouch", "Crouch Uppercut"}, player)
def can_fight(state: CollectionState, player: int) -> bool:
return state.has_any(("Jump Dive", "Jump Kick", "Punch", "Kick"), player)
def clamp_cell_limits(world: "JakAndDaxterWorld") -> str:
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
options = world.options
friendly_message = ""
if options.fire_canyon_cell_count.value > FireCanyonCellCount.friendly_maximum:
old_value = options.fire_canyon_cell_count.value
options.fire_canyon_cell_count.value = FireCanyonCellCount.friendly_maximum
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
friendly_message += (f" "
f"{options.fire_canyon_cell_count.display_name} must be no greater than "
f"{FireCanyonCellCount.friendly_maximum} (was {old_value}), "
f"changed option to appropriate value.\n")
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
if options.mountain_pass_cell_count.value > MountainPassCellCount.friendly_maximum:
old_value = options.mountain_pass_cell_count.value
options.mountain_pass_cell_count.value = MountainPassCellCount.friendly_maximum
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
friendly_message += (f" "
f"{options.mountain_pass_cell_count.display_name} must be no greater than "
f"{MountainPassCellCount.friendly_maximum} (was {old_value}), "
f"changed option to appropriate value.\n")
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
if options.lava_tube_cell_count.value > LavaTubeCellCount.friendly_maximum:
old_value = options.lava_tube_cell_count.value
options.lava_tube_cell_count.value = LavaTubeCellCount.friendly_maximum
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
friendly_message += (f" "
f"{options.lava_tube_cell_count.display_name} must be no greater than "
f"{LavaTubeCellCount.friendly_maximum} (was {old_value}), "
f"changed option to appropriate value.\n")
return friendly_message
def clamp_trade_total_limits(world: "JakAndDaxterWorld"):
"""Check if we need to recalculate the 2 trade orb options so the total fits under 2000. If so let's keep them
proportional relative to each other. Then we'll recalculate total_trade_orbs. Remember this situation is
only possible if both values are greater than 0, otherwise the absolute maximums would keep them under 2000."""
options = world.options
friendly_message = ""
world.total_trade_orbs = (9 * options.citizen_orb_trade_amount) + (6 * options.oracle_orb_trade_amount)
if world.total_trade_orbs > 2000:
old_total = world.total_trade_orbs
old_citizen_value = options.citizen_orb_trade_amount.value
old_oracle_value = options.oracle_orb_trade_amount.value
coefficient = old_oracle_value / old_citizen_value
options.citizen_orb_trade_amount.value = math.floor(2000 / (9 + (6 * coefficient)))
options.oracle_orb_trade_amount.value = math.floor(coefficient * options.citizen_orb_trade_amount.value)
world.total_trade_orbs = (9 * options.citizen_orb_trade_amount) + (6 * options.oracle_orb_trade_amount)
friendly_message += (f" "
f"Required number of orbs ({old_total}) must be no greater than total orbs in the game "
f"(2000). Reduced the value of {world.options.citizen_orb_trade_amount.display_name} "
f"from {old_citizen_value} to {options.citizen_orb_trade_amount.value} and "
f"{world.options.oracle_orb_trade_amount.display_name} from {old_oracle_value} to "
f"{options.oracle_orb_trade_amount.value}.\n")
return friendly_message
def enforce_mp_friendly_limits(world: "JakAndDaxterWorld"):
options = world.options
friendly_message = ""
if options.enable_orbsanity == EnableOrbsanity.option_global:
if options.global_orbsanity_bundle_size.value < GlobalOrbsanityBundleSize.friendly_minimum:
old_value = options.global_orbsanity_bundle_size.value
options.global_orbsanity_bundle_size.value = GlobalOrbsanityBundleSize.friendly_minimum
friendly_message += (f" "
f"{options.global_orbsanity_bundle_size.display_name} must be no less than "
f"{GlobalOrbsanityBundleSize.friendly_minimum} (was {old_value}), "
f"changed option to appropriate value.\n")
if options.global_orbsanity_bundle_size.value > GlobalOrbsanityBundleSize.friendly_maximum:
old_value = options.global_orbsanity_bundle_size.value
options.global_orbsanity_bundle_size.value = GlobalOrbsanityBundleSize.friendly_maximum
friendly_message += (f" "
f"{options.global_orbsanity_bundle_size.display_name} must be no greater than "
f"{GlobalOrbsanityBundleSize.friendly_maximum} (was {old_value}), "
f"changed option to appropriate value.\n")
if options.enable_orbsanity == EnableOrbsanity.option_per_level:
if options.level_orbsanity_bundle_size.value < PerLevelOrbsanityBundleSize.friendly_minimum:
old_value = options.level_orbsanity_bundle_size.value
options.level_orbsanity_bundle_size.value = PerLevelOrbsanityBundleSize.friendly_minimum
friendly_message += (f" "
f"{options.level_orbsanity_bundle_size.display_name} must be no less than "
f"{PerLevelOrbsanityBundleSize.friendly_minimum} (was {old_value}), "
f"changed option to appropriate value.\n")
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
if options.citizen_orb_trade_amount.value > CitizenOrbTradeAmount.friendly_maximum:
old_value = options.citizen_orb_trade_amount.value
options.citizen_orb_trade_amount.value = CitizenOrbTradeAmount.friendly_maximum
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
friendly_message += (f" "
f"{options.citizen_orb_trade_amount.display_name} must be no greater than "
f"{CitizenOrbTradeAmount.friendly_maximum} (was {old_value}), "
f"changed option to appropriate value.\n")
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
if options.oracle_orb_trade_amount.value > OracleOrbTradeAmount.friendly_maximum:
old_value = options.oracle_orb_trade_amount.value
options.oracle_orb_trade_amount.value = OracleOrbTradeAmount.friendly_maximum
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
friendly_message += (f" "
f"{options.oracle_orb_trade_amount.display_name} must be no greater than "
f"{OracleOrbTradeAmount.friendly_maximum} (was {old_value}), "
f"changed option to appropriate value.\n")
friendly_message += clamp_cell_limits(world)
friendly_message += clamp_trade_total_limits(world)
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
if friendly_message != "":
logging.warning(f"{world.player_name}: Your options have been modified to avoid disrupting the multiworld.\n"
f"{friendly_message}"
f"You can access more advanced options by setting 'enforce_friendly_options' in the seed "
f"generator's host.yaml to false and generating locally. (Use at your own risk!)")
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
def enforce_mp_absolute_limits(world: "JakAndDaxterWorld"):
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
friendly_message = ""
friendly_message += clamp_trade_total_limits(world)
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
if friendly_message != "":
logging.warning(f"{world.player_name}: Your options have been modified to avoid seed generation failures.\n"
f"{friendly_message}")
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
def enforce_sp_limits(world: "JakAndDaxterWorld"):
friendly_message = ""
Jak and Daxter: Implement New Game (#3291) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Implement New Game (#1) * Jak 1: Initial commit: Cell Locations, Items, and Regions modeled. * Jak 1: Wrote Regions, Rules, init. Untested. * Jak 1: Fixed mistakes, need better understanding of Entrances. * Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated. * Jak 1: Add Scout Fly Locations, code and style cleanup. * Jak 1: Add Scout Flies to Regions. * Jak 1: Add version info. * Jak 1: Reduced code smell. * Jak 1: Fixed UT bugs, added Free The Sages as Locations. * Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances. * Jak 1: Add some one-ways, adjust scout fly offset. * Jak 1: Found Scout Fly ID's for first 4 maps. * Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse. * Jak 1: Fixed a few things. Four maps to go. * Jak 1: Last of the scout flies mapped! * Jak 1: simplify citadel sages logic. * Jak 1: WebWorld setup, some documentation. * Jak 1: Initial checkin of Client. Removed the colon from the game name. * Jak 1: Refactored client into components, working on async communication between the client and the game. * Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory. * Jak 1: There's magic in the air... * Jak 1: Fixed bug translating scout fly ID's. * Jak 1: Make the REPL a little more verbose, easier to debug. * Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't. * Jak 1: Update Documentation. * Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops. * Jak 1: Simplified startup process, updated docs, prayed. * Jak 1: quick fix to settings. * Jak and Daxter: Genericize Items, Update Scout Fly logic, Add Victory Condition. (#3) * Jak 1: Update to 0.4.6. Decouple locations from items, support filler items. * Jak 1: Total revamp of Items. This is where everything broke. * Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders. * Jak 1: correct regions/rules, account for sequential oracle/miner locations. * Jak 1: make nicer strings. * Jak 1: Add logic for finished game. First full run complete! * Jak 1: update group names. * Jak and Daxter - Gondola, Pontoons, Rules, Regions, and Client Update * Jak 1: Overhaul of regions, rules, and special locations. Updated game info page. * Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners. * Alpha Updates (#15) * Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs. * Jak 1: Update setup guide. * Jak 1: Load title screen, save states of in/outboxes. * Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. * Deathlink (#18) * Jak 1: Implement Deathlink. TODO: make it optional... * Jak 1: Issue a proper send-event for deathlink deaths. * Jak 1: Added cause of death to deathlink, fixed typo. * Jak 1: Make Deathlink toggleable. * Jak 1: Added player name to death text, added zoomer/flut/fishing text, simplified GOAL call for deathlink. * Jak 1: Fix death text in client logger. * Move Randomizer (#26) * Finally remove debug-segment text, update Python imports to relative paths. * HUGE refactor to Regions/Rules to support move rando, first hub area coded. * More refactoring. * Another refactor - may squash. * Fix some Rules, reuse some code by returning key regions from build_regions. * More regions added. A couple of TODOs. * Fixed trade logic, added LPC regions. * Added Spider, Snowy, Boggy. Fixed Misty's orbs. * Fix circular import, assert orb counts per level, fix a few naming errors. * Citadel added, missing locs and connections fixed. First move rando seed generated. * Add Move Rando to Options class. * Fixed rules for prerequisite moves. * Implement client functionality for move rando, add blurbs to game info page. * Fix wrong address for cache checks. * Fix byte alignment of offsets, refactor read_memory for better code reuse. * Refactor memory offsets and add some unit tests. * Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations. * Move rando fixes (#29) * Fix virtual regions in Snowy. Fix some GMC problems. * Fix Deathlink on sunken slides. * Removed unncessary code causing build failure. * Orbsanity (#32) * My big dumb shortcut: a 2000 item array. * A better idea: bundle orbs as a numerical option and make array variable size. * Have Item/Region generation respect the chosen Orbsanity bundle size. Fix trade logic. * Separate Global/Local Orbsanity options. TODO - re-introduce orb factory for per-level option. * Per-level Orbsanity implemented w/ orb bundle factory. * Implement Orbsanity for client, fix some things up for regions. * Fix location name/id mappings. * Fix client orb collection on connection. * Fix minor Deathlink bug, add Update instructions. * Finishing Touches (#36) * Set up connector level thresholds, completion goal choices. * Send AP sender/recipient info to game via client. * Slight refactors. * Refactor option checking, add DataStorage handling of traded orbs. * Update instructions to change order of load/connect. * Add Option check to ensure enough Locations exist for Cell Count thresholds. Fix Final Door region. * Need some height move to get LPC sunken chamber cell. * Rename completion_condition to jak_completion_condition (#41) * The Afterparty (#42) * Fixes to Jak client, rules, options, and more. * Post-rebase fixes. * Remove orbsanity reset code, optimize game text in client. * More game text optimization. * Added more specific troubleshooting/setup instructions. * Add known issue about large releases taking time. (Dodge 6,666th commit.) * Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. * Make orb trade amounts configurable, make orbsanity defaults more reasonable. * Add HUD info to doc. * Exempt's Code Review Updates (#43) * Round 1 of code review updates, the easy stuff. * Factor options checking away from region/rule creation. * Code review updates round 2, more complex stuff. * Code review updates round 3: the mental health annihilator * Code review updates part 4: redemption. * More code review feedback, simplifying code, etc. * Added a host.yaml option to override friendly limits, plus a couple of code review updates. * Added singleplayer limits, player names to enforcement rules. * Updated friendly limits to be more strict, optimized recalculate logic. * Today's the big day Jak: updates docs for mod support in OpenGOAL Launcher * Rearranged and clarified some instructions, ADDED PATH-SPACE FIX TO CLIENT. * Fix deathlink reset stalls on a busy client. (#47) * Jak & Daxter Client : queue game text messages to get items faster during release (#48) * queue game text messages to write them during the main_tick function and empty the message queue faster during release * wrap comment for code style character limit Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * remove useless blank line Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * whitespace code style Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Move JsonMessageData dataclass outside of ReplClient class for code clarity --------- Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> * Item Classifications (and REPL fixes) (#49) * Changes to item classifications * Bugfixes to power cell thresholds. * Fix bugs in item_type_helper. * Refactor 100 cell door to pass unit tests. * Quick fix to ReplClient. * Not so quick fix to ReplClient. * Display friendly limits in options tooltips. * Use math.ceil like a normal person. * Missed a space. * Fix non-accessibility due to bad orb calculation. * Updated documentation. * More Options, More Docs, More Tests (#51) * Reorder cell counts, require punch for Klaww. * Friendlier friendly friendlies. * Removed custom_worlds references from docs/setup guide, focused OpenGOAL Launcher language. * Increased breadth of unit tests. * Clean imports of unit tests. * Create OptionGroups. * Fix region rule bug with Punch for Klaww. * Include Punch For Klaww in slot data. * Update worlds/jakanddaxter/__init__.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Temper and Harden Text Client (#52) * Provide config path so OpenGOAL can use mod-specific saves and settings. * Add versioning to MemoryReader. Harden the client against user errors. * Updated comments. * Add Deathlink as a "statement of intent" to the YAML. Small updates to client. * Revert deathlink changes. * Update error message. * Added color markup to log messages printed in text client. * Separate loggers by agent, write markup to GUI and non-markup to disk simultaneously. * Refactor MemoryReader callbacks from main_tick to constructor. * Make callback names more... informative. * Give users explicit instructions in error messages. * Stellar Messaging (#54) * Use new ap-messenger functions for text writing. * Remove Powershell requirement, bump memory version to 3. * Error message update w/ instructions for game crash. * Create no console window for gk. * ISO Data Enhancement (#58) * Add iso-path as argument to GOAL compiler. # Conflicts: # worlds/jakanddaxter/Client.py * More resilient handling of iso_path. * Fixed scout fly ID mismatches. * Corrected iso_data subpath. * Update memory version to 4. * Docs update for iso_data. * Auto Detect OpenGOAL Install (#63) * Auto detect OpenGOAL install path. Also fix Deathlink on server connection. * Updated docs, add instructions to error messages. * Slight tweak to error text. * J&D : add per region location groups (#64) * add per region power cells location group * add per region scout flies location group * add per zone orb bundle groups (I'm not particularly happy about this code, but I figured doing it this way was the point of least friction/duplication) * guess who forgot 9 very important characters in each line of the last commit * Rearrange location group names, quick fix to client error handling. * Fix pycharm warnings. * Fix more pycharm warnings. * Light cleanup: fix icons, add bug report page, remove py 3.8 code. * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Update worlds/jakanddaxter/Options.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * Code review updates on comments, tooltips, and type hints. * Update type hint for lists in regions. * Missed todo removal. * More type hint updates. * Small region updates for location accessibility, small updates to world guide and README.md. * Add GMC scout fly location group. * Improved sanitization of game text. * Traps 2 (#70) * Add trap items, relevant options, and citadel orb caches. * Update REPL to send traps to game. * Fix item counter. * Allow player to select which traps to use. * Fix host.yaml doc strings, ap-setup-options typing, bump memory version to 5. * Alter some trap names. * Update world doc. * Add health trap. * Added 3 more trap types. * Protect against empty trap list. * Reword traps paragraph in world doc. * Another update to trap paragraph. * Concisify trap option docstring. * Timestamp on game log file. * Update client to handle waiting on title screen. * Send slot name and seed to game. * Use self.random instead. * Update setup doc for new title screen. * Quick clarification of orb caches in world doc. * Sanitize slot info earlier. * Added to and improved unit tests. * Light cleanup on world. * Optimizations to movement rules, docs: known issues update. * Quick fixes for beta 0.5.0 release: template options and LPC logic. * Quick fix to spoiler counts. * Reorganize world guide for faster navigation. * Fix links. * Update HUD section. * Found a way to render apostrophes in item names. * March Refactors (#77) * Reorg imports, small fix to Rock Village movement. * Fix wait-on-title message never going to ready message. * Colorama init fix. * Swap trap list for a dictionary of trap weights. * The more laws, the less justice. * Quick readability update. * Have memory reader provide instructions for slow booting games. * Revert some things. * Update setup_en.md * Update HUD mode lingo for combined msgs. * Remade launcher icon, sized correctly. * I don't know why I can't be satisfied with things. * Apply suggestions from Scipio Co-authored-by: Scipio Wright <scipiowright@gmail.com> * Properly use the settings API instead of Utils. * Newline on requirements.txt. * Add __init__ files for frozen builds. * Replace an ap_inform function with a CommonClient built-in. * Resize icon to match kivymd expected size. * First round of Treble code reviews. * Second round of Treble code reviews. * Third round of Treble code reviews. * Missed an unncessary if condition. * Missed unnecessary comments. * Fourth round of Treble code reviews. * Switch trap dictionary to OptionCounter. * Use existing slot name/seed from network protocol. * Violet code review updates. * Violet code review updates part 2. * Refactor to avoid floating imports (Violet part 3). * Found a few more valid characters for messaging. * Move tests out of init, add colon to game name (now that it's safe). * But don't include those chars for file text. * Implement Vi suggestion on webhost-capable friendly limits. * Revert "Implement Vi suggestion on webhost-capable friendly limits." This reverts commit 2d012b7f4a9a4c13985ecd7303bb1fc646831c86. * Rename all files for PEP8. * Refactor how maximums work on webhost. * Fix rogue UT. * Don't rush. * Fix client post-PEP8. --------- Co-authored-by: Justus Lind <DeamonHunter@users.noreply.github.com> Co-authored-by: Romain BERNARD <30secondstodraw@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2025-05-21 08:12:27 -04:00
friendly_message += clamp_cell_limits(world)
friendly_message += clamp_trade_total_limits(world)
if friendly_message != "":
logging.warning(f"{world.player_name}: Your options have been modified to avoid seed generation failures.\n"
f"{friendly_message}")