{"id":21981387,"url":"https://github.com/magicalcookie/anno1800-mod-loader","last_synced_at":"2025-07-22T20:32:14.202Z","repository":{"id":36492156,"uuid":"186511189","full_name":"xforce/anno1800-mod-loader","owner":"xforce","description":"The one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML merging and Python mods.","archived":true,"fork":false,"pushed_at":"2023-08-04T16:22:28.000Z","size":8168,"stargazers_count":369,"open_issues_count":57,"forks_count":94,"subscribers_count":37,"default_branch":"develop","last_synced_at":"2023-10-20T23:52:33.374Z","etag":null,"topics":["anno","anno1800","cpp","cpp17","mod","modding","modding-games","mods","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xforce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-13T23:46:34.000Z","updated_at":"2023-10-20T23:52:35.658Z","dependencies_parsed_at":"2023-02-18T10:16:44.039Z","dependency_job_id":"8a331b7a-66a6-4960-8a9d-07eff3140bac","html_url":"https://github.com/xforce/anno1800-mod-loader","commit_stats":null,"previous_names":[],"tags_count":31,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xforce%2Fanno1800-mod-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xforce%2Fanno1800-mod-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xforce%2Fanno1800-mod-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xforce%2Fanno1800-mod-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xforce","download_url":"https://codeload.github.com/xforce/anno1800-mod-loader/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227174005,"owners_count":17742401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anno","anno1800","cpp","cpp17","mod","modding","modding-games","mods","reverse-engineering"],"created_at":"2024-11-29T17:17:24.209Z","updated_at":"2025-07-22T20:32:13.095Z","avatar_url":"https://github.com/xforce.png","language":"C++","funding_links":[],"categories":["Anno 1800","Game \u0026 Studio Tools"],"sub_categories":["Cyberpunk 2077 / REDEngine 4","Ubisoft"],"readme":"# Anno 1800 Mod Loader\n\n\u003e [!NOTE]\n\u003e The mod loader is now integrated into the game thus this project is no longer required.\n\u003e For the \"official\" version that has code for the new/different features see the following fowkr https://github.com/jakobharder/anno1800-mod-loader\n\nThe one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML auto merging and DLL based mods.\n\nNo file size limit. No more repacking. Less likely to break after updates (in general a mod should continue to work after every update, YMMV).\n\nThis 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.\n\n# Installation\n\nShort shitty video to show how easy it is to install the loader.\n\n\u003e Mods have to be installed seperately.\n\n\u003ca href=\"https://files.guettler.space/98e3009f-1232-4705-b2a0-5936bd7ba477.mp4\" target=\"_blank\" title=\"Watch the video\"\u003e\u003cimg src=\"https://files.guettler.space/98e3009f-1232-4705-b2a0-5936bd7ba477.jpeg\" alt=\"Watch the video\" /\u003e\u003c/a\u003e\n\nHead over to the releases page and download the loader.zip from the latest release.  \nUnzip the contents to the location where Anno1800.exe is\n\n\u003e Uplay default path is `C:\\Program Files (x86)\\Ubisoft\\Ubisoft Game Launcher\\games\\Anno 1800\\Bin\\Win64`\n\nYou will be asked to overwrite python35.dll, just accept that.\n\nYou probably also need the VS 2019 Redist https://aka.ms/vs/16/release/VC_redist.x64.exe\n\nAnd that's basically it.\n\nMods will always be loaded in alphabetical order.\nMods are either loaded from:\n\n- `C:\\Program Files (x86)\\Ubisoft\\Ubisoft Game Launcher\\games\\Anno 1800\\mods` assuming default Uplay path. _This depends on the location you chose when installing Anno 1800_\n- your Documents folder if that contains a `mods` folder. _You can access this using \u003ckbd\u003eWin\u003c/kbd\u003e + \u003ckbd\u003eR\u003c/kbd\u003e and entering `shell:Personal\\Anno 1800`_\n\n\u003e `mods` in Documents takes precedence over game install directory, meaning if you have a `mods` folder in the documents location mods will no longer be loaded from the game directory.\n\n\u003e For more experienced users symlinks made with `mklink` will be followd (resulting in an easier way to manage different reposetories of mods).\n\nA short introduction for mod creation with the mod loader is given below. For an example zoom extend mod see the `examples` directory.\n\n# Asset modding\n\nIn previous anno games there was a way to tell the game to load extacted files from disk instead of loading them  \nfrom the RDA container. While that made it easier, it's still not a nice way to handle modding large XML files.\n\nThis Anno 1800 mod loader supports a few simple 'commands' to easily patch the XML to achieve pretty much whatever you want.\n\n## How to Create a Patch for any XML File from the Game:\n\n**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\"\n\n**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`\n\n**Step 3)** Your XML document is expected to have the following structure:\n\n```xml\n\u003cModOps\u003e\n    \u003cModOp\u003e\n        \u003c!-- Whatever Change you want to do --\u003e\n    \u003c/ModOp\u003e\n\u003c/ModOps\u003e\n```\n\n\u003e You can give as many `\u003cModOp\u003e` as you'd like to and have multiple patch files for different original ones in a single mod.\n\n## How to Write a ModOp\n\n**Step 1)** Look up and select the XML node you want to edit with XPath using the Path argument.\n\nExample:\n\n```xml\n\u003cModOp Path = \"/Templates/Group[Name = 'Objects']/Template[Name = 'Residence7']/Properties\"\u003e\n```\n\nFor 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.\n\nExample:\n\n```xml\n    Standard way:               \u003cModOp Path = \"//Asset[Values/Standard/GUID = '1137']/Values/Standard/Name\"\u003e\n\n    Better, with GUID arg:      \u003cModOp GUID = '1337' Path = \"/Values/Standard/Name\"\u003e\n```\n\n**Step 2)** Give a type for a ModOp, to change the selected node.\n\nCurrently supported types:\n\n```\n- Merge                 Replaces all given child nodes or Arguments\n- Remove                Removes the selected Node\n- Add                   Adds inside the selected Node\n- Replace               Replaces the selected Node\n- AddNextSibling        Adds a sibling directly after the selected node\n- AddPrevSibling        Adds a sibling directly in front of the selected node\n```\n\n\u003e This was just a quick initial implementation (~3h), very open for discussions on how to make that better or do something entirely different\n\n**Step 3)** Add the XML code that you want to have added, merged or as replacement inside the ModOp.\nexample:\n\n```xml\n    \u003cModOp Type = \"replace\" GUID = '1337' Path = \"/Values/Standard/Name\"\u003e\n        \u003cName\u003eThisIsATestNameForGUID1337\u003c/Name\u003e\n    \u003c/ModOp\u003e\n```\n\n\u003e This ModOp will replace the node under /Values/Standard/Name of the asset with GUID 1337 with: \"`\u003cName\u003eThisIsATestNameForGUID1337\u003c/Name\u003e`\"\n\n## Split XML Patch into Multiple Files\n\nYou can split your XML patches into multiple files by using `Include` instructions.\n\n```xml\n\u003cModOps\u003e\n    \u003c!-- ModOps applied before the include --\u003e\n    \u003cInclude File=\"even-more-modops.include.xml\" /\u003e\n    \u003c!-- ModOps applied after the include --\u003e\n\u003c/ModOps\u003e\n```\n\n`File` takes a file path relative to the XML file that does the include.\n\nXML files without a counterpart in the game are normally mistakes and lead to errors in the log.\nUse the extension `*.include.xml` to prevent that.\n\nOtherwise, included XML patches are handled the same way as normal XML patches. Nesting includes is supported.\n\n## Tutorial: Adding a new zoom level\n\nPut this in a mod folder with the game path\nso this would be in `mods/new-zoom-level/data/config/game/camera.xml`\n\n\u003e 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`\n\n```xml\n\u003cModOp Type=\"add\" Path=\"/Normal/Presets\"\u003e\n    \u003cPreset ID=\"15\" Height=\"140\" Pitch=\"0.875\" MinPitch=\"-0.375\" MaxPitch=\"1.40\" Fov=\"0.56\" /\u003e\n\u003c/ModOp\u003e\n\u003cModOp Type=\"merge\" Path=\"/Normal/Settings\"\u003e\n    \u003cSettings MaxZoomPreset=\"15\"\u003e\u003c/Settings\u003e\n\u003c/ModOp\u003e\n```\n\nYou can find more examples in the `examples` directory.\n\n# Debugging\n\nDebugging 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.\n\n\u003e 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`\n\nTo 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.\n\n```\nxml-test game_camera.xml patch.xml\n```\n\n\u003e This patches game_camera.xml with patch.xml and writes the result as a patched.xml file in the current directory\n\nOriginal whitespace should be pretty much the same, so you can use some diff tool to see exactly what changed.\n\n## Other files\n\nOther 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).\nFor resources it is heavily recommended to use the Anno 1800/data folder.\n\n# Building\n\nYou need Bazel, Visual Studio 2022 and that _should_ be it.  \nYou can checkout `azure-pipelines.yml` and see how it's done there.\n\neasy steps to sucess:\n\n- Install Visual Studio 2022 (community version is fine + C++ tools)\n- Install Bazel (I recommend going with Bazelisk here)\n- _optional_ fork this repo\n- clone this repo (make sure you use the most recent branch/tag) into a workingdir\n- open the folder in Visual Studio 2022\n- _optional_ make changes\n- open a command prompt (admin) \u0026 navigate to the workingdir\n- If you have installed another version of Visual Studio as well:\n  - `set BAZEL_VC=C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC`\n  - this will use the correct build tools (if your VS 2022 install dir differ, please adapt)\n- use `bazel build //libs/python35:python35.dll` to build the .dll\n- find the DLL in your workingdir \\bazel-bin\\libs\\python35\n\nIf 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.\n\n# Coming soon (maybe)\n\n- 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicalcookie%2Fanno1800-mod-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicalcookie%2Fanno1800-mod-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicalcookie%2Fanno1800-mod-loader/lists"}