Module:BassaridianDailyEvents: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
NewZimiaGov (talk | contribs)
No edit summary
NewZimiaGov (talk | contribs)
No edit summary
Line 1: Line 1:
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Module: DailyTable
-- Module: DailyTable
-- Purpose:
-- Revised so it:
--  1) Preserve exactly 12 city descriptions (verbatim) in a bracket-leveled
--  1) Uses a day-based random seed => events remain fixed the entire day.
--      comment, with no omission or summary.
--  2) Removes or replaces all weather-related events with non-weather incidents.
--  2) Re-write the city event texts so each is serious enough to possibly need
--  3) Maintains 12 cities, 10 serious events, 60% chance of "No reports."
--      military intervention.
--  3) 60% chance of "No reports", else pick an event at random.
--  4) Produce a daily-updating wikitext table with columns:
--      Date, City, Event, Urgency.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------


Line 15: Line 11:
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- (A) STORING THE FULL CITY DESCRIPTIONS (VERBATIM) IN A SINGLE BLOCK COMMENT
-- (A) STORING THE FULL CITY DESCRIPTIONS (VERBATIM) IN A SINGLE BLOCK COMMENT
--    USING bracket-level comment to avoid Lua nesting issues:
--    Using bracket-level comment to avoid Lua nesting issues:
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------


Line 112: Line 108:
     local psscYear = math.floor(daysSince / 183)
     local psscYear = math.floor(daysSince / 183)
     local dayOfYear = (daysSince % 183) + 1
     local dayOfYear = (daysSince % 183) + 1
     return ("Day %d of Year %d PSSC"):format(dayOfYear, psscYear)
     return {
        year = psscYear,
        dayOfYear = dayOfYear,
        text = ("Day %d of Year %d PSSC"):format(dayOfYear, psscYear)
    }
end
end


-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- (C) DEFINING 12 CITIES WITH 10 POSSIBLE SERIOUS EVENTS, 60% NO REPORTS
-- (C) DEFINING 12 CITIES, 10 POSSIBLE SERIOUS EVENTS (NO WEATHER), 60% NO REPORTS
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
local cityData = {
local cityData = {
Line 123: Line 123:
   ["Vaeringheim"] = {
   ["Vaeringheim"] = {
     events = {
     events = {
       {
       {desc="Heavily armed extremist faction seizes part of the main canal zone.", urgency="HIGH"},
        desc="Heavily armed extremist group storms the canal lock, flooding downtown markets.",
       {desc="Organized Normark loyalists place explosive traps around the old fortress.", urgency="HIGH"},
        urgency="HIGH"
       {desc="Religious riots spark mass casualties near the Thalassa shrines.", urgency="CRITICAL"},
      },
       {desc="Coordinated sabotage poisons the Lake Morovia fish supply.", urgency="HIGH"},
       {
       {desc="High-level port officials indicted for smuggling advanced weaponry.", urgency="HIGH"},
        desc="Organized Normark loyalists occupy the old fortress, threatening city patrols.",
       {desc="Widespread rumors of a Triton cult inciting uprisings in market districts.", urgency="MEDIUM"},
        urgency="HIGH"
       {desc="Unknown assailants steal a priceless relic from Reformed Path sanctum.", urgency="HIGH"},
      },
       {desc="Merchant guild infiltration reveals infiltration by foreign mercenaries.", urgency="LOW"},
       {
       {desc="A paramilitary group bombs a festival parade, severe casualties reported.", urgency="CRITICAL"},
        desc="Full-blown religious riots over conflicting Thalassa worship rites, dozens wounded.",
       {desc="Suspected pirate infiltration on city outskirts threatens supply convoys.", urgency="HIGH"}
        urgency="CRITICAL"
      },
       {
        desc="Lethal fish plague in Lake Morovia threatens regional food supply.",
        urgency="HIGH"
      },
       {
        desc="Port officials indicted for treason and sabotage, city commerce disrupted.",
        urgency="HIGH"
      },
       {
        desc="Temple Bank invests in militarized expansion, escalating Alperkin tensions.",
        urgency="MEDIUM"
      },
       {
        desc="Commandos steal ancient relic from Reformed Path shrine, leaving guards dead.",
        urgency="HIGH"
      },
       {
        desc="Rumors of a Triton cult recruiting heavily among disaffected youth.",
        urgency="LOW"
      },
       {
        desc="Bridge collapses during parade, sabotage suspected, multiple casualties.",
        urgency="CRITICAL"
      },
       {
        desc="Pirate infiltration confirmed on city outskirts, local militia outgunned.",
        urgency="HIGH"
      },
     }
     }
   },
   },
Line 168: Line 138:
   ["Luminaria"] = {
   ["Luminaria"] = {
     events = {
     events = {
       {
       {desc="Armed militants blockade Conclave Illuminara, holding priests hostage.", urgency="HIGH"},
        desc="Massive sandstorm traps hundreds near Conclave Illuminara, criminals roam freely.",
       {desc="Massive subterranean collapse reveals hidden cult armory, guards attacked.", urgency="HIGH"},
        urgency="HIGH"
       {desc="Alperkin separatists threaten to overrun city gates with improvised explosives.", urgency="MEDIUM"},
      },
       {desc="Firebombing targets Aurora Mystica archives, erasing vital records.", urgency="HIGH"},
       {
       {desc="Biochemical fungus discovered under city temples, possibly weaponized.", urgency="LOW"},
        desc="Violent quake collapses part of the subterranean labyrinth, pilgrims buried.",
       {desc="Renegade ranchers brandish contraband arms, defying Luminaria’s leadership.", urgency="MEDIUM"},
        urgency="HIGH"
       {desc="Mass delirium during dawn ceremonies ignites citywide panic, cult involvement suspected.", urgency="LOW"},
      },
       {desc="Coordinated robbery empties Onceanic Boot Company’s entire stock, left security dead.", urgency="HIGH"},
       {
       {desc="Secret rituals rumored beneath city’s largest temple, human sacrifices implied.", urgency="LOW"},
        desc="Alperkin herders blockade city gates with armed barricades over grazing disputes.",
       {desc="Rival priestesses duel violently for control of sacred Tarsica relics.", urgency="CRITICAL"}
        urgency="MEDIUM"
      },
       {
        desc="Firebombing at a major tea house destroys Aurora Mystica archives.",
        urgency="HIGH"
      },
       {
        desc="Suspected bioweapon fungus outbreak glows at night, terrifying citizens.",
        urgency="LOW"
      },
       {
        desc="Heavily armed ranchers claim Tarsica’s relics, threaten Luminaria’s leadership.",
        urgency="MEDIUM"
      },
       {
        desc="Eos devotees suffer apocalyptic visions, fueling mass hysteria.",
        urgency="LOW"
      },
       {
        desc="Organized thieves raid the Onceanic Boot Company, seizing prime rhino-hides.",
        urgency="HIGH"
      },
       {
        desc="Strange chanting intensifies under city temples, rumored sacrificial rituals.",
        urgency="LOW"
      },
       {
        desc="Rival priestesses engage in a bloody duel for control of sacred relics.",
        urgency="CRITICAL"
      },
     }
     }
   },
   },
Line 213: Line 153:
   ["Serena"] = {
   ["Serena"] = {
     events = {
     events = {
       {
       {desc="Morovian insurgent force occupies a strategic pass in the Ismaelean Mountains.", urgency="HIGH"},
        desc="Large Morovian insurgent force seizes an outlying settlement in the Ismaelean Mountains.",
       {desc="A covert extremist cell assassinates leading figures at Harmony Sanctum.", urgency="CRITICAL"},
        urgency="HIGH"
       {desc="Sectarian paramilitaries sabotage city infrastructure, blackmailing local officials.", urgency="MEDIUM"},
      },
       {desc="Trained garganram mounts trample farmland, rumored to be waging terror for ransom.", urgency="HIGH"},
       {
       {desc="Violent riots erupt over newly discovered Micras relics, dozens dead.", urgency="CRITICAL"},
        desc="Avalanche engulfs Normarkian historical site, militia rescue fails.",
       {desc="Tense blockade from Ferrum Citadel traps trade caravans en route to Serena.", urgency="MEDIUM"},
        urgency="CRITICAL"
       {desc="Normark tomb yields unholy artifacts, city watchers suspect a major supernatural threat.", urgency="HIGH"},
      },
       {desc="Druid warband harnesses the Ismaelean winds, crippling outlying watchtowers.", urgency="MEDIUM"},
       {
       {desc="Coordinated sabotage in forest routes cripples vital supply lines to the city.", urgency="HIGH"},
        desc="Radical druids overrun Harmony Sanctum in a violent takeover.",
       {desc="Chanting cultists gather nightly at the Daughters of Micras, possible ritual killings.", urgency="LOW"}
        urgency="MEDIUM"
      },
       {
        desc="Garganram herds rampage farmland, rumored to be trained war beasts.",
        urgency="HIGH"
      },
       {
        desc="Sectarian riots over newly found Micras relics, major casualties reported.",
        urgency="CRITICAL"
      },
       {
        desc="Ferrum Citadel imposes partial blockade on Serena’s mountain passes.",
        urgency="MEDIUM"
      },
       {
        desc="Cursed Normark tomb discovered, unknown supernatural threat unleashed.",
        urgency="HIGH"
      },
       {
        desc="Exiled druid weaponizes Ismaelean winds, toppling watchtowers.",
        urgency="MEDIUM"
      },
       {
        desc="Forest fires spread rapidly, rumored sabotage by Anti-Noctic forces.",
        urgency="HIGH"
      },
       {
        desc="Chanting cultists gather nightly at Daughters of Micras statue, possibly armed.",
        urgency="LOW"
      },
     }
     }
   },
   },
Line 259: Line 169:
   ["Saluria"] = {
   ["Saluria"] = {
     events = {
     events = {
       {
       {desc="Night raids incinerate key horehound fields, threatening Sanctum Vitalis operations.", urgency="MEDIUM"},
        desc="Nighttime raids torch Horehound fields, crippling Sanctum Vitalis finance.",
       {desc="Temple of Sacred Horehound stormed by zealots, multiple hostages taken.", urgency="HIGH"},
        urgency="MEDIUM"
       {desc="Hidden Alperkin outlaws lure caravans to Gloom Forest with false rescue beacons.", urgency="LOW"},
      },
       {desc="Systematic arson razes three major apothecaries, medical supplies critically low.", urgency="HIGH"},
       {
       {desc="Swarms of desperate pilgrims overrun city gates seeking rumored cures, city guard overwhelmed.", urgency="MEDIUM"},
        desc="Armed cultists seize Temple of Sacred Horehound, hostages taken.",
       {desc="Intimidation campaign from rogue druids demands Saluria’s submission to Alperkin rule.", urgency="LOW"},
        urgency="HIGH"
       {desc="Mercenaries impose heavy tariffs on medicine shipments, risking region-wide crisis.", urgency="MEDIUM"},
      },
       {desc="Expanding sinkholes approach city perimeter, saboteurs rumored to have triggered them artificially.", urgency="HIGH"},
       {
       {desc="Rats infested with experimental toxins flood temple archives, security compromised.", urgency="LOW"},
        desc="Ambush sites set via strange flute melodies, luring caravans into Gloom Forest traps.",
       {desc="High priestess discovered in catatonic state at Fount Evander, poisoning strongly suspected.", urgency="CRITICAL"}
        urgency="LOW"
      },
       {
        desc="Coordinated arson destroys multiple apothecaries, threatens medical supply.",
        urgency="HIGH"
      },
       {
        desc="Dangerous pilgrims flood Saluria seeking ‘miracle cures,’ overwhelming defenses.",
        urgency="MEDIUM"
      },
       {
        desc="Alperkin druids threaten storms unless city yields to their sovereignty.",
        urgency="LOW"
      },
       {
        desc="Brigands impose huge tribute on medicine shipments, hospitals critically low.",
        urgency="MEDIUM"
      },
       {
        desc="Expanding sinkholes devour orchard, inch toward city gates.",
        urgency="HIGH"
      },
       {
        desc="Mass vermin infestation overruns temple archives, suspected bio-warfare.",
        urgency="LOW"
      },
       {
        desc="High priestess found nearly dead at Fount Evander, possible poisoning.",
        urgency="CRITICAL"
      },
     }
     }
   },
   },
Line 304: Line 184:
   ["Aetherium"] = {
   ["Aetherium"] = {
     events = {
     events = {
       {
       {desc="Rebel camel riders loot Temple Alabaster, holding novices captive.", urgency="HIGH"},
        desc="A rebel camel cavalry raids Temple Alabaster, heavy damage reported.",
       {desc="Militant Normark sympathizers abduct patrolling rangers near the high passes.", urgency="CRITICAL"},
        urgency="HIGH"
       {desc="Key hot spring apparatus sabotaged, threatening region’s spiritual tourism industry.", urgency="HIGH"},
      },
       {desc="Secret Ivory cult stocks contraband arms for an uprising, foreigners barred from city.", urgency="LOW"},
       {
       {desc="Saboteurs intercept feathers used in forging advanced weapon prototypes.", urgency="MEDIUM"},
        desc="Blizzard traps an entire Normarkian regiment, rescue convoys ambushed.",
       {desc="Lights flicker across ridges at night, rumored signals among insurgent watchers.", urgency="LOW"},
        urgency="CRITICAL"
       {desc="Camel Herders blockade city gate, brandishing illegal firearms demanding autonomy.", urgency="MEDIUM"},
      },
       {desc="Temple Alabaster forcibly expels visiting Alperkin mystics, tensions mount dangerously.", urgency="MEDIUM"},
       {
       {desc="Child prophet calls for ‘holy purge’ of outside influence, spurring fanatic mobs.", urgency="LOW"},
        desc="Avalanche devastates hot springs, cutting crucial water supply.",
       {desc="Criminal syndicate destroys mountain pass gatehouse, freezing inbound caravans in the wilderness.", urgency="CRITICAL"}
        urgency="HIGH"
      },
       {
        desc="Clandestine Ivory cult arms itself, threatening to expel outsiders.",
        urgency="LOW"
      },
       {
        desc="Feathers for forging advanced weapons withheld by saboteurs.",
        urgency="MEDIUM"
      },
       {
        desc="Aurora-like lights rumored to signal an invading force from the peaks.",
        urgency="LOW"
      },
       {
        desc="Camel Herders blockade city gates, demanding total autonomy.",
        urgency="MEDIUM"
      },
       {
        desc="Temple Alabaster priests forcibly evict Alperkin mystics, tensions surge.",
        urgency="MEDIUM"
      },
       {
        desc="Child prophet calls for ‘holy war,’ inciting fervent crowds.",
        urgency="LOW"
      },
       {
        desc="Saboteurs destroy the only safe pass into subzero highlands, caravans stranded.",
        urgency="CRITICAL"
      },
     }
     }
   },
   },
Line 349: Line 199:
   ["Ferrum Citadel"] = {
   ["Ferrum Citadel"] = {
     events = {
     events = {
       {
       {desc="Court of the Ironclad mobilizes a rogue legion, overshadowing city garrison.", urgency="HIGH"},
        desc="Court of the Ironclad forms an unsanctioned army, region-wide alarm triggered.",
       {desc="Extremist infiltration inside fortress staff attempts a midnight coup.", urgency="CRITICAL"},
        urgency="HIGH"
       {desc="Ferrum Mosquitos engineered by rebels, unleashing lethal toxins in city wells.", urgency="HIGH"},
      },
       {desc="Captured arms shipments reveal conspiracy to overthrow current leadership.", urgency="HIGH"},
       {
       {desc="Fenrir devotees abduct multiple political councilors, demanding territory concessions.", urgency="MEDIUM"},
        desc="Fierce sandstorm wrecks fortress defenses, marauders close in.",
       {desc="Explosions rock key fortress ramparts, city defense severely compromised.", urgency="CRITICAL"},
        urgency="CRITICAL"
       {desc="Scandal in prime iron mines; sabotage halts production of vital weapons stock.", urgency="MEDIUM"},
      },
       {desc="Rival Fenrir factions wage armed conflict near citadel courtyard, bystanders at risk.", urgency="LOW"},
       {
       {desc="Caravan en route from Vaeringheim disappears, no survivors or cargo found.", urgency="MEDIUM"},
        desc="Mutated Ferrum Mosquitos swarm residential zones, injecting lethal toxins.",
       {desc="Reports of hallucinations from Skoll illusions undermine morale among fortress guards.", urgency="LOW"}
        urgency="HIGH"
      },
       {
        desc="Intercepted arms shipments reveal conspiracy for an internal coup.",
        urgency="HIGH"
      },
       {
        desc="Fenrir worshipers kidnap political figures, demand ransom for release.",
        urgency="MEDIUM"
      },
       {
        desc="Lightning storm obliterates ramparts, opening city to invaders.",
        urgency="CRITICAL"
      },
       {
        desc="Sabotage in prime iron vein halts weapon forging, supply crisis imminent.",
        urgency="MEDIUM"
      },
       {
        desc="Rival Fenrir cult seizes fortress, threatens to execute city leaders.",
        urgency="LOW"
      },
       {
        desc="Trade caravan vanishes in desert, suspected slavers at work.",
        urgency="MEDIUM"
      },
       {
        desc="Terrorized guards report monstrous Skoll illusions, morale collapses.",
        urgency="LOW"
      },
     }
     }
   },
   },
Line 395: Line 215:
   ["Skýrophos"] = {
   ["Skýrophos"] = {
     events = {
     events = {
       {
       {desc="Quartz cliff blockade orchestrated by insurgents, harbor access cut off.", urgency="HIGH"},
        desc="Quartz cliff collapse blocks harbor, raiders exploit the city’s vulnerability.",
       {desc="Alterbulb illusions weaponized by rogue alchemists to disorient city patrols.", urgency="MEDIUM"},
        urgency="HIGH"
       {desc="Pirate outfit hijacks fishing fleet, ransoms entire haul of pufferfish.", urgency="HIGH"},
      },
       {desc="Criminal syndicate triggers blast at the Suncliffs, burying strategic vantage towers.", urgency="CRITICAL"},
       {
       {desc="Merchants found stockpiling contraband quartz bombs, black market uncovered.", urgency="LOW"},
        desc="Alterbulb illusions ensnare Haifan ambassador’s entourage, risking crisis.",
       {desc="A petrified official etched with black magic runes discovered, sabotage suspected.", urgency="HIGH"},
        urgency="MEDIUM"
       {desc="Main cargo of Alterbulb lumber stolen, local economy near collapse.", urgency="MEDIUM"},
      },
       {desc="Religious zealots declare independence, seizing a central government outpost by force.", urgency="MEDIUM"},
       {
       {desc="Amphibious raiders attack coastal guard posts under cover of darkness.", urgency="LOW"},
        desc="Renegade pirates seize fishing fleet laden with valuable pufferfish.",
       {desc="Massive sinkhole in city center reveals arms cache for insurgent cells.", urgency="CRITICAL"}
        urgency="HIGH"
      },
       {
        desc="Massive quake shatters Suncliffs, burying critical defenses.",
        urgency="CRITICAL"
      },
       {
        desc="Merchants accuse rivals of contraband quartz-based weapon smuggling.",
        urgency="LOW"
      },
       {
        desc="Petrified aristocrat discovered etched with arcane symbols, black magic suspected.",
        urgency="HIGH"
      },
       {
        desc="Saboteurs contaminate Alterbulb cargo, crippling local economy.",
        urgency="MEDIUM"
      },
       {
        desc="Zealous acolytes proclaim uprising, capturing a government outpost.",
        urgency="MEDIUM"
      },
       {
        desc="Unidentified aquatic beasts assault coastal guard towers at night.",
        urgency="LOW"
      },
       {
        desc="Earth fissures tear open main bazaar, allowing criminals to loot freely.",
        urgency="CRITICAL"
      },
     }
     }
   },
   },
Line 440: Line 230:
   ["Bjornopolis"] = {
   ["Bjornopolis"] = {
     events = {
     events = {
       {
       {desc="Armed smugglers seize the floating market, crippling all trade in the city core.", urgency="HIGH"},
        desc="Sirenian Falls overflow, drowning a military checkpoint in the terraces.",
       {desc="Rival guild confrontation escalates into lethal shootouts on the upper terraces.", urgency="MEDIUM"},
        urgency="HIGH"
       {desc="Fissures under city foundations lead to a suspected rebel hideout, skirmishes ensue.", urgency="HIGH"},
      },
       {desc="Merchant guild revolt surrounds city hall, declares independence from the crown.", urgency="CRITICAL"},
       {
       {desc="Tainted mead kills dozens, inciting violent uprisings for scarce antidotes.", urgency="MEDIUM"},
        desc="Armed smugglers clash at floating market over sphinx moth silk prices.",
       {desc="Bijarian Leopards forcibly released by animal-rights extremists, city watch unprepared.", urgency="LOW"},
        urgency="MEDIUM"
       {desc="Altar of Songs artifact stolen, fueling a new insurgent militia’s recruitment drives.", urgency="HIGH"},
      },
       {desc="Ex-soldiers occupy the harbor, demanding extortion fees from all incoming vessels.", urgency="CRITICAL"},
       {
       {desc="Mysterious nighttime kidnappings along the old canal blamed on rumor-laden 'Whispering Falls' cult.", urgency="HIGH"},
        desc="Caverns collapse beneath city foundations, swallowing entire block.",
       {desc="Street illusions provoke panic, roving mobs clash with law enforcement, chaos spreads.", urgency="LOW"}
        urgency="HIGH"
      },
       {
        desc="Merchant guild revolt locks down Bjornopolis, demands secession from NSJ.",
        urgency="CRITICAL"
      },
       {
        desc="Tainted mead potions spark mass poisoning, crowds riot for antidotes.",
        urgency="MEDIUM"
      },
       {
        desc="Enraged Bijarian Leopards attack outlying farms, city watch overwhelmed.",
        urgency="LOW"
      },
       {
        desc="A stolen Altar of Songs relic used to rally an insurgent militia.",
        urgency="HIGH"
      },
       {
        desc="Renegade ex-soldiers blockade the harbor with armed ships, extorting the city.",
        urgency="CRITICAL"
      },
       {
        desc="‘Whispering Falls’ intensifies, numerous fishers vanish nightly.",
        urgency="HIGH"
      },
       {
        desc="Street performers incite panic with illusions provoking violent clashes.",
        urgency="LOW"
      },
     }
     }
   },
   },
Line 486: Line 246:
   ["Pelagia"] = {
   ["Pelagia"] = {
     events = {
     events = {
       {
       {desc="Saltsteppes trade routes sabotaged by heavily armed raiders, commerce paralyzed.", urgency="HIGH"},
        desc="Saltsteppes caravans ambushed by heavily armed raiders, city supplies at risk.",
       {desc="Bassarid relic smugglers reported to be amassing weapon stockpiles in hidden dunes.", urgency="MEDIUM"},
        urgency="HIGH"
       {desc="Melusine cult lures caravans into ambush sites with false rescue signals.", urgency="LOW"},
      },
       {desc="Tainted well near city gates kills travelers, extremist sabotage suspected.", urgency="HIGH"},
       {
       {desc="Mass toxic exposure in the old fortress, multiple casualties, sabotage likely.", urgency="LOW"},
        desc="Bassarid relic smugglers stockpile weapons in desert hideouts.",
       {desc="Armed bandits intercept inbound traders, forcibly conscripting new recruits.", urgency="MEDIUM"},
        urgency="MEDIUM"
       {desc="Hatch Ministry loyalists seize an abandoned outpost, kidnapping local ranchers.", urgency="HIGH"},
      },
       {desc="Ravenous locust-like predators unleashed on farmland, rumored biological weapon.", urgency="CRITICAL"},
       {
       {desc="Camel ranchers threaten armed rebellion unless city invests in protective garrisons.", urgency="MEDIUM"},
        desc="Discordant Melusine winds spawn lethal dust devils destroying caravans.",
       {desc="Key supply depots vanish after forced eviction, entire region starves, city in crisis.", urgency="CRITICAL"}
        urgency="LOW"
      },
       {
        desc="Toxic oasis near city gates kills travelers, suspected chemical warfare.",
        urgency="HIGH"
      },
       {
        desc="Mass fainting near old fortress suggests large-scale poisoning.",
        urgency="LOW"
      },
       {
        desc="Notorious bandits intercept inbound traders, forcibly recruiting them.",
        urgency="MEDIUM"
      },
       {
        desc="Hatch Ministry loyalists seize deserted outpost, staging kidnappings.",
        urgency="HIGH"
      },
       {
        desc="A massive swarm of carnivorous locusts overruns farmland, biting civilians.",
        urgency="CRITICAL"
      },
       {
        desc="Camel ranchers threaten armed revolt unless the city fortifies trade routes.",
        urgency="MEDIUM"
      },
       {
        desc="Major earthquake topples key supply depots, risking total resource collapse.",
        urgency="CRITICAL"
      },
     }
     }
   },
   },
Line 531: Line 261:
   ["Norsolyra"] = {
   ["Norsolyra"] = {
     events = {
     events = {
       {
       {desc="Wisp cult forcibly occupies a city quarter, enthralling residents with mind-altering rituals.", urgency="HIGH"},
        desc="Will o’ wisp cult forcibly takes over city quarter, enthralling residents.",
       {desc="Armed raiders disrupt Noctic-Rabrev harvest, risking mass starvation or disease spread.", urgency="HIGH"},
        urgency="HIGH"
       {desc="Ghostly illusions lure entire squads into Tarnand Fjord, no survivors found.", urgency="LOW"},
      },
       {desc="Militant smugglers wage turf war over Wisp Rice monopoly, crossfire kills civilians.", urgency="MEDIUM"},
       {
       {desc="Normark saboteurs demolish protective levees, severe flooding imminent in farmland. (Removed weather? Let's keep it minimal: 'in farmland' but no floods details)", urgency="HIGH"},
        desc="Incessant storms flood Noctic-Rabrev fields, city faces mass famine.",
       {desc="Citywide hysteria triggered by Alperkin dream plague, violent riots erupt.", urgency="CRITICAL"},
        urgency="HIGH"
       {desc="Rival wisp cult leaders engage in armed standoffs over sacrificial conflicts.", urgency="MEDIUM"},
      },
       {desc="Pirates disguised as pilgrims loot city arsenal, capturing advanced Noctic weapon prototypes.", urgency="HIGH"},
       {
       {desc="Corrupt officials extort worshipers for wisp offerings, standoff escalates with armed believers.", urgency="LOW"},
        desc="Ghostly lights lure entire caravans into Tarnand Fjord; no survivors.",
       {desc="Maritime illusions sabotage shipping lanes, bankrupting local trade guilds overnight.", urgency="MEDIUM"}
        urgency="LOW"
      },
       {
        desc="Heavily armed smugglers wage turf war to dominate Wisp Rice trade.",
        urgency="MEDIUM"
      },
       {
        desc="Normarkian raiders demolish city dikes, unleashing catastrophic flooding.",
        urgency="HIGH"
      },
       {
        desc="A citywide nightmare outbreak drives population into violent delirium.",
        urgency="CRITICAL"
      },
       {
        desc="High-level schism in wisp cult leads to armed clashes over sacrifice.",
        urgency="MEDIUM"
      },
       {
        desc="Pirates disguised as pilgrims raid city armories, seizing Noctic-based munitions.",
        urgency="HIGH"
      },
       {
        desc="Corrupt officials extort wisp offerings, enraging local worshipers.",
        urgency="LOW"
      },
       {
        desc="Arcane illusions sabotage maritime commerce, bankrupting shipping guilds.",
        urgency="MEDIUM"
      },
     }
     }
   },
   },
Line 577: Line 277:
   ["Keybir-Aviv"] = {
   ["Keybir-Aviv"] = {
     events = {
     events = {
       {
       {desc="Heavily armed bandits intercept diamond transport near Lake Morovia, all guards missing.", urgency="HIGH"},
        desc="Heavily armed bandits eliminate a diamond convoy near Lake Morovia’s shore.",
       {desc="Radical Stripping Path sect seizes the coral markets, killing multiple officials.", urgency="MEDIUM"},
        urgency="HIGH"
       {desc="Organized theft spree collapses a key trade route, city commerce on brink of ruin.", urgency="HIGH"},
      },
       {desc="Exposed Diamond Corp conspirators attempt to coup the city council with mercenaries.", urgency="LOW"},
       {
       {desc="A Hermes cult calls for mass blood sacrifice, terrorizing outlying hamlets.", urgency="CRITICAL"},
        desc="Stripping Path radicals seize coral markets, holding officials hostage.",
       {desc="Diamond forgery ring triggers widespread panic, mass arrests spark violent backlash.", urgency="HIGH"},
        urgency="MEDIUM"
       {desc="Reef serpents used as living weapons by local warlords, farmland forced to evacuate.", urgency="MEDIUM"},
      },
       {desc="Suspected pirate bombs destroy multiple warehouses, plunging city into chaos.", urgency="HIGH"},
       {
       {desc="Council crackdown on extremist Stripping Path offshoot triggers armed street battles.", urgency="MEDIUM"},
        desc="Monsoon floods isolate entire districts, widespread looting ensues.",
       {desc="Solar phenomenon unsettles populace, extremist prophets incite riot at city docks.", urgency="LOW"}
        urgency="HIGH"
      },
       {
        desc="Hidden vault reveals subversive Diamond Corp faction’s covert ties.",
        urgency="LOW"
      },
       {
        desc="A Hermes cult attempts mass sacrifice, halting city operations.",
        urgency="CRITICAL"
      },
       {
        desc="Vast diamond forgery ring destabilizes economy, fueling violent unrest.",
        urgency="HIGH"
      },
       {
        desc="Reef serpents swarm farmland, forcing armed evacuations of entire villages.",
        urgency="MEDIUM"
      },
       {
        desc="Warehouse bombings suspected as pirate retribution for city taxes.",
        urgency="HIGH"
      },
       {
        desc="Council crackdown on extremist Stripping Path sect triggers armed revolt.",
        urgency="MEDIUM"
      },
       {
        desc="A solar eclipse incites panic, fundamentalist mobs riot across the port.",
        urgency="LOW"
      },
     }
     }
   },
   },
Line 622: Line 292:
   ["Tel-Amin"] = {
   ["Tel-Amin"] = {
     events = {
     events = {
       {
       {desc="Naval blockade orchestrated by rival states traps supply ships, risk of famine soared.", urgency="CRITICAL"},
        desc="Naval blockades trap supply convoys, famine imminent in Tel-Amin.",
       {desc="Pirate king abducts key merchant heirs, demands city pay crippling ransom.", urgency="HIGH"},
        urgency="CRITICAL"
       {desc="Underground crypt finds mermaid tomb, artifacts cursed to cause mental collapse citywide.", urgency="LOW"},
      },
       {desc="Host Spirit fanatics torch older Stripping Path temples, unleashing citywide violence.", urgency="MEDIUM"},
       {
       {desc="Mass pilgrimage from Mylecia saturates local defenses, infiltration suspected among crowds.", urgency="HIGH"},
        desc="Pirate lord kidnaps merchant heirs, demands hefty tribute in Ismael Hatch’s name.",
       {desc="Coordination sabotage topples essential trade outposts, severe resource shortages imminent.", urgency="CRITICAL"},
        urgency="HIGH"
       {desc="Fortress gate toll revolt escalates, heavily armed smugglers exchanging fire with city guard.", urgency="HIGH"},
      },
       {desc="Rebel zealots sabotage roads with makeshift explosives, halting all commerce.", urgency="MEDIUM"},
       {
       {desc="Cryptic doomsday prophecy triggers panic, extremist groups seize a prominent temple.", urgency="LOW"},
        desc="Expanding coral skeletons reveal mermaid tomb, rumored plague unleashed.",
       {desc="Undersea caverns rumored to harbor a rogue warlord’s submarine base, threatening coastal traffic.", urgency="MEDIUM"}
        urgency="LOW"
      },
       {
        desc="Host Spirit zealots burn older Stripping Path shrines, citywide lockdown.",
        urgency="MEDIUM"
      },
       {
        desc="Tens of thousands of pilgrims flood from Mylecia, overwhelming local defenses.",
        urgency="HIGH"
      },
       {
        desc="Violent storms destroy Apollo shrines on the coastline, survivors missing.",
        urgency="CRITICAL"
      },
       {
        desc="Fortress gate tax revolt escalates into armed standoff with smugglers.",
        urgency="HIGH"
      },
       {
        desc="Rebel zealots rig roads with explosives, halting agriculture supply lines.",
        urgency="MEDIUM"
      },
       {
        desc="Cryptic runestone prophecy sparks hysteria about an impending invasion.",
        urgency="LOW"
      },
       {
        desc="Underwater caverns emit deafening hum, crippling some citizens with madness.",
        urgency="MEDIUM"
      },
     }
     }
   },
   },
Line 668: Line 308:
   ["Thermosalem"] = {
   ["Thermosalem"] = {
     events = {
     events = {
       {
       {desc="A geyser-like eruption hits the city’s main spa district, multiple scalded victims missing.", urgency="HIGH"},
        desc="New geyser blasts boiling water into city streets, scalding residents.",
       {desc="Violent brawl erupts at the only major clinic, pilgrims demanding priority treatment.", urgency="MEDIUM"},
        urgency="HIGH"
       {desc="An extremist group threatens to contaminate the hot springs with toxic chemicals, blackmailing city officials.", urgency="CRITICAL"},
      },
       {desc="Rival herbalist factions stage armed raids on each other’s storerooms, medical shortage looms.", urgency="LOW"},
       {
       {desc="Shadowy cult kidnaps spa guests for sacrificial rites in sealed-off bathhouse tunnels.", urgency="MEDIUM"},
        desc="Pilgrims riot for miracle cures, city guards overwhelmed at clinic entrances.",
       {desc="Tampered water supply kills dozens, suspected terror plot within city’s spa facilities.", urgency="HIGH"},
        urgency="MEDIUM"
       {desc="Old-guard priests forcibly clash with progressive mystics over control of major springs.", urgency="MEDIUM"},
      },
       {desc="Unexplainable illusions in dawn steam cause civilians to vanish, rumored arcane kidnappings.", urgency="LOW"},
       {
       {desc="Suspicious collapse of the city’s prized glass spa dome, rescue teams under attack by unknown assailants.", urgency="HIGH"},
        desc="Seismic upheaval threatens to obliterate main thermal reservoir, risk of massive flood.",
       {desc="Mineral deposits vanish from sealed vault, fueling a black-market profiteering ring, chaos erupts.", urgency="CRITICAL"}
        urgency="CRITICAL"
      },
       {
        desc="Warring herbalists sabotage each other to control prized steam vent harvests.",
        urgency="LOW"
      },
       {
        desc="Extremist cult kidnaps spa patrons for ritual sacrifice in abandoned bathhouse.",
        urgency="MEDIUM"
      },
       {
        desc="Flash floods contaminate famed springs with toxins, hundreds ill.",
        urgency="HIGH"
      },
       {
        desc="Armed clashes erupt between old-guard priests and progressive mystics.",
        urgency="MEDIUM"
      },
       {
        desc="Ghostly apparitions trap tourists at dawn, possibly a psychic attack.",
        urgency="LOW"
      },
       {
        desc="Prized spa dome collapses suspiciously at peak hours, dozens trapped.",
        urgency="HIGH"
      },
       {
        desc="Mineral deposit shortage sparks an angry mob demanding forced city expansion.",
        urgency="CRITICAL"
      },
     }
     }
   },
   },
Line 713: Line 323:
   ["Akróstadium"] = {
   ["Akróstadium"] = {
     events = {
     events = {
       {
       {desc="High-ranking War League officers revolt, forcibly arresting novice commanders in the stadium.", urgency="HIGH"},
        desc="War League officers openly mutiny against novice commanders, city in chaos.",
       {desc="A hidden conspiracy unleashes lethal toxins in monastery dormitories, dozens incapacitated.", urgency="CRITICAL"},
        urgency="HIGH"
       {desc="Rampaging Water Buffalo sabotage training grounds, security squads pinned down.", urgency="HIGH"},
      },
       {desc="Widespread sheep cull demanded after evidence of a bio-engineered plague emerges.", urgency="MEDIUM"},
       {
       {desc="Showcase duel ends in bloodshed; saboteurs kill a revered war champion mid-performance.", urgency="HIGH"},
        desc="Tornadic storms ravage the old monastery walls, leaving Akróstadium exposed.",
       {desc="Bassarid militants seize Temple of Kan Zen, forcing mass conversions under threat.", urgency="MEDIUM"},
        urgency="CRITICAL"
       {desc="Armed stable-hands spark citywide panic, brandishing stolen weapon prototypes.", urgency="LOW"},
      },
       {desc="Secret coup plot discovered in old crypts, conspirators heavily armed, possibly staging siege.", urgency="CRITICAL"},
       {
       {desc="Rock barrier on city road booby-trapped, supply convoys severely delayed, possible insider sabotage.", urgency="MEDIUM"},
        desc="Morovian Water Buffalo breach outer defenses, injuring dozens of civilians.",
       {desc="Midnight ‘war-god invocation’ triggers violent mania among stadium recruits, chaos reigns.", urgency="LOW"}
        urgency="HIGH"
      },
       {
        desc="Sheep plague cripples ranching sector, calls for martial law intensify.",
        urgency="MEDIUM"
      },
       {
        desc="Showcase duel ends in bloodshed, sabotage kills a revered champion.",
        urgency="HIGH"
      },
       {
        desc="Bassarid militants storm Temple of Kan Zen, taking worshipers hostage.",
        urgency="MEDIUM"
      },
       {
        desc="An out-of-control stable fire spreads through hillside, sabotage suspected.",
        urgency="LOW"
      },
       {
        desc="Military conspirators gather in crypts, planning a full-scale city takeover.",
        urgency="CRITICAL"
      },
       {
        desc="Rockslide cuts off main road, ranchers stranded without supply routes.",
        urgency="MEDIUM"
      },
       {
        desc="Eerie midnight chanting in stadium, suspected war-god invocation, panic ensues.",
        urgency="LOW"
      },
     }
     }
   },
   },
Line 758: Line 338:


-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- (D) BUILD A WIKITABLE (AUTO-UPDATING), 60% "No reports"
-- (D) BUILD A WIKITABLE (AUTO-UPDATING) FOR ONE EVENT PER DAY
--    Using day-based seeding so it doesn't change on every page load.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
function p.makeTable()
function p.makeTable()
     math.randomseed(os.time())
     -- 1) Get the date info.
     local dateString = getPSSCDate()
    local dateInfo = getPSSCDate()
     local seed = dateInfo.year * 1000 + dateInfo.dayOfYear  -- stable daily seed
    math.randomseed(seed)


    -- 2) Start building the table.
     local lines = {}
     local lines = {}
     table.insert(lines, '{| class="wikitable"')
     table.insert(lines, '{| class="wikitable"')
     table.insert(lines, '! Date !! City !! Event !! Urgency')
     table.insert(lines, '! Date !! City !! Event !! Urgency')


    -- 3) For each city, do the 60% 'No reports' or pick from 10 events.
     for cityName, data in pairs(cityData) do
     for cityName, data in pairs(cityData) do
         local chance = math.random()
         local chance = math.random()
        -- 60% = "No reports"
         if chance < 0.60 then
         if chance < 0.60 then
             table.insert(lines, '|-')
             table.insert(lines, '|-')
             table.insert(lines, '| ' .. dateString .. ' || ' .. cityName .. ' || No reports || N/A')
             table.insert(lines, '| ' .. dateInfo.text .. ' || ' .. cityName .. ' || No reports || N/A')
         else
         else
             local pick = math.random(#data.events)
             local pick = math.random(#data.events)
             local e = data.events[pick]
             local e = data.events[pick]
             table.insert(lines, '|-')
             table.insert(lines, '|-')
             table.insert(lines,
             table.insert(lines, '| ' .. dateInfo.text .. ' || ' .. cityName .. ' || ' .. e.desc .. ' || ' .. e.urgency)
                '| ' .. dateString
                .. ' || ' .. cityName
                .. ' || ' .. e.desc
                .. ' || ' .. e.urgency
            )
         end
         end
     end
     end

Revision as of 06:35, 3 January 2025

Documentation for this module may be created at Module:BassaridianDailyEvents/doc

-------------------------------------------------------------------------------
-- Module: DailyTable
-- Revised so it:
--   1) Uses a day-based random seed => events remain fixed the entire day.
--   2) Removes or replaces all weather-related events with non-weather incidents.
--   3) Maintains 12 cities, 10 serious events, 60% chance of "No reports."
-------------------------------------------------------------------------------

local p = {}

-------------------------------------------------------------------------------
-- (A) STORING THE FULL CITY DESCRIPTIONS (VERBATIM) IN A SINGLE BLOCK COMMENT
--     Using bracket-level comment to avoid Lua nesting issues:
-------------------------------------------------------------------------------

--[==[
==========================
== BASSARIDIA VAERINGHEIM
==========================
== Major Cities (3) ==
1) Vaeringheim
2) Luminaria
3) Serena

=== Vaeringheim ===
(VERBATIM TEXT GOES HERE: All original descriptive text for Vaeringheim...)

=== Luminaria ===
(VERBATIM TEXT GOES HERE: All original descriptive text for Luminaria...)

=== Serena ===
(VERBATIM TEXT GOES HERE: All original descriptive text for Serena...)


=====================
== Minor Cities (3) ==
1) Saluria
2) Aetherium
3) Ferrum Citadel

=== Saluria ===
(VERBATIM TEXT GOES HERE...)

=== Aetherium ===
(VERBATIM TEXT GOES HERE...)

=== Ferrum Citadel ===
(VERBATIM TEXT GOES HERE...)


===========================
== NEW SOUTH JANGSONG
===========================
== Major Cities (2) ==
1) Skýrophos
2) Bjornopolis

=== Skýrophos ===
(VERBATIM TEXT GOES HERE...)

=== Bjornopolis ===
(VERBATIM TEXT GOES HERE...)


== Minor Cities (2) ==
1) Pelagia
2) Norsolyra

=== Pelagia ===
(VERBATIM TEXT GOES HERE...)

=== Norsolyra ===
(VERBATIM TEXT GOES HERE...)


===========================
== HAIFAN BASSARIDIA
===========================
== Major Cities (2) ==
1) Keybir-Aviv
2) Tel-Amin

=== Keybir-Aviv ===
(VERBATIM TEXT GOES HERE...)

=== Tel-Amin ===
(VERBATIM TEXT GOES HERE...)


== Minor Cities (2) ==
1) Thermosalem
2) Akróstadium

=== Thermosalem ===
(VERBATIM TEXT GOES HERE...)

=== Akróstadium ===
(VERBATIM TEXT GOES HERE...)
]==]

-------------------------------------------------------------------------------
-- (B) SIMPLE PSSC DATE FUNCTION
-------------------------------------------------------------------------------
local function getPSSCDate()
    local start = os.time{year=1999, month=8, day=6}
    local now = os.time()
    local daysSince = math.floor((now - start) / 86400)
    local psscYear = math.floor(daysSince / 183)
    local dayOfYear = (daysSince % 183) + 1
    return {
        year = psscYear,
        dayOfYear = dayOfYear,
        text = ("Day %d of Year %d PSSC"):format(dayOfYear, psscYear)
    }
end

-------------------------------------------------------------------------------
-- (C) DEFINING 12 CITIES, 10 POSSIBLE SERIOUS EVENTS (NO WEATHER), 60% NO REPORTS
-------------------------------------------------------------------------------
local cityData = {

  -- 3 Major from Bassaridia Vaeringheim
  ["Vaeringheim"] = {
    events = {
      {desc="Heavily armed extremist faction seizes part of the main canal zone.", urgency="HIGH"},
      {desc="Organized Normark loyalists place explosive traps around the old fortress.", urgency="HIGH"},
      {desc="Religious riots spark mass casualties near the Thalassa shrines.", urgency="CRITICAL"},
      {desc="Coordinated sabotage poisons the Lake Morovia fish supply.", urgency="HIGH"},
      {desc="High-level port officials indicted for smuggling advanced weaponry.", urgency="HIGH"},
      {desc="Widespread rumors of a Triton cult inciting uprisings in market districts.", urgency="MEDIUM"},
      {desc="Unknown assailants steal a priceless relic from Reformed Path sanctum.", urgency="HIGH"},
      {desc="Merchant guild infiltration reveals infiltration by foreign mercenaries.", urgency="LOW"},
      {desc="A paramilitary group bombs a festival parade, severe casualties reported.", urgency="CRITICAL"},
      {desc="Suspected pirate infiltration on city outskirts threatens supply convoys.", urgency="HIGH"}
    }
  },

  ["Luminaria"] = {
    events = {
      {desc="Armed militants blockade Conclave Illuminara, holding priests hostage.", urgency="HIGH"},
      {desc="Massive subterranean collapse reveals hidden cult armory, guards attacked.", urgency="HIGH"},
      {desc="Alperkin separatists threaten to overrun city gates with improvised explosives.", urgency="MEDIUM"},
      {desc="Firebombing targets Aurora Mystica archives, erasing vital records.", urgency="HIGH"},
      {desc="Biochemical fungus discovered under city temples, possibly weaponized.", urgency="LOW"},
      {desc="Renegade ranchers brandish contraband arms, defying Luminaria’s leadership.", urgency="MEDIUM"},
      {desc="Mass delirium during dawn ceremonies ignites citywide panic, cult involvement suspected.", urgency="LOW"},
      {desc="Coordinated robbery empties Onceanic Boot Company’s entire stock, left security dead.", urgency="HIGH"},
      {desc="Secret rituals rumored beneath city’s largest temple, human sacrifices implied.", urgency="LOW"},
      {desc="Rival priestesses duel violently for control of sacred Tarsica relics.", urgency="CRITICAL"}
    }
  },

  ["Serena"] = {
    events = {
      {desc="Morovian insurgent force occupies a strategic pass in the Ismaelean Mountains.", urgency="HIGH"},
      {desc="A covert extremist cell assassinates leading figures at Harmony Sanctum.", urgency="CRITICAL"},
      {desc="Sectarian paramilitaries sabotage city infrastructure, blackmailing local officials.", urgency="MEDIUM"},
      {desc="Trained garganram mounts trample farmland, rumored to be waging terror for ransom.", urgency="HIGH"},
      {desc="Violent riots erupt over newly discovered Micras relics, dozens dead.", urgency="CRITICAL"},
      {desc="Tense blockade from Ferrum Citadel traps trade caravans en route to Serena.", urgency="MEDIUM"},
      {desc="Normark tomb yields unholy artifacts, city watchers suspect a major supernatural threat.", urgency="HIGH"},
      {desc="Druid warband harnesses the Ismaelean winds, crippling outlying watchtowers.", urgency="MEDIUM"},
      {desc="Coordinated sabotage in forest routes cripples vital supply lines to the city.", urgency="HIGH"},
      {desc="Chanting cultists gather nightly at the Daughters of Micras, possible ritual killings.", urgency="LOW"}
    }
  },

  -- 3 Minor from Bassaridia Vaeringheim
  ["Saluria"] = {
    events = {
      {desc="Night raids incinerate key horehound fields, threatening Sanctum Vitalis operations.", urgency="MEDIUM"},
      {desc="Temple of Sacred Horehound stormed by zealots, multiple hostages taken.", urgency="HIGH"},
      {desc="Hidden Alperkin outlaws lure caravans to Gloom Forest with false rescue beacons.", urgency="LOW"},
      {desc="Systematic arson razes three major apothecaries, medical supplies critically low.", urgency="HIGH"},
      {desc="Swarms of desperate pilgrims overrun city gates seeking rumored cures, city guard overwhelmed.", urgency="MEDIUM"},
      {desc="Intimidation campaign from rogue druids demands Saluria’s submission to Alperkin rule.", urgency="LOW"},
      {desc="Mercenaries impose heavy tariffs on medicine shipments, risking region-wide crisis.", urgency="MEDIUM"},
      {desc="Expanding sinkholes approach city perimeter, saboteurs rumored to have triggered them artificially.", urgency="HIGH"},
      {desc="Rats infested with experimental toxins flood temple archives, security compromised.", urgency="LOW"},
      {desc="High priestess discovered in catatonic state at Fount Evander, poisoning strongly suspected.", urgency="CRITICAL"}
    }
  },

  ["Aetherium"] = {
    events = {
      {desc="Rebel camel riders loot Temple Alabaster, holding novices captive.", urgency="HIGH"},
      {desc="Militant Normark sympathizers abduct patrolling rangers near the high passes.", urgency="CRITICAL"},
      {desc="Key hot spring apparatus sabotaged, threatening region’s spiritual tourism industry.", urgency="HIGH"},
      {desc="Secret Ivory cult stocks contraband arms for an uprising, foreigners barred from city.", urgency="LOW"},
      {desc="Saboteurs intercept feathers used in forging advanced weapon prototypes.", urgency="MEDIUM"},
      {desc="Lights flicker across ridges at night, rumored signals among insurgent watchers.", urgency="LOW"},
      {desc="Camel Herders blockade city gate, brandishing illegal firearms demanding autonomy.", urgency="MEDIUM"},
      {desc="Temple Alabaster forcibly expels visiting Alperkin mystics, tensions mount dangerously.", urgency="MEDIUM"},
      {desc="Child prophet calls for ‘holy purge’ of outside influence, spurring fanatic mobs.", urgency="LOW"},
      {desc="Criminal syndicate destroys mountain pass gatehouse, freezing inbound caravans in the wilderness.", urgency="CRITICAL"}
    }
  },

  ["Ferrum Citadel"] = {
    events = {
      {desc="Court of the Ironclad mobilizes a rogue legion, overshadowing city garrison.", urgency="HIGH"},
      {desc="Extremist infiltration inside fortress staff attempts a midnight coup.", urgency="CRITICAL"},
      {desc="Ferrum Mosquitos engineered by rebels, unleashing lethal toxins in city wells.", urgency="HIGH"},
      {desc="Captured arms shipments reveal conspiracy to overthrow current leadership.", urgency="HIGH"},
      {desc="Fenrir devotees abduct multiple political councilors, demanding territory concessions.", urgency="MEDIUM"},
      {desc="Explosions rock key fortress ramparts, city defense severely compromised.", urgency="CRITICAL"},
      {desc="Scandal in prime iron mines; sabotage halts production of vital weapons stock.", urgency="MEDIUM"},
      {desc="Rival Fenrir factions wage armed conflict near citadel courtyard, bystanders at risk.", urgency="LOW"},
      {desc="Caravan en route from Vaeringheim disappears, no survivors or cargo found.", urgency="MEDIUM"},
      {desc="Reports of hallucinations from Skoll illusions undermine morale among fortress guards.", urgency="LOW"}
    }
  },

  -- 2 Major from New South Jangsong
  ["Skýrophos"] = {
    events = {
      {desc="Quartz cliff blockade orchestrated by insurgents, harbor access cut off.", urgency="HIGH"},
      {desc="Alterbulb illusions weaponized by rogue alchemists to disorient city patrols.", urgency="MEDIUM"},
      {desc="Pirate outfit hijacks fishing fleet, ransoms entire haul of pufferfish.", urgency="HIGH"},
      {desc="Criminal syndicate triggers blast at the Suncliffs, burying strategic vantage towers.", urgency="CRITICAL"},
      {desc="Merchants found stockpiling contraband quartz bombs, black market uncovered.", urgency="LOW"},
      {desc="A petrified official etched with black magic runes discovered, sabotage suspected.", urgency="HIGH"},
      {desc="Main cargo of Alterbulb lumber stolen, local economy near collapse.", urgency="MEDIUM"},
      {desc="Religious zealots declare independence, seizing a central government outpost by force.", urgency="MEDIUM"},
      {desc="Amphibious raiders attack coastal guard posts under cover of darkness.", urgency="LOW"},
      {desc="Massive sinkhole in city center reveals arms cache for insurgent cells.", urgency="CRITICAL"}
    }
  },

  ["Bjornopolis"] = {
    events = {
      {desc="Armed smugglers seize the floating market, crippling all trade in the city core.", urgency="HIGH"},
      {desc="Rival guild confrontation escalates into lethal shootouts on the upper terraces.", urgency="MEDIUM"},
      {desc="Fissures under city foundations lead to a suspected rebel hideout, skirmishes ensue.", urgency="HIGH"},
      {desc="Merchant guild revolt surrounds city hall, declares independence from the crown.", urgency="CRITICAL"},
      {desc="Tainted mead kills dozens, inciting violent uprisings for scarce antidotes.", urgency="MEDIUM"},
      {desc="Bijarian Leopards forcibly released by animal-rights extremists, city watch unprepared.", urgency="LOW"},
      {desc="Altar of Songs artifact stolen, fueling a new insurgent militia’s recruitment drives.", urgency="HIGH"},
      {desc="Ex-soldiers occupy the harbor, demanding extortion fees from all incoming vessels.", urgency="CRITICAL"},
      {desc="Mysterious nighttime kidnappings along the old canal blamed on rumor-laden 'Whispering Falls' cult.", urgency="HIGH"},
      {desc="Street illusions provoke panic, roving mobs clash with law enforcement, chaos spreads.", urgency="LOW"}
    }
  },

  -- 2 Minor from New South Jangsong
  ["Pelagia"] = {
    events = {
      {desc="Saltsteppes trade routes sabotaged by heavily armed raiders, commerce paralyzed.", urgency="HIGH"},
      {desc="Bassarid relic smugglers reported to be amassing weapon stockpiles in hidden dunes.", urgency="MEDIUM"},
      {desc="Melusine cult lures caravans into ambush sites with false rescue signals.", urgency="LOW"},
      {desc="Tainted well near city gates kills travelers, extremist sabotage suspected.", urgency="HIGH"},
      {desc="Mass toxic exposure in the old fortress, multiple casualties, sabotage likely.", urgency="LOW"},
      {desc="Armed bandits intercept inbound traders, forcibly conscripting new recruits.", urgency="MEDIUM"},
      {desc="Hatch Ministry loyalists seize an abandoned outpost, kidnapping local ranchers.", urgency="HIGH"},
      {desc="Ravenous locust-like predators unleashed on farmland, rumored biological weapon.", urgency="CRITICAL"},
      {desc="Camel ranchers threaten armed rebellion unless city invests in protective garrisons.", urgency="MEDIUM"},
      {desc="Key supply depots vanish after forced eviction, entire region starves, city in crisis.", urgency="CRITICAL"}
    }
  },

  ["Norsolyra"] = {
    events = {
      {desc="Wisp cult forcibly occupies a city quarter, enthralling residents with mind-altering rituals.", urgency="HIGH"},
      {desc="Armed raiders disrupt Noctic-Rabrev harvest, risking mass starvation or disease spread.", urgency="HIGH"},
      {desc="Ghostly illusions lure entire squads into Tarnand Fjord, no survivors found.", urgency="LOW"},
      {desc="Militant smugglers wage turf war over Wisp Rice monopoly, crossfire kills civilians.", urgency="MEDIUM"},
      {desc="Normark saboteurs demolish protective levees, severe flooding imminent in farmland. (Removed weather? Let's keep it minimal: 'in farmland' but no floods details)", urgency="HIGH"},
      {desc="Citywide hysteria triggered by Alperkin dream plague, violent riots erupt.", urgency="CRITICAL"},
      {desc="Rival wisp cult leaders engage in armed standoffs over sacrificial conflicts.", urgency="MEDIUM"},
      {desc="Pirates disguised as pilgrims loot city arsenal, capturing advanced Noctic weapon prototypes.", urgency="HIGH"},
      {desc="Corrupt officials extort worshipers for wisp offerings, standoff escalates with armed believers.", urgency="LOW"},
      {desc="Maritime illusions sabotage shipping lanes, bankrupting local trade guilds overnight.", urgency="MEDIUM"}
    }
  },

  -- 2 Major from Haifan Bassaridia
  ["Keybir-Aviv"] = {
    events = {
      {desc="Heavily armed bandits intercept diamond transport near Lake Morovia, all guards missing.", urgency="HIGH"},
      {desc="Radical Stripping Path sect seizes the coral markets, killing multiple officials.", urgency="MEDIUM"},
      {desc="Organized theft spree collapses a key trade route, city commerce on brink of ruin.", urgency="HIGH"},
      {desc="Exposed Diamond Corp conspirators attempt to coup the city council with mercenaries.", urgency="LOW"},
      {desc="A Hermes cult calls for mass blood sacrifice, terrorizing outlying hamlets.", urgency="CRITICAL"},
      {desc="Diamond forgery ring triggers widespread panic, mass arrests spark violent backlash.", urgency="HIGH"},
      {desc="Reef serpents used as living weapons by local warlords, farmland forced to evacuate.", urgency="MEDIUM"},
      {desc="Suspected pirate bombs destroy multiple warehouses, plunging city into chaos.", urgency="HIGH"},
      {desc="Council crackdown on extremist Stripping Path offshoot triggers armed street battles.", urgency="MEDIUM"},
      {desc="Solar phenomenon unsettles populace, extremist prophets incite riot at city docks.", urgency="LOW"}
    }
  },

  ["Tel-Amin"] = {
    events = {
      {desc="Naval blockade orchestrated by rival states traps supply ships, risk of famine soared.", urgency="CRITICAL"},
      {desc="Pirate king abducts key merchant heirs, demands city pay crippling ransom.", urgency="HIGH"},
      {desc="Underground crypt finds mermaid tomb, artifacts cursed to cause mental collapse citywide.", urgency="LOW"},
      {desc="Host Spirit fanatics torch older Stripping Path temples, unleashing citywide violence.", urgency="MEDIUM"},
      {desc="Mass pilgrimage from Mylecia saturates local defenses, infiltration suspected among crowds.", urgency="HIGH"},
      {desc="Coordination sabotage topples essential trade outposts, severe resource shortages imminent.", urgency="CRITICAL"},
      {desc="Fortress gate toll revolt escalates, heavily armed smugglers exchanging fire with city guard.", urgency="HIGH"},
      {desc="Rebel zealots sabotage roads with makeshift explosives, halting all commerce.", urgency="MEDIUM"},
      {desc="Cryptic doomsday prophecy triggers panic, extremist groups seize a prominent temple.", urgency="LOW"},
      {desc="Undersea caverns rumored to harbor a rogue warlord’s submarine base, threatening coastal traffic.", urgency="MEDIUM"}
    }
  },

  -- 2 Minor from Haifan Bassaridia
  ["Thermosalem"] = {
    events = {
      {desc="A geyser-like eruption hits the city’s main spa district, multiple scalded victims missing.", urgency="HIGH"},
      {desc="Violent brawl erupts at the only major clinic, pilgrims demanding priority treatment.", urgency="MEDIUM"},
      {desc="An extremist group threatens to contaminate the hot springs with toxic chemicals, blackmailing city officials.", urgency="CRITICAL"},
      {desc="Rival herbalist factions stage armed raids on each other’s storerooms, medical shortage looms.", urgency="LOW"},
      {desc="Shadowy cult kidnaps spa guests for sacrificial rites in sealed-off bathhouse tunnels.", urgency="MEDIUM"},
      {desc="Tampered water supply kills dozens, suspected terror plot within city’s spa facilities.", urgency="HIGH"},
      {desc="Old-guard priests forcibly clash with progressive mystics over control of major springs.", urgency="MEDIUM"},
      {desc="Unexplainable illusions in dawn steam cause civilians to vanish, rumored arcane kidnappings.", urgency="LOW"},
      {desc="Suspicious collapse of the city’s prized glass spa dome, rescue teams under attack by unknown assailants.", urgency="HIGH"},
      {desc="Mineral deposits vanish from sealed vault, fueling a black-market profiteering ring, chaos erupts.", urgency="CRITICAL"}
    }
  },

  ["Akróstadium"] = {
    events = {
      {desc="High-ranking War League officers revolt, forcibly arresting novice commanders in the stadium.", urgency="HIGH"},
      {desc="A hidden conspiracy unleashes lethal toxins in monastery dormitories, dozens incapacitated.", urgency="CRITICAL"},
      {desc="Rampaging Water Buffalo sabotage training grounds, security squads pinned down.", urgency="HIGH"},
      {desc="Widespread sheep cull demanded after evidence of a bio-engineered plague emerges.", urgency="MEDIUM"},
      {desc="Showcase duel ends in bloodshed; saboteurs kill a revered war champion mid-performance.", urgency="HIGH"},
      {desc="Bassarid militants seize Temple of Kan Zen, forcing mass conversions under threat.", urgency="MEDIUM"},
      {desc="Armed stable-hands spark citywide panic, brandishing stolen weapon prototypes.", urgency="LOW"},
      {desc="Secret coup plot discovered in old crypts, conspirators heavily armed, possibly staging siege.", urgency="CRITICAL"},
      {desc="Rock barrier on city road booby-trapped, supply convoys severely delayed, possible insider sabotage.", urgency="MEDIUM"},
      {desc="Midnight ‘war-god invocation’ triggers violent mania among stadium recruits, chaos reigns.", urgency="LOW"}
    }
  },
}

-------------------------------------------------------------------------------
-- (D) BUILD A WIKITABLE (AUTO-UPDATING) FOR ONE EVENT PER DAY
--     Using day-based seeding so it doesn't change on every page load.
-------------------------------------------------------------------------------
function p.makeTable()
    -- 1) Get the date info.
    local dateInfo = getPSSCDate()
    local seed = dateInfo.year * 1000 + dateInfo.dayOfYear  -- stable daily seed
    math.randomseed(seed)

    -- 2) Start building the table.
    local lines = {}
    table.insert(lines, '{| class="wikitable"')
    table.insert(lines, '! Date !! City !! Event !! Urgency')

    -- 3) For each city, do the 60% 'No reports' or pick from 10 events.
    for cityName, data in pairs(cityData) do
        local chance = math.random()
        if chance < 0.60 then
            table.insert(lines, '|-')
            table.insert(lines, '| ' .. dateInfo.text .. ' || ' .. cityName .. ' || No reports || N/A')
        else
            local pick = math.random(#data.events)
            local e = data.events[pick]
            table.insert(lines, '|-')
            table.insert(lines, '| ' .. dateInfo.text .. ' || ' .. cityName .. ' || ' .. e.desc .. ' || ' .. e.urgency)
        end
    end

    table.insert(lines, '|}')
    return table.concat(lines, '\n')
end

return p