<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.polymorph.games/foundation/modding/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.polymorph.games/foundation/modding/feed.php">
        <title>Foundation - Modding Documentation</title>
        <description></description>
        <link>https://www.polymorph.games/foundation/modding/</link>
        <image rdf:resource="https://www.polymorph.games/foundation/modding/_media/wiki/dokuwiki.svg" />
       <dc:date>2026-04-21T12:59:39+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/changelog?rev=1776264095&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/class-info?rev=1771887572&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/custom-data?rev=1771886967&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/custom-building-function?rev=1771885208&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/custom-asset?rev=1771885158&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/mod-management-functions?rev=1771884158&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/mod-io-functions?rev=1771883641&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/version-library?rev=1771883614&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/foundation-library-functions?rev=1771883590&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/debugging-mods?rev=1771883570&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/texture-usage-policy?rev=1771883559&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/example-mods?rev=1771883545&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.polymorph.games/foundation/modding/_media/wiki/dokuwiki.svg">
        <title>Foundation - Modding Documentation</title>
        <link>https://www.polymorph.games/foundation/modding/</link>
        <url>https://www.polymorph.games/foundation/modding/_media/wiki/dokuwiki.svg</url>
    </image>
    <item rdf:about="https://www.polymorph.games/foundation/modding/changelog?rev=1776264095&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-15T14:41:35+00:00</dc:date>
        <dc:creator>mathieu (mathieu@undisclosed.example.com)</dc:creator>
        <title>changelog - 1.11.0.17</title>
        <link>https://www.polymorph.games/foundation/modding/changelog?rev=1776264095&amp;do=diff</link>
        <description>Changelog

Foundation Full Release (1.11)

	*  Full Changelog
	*  1.11.0.17 Changelog
	*  1.11.0.14 Changelog
	*  1.11.0.12 Changelog
	*  1.11.0.8 Changelog

Foundation 1.10

	*  Full Changelog
	*  1.10.3.12 Changelog
	*  1.10.3.11 Changelog
	*  1.10.3.10 Changelog
	*  1.10.3.8 Changelog
	*  1.10.3.6 Changelog
	*  1.10.3.4 Changelog
	*  1.10.3.3 Changelog
	*  1.10.3.1 Changelog
	*  1.10.2.15 modding 4 Changelog
	*  1.10.2.15 modding 3 Changelog
	*  1.10.2.15 modding 2 Changelog

Foundation 1.9

…</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/class-info?rev=1771887572&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T22:59:32+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>class-info</title>
        <link>https://www.polymorph.games/foundation/modding/class-info?rev=1771887572&amp;do=diff</link>
        <description>Class Info

This is a table defining a custom class to be registered with the mod:registerClass() function.


{
    TypeName = &quot;MY_TYPE_NAME&quot;,
    ParentType = &quot;ASSET&quot;,
    Properties = {
        { Name = &quot;Property1&quot;, Type = &quot;string&quot;, Default = &quot;SomeString&quot; },
        { Name = &quot;Property2&quot;, Type = &quot;list&lt;RESOURCE_QUANTITY_PAIR&gt;&quot; },
        { Name = &quot;Property3&quot;, Type = &quot;integer&quot;, Default = 1, Flags = { &quot;SAVE_GAME&quot; } }
    }
    
}</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/custom-data?rev=1771886967&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T22:49:27+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>custom-data - [Step 1: Defining a DATA Object using a Lua Table] </title>
        <link>https://www.polymorph.games/foundation/modding/custom-data?rev=1771886967&amp;do=diff</link>
        <description>DATA classes are the most basic type in Foundation that all other types are based on.

For reference all available pure DATA classes can be found in this section of the API.

Creating &amp; Using a Custom DATA Object

Step 1: Defining a DATA Object using a Lua Table</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/custom-building-function?rev=1771885208&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T22:20:08+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>custom-building-function</title>
        <link>https://www.polymorph.games/foundation/modding/custom-building-function?rev=1771885208&amp;do=diff</link>
        <description>BUILDING_FUNCTION classes are registerable types in Foundation that define what purpose  a certain BUILDING_PART will serve in the game.

For reference all available BUILDING_FUNCTION classes can be found in this section of the API.

Creating &amp; Using a Custom BUILDING_FUNCTION

Step 1: Defining a BUILDING_FUNCTION Class using a Lua Table</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/custom-asset?rev=1771885158&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T22:19:18+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>custom-asset - [Step 1: Defining an ASSET Object using a Lua Table] </title>
        <link>https://www.polymorph.games/foundation/modding/custom-asset?rev=1771885158&amp;do=diff</link>
        <description>ASSET classes are the basic registerable types in Foundation.

For reference all available ASSET classes can be found in this section of the API.

Creating &amp; Using a Custom ASSET Object

Step 1: Defining an ASSET Object using a Lua Table

To create a custom ASSET object we will need to make use of the</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/mod-management-functions?rev=1771884158&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T22:02:38+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>mod-management-functions - [registerClass] </title>
        <link>https://www.polymorph.games/foundation/modding/mod-management-functions?rev=1771884158&amp;do=diff</link>
        <description>Mod Management Functions

All these functions are available on your mod object

dofile

Loads and runs a Lua script

Returns the file&#039;s return values

[...] myMod:dofile(scriptPath [, args...])
 Name  Type  Description  scriptPath  string  the relative path to the file, inside the mod directory</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/mod-io-functions?rev=1771883641&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T21:54:01+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>mod-io-functions</title>
        <link>https://www.polymorph.games/foundation/modding/mod-io-functions?rev=1771883641&amp;do=diff</link>
        <description>Mod IO Functions

All these functions are available on your mod object

fileExists

Checks if a file exists in the mod directory.

Returns true if the file is inside the mod directory and exists, false otherwise

boolean myMod:fileExists(filePath)
 Name</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/version-library?rev=1771883614&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T21:53:34+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>version-library</title>
        <link>https://www.polymorph.games/foundation/modding/version-library?rev=1771883614&amp;do=diff</link>
        <description>Version Library

cmp

Compare two version numbers

Returns:

	*  0 if version1 == version2
	*  -1 if version1 &lt; version2
	*  1 if version1 &gt; version2

integer version.cmp(version1, version2)
 Name  Type  Description  version1  string    version2  string</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/foundation-library-functions?rev=1771883590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T21:53:10+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>foundation-library-functions</title>
        <link>https://www.polymorph.games/foundation/modding/foundation-library-functions?rev=1771883590&amp;do=diff</link>
        <description>Foundation Library Functions

createMod

Creates and returns a new mod

void foundation.createMod()

----------

isModEnabled

Checks if a mod is enabled

Returns true if the mod is found and it is enabled, false otherwise

boolean foundation.isModEnabled</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/debugging-mods?rev=1771883570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T21:52:50+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>debugging-mods</title>
        <link>https://www.polymorph.games/foundation/modding/debugging-mods?rev=1771883570&amp;do=diff</link>
        <description>Debugging Mods

Lua development environments can be configured to debug Foudation mods.

Debuggee script

The first step in debugging a mod is to setup the chosen debugger in the VM. This cannot be done by the mod scripts themselves as it requires escaping the sandbox they operate in; the required setup must be placed in a special</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/texture-usage-policy?rev=1771883559&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T21:52:39+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>texture-usage-policy</title>
        <link>https://www.polymorph.games/foundation/modding/texture-usage-policy?rev=1771883559&amp;do=diff</link>
        <description>Game Texture Usage Policy

Game textures may be called into a mod, this has the advantage of easily adopting the Foundation art style whilst also preventing copyright infringement.

This method also has the added benefit of optimizing texture usage in the game engine by not duplicating textures.</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/example-mods?rev=1771883545&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T21:52:25+00:00</dc:date>
        <dc:creator>polymorphgames (polymorphgames@undisclosed.example.com)</dc:creator>
        <title>example-mods</title>
        <link>https://www.polymorph.games/foundation/modding/example-mods?rev=1771883545&amp;do=diff</link>
        <description>Example Mods

You can find the example mods in your Foundation installation directory, under the mods folder.

Example - Simple

This example mod shows the basic structure of a Foundation mod and can be used as boilerplate code for getting started

Example - Mithril Factory</description>
    </item>
</rdf:RDF>
