All Projects → xforce → Anno1800 Mod Loader

xforce / Anno1800 Mod Loader

Licence: mit
The one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML merging and Python mods.

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Anno1800 Mod Loader

XLShredLoader
A collection of mods for Skater XL that use the Unity Mod Manager (reworked from the XLShredMenu mod)
Stars: ✭ 33 (-79.5%)
Mutual labels:  modding, mod
Tremor
Tremor mod, for tModLoader Terraria
Stars: ✭ 26 (-83.85%)
Mutual labels:  mod, modding
Thunderstore
Thunderstore is a mod database and API for downloading mods. Thunderstore Discord: https://discord.gg/UWpWhjZken
Stars: ✭ 45 (-72.05%)
Mutual labels:  modding, mod
Showoff-NVSE
An NVSE plugin that adds functions and some engine-level tweaks.
Stars: ✭ 32 (-80.12%)
Mutual labels:  modding, mod
Modio Unity
Unity Plugin for integrating mod.io - a modding API for game developers
Stars: ✭ 53 (-67.08%)
Mutual labels:  mod, modding
LoS-Mod Files X
Mod Files for the Xbox 360 version of Sonic '06 mod; Legacy of Solaris.
Stars: ✭ 22 (-86.34%)
Mutual labels:  modding, mod
Dji Firmware Tools
Tools for handling firmwares of DJI products, with focus on quadcopters.
Stars: ✭ 424 (+163.35%)
Mutual labels:  modding, reverse-engineering
ME3TweaksModManager
Mod Manager for Mass Effect Original Trilogy and Mass Effect Legendary Edition
Stars: ✭ 83 (-48.45%)
Mutual labels:  modding, mod
Xoreos Tools
Tools to help the development of xoreos
Stars: ✭ 38 (-76.4%)
Mutual labels:  modding, reverse-engineering
Halomd
New demo version of Halo for the Mac.
Stars: ✭ 36 (-77.64%)
Mutual labels:  mod, reverse-engineering
factorio-example-mod
Lightweight modular example mod with various features and compatibilities
Stars: ✭ 15 (-90.68%)
Mutual labels:  modding, mod
Qmodmanager
Config based patch management for Subnautica and Subnautica: Below Zero
Stars: ✭ 78 (-51.55%)
Mutual labels:  mod, modding
EMF
Extended Mechanics & Flavor
Stars: ✭ 33 (-79.5%)
Mutual labels:  modding, mod
SMLHelper
A complete Subnautica and Subnautica: Below Zero modding library for the popular QModManager framework.
Stars: ✭ 36 (-77.64%)
Mutual labels:  modding, mod
Resource-Pack
The official repository for Faithful 32x for Minecraft: Dungeons
Stars: ✭ 16 (-90.06%)
Mutual labels:  modding, mod
MPPatch
Patch for Civilization V to allow modded multiplayer. Currently under development.
Stars: ✭ 31 (-80.75%)
Mutual labels:  modding, mod
Open-Terraria-API
Open Terraria API - Mac, Linux & Windows
Stars: ✭ 65 (-59.63%)
Mutual labels:  modding, mod
ModdingDiablo2Resurrected
This repository contains some tools and guides on modding Diablo 2 Resurrected.
Stars: ✭ 75 (-53.42%)
Mutual labels:  modding, mod
Darksoulsiii.fileformats
Dark Souls III archive file information
Stars: ✭ 32 (-80.12%)
Mutual labels:  modding, reverse-engineering
Linkermod
Enhancements for Black Ops' modtools
Stars: ✭ 63 (-60.87%)
Mutual labels:  mod, modding

Anno 1800 Mod Loader

The one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML auto merging and DLL based mods.

No file size limit. No more repacking. Less likely to break after updates (in general a mod should continue to work after every update, YMMV).

This changes the games XML files using XPath, this makes it easy and possible to only have the changes in a mod that you absolutely need instead of handling megabytes of XML files.

Installation

Short shitty video to show how easy it is to install the loader.

Mods have to be installed seperately.

Watch the video

Head over to the releases page and download the loader.zip from the latest release.
Unzip the contents to the location where Anno1800.exe is

Uplay default path is C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Anno 1800\Bin\Win64)

You will be asked to overwrite python35.dll, just accept that.

You probably also need the VS 2019 Redist https://aka.ms/vs/16/release/VC_redist.x64.exe

And that's basically it.

Mods will be loaded alphabetically from C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Anno 1800\mods assuming default Uplay path. A short tutorial for mod creation with the mod loader is given below. For an example zoom extend mod see the examples directory.

Asset modding

In previous anno games there was a way to tell the game to load extacted files from disk instead of loading them
from the RDA container. While that made it easier, it's still not a nice way to handle modding large XML files.

This Anno 1800 mod loader supports a few simple 'commands' to easily patch the XML to achieve pretty much whatever you want.

How to Create a Patch for any XML File from the Game:

Step 1) Set up a directory for your mod inside Anno 1800/mods. In the following steps, it is assumed that you have titled your directory "myMod"

Step 2) inside of myMod, you recreate the exact file structure that the base game uses. A patched assets.xml file would have to be under the following path: Anno 1800/mods/myMod/data/config/export/main/asset/assets.xml

Step 3) Your XML document is expected to have the following structure:

<ModOps>
    <ModOp>
        <!-- Whatever Change you want to do -->
    </ModOp>
</ModOps>

You can give as many <ModOp> as you'd like to and have multiple patch files for different original ones in a single mod.

How to Write a ModOp

Step 1) Look up and select the XML node you want to edit with XPath using the Path argument.

Example:

<ModOp Path = "/Templates/Group[Name = 'Objects']/Template[Name = 'Residence7']/Properties"> 

For the assets file, you can also use the GUID argument. This selects all the child nodes of the asset with the given GUID as new roots for your xPath for cleaner code and is also much faster, performance-wise.

Example:

    Standard way:               <ModOp Path = "//Asset[Values/Standard/GUID = '1137']/Values/Standard/Name">
    
    Better, with GUID arg:      <ModOp GUID = '1337' Path = "/Values/Standard/Name"> 

Step 2) Give a type for a ModOp, to change the selected node.

Currently supported types:

- Merge                 Replaces all given child nodes or Arguments
- Remove                Removes the selected Node
- Add                   Adds inside the selected Node
- Replace               Replaces the selected Node
- AddNextSibling        Adds a sibling directly after the selected node   
- AddPrevSibling        Adds a sibling directly in front of the selected node

This was just a quick initial implementation (~3h), very open for discussions on how to make that better or do something entirely different

Step 3) Add the XML code that you want to have added, merged or as replacement inside the ModOp. example:

    <ModOp Type = "replace" GUID = '1337' Path = "/Values/Standard/Name">
        <Name>ThisIsATestNameForGUID1337</Name>
    </ModOp>

This ModOp will replace the node under /Values/Standard/Name of the asset with GUID 1337 with: "<Name>ThisIsATestNameForGUID1337</Name>"

Tutorial: Adding a new zoom level

Put this in a mod folder with the game path so this would be in mods/new-zoom-level/data/config/game/camera.xml

The mods folder in a default uPlay installation has to be located at C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Anno 1800\mods

<ModOp Type="add" Path="/Normal/Presets">
    <Preset ID="15" Height="140" Pitch="0.875" MinPitch="-0.375" MaxPitch="1.40" Fov="0.56" />
</ModOp>
<ModOp Type="merge" Path="/Normal/Settings">
    <Settings MaxZoomPreset="15"></Settings>
</ModOp>

You can find more examples in the examples directory.

Debugging

Debugging will not be possible, the game is using Denuvo and VMProtect, I have my own tools that allow me to debug it, but I will not be sharing those publicly.

You can read a printf aka debug-log about any errors caused by missing nodes, wrong paths or unrecognized node tests in Anno 1800/logs/mod-loader.log

To test what a 'patch' you write does to the original game file, you can also use xml-test, which will simulate what the game will load.

xml-test game_camera.xml patch.xml

This patches game_camera.xml with patch.xml and writes the result as a patched.xml file in the current directory

Original whitespace should be pretty much the same, so you can use some diff tool to see exactly what changed.

Other files

Other file types can't be 'merged' obviously, so there we just load the version of the last mod that has that file. (Mods are loaded alphabetically). For resources it is heavily recommended to use the Anno 1800/data folder.

Building

You need Bazel, Visual Studio 2019 and that should be it.
You can checkout azure-pipelines.yml and see how it's done there.

If you want to work on new features for XML operations, you can use xmltest for testing. As that is using the same code as the actualy file loader.

Coming soon (maybe)

  • Access to the Anno python api, the game has an internal python API, I am not yet at a point where I can say how much you can do with it, but I will be exploring that in the future.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].