Events
Events come in three kinds: world, daily and personal. Each event grows from a seed. The engine turns the weighted choices into a success chance p. Then it rolls one seeded random number from 0 to 1, and maps the result to one of five outcome tiers.
Three event kinds
| Event kind | World (Thiên Hạ Sự) | Daily (Nhật Sự) | Personal (Cơ Duyên / Kiếp Nạn) |
|---|---|---|---|
| Scope | all players | one region | one player |
| Spawn | 25% a day at 00:00 ICT, × omen multipliers; due seeds fire on their date | 70% a day per region (~4 a day across 6 regions) | 30% every 2 h; max 2 open, max 4 a day |
| Window | 48 h, closes 20:00 ICT | ~20 h, closes 20:00 ICT | 8 h |
| Resolution | daily tick 20:00, published by 21:00 | same daily tick | hourly tick |
| No answer | abstain (weight 0) | abstain | default option thuận theo tự nhiên ("let fate decide") |
Seeds and cooldowns
- A seed sets the structure: options, resolution rule, effects per tier, art tags and cooldown. The LLM writes the specifics.
- Seed pools depend on the realm. Seeds carry a civilisation tag, so Yêu Ma and Hư Ám drive events through their own seeds.
- Weight = base × omen multipliers × region-tag match. For example, the omen
huyet_nguyet(blood moon) makes ma tu and Yêu Ma seeds 3× as likely. - Cooldown (spec): a seed is excluded if it ran in the last 20 world, 10 daily (per region) or 30 personal events.
- Cooldown (prototype): world cooldown = min(20, ⌊(pool − 1) / 2⌋), so a small pool never starves. Follow-up and threshold seeds ignore cooldown.
Follow-ups and thresholds
- Explicit follow-ups: an effect queues a seed with an absolute fire date.
- Thresholds: engine rules with no LLM. Danger ≥ 80 enables a beast tide; prosperity ≤ 20 enables refugees (
nan_dan); two sects at blood feud enable a sect war. - Omens change pool weights while they are active.
- NPC state: a dead NPC leaves all pools and can enable inheritance or revenge seeds.
- Karma links: each favour or grudge has a 10% daily chance to start a personal event.
The prototype implements 1 and 2 (the prosperity threshold only). It has no omens, market, karma or sect relations yet.
Aggregation and sect dampening
Each player's influence is w = 1 + 0.5 × (min(effective cấp, 5) − 1). A Luyện Thể player has 1.0, a Ngưng Nguyên player 1.5. Each option's score is the sum, over sects, of (Σw)0.85, plus the Σw of players without a sect. This dampening stops one big sect from outvoting everyone in a straight line. When players bring less than 50 weight, NPCs pad the count with max(0, 50 − Σw), as a separate bucket.
From choices to p and an outcome tier
The prototype uses a "share" form of the spec formula. Options have a power: + for defence, − for the attackers.
def = Σ power⁺ × score atk = 0.25 × Σscore + Σ |power⁻| × score
p = clamp(0.5 + 0.4 × tanh(2 × (def − atk) / Σscore), 0.05, 0.95)
tier from (p − roll): ≥ 0.4 đại thắng · ≥ 0.1 thắng · > −0.1 giằng co · > −0.4 bại · else thảm bại
Move the sliders to set the dampened score of each option of the raid seed. p and the tier bands update live. Then roll to see where a roll lands. The sliders start at the scores in the seed-1 receipt (the engine's saved record of that raid).
The spec §6.2 writes the same idea with an absolute threat and slope 1/max(10, 0.2·Σw). The prototype calibrated it to threat 0.25 × Σ and slope 2. An earlier calibration (threat 0.54 × Σ, slope 5) gave p ≈ 0.15–0.34 even when the defenders were the largest group.
Mean reversion
Region values drift back to a stored baseline, after the 00:00 spawn pass. A dead band of ±5 keeps small changes. Beyond it, the value moves back by max(1, round(10% × excess)) per day. Reversion never pushes a value back across a threshold that a pending seed relies on. Example from the seed-1 dungeon run: danger 78 → 77 (baseline 68).
── Thiên Nguyên 1024 · ngày 1 ──
✦ Khai sự ev_1: Huyết Sát Môn tập kích Lạc Hà Trấn
ev_1 mở đến Thiên Nguyên 1024 · ngày 3 · 200 đạo hữu đã chọn
── Thiên Nguyên 1024 · ngày 2 ──
── Thiên Nguyên 1024 · ngày 3 ──
══════ THIÊN HẠ BIẾN · ev_1 ══════
Huyết Sát Môn tập kích Lạc Hà Trấn — Thiên Nguyên 1024 · ngày 3
Lựa chọn (người chơi; điểm = Σ(Σw theo tông)^0.85 + Σw vô môn phái):
A Cầm kiếm giữ trấn 80 người Σw= 92.5 điểm= 64.7 {"bach_thao":12,"huyet_sat":2,"none":22,"thien_kiem":44}
B Sơ tán dân làng 66 người Σw= 77 điểm= 58 {"bach_thao":25,"huyet_sat":1,"none":23,"thien_kiem":17}
C Thừa cơ buôn đan dược 29 người Σw= 34.5 điểm= 28.4 {"bach_thao":8,"huyet_sat":6,"none":10,"thien_kiem":5}
D Gia nhập ma tu 25 người Σw= 29 điểm= 21.7 {"bach_thao":3,"huyet_sat":16,"none":4,"thien_kiem":2}
NPC đệm (riêng): 0 (Σw người chơi 233 ≥ 50)
Thế trận: thủ=93.7 · công=64.9 (uy hiếp 0.25×Σ) · p=0.628 · roll=0.681 → GIẰNG CO
Biến đổi:
Lạc Hà Trấn · nguy hiểm: 42 → 45
Lạc Hà Trấn · phồn thịnh: 30 → 27
Lý lão bản · trạng thái: khỏe → bị thương
Thuật sử [dummy]:
Sử quan chép: Thiên Nguyên 1024 · ngày 3, Huyết Sát Môn tập kích Lạc Hà Trấn. 80 đạo hữu chọn «Cầm kiếm giữ trấn», 66 đạo hữu chọn «Sơ tán dân làng», 29 đạo hữu chọn «Thừa cơ buôn đan dược», 25 đạo hữu chọn «Gia nhập ma tu». Đông nhất là phe «Cầm kiếm giữ trấn», song thiên ý định đoạt: giằng co. ma tu vẫn lảng vảng ngoài trấn; kho thuốc bị đốt; trúng huyết chưởng.
Hậu sự:
Thiên Kiếm Tông phản kích Huyết Sát Môn [sect_retaliation] — định ngày Thiên Nguyên 1024 · ngày 4 — ĐỦ ĐIỀU KIỆN (chờ khởi phát)
── Thiên Nguyên 1024 · ngày 4 ──
↳ ĐÃ KHỞI PHÁT hậu sự sect_retaliation (từ ev_1) → ev_2
ev_2 mở đến Thiên Nguyên 1024 · ngày 6 · 200 đạo hữu đã chọn