Module:BassaridianDailyEvents
From MicrasWiki
Documentation for this module may be created at Module:BassaridianDailyEvents/doc
-------------------------------------------------------------------------------
-- Module: DailyTable
-- Purpose:
-- 1) Preserve exactly 12 city descriptions (verbatim) in a bracket-leveled
-- comment, with no omission or summary.
-- 2) Re-write the city event texts so each is serious enough to possibly need
-- 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.
-------------------------------------------------------------------------------
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 ("Day %d of Year %d PSSC"):format(dayOfYear, psscYear)
end
-------------------------------------------------------------------------------
-- (C) DEFINING 12 CITIES WITH 10 POSSIBLE SERIOUS EVENTS, 60% NO REPORTS
-------------------------------------------------------------------------------
local cityData = {
-- 3 Major from Bassaridia Vaeringheim
["Vaeringheim"] = {
events = {
{
desc="Heavily armed extremist group storms the canal lock, flooding downtown markets.",
urgency="HIGH"
},
{
desc="Organized Normark loyalists occupy the old fortress, threatening city patrols.",
urgency="HIGH"
},
{
desc="Full-blown religious riots over conflicting Thalassa worship rites, dozens wounded.",
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"
},
}
},
["Luminaria"] = {
events = {
{
desc="Massive sandstorm traps hundreds near Conclave Illuminara, criminals roam freely.",
urgency="HIGH"
},
{
desc="Violent quake collapses part of the subterranean labyrinth, pilgrims buried.",
urgency="HIGH"
},
{
desc="Alperkin herders blockade city gates with armed barricades over grazing disputes.",
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"
},
}
},
["Serena"] = {
events = {
{
desc="Large Morovian insurgent force seizes an outlying settlement in the Ismaelean Mountains.",
urgency="HIGH"
},
{
desc="Avalanche engulfs Normarkian historical site, militia rescue fails.",
urgency="CRITICAL"
},
{
desc="Radical druids overrun Harmony Sanctum in a violent takeover.",
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"
},
}
},
-- 3 Minor from Bassaridia Vaeringheim
["Saluria"] = {
events = {
{
desc="Nighttime raids torch Horehound fields, crippling Sanctum Vitalis finance.",
urgency="MEDIUM"
},
{
desc="Armed cultists seize Temple of Sacred Horehound, hostages taken.",
urgency="HIGH"
},
{
desc="Ambush sites set via strange flute melodies, luring caravans into Gloom Forest traps.",
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"
},
}
},
["Aetherium"] = {
events = {
{
desc="A rebel camel cavalry raids Temple Alabaster, heavy damage reported.",
urgency="HIGH"
},
{
desc="Blizzard traps an entire Normarkian regiment, rescue convoys ambushed.",
urgency="CRITICAL"
},
{
desc="Avalanche devastates hot springs, cutting crucial water supply.",
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"
},
}
},
["Ferrum Citadel"] = {
events = {
{
desc="Court of the Ironclad forms an unsanctioned army, region-wide alarm triggered.",
urgency="HIGH"
},
{
desc="Fierce sandstorm wrecks fortress defenses, marauders close in.",
urgency="CRITICAL"
},
{
desc="Mutated Ferrum Mosquitos swarm residential zones, injecting lethal toxins.",
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"
},
}
},
-- 2 Major from New South Jangsong
["Skýrophos"] = {
events = {
{
desc="Quartz cliff collapse blocks harbor, raiders exploit the city’s vulnerability.",
urgency="HIGH"
},
{
desc="Alterbulb illusions ensnare Haifan ambassador’s entourage, risking crisis.",
urgency="MEDIUM"
},
{
desc="Renegade pirates seize fishing fleet laden with valuable pufferfish.",
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"
},
}
},
["Bjornopolis"] = {
events = {
{
desc="Sirenian Falls overflow, drowning a military checkpoint in the terraces.",
urgency="HIGH"
},
{
desc="Armed smugglers clash at floating market over sphinx moth silk prices.",
urgency="MEDIUM"
},
{
desc="Caverns collapse beneath city foundations, swallowing entire block.",
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"
},
}
},
-- 2 Minor from New South Jangsong
["Pelagia"] = {
events = {
{
desc="Saltsteppes caravans ambushed by heavily armed raiders, city supplies at risk.",
urgency="HIGH"
},
{
desc="Bassarid relic smugglers stockpile weapons in desert hideouts.",
urgency="MEDIUM"
},
{
desc="Discordant Melusine winds spawn lethal dust devils destroying caravans.",
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"
},
}
},
["Norsolyra"] = {
events = {
{
desc="Will o’ wisp cult forcibly takes over city quarter, enthralling residents.",
urgency="HIGH"
},
{
desc="Incessant storms flood Noctic-Rabrev fields, city faces mass famine.",
urgency="HIGH"
},
{
desc="Ghostly lights lure entire caravans into Tarnand Fjord; no survivors.",
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"
},
}
},
-- 2 Major from Haifan Bassaridia
["Keybir-Aviv"] = {
events = {
{
desc="Heavily armed bandits eliminate a diamond convoy near Lake Morovia’s shore.",
urgency="HIGH"
},
{
desc="Stripping Path radicals seize coral markets, holding officials hostage.",
urgency="MEDIUM"
},
{
desc="Monsoon floods isolate entire districts, widespread looting ensues.",
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"
},
}
},
["Tel-Amin"] = {
events = {
{
desc="Naval blockades trap supply convoys, famine imminent in Tel-Amin.",
urgency="CRITICAL"
},
{
desc="Pirate lord kidnaps merchant heirs, demands hefty tribute in Ismael Hatch’s name.",
urgency="HIGH"
},
{
desc="Expanding coral skeletons reveal mermaid tomb, rumored plague unleashed.",
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"
},
}
},
-- 2 Minor from Haifan Bassaridia
["Thermosalem"] = {
events = {
{
desc="New geyser blasts boiling water into city streets, scalding residents.",
urgency="HIGH"
},
{
desc="Pilgrims riot for miracle cures, city guards overwhelmed at clinic entrances.",
urgency="MEDIUM"
},
{
desc="Seismic upheaval threatens to obliterate main thermal reservoir, risk of massive flood.",
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"
},
}
},
["Akróstadium"] = {
events = {
{
desc="War League officers openly mutiny against novice commanders, city in chaos.",
urgency="HIGH"
},
{
desc="Tornadic storms ravage the old monastery walls, leaving Akróstadium exposed.",
urgency="CRITICAL"
},
{
desc="Morovian Water Buffalo breach outer defenses, injuring dozens of civilians.",
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"
},
}
},
}
-------------------------------------------------------------------------------
-- (D) BUILD A WIKITABLE (AUTO-UPDATING), 60% "No reports"
-------------------------------------------------------------------------------
function p.makeTable()
math.randomseed(os.time())
local dateString = getPSSCDate()
local lines = {}
table.insert(lines, '{| class="wikitable"')
table.insert(lines, '! Date !! City !! Event !! Urgency')
for cityName, data in pairs(cityData) do
local chance = math.random()
-- 60% = "No reports"
if chance < 0.60 then
table.insert(lines, '|-')
table.insert(lines, '| ' .. dateString .. ' || ' .. cityName .. ' || No reports || N/A')
else
local pick = math.random(#data.events)
local e = data.events[pick]
table.insert(lines, '|-')
table.insert(lines,
'| ' .. dateString
.. ' || ' .. cityName
.. ' || ' .. e.desc
.. ' || ' .. e.urgency
)
end
end
table.insert(lines, '|}')
return table.concat(lines, '\n')
end
return p