Expedition Generation Model¶
Purpose¶
This file defines the concrete technical model for expedition offer generation.
Expeditions should not appear as a loose pile of hand-authored quests. They should be generated from structured base types, local state, targets, rewards, and event modifiers.
Core Rule¶
An expedition offer should be a resolved combination of:
base_typeboard_sourceboard_contextregiontargeturgencyreward_classevent_modifiers
Everything the player sees on a board should come from that contract plus compact display projections.
Offer Contract¶
Each expedition offer should have at least:
offer_idtemplate_idbase_typeregion_idarea_idboard_sourceboard_context_snapshot_reftarget_typetarget_refurgency_bandsource_priority_scoretown_urgency_scoreevent_severity_scorecontrol_window_scorereward_classdifficulty_bandrecommended_group_sizeevent_modifier_setgeneration_reason_tagsexpires_atseed
Optional but useful fields:
required_knowledge_tagssuggested_loadout_tagsspecial_supply_tagsevent_instance_refcontrol_window_refpublic_work_ref
Base Type¶
base_type should be one of the core expedition classes:
- Hunt
- Gather
- Survey
- Escort
- Rescue
- Delve
- Bounty
- Caravan
- Boss Omen Or Event Hunt
That field drives validation, reward composition, and board grouping.
Region And Area Binding¶
Every generated offer should bind to a real location context.
region_ididentifies the broader climate and economy contextarea_ididentifies the actual target zone or route zone
This is what makes regional identity and town need matter.
Target Model¶
target_type should be explicit.
Recommended target types:
monster_familynamed_targetresource_siteroute_segmentsite_instanceshipmentsurvivor_groupevent_instancetile_cluster
target_ref should point to the authoritative source record, not to display text.
Urgency Model¶
Urgency should be a small readable band, not a hidden timer only.
Recommended bands:
routineactiveurgentcritical
Urgency should affect:
- board ordering
- expiry window
- reward multiplier
- event or town impact if ignored
Reward Class¶
Every offer should advertise a dominant reward class.
Recommended classes:
lootmaterialsknowledgerenownstate_stabilizationmixed
This helps the board stay readable.
Event Modifier Set¶
Dynamic events should not create a separate expedition framework.
Instead, attach modifiers to the offer.
Examples:
storm_windowblight_responserefugee_pressureroute_disruptedpredator_surgefestival_demandquarantine_zone
Modifiers should be authoritative data, not display-only flavor.
They can affect:
- target availability
- difficulty
- urgency
- reward profile
- tile or route state
Board Context Snapshot¶
Offer generation should not read half a dozen live systems separately while scoring a board refresh. Each board source should first materialize one compact immutable snapshot.
Recommended snapshot fields:
board_sourcesource_reftown_refif relevanttown_urgency_scoreworst_reserve_classroute_pressure_scorehighest_event_severityactive_event_refscontrol_statecontrol_window_refif active or previewedcontrol_window_phasecontrol_window_scorepublic_work_priority_refsgenerated_at
This snapshot becomes the single authoritative input for one generation run.
Direct Input Consumption¶
Mission boards should consume the new town, event, and governance signals directly rather than translating them back into vague flavor categories.
Town Urgency¶
Town boards and logistics-heavy boards should read the town pressure model as a normalized 0-100 score.
Recommended rule:
town_urgency_score = clamp(reserve_deficit × 0.45 + route_pressure × 0.20 + event_pressure × 0.20 + project_priority × 0.15 - recent_completion_relief, 0, 100)
Where the input terms come from the town simulation layer, not from expedition templates.
Town urgency should drive:
- how many board slots are reserved for stabilization work
- whether routine opportunities are suppressed by emergencies
- expiry windows for shortage-sensitive offers
- reward emphasis toward
state_stabilization,materials, ormixed
Event Severity¶
The generator should read event_instance.severity_score directly.
Recommended rules:
board_event_severity = max(severity_score)for active events visible to the board scopecandidate_event_severity = linked event severityfor event-bound offers- non-event town offers may still inherit
25-50%ofboard_event_severityas spillover pressure if the event affects routes, reserves, or local safety
Event severity should drive:
- how many event-response offers appear
- whether the board spawns rescue, escort, survey, or hunt variants
- additional reward and danger modifiers
- how aggressive expiry windows become
Control Window Inputs¶
Guild and contested-town boards should read scheduled control windows directly from governance state.
Recommended rule:
control_window_score = clamp(phase_bonus + contested_bonus + destabilized_bonus + town_urgency_score × 0.25 + strategic_value_bonus, 0, 100)
Suggested phase bonuses:
preview:25active:60closing:80
Suggested state bonuses:
contested:10destabilized:20
Control-window score should drive:
- guild-board patrol, escort, delivery, and survey offers
- emergency logistics and militia-support work on town boards when the settlement is contested
- renown and influence weighting for offers tied to the control window
Input Weight Table¶
Different boards should weight the same inputs differently.
| Board Source | Town Urgency Weight | Event Severity Weight | Control Window Weight | Main Use |
|---|---|---|---|---|
town_board |
0.55 |
0.30 |
0.15 |
shortages, projects, local safety |
guild_board |
0.20 |
0.20 |
0.60 |
control windows, civic support, strategic prep |
event_board |
0.10 |
0.80 |
0.10 |
direct event response |
regional_caravan_board |
0.45 |
0.20 |
0.35 |
route recovery, supply movement, convoy defense |
faction_board |
0.30 |
0.40 |
0.30 |
regional security and policy pressure |
Generation Inputs¶
Offer generation should pull from local and regional state such as:
- town deficits and surpluses
- route stability
- monster pressure
- active event instances
- undiscovered or stale tile clusters
- resource site availability
- guild or faction policy where relevant
The generator should prefer the precomputed board-context snapshot over rereading raw live tables during scoring.
Candidate Scoring Model¶
Each eligible offer candidate should receive a comparable priority score.
Recommended rule:
candidate_score = template_weight + board_source_weight + town_input + event_input + control_input + target_availability_bonus + scarcity_bonus + route_bonus - duplicate_penalty - saturation_penalty + seed_jitter
Where:
town_input = town_urgency_score × board_town_weightevent_input = candidate_event_severity × board_event_weightcontrol_input = control_window_score × board_control_weight
Candidate score should decide:
- whether an offer appears this refresh
- how high it ranks on the board
- whether it upgrades from routine to active, urgent, or critical
- whether a board slot is consumed by a shortage response, control-window action, or background opportunity
Offer Shape By Input¶
The generator should bend base expedition types according to the direct inputs.
- high
town_urgency_scorefrom food, water, medicine, or building deficits should favorGather,Caravan,Escort, andSurveyoffers tied to real supply relief - high route pressure plus high event severity should favor
Escort,Rescue, andSurveyoffers over generic hunts - high monster pressure plus event severity should favor
Hunt,Bounty, andBoss Omen Or Event Hunt - active
control_window_scoreshould favorEscort,Caravan,Survey,Hunt, andRescuevariants that award influence or stabilize the settlement - prosperity without crisis should unlock lower-urgency luxury, tournament, or opportunity offers instead of emergency work
Generation Flow¶
- collect board scope and permissions from one town, guild, or area source
- materialize one
board_context_snapshotfrom town, event, route, and governance state - derive slot mix from board source plus
town_urgency_score,highest_event_severity, andcontrol_window_score - choose eligible
base_typecandidates by weighted rules - bind a valid target and area or route context
- score candidates with direct town, event, and control-window inputs
- calculate urgency band, difficulty band, reward profile, and expiry window
- attach event modifiers, reason tags, and board ordering score
- write offer projections, expire displaced offers, and cache the public board read model
This should happen on cadence or on meaningful local-state changes, not every time a player opens the board.
Board Mix Rules¶
Boards should not just sort a global candidate list. Each board source should reserve space for different mission families.
Town Board¶
Recommended size: 8-12 offers.
50%stabilization work whentown_urgency_score >= 5020-30%event-response work when an active local event exists10-20%project or civic-support work- remaining slots for routine local opportunities
If town_urgency_score >= 75, suppress most luxury or low-impact background offers.
Event Board¶
Recommended rule:
event_offer_slots = min(5, 1 + floor(candidate_event_severity / 25))
Each active event should try to expose multiple response vectors rather than one generic card: for example hunt, delivery, escort, survey, or rescue depending on the event family.
Guild Board¶
If a control window is active or closing:
55-65%control-window scoring work20-25%civic stabilization work in the contested town15-20%preparation or scouting work for the next wave
If no control window is active, the guild board should shift toward logistics, public works, and strategic prep instead.
Regional Caravan Board¶
Prioritize deficits, route disruption, and contested logistics. This board should react strongly when towns are strained, events break routes, or a control window puts caravan lanes at strategic risk.
Urgency, Expiry, and Reward Derivation¶
Urgency should be derived from the same direct inputs that created the offer.
Recommended rule:
offer_urgency_score = max(candidate_score, town_urgency_score, candidate_event_severity, control_window_score)
Map to visible bands:
0-24:routine25-49:active50-74:urgent75-100:critical
Expiry guidance:
routine:24-72hoursactive:12-36hoursurgent:6-18hourscritical:2-8hours
Reward guidance:
- town-urgency-driven offers should bias toward materials, reserve relief, renown, and civic reputation
- high-severity event offers should bias toward
state_stabilization, rare drops, and high-risk payout - control-window offers should bias toward renown, influence credit, treasury support, and route control rather than only raw coin
Refresh Triggers¶
Offer regeneration should run when one of these changes materially affects the board context:
- a town reserve class changes band
- route pressure or service state changes enough to alter board priority
- an event spawns, changes phase, changes severity band, or resolves
- a control window enters preview, active, closing, or resolved state
- a contested town becomes
destabilized,controlled, oropen - a public work starts, stalls, or completes
This keeps boards synchronized with the simulation without refreshing on every page load.
Board Sources¶
Offers should originate from specific sources:
- town board
- guild board
- event board
- regional caravan board
- faction board
board_source matters because it affects permissions, reward type, and display grouping.
It should also affect which direct inputs dominate generation. A town board should never behave like an event board, and a guild control board should never ignore active control windows.
Offer Reason Tags¶
Each offer should store one or more machine-readable reason tags explaining why it exists.
Recommended tags:
shortage:foodshortage:medicineevent:storm_surgeevent:predator_surgecontrol:previewcontrol:active_windowcontrol:closing_pushproject:granaryroute:washed_road
The client can surface one primary reason tag and keep the rest for filtering and tooltips.
Records¶
Templates And Rules¶
Store:
expedition_templateexpedition_generation_ruleexpedition_reward_profileexpedition_modifier_templateexpedition_board_mix_rule
Generated Offers¶
Store:
expedition_board_context_snapshotexpedition_generation_runexpedition_offerexpedition_offer_modifierexpedition_target_refexpedition_board_projectionexpedition_offer_reason
Acceptance Snapshot¶
When a player accepts an offer, snapshot the offer into:
expedition_instanceexpedition_acceptance_snapshotexpedition_reward_commitment
The live expedition must not keep reading a mutable board offer after acceptance.
See unified-board-item-and-player-contract-model.md for how generated offers and player-posted contracts share one board-item projection.
See expedition-acceptance-and-settlement-model.md for how accepted board items freeze into immutable expedition snapshots and settlement writebacks.
Validation Rules¶
The generator must validate that:
- the target still exists
- the area is still valid
- required event state is still active if event-bound
- required control window is still in a valid phase if control-bound
- the offer does not duplicate an already-open exclusive target unless intended
- the expiry window is long enough to be actionable
- the board-context snapshot is fresh enough for
urgentandcriticaloffers
Examples¶
Survey Offer¶
base_type: Surveyboard_source: town boardregion_id: Ashwood Wildstarget_type: tile_clustertarget_ref: stale north-route tilesurgency_band: activetown_urgency_score: 42event_severity_score: 18control_window_score: 0reward_class: knowledgeevent_modifier_set:route_disruptedgeneration_reason_tags:route:washed_road,shortage:building
Gather Offer¶
base_type: Gatherboard_source: event boardregion_id: Frontier Marchestarget_type: resource_sitetarget_ref: herb bloom clusterurgency_band: urgenttown_urgency_score: 58event_severity_score: 67control_window_score: 0reward_class: materialsevent_modifier_set:blight_responsegeneration_reason_tags:event:blight_response,shortage:medicine
Rescue Offer¶
base_type: Rescueboard_source: event boardregion_id: Frontier Mine Belttarget_type: survivor_grouptarget_ref: collapse incident 184urgency_band: criticaltown_urgency_score: 64event_severity_score: 83control_window_score: 0reward_class: state_stabilizationevent_modifier_set:route_disrupted,mine_collapsegeneration_reason_tags:event:mine_collapse,route:washed_road
Guild Control Escort Offer¶
base_type: Escortboard_source: guild boardregion_id: South March Roadtarget_type: shipmenttarget_ref: civic reserve grain convoy 44urgency_band: urgenttown_urgency_score: 61event_severity_score: 25control_window_score: 78reward_class: mixedevent_modifier_set:route_disrupted,control_windowgeneration_reason_tags:control:active_window,shortage:food
Read Model Rule¶
The client should not render raw generation tables.
Expose compact board views such as:
- base type label
- destination or route
- urgency tag
- reward class
- primary reason tag
- event modifiers
- time remaining
That keeps the board readable in a browser UI.
Coordinator Rule¶
Use one local coordinator per board source where possible.
Examples:
- one town board coordinator per settlement
- one regional caravan coordinator per logistics hub
- one event board coordinator per area cluster
That keeps generation local and avoids one giant world quest scan.
Related Systems¶
- missions and expeditions
- expedition types
- unified board item and player contract model
- expedition acceptance and settlement model
- dynamic events and world state
- system simulation patterns
- town simulation and supply