Module:BassaridianDailyEvents
From MicrasWiki
Documentation for this module may be created at Module:BassaridianDailyEvents/doc
-------------------------------------------------------------------------------
-- Module: DailyTableFixed
-- Purpose:
-- Provide a daily-updating table of events for 12 specified cities,
-- with a single bracket-leveled block comment to avoid nested bracket errors.
-------------------------------------------------------------------------------
local p = {}
-------------------------------------------------------------------------------
-- (A) STORING THE FULL CITY DESCRIPTIONS IN A SINGLE BLOCK COMMENT
-- WITH LEVEL 2 BRACKETS: --[==[ ... ]==]
-------------------------------------------------------------------------------
--[==[
==========================
== BASSARIDIA VAERINGHEIM
==========================
== Major Cities (3) ==
1) Vaeringheim
2) Luminaria
3) Serena
=== Vaeringheim ===
Vaeringheim is the oldest major city in the region surrounding Lake Morovia...
[All of Vaeringheim’s text goes here, verbatim — no summarizing or omitting.]
=== Luminaria ===
Luminaria is a unique city situated in the eastern reaches of the Plains of Vaeringheim...
[All Luminaria text, verbatim.]
=== Serena ===
Built atop the ruins of a Normarkian military outpost, Serena is a city located in far...
[All Serena text, verbatim.]
=====================
== Minor Cities (3) ==
1) Saluria
2) Aetherium
3) Ferrum Citadel
=== Saluria ===
Saluria, nestled in the eastern reaches of the Gloom Forest of Perpetual Autumn...
[All Saluria text, verbatim.]
=== Aetherium ===
Aetherium, situated in the furthest reaches of the snowy Northern Highlands...
[All Aetherium text, verbatim.]
=== Ferrum Citadel ===
Ferrum Citadel, located in the high desert of far western Bassaridia Vaeringheim...
[All Ferrum Citadel text, verbatim.]
===========================
== NEW SOUTH JANGSONG
===========================
== Major Cities (2) ==
1) Skýrophos
2) Bjornopolis
=== Skýrophos ===
Skýrophos is a prominent city in the Normarkian region of New South Jangsong...
[All Skýrophos text, verbatim.]
=== Bjornopolis ===
Bjornopolis is a thriving city, known for its rich Normarkian heritage...
[All Bjornopolis text, verbatim.]
== Minor Cities (2) ==
1) Pelagia
2) Norsolyra
=== Pelagia ===
Pelagia is a unique city originally established by Bassarid military forces...
=== Norsolyra ===
Norsolyra is a captivating city known for its unique blend of Alperkin spiritual heritage...
===========================
== HAIFAN BASSARIDIA
===========================
== Major Cities (2) ==
1) Keybir-Aviv
2) Tel-Amin
=== Keybir-Aviv ===
Keybir-Aviv is a historic city located near the eastern shore of Lake Morovia...
=== Tel-Amin ===
Tel-Amin is a historic city located near the western shore of the Southern Strait of Haifa...
== Minor Cities (2) ==
1) Thermosalem
2) Akróstadium
=== Thermosalem ===
Thermosalem is a serene city renowned for its natural hot springs...
=== Akróstadium ===
Akróstadium is a small, fortified city originally established as a monastery...
[==] -- Notice this won't close the comment yet (we use two equal signs)
We end the block comment properly below:
]==]
-------------------------------------------------------------------------------
-- (B) SIMPLE PSSC DATE FUNCTION
-------------------------------------------------------------------------------
local function getPSSCDate()
-- We define a baseline date:
local start = os.time{year=1999, month=8, day=6}
local now = os.time()
local daysSince = math.floor((now - start) / 86400)
-- 183-day year:
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 DRAMATIC EVENTS EACH
-- 60% chance = "No reports," else pick an event
-------------------------------------------------------------------------------
local cityData = {
-- 3 Major from Bassaridia Vaeringheim
["Vaeringheim"] = {
events = {
{desc="Massive canal lock malfunction floods downtown markets.", urgency="HIGH"},
{desc="Spectral Normark apparitions haunt the old fortress at dusk.", urgency="MEDIUM"},
{desc="Religious riots over conflicting Thalassa worship rites.", urgency="CRITICAL"},
{desc="A cryptic plague strikes fish in Lake Morovia.", urgency="HIGH"},
{desc="General Port officials arrested for corruption scandal.", urgency="HIGH"},
{desc="Temple Bank invests in radical city expansion plans.", urgency="MEDIUM"},
{desc="Ancient relic stolen from Reformed Stripping Path shrine.", urgency="HIGH"},
{desc="Rumors swirl of a Triton descendant stirring local politics.", urgency="LOW"},
{desc="Bridge collapse during festival parade causes chaos.", urgency="CRITICAL"},
{desc="Pirate infiltration rumored near the outer city wharves.", urgency="HIGH"}
}
},
["Luminaria"] = {
events = {
{desc="Flash sandstorm disrupts travelers near Conclave Illuminara.", urgency="MEDIUM"},
{desc="Subterranean labyrinth collapses after mild quake.", urgency="HIGH"},
{desc="Nomadic Alperkin herders clash with city guard over grazing rights.", urgency="MEDIUM"},
{desc="Tea house conflagration threatens archives of Aurora Mystica.", urgency="HIGH"},
{desc="Mass illumination festival ends in bizarre luminous fungus outbreak.", urgency="LOW"},
{desc="Local ranchers brandish relics claimed to be Tarsica's gifts.", urgency="MEDIUM"},
{desc="Disturbing visions plague pilgrims at dawn ceremonies.", urgency="LOW"},
{desc="Burglars sabotage Onceanic Boot Company’s best rhino-hides.", urgency="HIGH"},
{desc="Strange chanting from hidden tunnels under city temples.", urgency="LOW"},
{desc="Rival priestesses duel publicly over rightful relic custody.", urgency="CRITICAL"}
}
},
["Serena"] = {
events = {
{desc="Morovian insurgents raid supply routes in the Ismaelean Mountains.", urgency="HIGH"},
{desc="Avalanche buries a caravan near Normarkian ruins.", urgency="CRITICAL"},
{desc="Mystic meltdown at Harmony Sanctum disrupts city peace.", urgency="MEDIUM"},
{desc="Violent garganram stampede ravages farmland.", urgency="HIGH"},
{desc="Sectarian riots break out over newly found relics of Micras.", urgency="CRITICAL"},
{desc="Trade dispute with Ferrum Citadel escalates tensions.", urgency="MEDIUM"},
{desc="Minor earthquake unearths a cursed Normark tomb.", urgency="HIGH"},
{desc="Rogue druid attempts to harness Ismaelean winds destructively.", urgency="MEDIUM"},
{desc="Forest fires trap merchants on city outskirts.", urgency="HIGH"},
{desc="Eerie chanting near the Daughters of Micras alarms watchmen.", urgency="LOW"}
}
},
-- 3 Minor from Bassaridia Vaeringheim
["Saluria"] = {
events = {
{desc="Blight on Horehound fields threatens Sanctum Vitalis revenue.", urgency="MEDIUM"},
{desc="Ritual chanting at Temple of Sacred Horehound stirs panic.", urgency="LOW"},
{desc="Haunting flute melodies lure travelers astray in the Gloom Forest.", urgency="LOW"},
{desc="Suspicious fires ravage Salurian apothecaries at midnight.", urgency="HIGH"},
{desc="Pilgrims overwhelm city’s healers in search of miracle cures.", urgency="MEDIUM"},
{desc="Alperkin druids claim dream-visions from Plateau, spark vigil.", urgency="LOW"},
{desc="Medicine supply lines blocked by roving brigands demanding tolls.", urgency="MEDIUM"},
{desc="Unexplained sinkholes swallow entire orchard near city walls.", urgency="HIGH"},
{desc="Vermin infestation strikes the Temple of Plateau's archives.", urgency="LOW"},
{desc="High priestess found unconscious at Fount Evander; sabotage suspected.", urgency="CRITICAL"}
}
},
["Aetherium"] = {
events = {
{desc="Camel stampede damages Temple Alabaster walls.", urgency="HIGH"},
{desc="Blizzard strands Normarkian herders in subzero passes.", urgency="CRITICAL"},
{desc="Avalanche jeopardizes vital hot springs for spiritual tourism.", urgency="HIGH"},
{desc="Clandestine cult rumored to worship Ivory in forbidden ice caves.", urgency="LOW"},
{desc="Blacksmiths run out of Rift Harpy feathers for advanced forging.", urgency="MEDIUM"},
{desc="Mystic lights dance across snowy peaks at midnight.", urgency="LOW"},
{desc="Camel Herders protest new taxes, block key trade roads.", urgency="MEDIUM"},
{desc="Priests clash with Alperkin mystics over purity rites.", urgency="MEDIUM"},
{desc="Visionary child channels Selene’s voice, draws pilgrims.", urgency="LOW"},
{desc="Sabotage leaves caravans stranded in the highlands.", urgency="CRITICAL"}
}
},
["Ferrum Citadel"] = {
events = {
{desc="Court of the Ironclad organizes huge martial parade, alarming loyalists.", urgency="HIGH"},
{desc="Sandstorm cripples fortress defenses in the high desert.", urgency="CRITICAL"},
{desc="Ferrum Mosquitos contaminate city water supply.", urgency="HIGH"},
{desc="War profiteers smuggle stolen arms from Morovian insurgents.", urgency="HIGH"},
{desc="Fenrir devotees riot over new taxes on mercenary contracts.", urgency="MEDIUM"},
{desc="Lightning storm blasts fortress ramparts, injures dozens.", urgency="CRITICAL"},
{desc="Iron mining breakdown leads to forging shortfall.", urgency="MEDIUM"},
{desc="Sectarian disputes among Fenrir worshipers over succession.", urgency="LOW"},
{desc="Entire caravan vanishes near rocky outcrops, no survivors.", urgency="MEDIUM"},
{desc="Phantasms of Skoll spook city guard on nightly patrols.", urgency="LOW"}
}
},
-- 2 Major from New South Jangsong
["Skýrophos"] = {
events = {
{desc="Quartz cliff collapse traps ships in harbor.", urgency="HIGH"},
{desc="Alterbulb illusions confuse a visiting Haifan delegation, risking diplomacy.", urgency="MEDIUM"},
{desc="Renegade pirates raid fishing vessels for prized pufferfish.", urgency="HIGH"},
{desc="Suncliffs crack under heatwave, toppling lookout towers.", urgency="CRITICAL"},
{desc="Merchants brawl over magical quartz amulets claims.", urgency="LOW"},
{desc="Normarkian aristocrat found petrified at Suncliffs’ edge.", urgency="HIGH"},
{desc="Alterbulb shipments halt over forest contamination fears.", urgency="MEDIUM"},
{desc="Acolytes claim 'Spirit of the Cliffs' calls for secession.", urgency="MEDIUM"},
{desc="Strange sea life sightings spark aquatic beast rumors.", urgency="LOW"},
{desc="Earth tremors open a sinkhole in the main bazaar.", urgency="CRITICAL"}
}
},
["Bjornopolis"] = {
events = {
{desc="Sirenian Falls overflow, flooding lower terraces.", urgency="HIGH"},
{desc="Market skirmish breaks out over sphinx moth silk prices.", urgency="MEDIUM"},
{desc="Deep rumbles reveal caverns under city foundations.", urgency="HIGH"},
{desc="Merchant guild revolt threatens city council authority.", urgency="CRITICAL"},
{desc="Mead-laced potions appear illegally, raising health alarms.", urgency="MEDIUM"},
{desc="Bijarian Ring-Tailed Leopards spotted near forest edges.", urgency="LOW"},
{desc="Stolen relic from Altar of Songs surfaces on black market.", urgency="HIGH"},
{desc="Renegade ex-soldiers blockade the harbor, demanding ransoms.", urgency="CRITICAL"},
{desc="Fabled 'Whispering Falls' phenomenon causes fisherman vanishings.", urgency="HIGH"},
{desc="Street performers chaos with illusions mimicking garganrams.", urgency="LOW"}
}
},
-- 2 Minor from New South Jangsong
["Pelagia"] = {
events = {
{desc="Saltsteppes caravans vanish, fueling sabotage fears.", urgency="HIGH"},
{desc="Bassarid relics found by Normarkian camel herders spark land disputes.", urgency="MEDIUM"},
{desc="Winds of Melusine produce unsettling dissonant music for days.", urgency="LOW"},
{desc="Poisoned oasis discovered near city gates, rumored smugglers at fault.", urgency="HIGH"},
{desc="Mass fainting at the old Bassarid fortress stirs talk of war curses.", urgency="LOW"},
{desc="Migrating traders petition city for safe Saltsteppes passage.", urgency="MEDIUM"},
{desc="Hatch Ministry loyalists attempt to reoccupy deserted outpost violently.", urgency="HIGH"},
{desc="Carnivorous desert locust plague devastates oasis farmland.", urgency="CRITICAL"},
{desc="Camel ranchers demand expansions for seasonal caravans.", urgency="MEDIUM"},
{desc="Earth tremor topples supply warehouse, risking resource conflict.", urgency="CRITICAL"}
}
},
["Norsolyra"] = {
events = {
{desc="Midnight rites channel deadly will o’ wisps into the city.", urgency="HIGH"},
{desc="Veinscour Marsh storms isolate Noctic-Rabrev plantations.", urgency="HIGH"},
{desc="Ghostly lights lure travelers to vanish in Tarnand Fjord.", urgency="LOW"},
{desc="Smuggling ring busted for trafficking Wisp Rice illegally.", urgency="MEDIUM"},
{desc="Normarkian raiders sabotage dikes, flooding farmland at marsh edge.", urgency="HIGH"},
{desc="Mass dream plague shares the same Alperkin demon visage.", urgency="CRITICAL"},
{desc="Feud among wisp cult leaders on sacrificial practices breaks out.", urgency="MEDIUM"},
{desc="Pirates disguised as pilgrims loot prized Noctic goods storerooms.", urgency="HIGH"},
{desc="Corrupt officials caught pocketing will o’ wisp offerings.", urgency="LOW"},
{desc="Illusions in Tarnand Fjord divert merchant ships astray.", urgency="MEDIUM"}
}
},
-- 2 Major from Haifan Bassaridia
["Keybir-Aviv"] = {
events = {
{desc="Diamond traders vanish on Lake Morovia’s shore, suspected bandits.", urgency="HIGH"},
{desc="Stripping Path traditionalists clash with local authorities in coral markets.", urgency="MEDIUM"},
{desc="Monsoon floods cut roads linking coral farmland to the port.", urgency="HIGH"},
{desc="Hidden vault reveals earliest Wallis-Haifan Diamond Corp. records.", urgency="LOW"},
{desc="Rival cults battle for Hermes’s prime temple, citywide unrest grows.", urgency="CRITICAL"},
{desc="Spike in diamond forgeries undermines local economy.", urgency="HIGH"},
{desc="Venomous reef serpents threaten outlying farms in Coral Woodlands.", urgency="MEDIUM"},
{desc="Warehouse fires spark sabotage conspiracy by rumored pirates.", urgency="HIGH"},
{desc="Council debates cutting ties with radical Stripping Path offshoots.", urgency="MEDIUM"},
{desc="A mysterious eclipse halts shipping for an entire day.", urgency="LOW"}
}
},
["Tel-Amin"] = {
events = {
{desc="Naval blockades erupt, crippling overland routes along the Southern Strait.", urgency="CRITICAL"},
{desc="Pirate lord demands tribute from local merchants, claiming Ismael Hatch’s legacy.", urgency="HIGH"},
{desc="Coral skeleton expansions yield hidden mermaid fossils near outskirts.", urgency="LOW"},
{desc="Host Spirit cult clashes with older Stripping Path in fiery sermon feud.", urgency="MEDIUM"},
{desc="Pilgrimage from Mylecia overwhelms Tel-Amin's lodgings, unrest ensues.", urgency="HIGH"},
{desc="Severe storms topple Apollo shrines along the coastline.", urgency="CRITICAL"},
{desc="Fortress gate taxes anger smugglers, blockade threatened.", urgency="HIGH"},
{desc="Rebel zealots sabotage roads, halting agricultural shipments.", urgency="MEDIUM"},
{desc="Cryptic runestone warns Tel-Amin of doom if no Haifan reconciliation is done.", urgency="LOW"},
{desc="Mysterious humming in underwater caverns suggests awakening sea spirits.", urgency="MEDIUM"}
}
},
-- 2 Minor from Haifan Bassaridia
["Thermosalem"] = {
events = {
{desc="New hot spring emerges violently, flooding established bathhouses.", urgency="HIGH"},
{desc="Pilgrims swarm city for rumored cures, overwhelming local clinics.", urgency="MEDIUM"},
{desc="Unstable seismic activity fractures main thermal reservoir.", urgency="CRITICAL"},
{desc="Herbalists feud over newly found healing moss near steam vents.", urgency="LOW"},
{desc="Midnight chanting in abandoned bathhouse hints extremist cult activity.", urgency="MEDIUM"},
{desc="Flash floods contaminate half the city’s pristine hot springs.", urgency="HIGH"},
{desc="Old-guard priests clash with progressive mystics over hydrotherapy rites.", urgency="MEDIUM"},
{desc="Ghostly apparitions at dawn float across largest pool, puzzling onlookers.", urgency="LOW"},
{desc="Suspected sabotage collapses prized spa dome at peak hours.", urgency="HIGH"},
{desc="Mineral deposit shortage stalls biggest resort expansions, economic crisis.", urgency="CRITICAL"}
}
},
["Akróstadium"] = {
events = {
{desc="Veteran War League officers clash with novices at grand stadium drill.", urgency="HIGH"},
{desc="Violent storm undermines old fortress-era monastery walls.", urgency="CRITICAL"},
{desc="Morovian Water Buffalo rampage across training grounds, damaging city defenses.", urgency="HIGH"},
{desc="Sheep plague devastates flocks, threatening pastoral economy.", urgency="MEDIUM"},
{desc="Showcase duel ends in tragedy after sabotage discovered.", urgency="HIGH"},
{desc="Bassarid devotees invade Temple of Kan Zen demanding martial blessings.", urgency="MEDIUM"},
{desc="Windblown embers spark hillside stable blaze, calling for better firefighting.", urgency="LOW"},
{desc="Military conspirators rumored plotting coup in old monastery crypts.", urgency="CRITICAL"},
{desc="Rockslide blocks main road, cutting ranchers from city markets.", urgency="MEDIUM"},
{desc="Eerie midnight chanting echoes around the stadium, fueling war-god myths.", urgency="LOW"}
}
}
}
-------------------------------------------------------------------------------
-- (D) BUILD A WIKITABLE (AUTO-UPDATING), 60% "No reports" per city
-------------------------------------------------------------------------------
function p.makeTable()
math.randomseed(os.time()) -- daily random
local dateString = getPSSCDate()
local output = {}
table.insert(output, '{| class="wikitable"')
table.insert(output, '! Date !! City !! Event !! Urgency')
for cityName, data in pairs(cityData) do
local rnd = math.random()
if rnd < 0.60 then
table.insert(output, '|-')
table.insert(output, '| ' .. dateString .. ' || ' .. cityName .. ' || No reports || N/A')
else
local possible = data.events
local pick = math.random(#possible)
local chosen = possible[pick]
table.insert(output, '|-')
table.insert(output,
'| ' .. dateString
.. ' || ' .. cityName
.. ' || ' .. chosen.desc
.. ' || ' .. chosen.urgency
)
end
end
table.insert(output, '|}')
return table.concat(output, '\n')
end
return p