Getting Started: Difference between revisions

From Ardenfall Wiki
Jump to navigation Jump to search
Created page with "TODO"
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
TODO
[IN PROGRESS]
 
=== Mod Structure ===
Here is the suggested structure for your Mod. Technically the only requirement is the mod_metadata.txt file being in the root directory of your mod.
Ardenfall_Data 
    StreamingAssets
      Mods
        YourModDirectory
            mod_metadata.txt
            mod_manifest.txt
            Assets
              Textures
                  yourtexture.png
            Scripts
              yourscript.cs
 
=== Mod Metadata ===
The mod metadata file defines some top level values for your mod.
 
modName: The name displayed to the user
 
modAuthor: The author displayed to the user. Can be empty or multiple names, whatever.
 
modId: The ID used by the modding system. Make sure this is unique - if two mods have the same id, they can't both be activated. You can use a GUID like the example below, or just write an id you think no one would use. The Mod Template Builder also auto generates this id.
 
modDescription: The description displayed to the user. Can be empty.
 
modVersion: A version string (must be in a format supported by [https://learn.microsoft.com/en-us/dotnet/api/system.version?view=netframework-4.8.1 C#'s Version], such as "1", "1.0", or "3.2.7".<syntaxhighlight lang="json">
{
    "modName": "Example Mod",
    "modAuthor": "joshcamas",
    "modId": "f5c4ccca-87ab-40ed-8731-1e19aa17ab66",
    "modDescription": "A simple mod that showcases a very simple scripting setup.",
    "modVersion": "0.0.1"
}
 
</syntaxhighlight>
 
=== Mod Asset Manifest ===
You can define assets to import via the mod_manifest.txt file within your mod directory.
 
See [[Custom Asset Importing|Custom Asset Importing.]]
 
=== Mod Scripts ===
You can define C# scripts to be run within the Scripts directory, within your mod directory.
 
See [[Mod Scripting|Mod Scripting.]]
 
=== Mod Template Builder ===
The Mod Template Builder tool allows you to create a mod starting point easily. It also includes the generation of a .csproj file, which will let you create scripts while referencing the actual codebase of ardenfall that mods have access to.
 
Run the application ModTemplateBuilder.exe within your ardenfall's installation directory, and follow the prompts.
 
The mod will be created in Ardenfall_Data/StreamingAssets/Mods.

Latest revision as of 21:10, 21 May 2026

[IN PROGRESS]

Mod Structure

Here is the suggested structure for your Mod. Technically the only requirement is the mod_metadata.txt file being in the root directory of your mod.

Ardenfall_Data  
   StreamingAssets
     Mods
        YourModDirectory
           mod_metadata.txt
           mod_manifest.txt
           Assets
              Textures
                 yourtexture.png
           Scripts
              yourscript.cs

Mod Metadata

The mod metadata file defines some top level values for your mod.

modName: The name displayed to the user

modAuthor: The author displayed to the user. Can be empty or multiple names, whatever.

modId: The ID used by the modding system. Make sure this is unique - if two mods have the same id, they can't both be activated. You can use a GUID like the example below, or just write an id you think no one would use. The Mod Template Builder also auto generates this id.

modDescription: The description displayed to the user. Can be empty.

modVersion: A version string (must be in a format supported by C#'s Version, such as "1", "1.0", or "3.2.7".

{
    "modName": "Example Mod",
    "modAuthor": "joshcamas",
    "modId": "f5c4ccca-87ab-40ed-8731-1e19aa17ab66",
    "modDescription": "A simple mod that showcases a very simple scripting setup.",
    "modVersion": "0.0.1"
}

Mod Asset Manifest

You can define assets to import via the mod_manifest.txt file within your mod directory.

See Custom Asset Importing.

Mod Scripts

You can define C# scripts to be run within the Scripts directory, within your mod directory.

See Mod Scripting.

Mod Template Builder

The Mod Template Builder tool allows you to create a mod starting point easily. It also includes the generation of a .csproj file, which will let you create scripts while referencing the actual codebase of ardenfall that mods have access to.

Run the application ModTemplateBuilder.exe within your ardenfall's installation directory, and follow the prompts.

The mod will be created in Ardenfall_Data/StreamingAssets/Mods.