<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://story.dsserv.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ASettlement</id>
	<title>Module:Settlement - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://story.dsserv.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ASettlement"/>
	<link rel="alternate" type="text/html" href="https://story.dsserv.net/index.php?title=Module:Settlement&amp;action=history"/>
	<updated>2026-05-06T15:05:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://story.dsserv.net/index.php?title=Module:Settlement&amp;diff=29&amp;oldid=prev</id>
		<title>Dubhghlas: Dubhghlas moved page Module:Infobox settlement to Module:Settlement without leaving a redirect: Simplification.</title>
		<link rel="alternate" type="text/html" href="https://story.dsserv.net/index.php?title=Module:Settlement&amp;diff=29&amp;oldid=prev"/>
		<updated>2025-05-04T02:49:51Z</updated>

		<summary type="html">&lt;p&gt;Dubhghlas moved page &lt;a href=&quot;/index.php?title=Module:Infobox_settlement&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:Infobox settlement (page does not exist)&quot;&gt;Module:Infobox settlement&lt;/a&gt; to &lt;a href=&quot;/index.php/Module:Settlement&quot; title=&quot;Module:Settlement&quot;&gt;Module:Settlement&lt;/a&gt; without leaving a redirect: Simplification.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:49, 4 May 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Dubhghlas</name></author>
	</entry>
	<entry>
		<id>https://story.dsserv.net/index.php?title=Module:Settlement&amp;diff=14&amp;oldid=prev</id>
		<title>Dubhghlas: Created page with &quot;-- Module:Settlement -- Provides enhanced functionality for settlement infoboxes  local p = {}  -- Main entry point for the module function p.infobox(frame)     local args = frame.args          -- If called via #invoke, get the args from the parent frame     if not args or not args[1] then         args = frame:getParent().args     end          -- Initialize HTML output     local html = mw.html.create()          -- Create the main infobox container     local infobox = htm...&quot;</title>
		<link rel="alternate" type="text/html" href="https://story.dsserv.net/index.php?title=Module:Settlement&amp;diff=14&amp;oldid=prev"/>
		<updated>2025-05-04T00:00:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- Module:Settlement -- Provides enhanced functionality for settlement infoboxes  local p = {}  -- Main entry point for the module function p.infobox(frame)     local args = frame.args          -- If called via #invoke, get the args from the parent frame     if not args or not args[1] then         args = frame:getParent().args     end          -- Initialize HTML output     local html = mw.html.create()          -- Create the main infobox container     local infobox = htm...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module:Settlement&lt;br /&gt;
-- Provides enhanced functionality for settlement infoboxes&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Main entry point for the module&lt;br /&gt;
function p.infobox(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Initialize HTML output&lt;br /&gt;
    local html = mw.html.create()&lt;br /&gt;
    &lt;br /&gt;
    -- Create the main infobox container&lt;br /&gt;
    local infobox = html:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;infoboxFrame&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    -- Add the title&lt;br /&gt;
    local name = args.name or &amp;#039;Settlement Name&amp;#039;&lt;br /&gt;
    local color = args.color or &amp;#039;#bcd&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;infoboxHeadTitle&amp;#039;)&lt;br /&gt;
        :css(&amp;#039;background-color&amp;#039;, color)&lt;br /&gt;
        :wikitext(name)&lt;br /&gt;
    &lt;br /&gt;
    -- Add image if provided&lt;br /&gt;
    if args.image then&lt;br /&gt;
        local imageDiv = infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
            :addClass(&amp;#039;infoboxImage&amp;#039;)&lt;br /&gt;
        &lt;br /&gt;
        imageDiv:wikitext(string.format(&amp;#039;[[File:%s|300px|%s]]&amp;#039;, args.image, name))&lt;br /&gt;
        &lt;br /&gt;
        if args.caption then&lt;br /&gt;
            imageDiv:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
                :addClass(&amp;#039;infoboxCaption&amp;#039;)&lt;br /&gt;
                :wikitext(args.caption)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Function to add a simple row&lt;br /&gt;
    local function addRow(label, value)&lt;br /&gt;
        if value and value ~= &amp;#039;&amp;#039; then&lt;br /&gt;
            local row = infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
                :addClass(&amp;#039;infoboxRow&amp;#039;)&lt;br /&gt;
            &lt;br /&gt;
            row:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
                :addClass(&amp;#039;infoboxLabel&amp;#039;)&lt;br /&gt;
                :wikitext(label)&lt;br /&gt;
            &lt;br /&gt;
            row:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
                :addClass(&amp;#039;infoboxData&amp;#039;)&lt;br /&gt;
                :wikitext(value)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Function to add a section header&lt;br /&gt;
    local function addSection(title)&lt;br /&gt;
        infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
            :addClass(&amp;#039;infoboxSubheader&amp;#039;)&lt;br /&gt;
            :wikitext(title)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Add basic information&lt;br /&gt;
    addRow(&amp;#039;Nickname&amp;#039;, args.nickname)&lt;br /&gt;
    if args.motto then&lt;br /&gt;
        local row = infobox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
            :addClass(&amp;#039;infoboxRow&amp;#039;)&lt;br /&gt;
        &lt;br /&gt;
        row:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
            :addClass(&amp;#039;infoboxLabel&amp;#039;)&lt;br /&gt;
            :wikitext(&amp;#039;Motto&amp;#039;)&lt;br /&gt;
        &lt;br /&gt;
        row:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
            :addClass(&amp;#039;infoboxData&amp;#039;)&lt;br /&gt;
            :css(&amp;#039;font-style&amp;#039;, &amp;#039;italic&amp;#039;)&lt;br /&gt;
            :wikitext(args.motto)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Location section&lt;br /&gt;
    addSection(&amp;#039;Location&amp;#039;)&lt;br /&gt;
    addRow(&amp;#039;Type&amp;#039;, args.type)&lt;br /&gt;
    addRow(&amp;#039;Region&amp;#039;, args.region)&lt;br /&gt;
    addRow(&amp;#039;Continent&amp;#039;, args.continent)&lt;br /&gt;
    addRow(&amp;#039;World&amp;#039;, args.world)&lt;br /&gt;
    addRow(&amp;#039;Coordinates&amp;#039;, args.coordinates)&lt;br /&gt;
    &lt;br /&gt;
    -- Government section&lt;br /&gt;
    addSection(&amp;#039;Government&amp;#039;)&lt;br /&gt;
    addRow(&amp;#039;Government&amp;#039;, args.government)&lt;br /&gt;
    addRow(&amp;#039;Sovereign&amp;#039;, args.sovereign)&lt;br /&gt;
    addRow(&amp;#039;Governor&amp;#039;, args.governor)&lt;br /&gt;
    addRow(&amp;#039;Founded&amp;#039;, args.founded)&lt;br /&gt;
    &lt;br /&gt;
    -- Demographics section&lt;br /&gt;
    addSection(&amp;#039;Demographics&amp;#039;)&lt;br /&gt;
    addRow(&amp;#039;Population&amp;#039;, args.population)&lt;br /&gt;
    addRow(&amp;#039;Demographics&amp;#039;, args.demographics)&lt;br /&gt;
    addRow(&amp;#039;Social Classes&amp;#039;, args.socialclasses)&lt;br /&gt;
    &lt;br /&gt;
    -- Geography section&lt;br /&gt;
    addSection(&amp;#039;Geography&amp;#039;)&lt;br /&gt;
    addRow(&amp;#039;Elevation&amp;#039;, args.elevation)&lt;br /&gt;
    addRow(&amp;#039;Geographic&amp;lt;br&amp;gt;Features&amp;#039;, args.geography)&lt;br /&gt;
    addRow(&amp;#039;Districts&amp;#039;, args.districts)&lt;br /&gt;
    addRow(&amp;#039;Landmarks&amp;#039;, args.landmarks)&lt;br /&gt;
    &lt;br /&gt;
    -- Economy section&lt;br /&gt;
    addSection(&amp;#039;Economy&amp;#039;)&lt;br /&gt;
    addRow(&amp;#039;Economy&amp;#039;, args.economy)&lt;br /&gt;
    addRow(&amp;#039;Currency&amp;#039;, args.currency)&lt;br /&gt;
    addRow(&amp;#039;Main Exports&amp;#039;, args.exports)&lt;br /&gt;
    &lt;br /&gt;
    -- Transportation section&lt;br /&gt;
    if args.transportation then&lt;br /&gt;
        addSection(&amp;#039;Transportation&amp;#039;)&lt;br /&gt;
        addRow(&amp;#039;Transport&amp;#039;, args.transportation)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Culture section&lt;br /&gt;
    addSection(&amp;#039;Culture&amp;#039;)&lt;br /&gt;
    addRow(&amp;#039;Major Factions&amp;#039;, args.factions)&lt;br /&gt;
    addRow(&amp;#039;Dominant Faith&amp;#039;, args.faith)&lt;br /&gt;
    addRow(&amp;#039;Cultural&amp;lt;br&amp;gt;Institutions&amp;#039;, args.institutions)&lt;br /&gt;
    &lt;br /&gt;
    -- Climate section&lt;br /&gt;
    if args.climate then&lt;br /&gt;
        addSection(&amp;#039;Climate&amp;#039;)&lt;br /&gt;
        addRow(&amp;#039;Climate&amp;#039;, args.climate)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Custom fields&lt;br /&gt;
    if args.custom1name then&lt;br /&gt;
        addRow(args.custom1name, args.custom1value or &amp;#039;&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    if args.custom2name then&lt;br /&gt;
        addRow(args.custom2name, args.custom2value or &amp;#039;&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    if args.custom3name then&lt;br /&gt;
        addRow(args.custom3name, args.custom3value or &amp;#039;&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Return the completed HTML&lt;br /&gt;
    return tostring(html)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Function to generate a list of settlements based on a category&lt;br /&gt;
function p.listFromCategory(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local category = args.category or &amp;#039;Settlements&amp;#039;&lt;br /&gt;
    local limit = tonumber(args.limit) or 100&lt;br /&gt;
    &lt;br /&gt;
    local settlements = mw.site.stats.pagesInCategory(category, &amp;#039;page&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    local html = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;settlement-list&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    local count = 0&lt;br /&gt;
    for _, settlement in ipairs(settlements) do&lt;br /&gt;
        if count &amp;gt;= limit then break end&lt;br /&gt;
        &lt;br /&gt;
        html:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
            :addClass(&amp;#039;settlement-item&amp;#039;)&lt;br /&gt;
            :wikitext(string.format(&amp;#039;* [[%s]]&amp;#039;, settlement.title))&lt;br /&gt;
        &lt;br /&gt;
        count = count + 1&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return tostring(html)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Function to find nearest settlements based on coordinates&lt;br /&gt;
function p.findNearest(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local originName = args.origin or frame:preprocess(&amp;#039;{{PAGENAME}}&amp;#039;)&lt;br /&gt;
    local limit = tonumber(args.limit) or 5&lt;br /&gt;
    &lt;br /&gt;
    -- This is a placeholder function that would need to be implemented based on&lt;br /&gt;
    -- how you store and retrieve geographical coordinates in your wiki&lt;br /&gt;
    -- For now, we&amp;#039;ll just return a message&lt;br /&gt;
    &lt;br /&gt;
    return &amp;quot;Function to find nearest settlements would be implemented here based on how your wiki stores geographical data.&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Advanced search function for settlements with specific attributes&lt;br /&gt;
function p.search(frame)&lt;br /&gt;
    local args = frame.args&lt;br /&gt;
    &lt;br /&gt;
    -- If called via #invoke, get the args from the parent frame&lt;br /&gt;
    if not args or not args[1] then&lt;br /&gt;
        args = frame:getParent().args&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- This is a placeholder function that would need to be implemented based on&lt;br /&gt;
    -- how you store and search for settlement attributes in your wiki&lt;br /&gt;
    -- For now, we&amp;#039;ll just return a message&lt;br /&gt;
    &lt;br /&gt;
    return &amp;quot;Settlement search function would be implemented here based on your wiki&amp;#039;s data structure.&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Dubhghlas</name></author>
	</entry>
</feed>