# 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.
<a href="https://files.guettler.space/98e3009f-1232-4705-b2a0-5936bd7ba477.mp4" target="_blank" title="Watch the video"><img src="https://files.guettler.space/98e3009f-1232-4705-b2a0-5936bd7ba477.jpeg" alt="Watch the video" /></a>
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:
```xml
<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:
```xml
<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:
```xml
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:
```xml
<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`
```xml
<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.
没有合适的资源?快使用搜索试试~ 我知道了~
anno1800-mod-loader:Anno 1800的唯一的mod loader,支持加载解压的RDA文件,XML合并和P...
共241个文件
h:111个
xml:44个
json:23个
需积分: 45 2 下载量 162 浏览量
2021-01-30
20:23:12
上传
评论
收藏 6.89MB ZIP 举报
温馨提示
Anno 1800 Mod装载机 Anno 1800的唯一且唯一的Mod加载器支持加载解压缩的RDA文件,XML自动合并和基于DLL的Mod。 没有文件大小限制。 不再需要重新包装。 更新后中断的可能性较小(一般来说,mod在每次更新后应继续工作,YMMV)。 这使用XPath更改了游戏的XML文件,这使得轻松且可能的是仅在您绝对需要的mod中进行更改,而不用处理兆字节的XML文件。 安装 简短的简短视频,展示了安装加载程序有多么容易。 Mod必须单独安装。 转至发布页面,并从最新版本下载loader.zip。 将内容解压缩到Anno1800.exe所在的位置 Uplay的默认路径为C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Anno 1800\Bin\Win64 ) 系统会要求您覆盖python35.dll,只需接受即可。 您可能还需要VS 2019 Redist 基本上就是这样。 假定默认的Uplay路径,将从C:\Program Files (x86)\Ubisoft\Ubisoft Ga
资源详情
资源评论
资源推荐
收起资源包目录
anno1800-mod-loader:Anno 1800的唯一的mod loader,支持加载解压的RDA文件,XML合并和Python mods (241个子文件)
.bazelrc 150B
.linux.bazelrc 27B
zstd.BUILD 5KB
BUILD 1KB
BUILD 1KB
BUILD 1KB
BUILD 688B
BUILD 638B
BUILD 500B
BUILD 435B
BUILD 419B
BUILD 333B
pugixml.BUILD 291B
BUILD 0B
BUILD 0B
winsdk_configure.bzl 5KB
run_binary.bzl 4KB
write_file_private.bzl 4KB
win_res.bzl 3KB
winsdk_toolchain.bzl 2KB
dicts.bzl 2KB
write_file.bzl 97B
mod_manager.cc 24KB
random_game_functions.cc 18KB
main.cc 15KB
xml_operations.cc 15KB
external-file-loader.cc 14KB
python.cc 2KB
main.cc 2KB
mod.cc 1KB
main.cc 84B
cache.cc 0B
.clang-format 2KB
3rd_party_07_diff_0.dds 5.33MB
3rd_party_07_diff_1.dds 1.33MB
3rd_party_07_diff_2.dds 342KB
python_forward.def 85KB
python35_ubi.dll 3.74MB
.gitignore 488B
.gitmodules 944B
ntdll.h 230KB
unicodeobject.h 76KB
abstract.h 43KB
object.h 38KB
pyport.h 31KB
meow_hash_x64_aesni.h 26KB
dynamic_annotations.h 22KB
Python-ast.h 20KB
pyconfig.h 20KB
pyerrors.h 16KB
objimpl.h 14KB
pystate.h 9KB
datetime.h 8KB
pyfpe.h 8KB
longobject.h 8KB
pyatomic.h 8KB
ceval.h 7KB
pymath.h 7KB
pymem.h 7KB
codecs.h 7KB
pythonrun.h 7KB
pytime.h 6KB
modsupport.h 6KB
dictobject.h 6KB
bytesobject.h 5KB
opcode.h 5KB
symtable.h 5KB
code.h 5KB
floatobject.h 5KB
mod_manager.h 4KB
pyhash.h 4KB
py_curses.h 4KB
longintrepr.h 4KB
file.h 4KB
import.h 4KB
pylifecycle.h 4KB
funcobject.h 4KB
frameobject.h 3KB
methodobject.h 3KB
pymacro.h 3KB
setobject.h 3KB
xml_operations.h 3KB
pythread.h 3KB
pymacconfig.h 3KB
descrobject.h 3KB
Python.h 3KB
listobject.h 3KB
parsetok.h 3KB
fileutils.h 3KB
weakrefobject.h 3KB
pyarena.h 3KB
memoryobject.h 3KB
genobject.h 2KB
tupleobject.h 2KB
pyexpat.h 2KB
typeslots.h 2KB
traceback.h 2KB
compile.h 2KB
moduleobject.h 2KB
bytearrayobject.h 2KB
共 241 条
- 1
- 2
- 3
有道理的同桌
- 粉丝: 26
- 资源: 4653
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0