<?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-16T08:53:34+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/annotations?rev=1660661794&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/api?rev=1776263957&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/asset-override?rev=1569532189&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/assets?rev=1776263957&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/behavior-trees?rev=1627574192&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/building-asset-processor?rev=1751040933&amp;do=diff"/>
                <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/communityapi?rev=1651485458&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/components?rev=1594218068&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/construction-steps?rev=1634837286&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/custom-building-function?rev=1771885208&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/custom-classes?rev=1648600595&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/data-types?rev=1771883431&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/dependencies?rev=1594746929&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/enumerations?rev=1615295423&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/events?rev=1590164619&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/example-mods?rev=1771883545&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/foundation?rev=1559334563&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/guides?rev=1620659747&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/level-of-detail?rev=1588112653&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/material-sets?rev=1588113367&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/migration?rev=1693927303&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/mod-management-functions?rev=1771884158&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/monuments?rev=1569532120&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/particle-effects?rev=1569532173&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/sidebar?rev=1764178713&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/start?rev=1771883516&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/texture-pack?rev=1767644048&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/version-library?rev=1771883614&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/walls?rev=1569532161&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.polymorph.games/foundation/modding/workplaces?rev=1569532080&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/annotations?rev=1660661794&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-16T14:56:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>annotations</title>
        <link>https://www.polymorph.games/foundation/modding/annotations?rev=1660661794&amp;do=diff</link>
        <description>Annotations

Type annotations

Single-property type

A type with this annotation contains only a single serialized property. Thus, to make the syntax lighter, instantiation for this type can be done by simply providing the value of the single property.


foundation.createData({
	DataType = &quot;BUILDING_PART_COST&quot;,
	ResourceNeededList = { -- list of RESOURCE_COLLECTION_VALUE
	
		-- Can be serialized in full, like any other type
		{
			Collection = {
				{ Resource = &quot;WOOD&quot;, Quantity = 20 },
				{ Re…</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/api?rev=1776263957&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-15T14:39:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>api</title>
        <link>https://www.polymorph.games/foundation/modding/api?rev=1776263957&amp;do=diff</link>
        <description>API

Engine Core

	*  COMPONENT
	*  COMPONENT_MANAGER
	*  GAME
	*  GAME_OBJECT
	*  LEVEL

Assets Classes

	*  ABSTRACT_QUEST
	*  AGENT_NEED_TYPE
	*  AGENT_NEED_TYPE_HOUSING
	*  AGENT_NEED_TYPE_LODGING
	*  AGENT_NEED_TYPE_RESOURCE
	*  AGENT_NEED_TYPE_SOLDIER_EQUIPMENT
	*  AGENT_NEED_TYPE_SOLDIER_HEALING
	*  AGENT_NEED_TYPE_SOLDIER_TRAINING
	*  AGENT_NEED_TYPE_VISIT_BUILDING
	*  AGENT_PORTRAIT
	*  AGENT_PROFILE
	*  ASSET
	*  ASSIGNABLE_BUILDING_FUNCTION_LIST
	*  ATLAS_CELL
	*  AUDIO_EVENT
	*  BALA…</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/asset-override?rev=1569532189&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-09-26T21:09:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>asset-override</title>
        <link>https://www.polymorph.games/foundation/modding/asset-override?rev=1569532189&amp;do=diff</link>
        <description>Asset Override

All game assets (and other mods assets) can be override by mods, partially or totally.

The mod:override function should be used for that purpose.

Overriding specific values


myMod:override({
	Id = &quot;DEFAULT_BALANCING&quot;,
	InitialFamilyCount = 1,
	MinimumHappinessForLeaving = 30
})</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/assets?rev=1776263957&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-15T14:39:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>assets</title>
        <link>https://www.polymorph.games/foundation/modding/assets?rev=1776263957&amp;do=diff</link>
        <description>Assets

	*  AGENT_NEED_TYPE_HOUSING
	*  AGENT_NEED_TYPE_LODGING
	*  AGENT_NEED_TYPE_RESOURCE
	*  AGENT_NEED_TYPE_SOLDIER_HEALING
	*  AGENT_NEED_TYPE_SOLDIER_TRAINING
	*  AGENT_NEED_TYPE_VISIT_BUILDING
	*  AGENT_PROFILE
	*  ASSET
	*  ASSIGNABLE_BUILDING_FUNCTION_LIST
	*  ATLAS_CELL
	*  BALANCING
	*  BEHAVIOR_TREE
	*  BIOME_LAYER
	*  BLUEPRINT
	*  BUILDING
	*  BUILDING_FUNCTION
	*  BUILDING_GAME_CONDITION_CONFIG
	*  BUILDING_PART
	*  BUILD_MENU_CONFIG
	*  CHANGE_EDICT_MANDATE_TYPE
	*  CHANGE_PRIVI…</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/behavior-trees?rev=1627574192&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-07-29T15:56:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>behavior-trees</title>
        <link>https://www.polymorph.games/foundation/modding/behavior-trees?rev=1627574192&amp;do=diff</link>
        <description>Behavior Trees

You can find an example of behavior tree and behavior tree node creation in the following mods:

	*  Example 01 (file wooden_keep_guard_locator.lua)
	*  Example 02 (file scripts/behavior_tree.lua).

Register new behavior trees

You can now create custom behavior tree assets with</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/building-asset-processor?rev=1751040933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-06-27T16:15:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>building-asset-processor</title>
        <link>https://www.polymorph.games/foundation/modding/building-asset-processor?rev=1751040933&amp;do=diff</link>
        <description>Building Asset Processor

You can register a BUILDING_ASSET_PROCESSOR on any FBX to partially automatize the configuration of your building or monument building part nodes.

Register the asset processor on a FBX like that:


-- Apply building asset processor
mod:registerAssetProcessor(&quot;models/MithrilFactory.fbx&quot;, {
	DataType = &quot;BUILDING_ASSET_PROCESSOR&quot;
})</description>
    </item>
    <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>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>changelog</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>Anonymous (anonymous@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/communityapi?rev=1651485458&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-05-02T09:57:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>communityapi</title>
        <link>https://www.polymorph.games/foundation/modding/communityapi?rev=1651485458&amp;do=diff</link>
        <description>Community API

Foundation Extended Building Functions

Mod Dependency: Foundation EBF

----------

Data &amp; Assets

	*  GROWING_STEP_LIST
	*  UPS_OBJECT_SETUP
	*  UPS_OBJECT_SETUP_LIST

----------

Building Functions

Animations

	*  BUILDING_FUNCTION_SINGLE_DOOR
	*  BUILDING_FUNCTION_DOUBLE_DOOR
	*  BUILDING_FUNCTION_PORTCULLIS
	*  BUILDING_FUNCTION_SIMPLE_DRAWBRIDGE

Particle Emitters

	*  BUILDING_FUNCTION_ACTIVATED_PARTICLE_EMITTER
	*  BUILDING_FUNCTION_DEACTIVATED_PARTICLE_EMITTER

Resource P…</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/components?rev=1594218068&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-07-08T14:21:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>components</title>
        <link>https://www.polymorph.games/foundation/modding/components?rev=1594218068&amp;do=diff</link>
        <description>Components

Components are small modules used to define the behavior of any game object. Game objects can have any number of components, but can have only one of each type.

See the list of all available components. You can also define your own custom components.

----------

Components can be added to any FBX node with the</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/construction-steps?rev=1634837286&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-10-21T17:28:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>construction-steps</title>
        <link>https://www.polymorph.games/foundation/modding/construction-steps?rev=1634837286&amp;do=diff</link>
        <description>Construction steps

Buildings and building parts are built step by step. The construction system is based on naming.

You can specify a prefab to be used as construction visual.

The system will parse the prefab and search for objects with a name starting with</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>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>custom-asset</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/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>Anonymous (anonymous@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-classes?rev=1648600595&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-03-30T00:36:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>custom-classes</title>
        <link>https://www.polymorph.games/foundation/modding/custom-classes?rev=1648600595&amp;do=diff</link>
        <description>Custom Classes

You can define new types with the mod:registerClass function. This function allows you to create new data types, or extend existing core classes.

When you define a new type, you can assign it functions and properties. Properties are editable, usable in your type&#039;s behavior, and that can be saved in a savegame. Those properties must have a name and a type. They can also have a default value, flags, and access functions (getter and setter).</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>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>custom-data</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/data-types?rev=1771883431&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T21:50:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>data-types</title>
        <link>https://www.polymorph.games/foundation/modding/data-types?rev=1771883431&amp;do=diff</link>
        <description>Data Types

----------

boolean


local value = true


----------

integer and unsigned integer

Integer number. Cannot be negative for unsigned integers.


local value = 42


----------

float

Floating-point number with single precision


local value = 17.44</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>Anonymous (anonymous@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/dependencies?rev=1594746929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-07-14T17:15:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>dependencies</title>
        <link>https://www.polymorph.games/foundation/modding/dependencies?rev=1594746929&amp;do=diff</link>
        <description>Dependencies

Hard dependency

If your mod depends on features/content created in another mod, you can declare this other mod as a hard dependency of yours. Doing so will warn players if they try to use your mod without its dependencies.

To declare dependencies for your mod, add a</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/enumerations?rev=1615295423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-03-09T13:10:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>enumerations</title>
        <link>https://www.polymorph.games/foundation/modding/enumerations?rev=1615295423&amp;do=diff</link>
        <description>Enumerations

An enumeration (or enum) is a data type containing a set of constant values.

See the list of all available enumerations.

----------

Previously, you could only refer to enum elements as strings. For example, to define the building type of a building, you used BuildingType = “GENERAL”.

Now, all enum values are stored in their enum type&#039;s table. This allows for a more clear syntax:</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/events?rev=1590164619&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-05-22T16:23:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>events</title>
        <link>https://www.polymorph.games/foundation/modding/events?rev=1590164619&amp;do=diff</link>
        <description>Events

Some core types use events. These events can be used to run a function when a certain trigger happens on a specific object.

Triggering events

To trigger an event on an object, call this event from the chosen object. Events are designed to be triggered by their owner, and listened to by other objects.</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>Anonymous (anonymous@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>
    <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>Anonymous (anonymous@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/foundation?rev=1559334563&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-05-31T20:29:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>foundation</title>
        <link>https://www.polymorph.games/foundation/modding/foundation?rev=1559334563&amp;do=diff</link>
        <description>foundation

createMod


local myMod = foundation.createMod();</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/guides?rev=1620659747&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-05-10T15:15:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides</title>
        <link>https://www.polymorph.games/foundation/modding/guides?rev=1620659747&amp;do=diff</link>
        <description>Community Guides

Building Set-Up

	*  Adding Platform Collider to a Building
	*  Defining Building&#039;s Worker Path
	*  Having 2 Scales on the same Building
	*  Options for Workplaces
	*  How to Randomly set Doors and Windows on a Building

----------

Custom Components

	*  Computing Ground or Water Elevation at a Point
	*  Triggering Code on Villager Approaching a Point
	*  Tips on Quaternions

----------</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/level-of-detail?rev=1588112653&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-04-28T22:24:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>level-of-detail</title>
        <link>https://www.polymorph.games/foundation/modding/level-of-detail?rev=1588112653&amp;do=diff</link>
        <description>Level Of Detail

To reduce the rendering performance impact of models with high triangle counts or models with a lot of instances, Hurricane supports levels of detail (LOD). This allows models to be rendered with a different mesh at different distances to the camera.</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/material-sets?rev=1588113367&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-04-28T22:36:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>material-sets</title>
        <link>https://www.polymorph.games/foundation/modding/material-sets?rev=1588113367&amp;do=diff</link>
        <description>Material Sets

Like the church, a monument can have material sets. This means that each material (base and replacement) must be listed in your monument asset property MaterialSetList.

For each material set, all materials must be listed in the same order as their replacement:</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/migration?rev=1693927303&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-09-05T15:21:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>migration</title>
        <link>https://www.polymorph.games/foundation/modding/migration?rev=1693927303&amp;do=diff</link>
        <description>Migration Notes

Foundation 1.9.6

Trading Village

In 1.9.6, we simplified TRADING_VILLAGE&#039;s list of resources by simply requiring a list of assets.


-- OLD WAY
-- Register an addition neighbour to trade with. 
saltTrader:registerAsset({
	DataType = &quot;TRADING_VILLAGE&quot;,
	Id = SaltPrefix .. &quot;_VILLAGE_NANTES&quot;,
        Heraldry = &quot;ICON_&quot; .. CommonResourceSalt,
        Description = SaltPrefix .. &quot;_VILLAGE_NANTES_DESC&quot;,
	VillageName = &quot;Nantes&quot;,
	--RESOURCE QUANTITY PAIR
	UnlockCost = { 
		{ Resource…</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>Anonymous (anonymous@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/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>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mod-management-functions</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/monuments?rev=1569532120&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-09-26T21:08:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>monuments</title>
        <link>https://www.polymorph.games/foundation/modding/monuments?rev=1569532120&amp;do=diff</link>
        <description>Monuments

Monuments are complex buildings that let the player assemble different building parts.

The different BUILDING_CONSTRUCTOR allow to create different type of parts, like scalable tower, bridges, etc.

Here is an example of declaring a new monument, allowing a collection of building parts:</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/particle-effects?rev=1569532173&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-09-26T21:09:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>particle-effects</title>
        <link>https://www.polymorph.games/foundation/modding/particle-effects?rev=1569532173&amp;do=diff</link>
        <description>Particle Effects

PARTICLE_SYSTEM asset configure a certain type of particle system.

COMP_PARTICLE_EMITTER component is attached to a game object and emit the particle system in the scene.

COMP_PARTICLE_EMITTER_TOGGLE is a particle emitter controller that will just stop and restart the COMP_PARTICLE_EMITTER attached to the same game object when disabled / enabled. It is especially used to control particle system emission during production cycle in workplaces to avoid directly turning on and of…</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/sidebar?rev=1764178713&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-26T17:38:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sidebar</title>
        <link>https://www.polymorph.games/foundation/modding/sidebar?rev=1764178713&amp;do=diff</link>
        <description>*  Home
	*  Scripting API
	*  Assets
	*  Changelog
	*  Migration notes
	*  Community Guides
	*  Community API
	*  Texture Pack</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/start?rev=1771883516&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-02-23T21:51:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>start</title>
        <link>https://www.polymorph.games/foundation/modding/start?rev=1771883516&amp;do=diff</link>
        <description>Welcome to the Foundation Modding Wiki

Warning

Modding capabilities are very embryonic. Expect a lot of improvement and changes in the future.

This documentation is a draft with a few guidelines, it will evolve gradually with the development of modding features.</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/texture-pack?rev=1767644048&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-01-05T20:14:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>texture-pack</title>
        <link>https://www.polymorph.games/foundation/modding/texture-pack?rev=1767644048&amp;do=diff</link>
        <description>Texture Pack

Mods can reference game textures, making it easy to adopt the Foundation art style.

To support modders, Polymorph Games provides a package of watermarked textures for use in 3D software.

You can reference a Foundation texture into a mod using the texture file name, however:</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>Anonymous (anonymous@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/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>Anonymous (anonymous@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/walls?rev=1569532161&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-09-26T21:09:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>walls</title>
        <link>https://www.polymorph.games/foundation/modding/walls?rev=1569532161&amp;do=diff</link>
        <description>Walls

See WALL_CONFIG api page.

See Mod Example 02, scripts/sci_fi_wall/wall.lua.

CrenationDistance



Width



Height



UvTilingWall



UvTilingTop



WallOffsetY



CrenationOffsetY



CrenationOffsetZ</description>
    </item>
    <item rdf:about="https://www.polymorph.games/foundation/modding/workplaces?rev=1569532080&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-09-26T21:08:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>workplaces</title>
        <link>https://www.polymorph.games/foundation/modding/workplaces?rev=1569532080&amp;do=diff</link>
        <description>Workplaces

A workplace is a building containing a BUILDING_FUNCTION_WORKPLACE.

Example of declaring a workplace building function


-- Register the mithril factory extension B part
mod:register({
	DataType = &quot;BUILDING_PART&quot;,
	Id = &quot;MITHRIL_FACTORY_EXTENSION_B_ROOT_PART&quot;,
	-- [...]
	BuildingFunction = { 
		DataType = &quot;BUILDING_FUNCTION_WORKPLACE&quot;,
		WorkerCapacity = 1,
		RelatedJob = { Job = &quot;MITHRIL_ARTISAN&quot;, Behavior = &quot;WORK_BEHAVIOR&quot; },
		InputInventoryCapacity = {{ Resource = &quot;MITHRIL_ORE&quot;,…</description>
    </item>
</rdf:RDF>
