Module:BassaridianDailyEvents
From MicrasWiki
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