Module:VaeringheimGossip

From MicrasWiki
Revision as of 22:35, 25 December 2024 by NewZimiaGov (talk | contribs)
Jump to navigationJump to search

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

local p = {}

function p.getCurrentDate()
    local startDate = os.time({year = 1999, month = 8, day = 6})
    local secondsInDay = 86400
    local daysPerYear = 183

    local currentDate = os.time()
    local totalDaysElapsed = math.floor((currentDate - startDate) / secondsInDay)

    local yearFraction = totalDaysElapsed / daysPerYear
    local psscYear = math.floor(yearFraction)
    local dayOfYear = math.floor((yearFraction - psscYear) * daysPerYear) + 1

    local month, dayInMonth
    if dayOfYear <= 61 then
        month = "Atosiel"
        dayInMonth = dayOfYear
    elseif dayOfYear <= 122 then
        month = "Thalassiel"
        dayInMonth = dayOfYear - 61
    else
        month = "Opsitheiel"
        dayInMonth = dayOfYear - 122
    end

    local dateInfo = {
        year = psscYear,
        month = month,
        day = dayInMonth
    }

    return dateInfo
end

function p.generateGossip()
    local npcs = {
        {name = "Amar Sefar", role = "Canal Dockworker", company = "Lake Morovia Blockade Fund", cult = "Ordo Solis Invicti", description = "A burly man with weathered skin, always wearing a wide-brimmed hat to shield himself from the sun."},
        {name = "Liora Eoseth", role = "Merchant of Silks", company = "Market Hanavusu", cult = "Order of Aurora Mystica", description = "A petite woman with sharp features and flowing auburn hair, known for her vibrant robes."},
        {name = "Tahir Morion", role = "Priest of the Host Spirit", company = "Temple Bank of the Reformed Stripping Path", cult = "Ordo Solis Invicti", description = "A tall, solemn man with a shaved head and piercing green eyes."},
        {name = "Kala Inephra", role = "Goldsmith", company = "Shï Collective", cult = "Guild of Golden Shadows", description = "A middle-aged woman with nimble fingers and a streak of silver in her jet-black hair."},
        {name = "Nadir Alphon", role = "Tavern Keeper", company = "Ale of the Night Central Brewery", cult = "Mystery of Red Mirth", description = "A stout man with a booming laugh and a thick mustache."},
        {name = "Elina Voraith", role = "Fisherwoman", company = "Suncliff Fisheries", cult = "Azure Sentinel Sect", description = "A lean, tanned woman with a perpetual smell of saltwater and a streak of mischief in her smile."},
        {name = "Darin Ilphas", role = "Caravan Guard", company = "East Keltian Iron Company", cult = "Court of the Ironclad", description = "A rugged man with a scar across his cheek and a protective demeanor."},
        {name = "Saira Lineth", role = "Student of the Arts", company = "La Sái Ebile", cult = "Reverie Nebulous", description = "A dreamy young woman with ink-stained fingers and a penchant for painting sunsets."},
        {name = "Marik Troven", role = "Historian", company = "Temple University of Delphica", cult = "Conclave Illuminara", description = "A wiry man with spectacles perpetually sliding down his nose and a satchel full of scrolls."},
        {name = "Zia Falorin", role = "Street Performer", company = "Maritime Guild of the Cult of Maskmakers", cult = "Harmony Sanctum", description = "A flamboyant figure with a painted face and a penchant for acrobatics."},
        {name = "Vera Myrian", role = "Apothecary", company = "Salurian Temple of Sacred Horehound", cult = "Mystery of the Verdant Embrace", description = "A serene woman with gentle eyes and a belt full of pouches and vials."},
        {name = "Torin Velar", role = "Blacksmith", company = "East Keltian Iron Company", cult = "Court of the Ironclad", description = "A burly man with soot-streaked arms and a hammer that rarely leaves his side."},
        {name = "Ilari Draven", role = "Architect", company = "Thalassian Granite Export Cooperative", cult = "Guild of Golden Shadows", description = "A meticulous man with a monocle and a leather-bound notebook always in hand."},
        {name = "Nina Iseth", role = "Trader", company = "Gladeseed Farmers' Union", cult = "Harmony Sanctum", description = "A shrewd woman with sharp eyes and a knack for bartering."},
        {name = "Orin Lareth", role = "Boat Builder", company = "Lake Morovia Blockade Fund", cult = "Azure Sentinel Sect", description = "A stocky man with calloused hands and a deep tan."},
        {name = "Rina Fahl", role = "Chef", company = "Ale of the Night Central Brewery", cult = "Mystery of Red Mirth", description = "A jovial woman with a round face and a knack for making people smile with her cooking."},
        {name = "Khalid Fenra", role = "Scholar", company = "Temple University of Delphica", cult = "Reverie Nebulous", description = "A lanky man with a dreamy expression and a habit of muttering to himself."},
        {name = "Evanor Tyreth", role = "Carpenter", company = "East Keltian Timber Company", cult = "Sylvan Fellowship", description = "A wiry man with a saw always slung over his shoulder and a warm smile."},
        {name = "Sorin Althis", role = "Guard Captain", company = "Baratar Corporation", cult = "Court of the Ironclad", description = "A stoic man with a commanding presence and a deep, gravelly voice."},
        {name = "Leona Veyar", role = "Painter", company = "Shï Collective", cult = "Order of Aurora Mystica", description = "A vibrant woman with paint-splattered clothing and a sparkle in her eye."},
        {name = "Dariel Voss", role = "Bard", company = "La Sái Ebile", cult = "Reverie Nebulous", description = "A charismatic performer with a lute slung over his back and a song always ready."},
        {name = "Hirin Velas", role = "Jeweler", company = "Shï Collective", cult = "Guild of Golden Shadows", description = "A quiet man with steady hands and a love for intricate designs."},
        {name = "Zorin Kael", role = "Weaver", company = "Seamstresses of Rouge", cult = "Harmony Sanctum", description = "A tall man with a calm demeanor and a knack for creating intricate patterns."},
        {name = "Linara Theros", role = "Tea House Keeper", company = "Market Hanavusu", cult = "Mystery of the Verdant Embrace", description = "A warm woman with a welcoming smile and a deep knowledge of herbal teas."},
        {name = "Karim Jorath", role = "Fisherman", company = "Suncliff Fisheries", cult = "Azure Sentinel Sect", description = "A jovial man with a love for storytelling and a passion for the sea."},
        {name = "Mira Elvor", role = "Librarian", company = "Temple University of Delphica", cult = "Conclave Illuminara", description = "A meticulous woman with an ever-present pair of reading glasses and a soft voice."},
        {name = "Rivan Pharos", role = "Trader", company = "Gladeseed Farmers' Union", cult = "Harmony Sanctum", description = "A shrewd trader with a sharp mind and a ready smile."},
        {name = "Talia Meren", role = "Herbalist", company = "Salurian Temple of Sacred Horehound", cult = "Mystery of the Verdant Embrace", description = "A serene woman with a deep knowledge of plants and their uses."},
        {name = "Elanor Trayn", role = "Storyteller", company = "La Sái Ebile", cult = "Reverie Nebulous", description = "An older woman with a rich voice and a treasure trove of tales."}
    }

    local gossip = {
        "The canals have seen fewer Morovian Rainbow Birds this season—some say it's an omen of change.",
        "Gold prices in the General Port are skyrocketing; whispers of a new trade route opening abound.",
        "A secretive cult was spotted performing rituals near the Tomb of Styx.",
        "The Shï Collective's latest sculptures fetch unimaginable prices in the markets.",
        "Fishermen claim the Atterian Armored Pufferfish are growing larger this year, likely due to new hatchery practices.",
        "Vaeringheim’s canal system is rumored to be expanded with a new section linking it directly to the eastern sea routes.",
        "The annual Regatta Festival in Vaeringheim has seen an influx of competitors from neighboring regions.",
        "A rare sighting of a Somniant Eidolon near Lake Morovia has captivated the city’s mystics.",
        "The newly restored statue of Atos in the city square has become a pilgrimage site.",
        "Residents complain about increasing water taxes as the city council funds new trade initiatives.",
        "A popular street bard’s ballad about the Host Spirit has gone viral among the youth.",
        "A new shipment of rare spices from Luminaria has made its way to Vaeringheim’s bustling market district.",
        "The Shï Collective has unveiled a new exhibit featuring golden masks inspired by the Reformed Stripping Path.",
        "Local sailors swear they’ve seen glowing lights under the water near the canal’s western edge.",
        "The Guild of Golden Shadows is rumored to be recruiting new members from the artisan district.",
        "The canals are unusually busy this week as a major trade deal with Symphonara is underway.",
        "Artisans in Vaeringheim are racing to complete decorations for the upcoming Lightfall Festival.",
        "Residents report an increase in crime near the General Port, prompting calls for increased patrols.",
        "An eccentric inventor has proposed a steam-powered barge system for the canals.",
        "Temple Bank priests have begun holding nightly vigils for better trade winds in Lake Morovia.",
        "A newly discovered cavern beneath the city may hold ancient relics tied to the Host Spirit.",
        "Vaeringheim’s taverns are packed as sailors gather to celebrate their latest successful voyages.",
        "A historian claims the architecture in Vaeringheim’s temples holds hidden messages about the city’s founding.",
        "Residents speculate about the mysterious disappearance of several goods from the artisan market.",
        "A rogue trader was caught selling counterfeit Shï Collective art pieces.",
        "Fishermen claim a sudden increase in the size of their hauls—an unexpected boon during lean times.",
        "Caravan leaders are urging the city council to improve the roads leading to Vaeringheim.",
        "A sudden bloom of phosphorescent plants in the eastern marshes has sparked curiosity among herbalists.",
        "Vaeringheim’s weavers are working on a tapestry depicting the legend of Styx for the central library.",
        "The Azure Sentinel Sect has announced an open blessing ceremony at the Host Spirit Temple this weekend.",
        "Rumors circulate that a new type of enchanted jewelry is being developed by the Shï Collective.",
        "A local alchemist claims to have found a new use for Atterian Armored Pufferfish scales in medicine.",
        "Fishermen report strange weather patterns over Lake Morovia, stoking superstitions about the Host Spirit.",
        "The city council has allocated additional funds to preserve Vaeringheim’s iconic canal bridges.",
        "A young painter has captured the essence of the Lightfall Festival in a new mural near the docks.",
        "The Merchant’s Guild is holding an emergency meeting to discuss rising tariffs from Luminaria.",
        "A famed historian’s lecture on the Morovian Frontier Campaign drew record crowds at the central square.",
        "Vaeringheim’s famous tea houses are experimenting with new blends incorporating regional herbs.",
        "Pilgrims traveling to Vaeringheim have reported seeing visions of the Host Spirit in their dreams.",
        "The city watch has detained smugglers attempting to move artifacts from the Host Spirit Temple.",
        "Vaeringheim’s renowned musicians are preparing for a symphony honoring the Reformed Stripping Path.",
        "A controversial new play about Chrysos premiered at the main theater and sparked heated debates.",
        "Residents of the northern district have reported sightings of ghostly apparitions near the canals.",
        "The annual lantern lighting ceremony in honor of the Host Spirit saw its largest crowd yet this year."
    }

    local dateInfo = p.getCurrentDate()
    local news = {}

    for i = 1, 100 do
        local npc = npcs[math.random(#npcs)]
        local story = gossip[math.random(#gossip)]
        local entry = string.format(
            "Date: %d %s, %s PSSC | Reporter: %s (%s, %s, %s) | Gossip: %s",
            dateInfo.day,
            dateInfo.month,
            dateInfo.year,
            npc.name,
            npc.role,
            npc.company,
            npc.cult,
            story
        )
        table.insert(news, entry)
    end

    return news
end

function p.generate(frame)
    local gossip = p.generateGossip()
    local output = ""

    for _, entry in ipairs(gossip) do
        output = output .. "* " .. entry .. "\n"
    end

    return output
end

return p