180 lines
5.5 KiB
JavaScript
180 lines
5.5 KiB
JavaScript
// OTIVM constants — do not modify H3 IDs, they are permanent
|
||
// H3 resolution 5 is the canonical waypoint resolution
|
||
// All five cities are within TESSERA interaction sphere (15–72N, 15W–75E)
|
||
|
||
export const WAYPOINTS = {
|
||
ostia: {
|
||
id: 'ostia',
|
||
name: 'Ostia',
|
||
latin: 'Ostia',
|
||
h3_r5: '851e805bfffffff',
|
||
h3_r7: '871e805b3ffffff',
|
||
h3_r9: '891e805b31bffff',
|
||
chapter: 1,
|
||
},
|
||
capua: {
|
||
id: 'capua',
|
||
name: 'Capua',
|
||
latin: 'Capua',
|
||
h3_r5: '851e8333fffffff',
|
||
h3_r7: '871e8331cffffff',
|
||
h3_r9: '891e8331c6bffff',
|
||
chapter: 2,
|
||
},
|
||
brundisium: {
|
||
id: 'brundisium',
|
||
name: 'Brundisium',
|
||
latin: 'Brundisium',
|
||
h3_r5: '851e8ba3fffffff',
|
||
h3_r7: '871e8ba35ffffff',
|
||
h3_r9: '891e8ba358bffff',
|
||
chapter: 3,
|
||
},
|
||
carthago: {
|
||
id: 'carthago',
|
||
name: 'Carthago',
|
||
latin: 'Carthago',
|
||
h3_r5: '85386e23fffffff',
|
||
h3_r7: '87386e20dffffff',
|
||
h3_r9: '89386e20d63ffff',
|
||
chapter: 4,
|
||
},
|
||
alexandria: {
|
||
id: 'alexandria',
|
||
name: 'Alexandria',
|
||
latin: 'Alexandria',
|
||
h3_r5: '853f5ba7fffffff',
|
||
h3_r7: '873f5ba66ffffff',
|
||
h3_r9: '893f5ba66b3ffff',
|
||
chapter: 5,
|
||
},
|
||
}
|
||
|
||
export const ROUTES = [
|
||
{
|
||
id: 'olive',
|
||
from: 'ostia',
|
||
to: 'capua',
|
||
goods: 'Olive oil, Garum',
|
||
profit: 12,
|
||
cost: 8,
|
||
duration_ms: 6000,
|
||
chapter: 1,
|
||
unlock_den: 0,
|
||
unlock_aut: 0,
|
||
desc: 'The coastal road. Safe, slow, reliable.',
|
||
// Provenance — stub H3 IDs reference TESSERA cells for origin region.
|
||
// These become live TESSERA API queries in OTIVM-V.
|
||
origin_h3_r5: '851e805bfffffff', // Ostia hinterland, Tyrrhenian coast
|
||
origin_region: 'Latium, Campania',
|
||
cultural_note: 'Olive groves established before Rome. Garum production coastal.',
|
||
},
|
||
{
|
||
id: 'wine',
|
||
from: 'capua',
|
||
to: 'brundisium',
|
||
goods: 'Campanian wine, Wool',
|
||
profit: 22,
|
||
cost: 14,
|
||
duration_ms: 9000,
|
||
chapter: 2,
|
||
unlock_den: 120,
|
||
unlock_aut: 5,
|
||
desc: 'Via Appia. Faster in autumn.',
|
||
origin_h3_r5: '851e8333fffffff', // Campanian interior, volcanic soils
|
||
origin_region: 'Campania',
|
||
cultural_note: 'Campanian wine traded north since Etruscan period. Wool from upland flocks.',
|
||
},
|
||
{
|
||
id: 'grain',
|
||
from: 'brundisium',
|
||
to: 'carthago',
|
||
goods: 'Adriatic grain, Amber',
|
||
profit: 40,
|
||
cost: 24,
|
||
duration_ms: 13000,
|
||
chapter: 3,
|
||
unlock_den: 350,
|
||
unlock_aut: 15,
|
||
desc: 'Open sea crossing. Amber from the northern forests.',
|
||
origin_h3_r5: '851e8ba3fffffff', // Apulian plain — grain. Amber: northern H3 stub pending TESSERA OCC_FLAG
|
||
origin_region: 'Apulia — grain; Baltic coast — amber',
|
||
cultural_note: 'Amber passed through a dozen hands before Brundisium. Origin: Maglemoisian forests.',
|
||
},
|
||
{
|
||
id: 'linen',
|
||
from: 'carthago',
|
||
to: 'alexandria',
|
||
goods: 'Berber linen, Frankincense',
|
||
profit: 70,
|
||
cost: 38,
|
||
duration_ms: 18000,
|
||
chapter: 4,
|
||
unlock_den: 800,
|
||
unlock_aut: 30,
|
||
desc: 'The great southern route. Fortune awaits the bold.',
|
||
origin_h3_r5: '85386e23fffffff', // North African littoral, Carthage hinterland
|
||
origin_region: 'North Africa, Arabian peninsula',
|
||
cultural_note: 'Linen woven on looms unchanged since Neolithic. Frankincense route predates Rome by millennia.',
|
||
},
|
||
]
|
||
|
||
export const JOURNAL = {
|
||
olive: [
|
||
{
|
||
dispatch: 1,
|
||
day: 'Day 14 · Capua',
|
||
text: 'The factor at Capua counts my oil amphorae with the practised suspicion of a man who has been cheated before. Still, the payment is honest. The road back passes a stand of ancient holm oaks that remember a time before Rome.',
|
||
},
|
||
{
|
||
dispatch: 2,
|
||
day: 'Day 28 · Capua',
|
||
text: 'Third run on the olive route. I hired a mule this time. The amber bead the Northern trader pressed into my hand at Ostia — I cannot say why, but it feels old in a way that coins do not.',
|
||
},
|
||
],
|
||
wine: [
|
||
{
|
||
dispatch: 1,
|
||
day: 'Day 1 · Brundisium',
|
||
text: 'Via Appia. The legionary milestones count the distance to Rome, but I am going the other way now. Campanian wine travels better than Campanian gossip. I have reached chapter two of this life.',
|
||
},
|
||
],
|
||
grain: [
|
||
{
|
||
dispatch: 1,
|
||
day: 'Day 3 · At sea',
|
||
text: 'Nothing but water and the creak of the hull. The amber in the hold came down from forests so far north the trees have no name in Latin. Strange to think it passed through a dozen hands before mine.',
|
||
},
|
||
],
|
||
linen: [
|
||
{
|
||
dispatch: 1,
|
||
day: 'Day 7 · Alexandria',
|
||
text: 'The lighthouse. After everything — the coastal roads, the Appian dust, the crossing — the lighthouse. I have made it. The linen is sold. I find I am less interested in the profit than in what comes next.',
|
||
},
|
||
],
|
||
}
|
||
|
||
export const INITIAL_STATE = {
|
||
den: 50,
|
||
aut: 0,
|
||
dispatches: 0,
|
||
chapter: 1,
|
||
route_dispatches: {},
|
||
journal_seen: [],
|
||
// active_dispatch: records the in-progress dispatch for position tracking and
|
||
// real-time duration (OTIVM-IV). null when no dispatch is running.
|
||
active_dispatch: null,
|
||
// events: append-only record of meaningful game events.
|
||
// Each entry: { type, route_id, timestamp_utc }
|
||
// Types: 'dispatch_start', 'dispatch_complete', 'otium', 'chapter_advance', 'journal_unlock'
|
||
// This is the sequencing substrate for OTIVM-IX attestation.
|
||
events: [],
|
||
token: null,
|
||
created_at: null,
|
||
}
|
||
|
||
export const OTIUM_DURATION_MS = 8000
|
||
export const OTIUM_BASE_AUT = 1
|
||
export const MAX_CONCURRENT_PLAYERS = 128
|