1.5 KiB
1.5 KiB
Legacy General Pools
This document summarizes the general pool system used for character selection
and event-driven recruitment. References include legacy/hwe/sammo/AbsGeneralPool.php,
legacy/hwe/sammo/AbsFromUserPool.php, and legacy/hwe/sammo/GeneralPool/*.
Core Abstractions
-
AbsGeneralPool- Wraps a
Scenario\GeneralBuilderand a rawinfopayload. - Provides
getGeneralBuilder(),getInfo(), andoccupyGeneralName(). - Abstract method:
pickGeneralFromPool(...).
- Wraps a
-
AbsFromUserPool- Implements reservation logic backed by the
select_pooltable. - Reserves candidates for a user (
owner) untilreserved_until. - On selection, clears reservation and binds
general_id.
- Implements reservation logic backed by the
Pool Implementations
-
GeneralPool/RandomNameGeneral- Generates random names using
GameConst::$randGen*lists. - Checks duplicate counts and appends suffixes if needed.
- Inserts reservation rows into
select_poolfor user selection.
- Generates random names using
-
GeneralPool/SPoolUnderU30- Loads a curated pool from
GeneralPool/Pool/UnderS30.json. - Inserts rows into
select_poolwith pre-defined stats and specials.
- Loads a curated pool from
Data Model
select_pool table fields (observed usage):
unique_name(pool key)info(JSON: stats, portrait, specials, dex, etc.)owner(reservation user id)reserved_until(reservation expiry)general_id(assigned after creation)
RNG Notes
Pool selection uses injected RandUtil to choose candidates and generate
random names; deterministic seeding depends on caller context.