You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 4, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+91-42Lines changed: 91 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -2,36 +2,100 @@
2
2
3
3
The one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML auto merging and DLL based mods.
4
4
5
-
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).
5
+
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).
6
+
7
+
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.
8
+
9
+
# Installation
10
+
11
+
Short shitty video to show how easy it is to install the loader.
12
+
> Mods have to be installed seperately.
13
+
14
+
<ahref="https://files.guettler.space/98e3009f-1232-4705-b2a0-5936bd7ba477.mp4"target="_blank"title="Watch the video"><imgsrc="https://files.guettler.space/98e3009f-1232-4705-b2a0-5936bd7ba477.jpeg"alt="Watch the video" /></a>
15
+
16
+
Head over to the releases page and download the loader.zip from the latest release.
17
+
Unzip the contents to the location where Anno1800.exe is
18
+
19
+
> Uplay default path is `C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Anno 1800\Bin\Win64`)
20
+
21
+
You will be asked to overwrite python35.dll, just accept that.
22
+
23
+
You probably also need the VS 2019 Redist https://aka.ms/vs/16/release/VC_redist.x64.exe
24
+
25
+
And that's basically it.
26
+
27
+
Mods will be loaded alphabetically from `C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Anno 1800\mods` assuming default Uplay path.
28
+
A short tutorial for mod creation with the mod loader is given below. For an example zoom extend mod see the `examples` directory.
29
+
6
30
7
31
# Asset modding
8
32
9
33
In previous anno games there was a way to tell the game to load extacted files from disk instead of loading them
10
34
from the RDA container. While that made it easier, it's still not a nice way to handle modding large XML files.
11
35
12
-
## XML files
36
+
This Anno 1800 mod loader supports a few simple 'commands' to easily patch the XML to achieve pretty much whatever you want.
13
37
14
-
This Anno 1800 Mod loader supports a few simple 'commands' to easily patch the XML to achieve pretty much whatever you want.
15
-
Currently supported operations inside an XML file:
38
+
## How to Create a Patch for any XML File from the Game:
16
39
17
-
> This was just a quick initial implementation (~3h), very open for discussions on how to make that better or do something entirely different
40
+
**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"
41
+
42
+
**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`
43
+
44
+
**Step 3)** Your XML document is expected to have the following structure:
45
+
```xml
46
+
<ModOps>
47
+
<ModOp>
48
+
<!-- Whatever Change you want to do -->
49
+
</ModOp>
50
+
</ModOps>
51
+
```
52
+
> You can give as many ```<ModOp>``` as you'd like to and have multiple patch files for different original ones in a single mod.
53
+
54
+
## How to Write a ModOp
55
+
56
+
**Step 1)** Look up and select the XML node you want to edit with XPath using the Path argument.
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.
64
+
65
+
Example:
66
+
```xml
67
+
Standard way: <ModOp Path = "//Asset[Values/Standard/GUID = '1137']/Values/Standard/Name">
**Step 2)** Give a type for a ModOp, to change the selected node.
18
72
19
-
- Merge
20
-
- Remove
21
-
- Add
22
-
- Replace
23
-
- AddNextSibling
24
-
- AddPrevSibling
73
+
Currently supported types:
74
+
```
75
+
- Merge Replaces all given child nodes or Arguments
76
+
- Remove Removes the selected Node
77
+
- Add Adds inside the selected Node
78
+
- Replace Replaces the selected Node
79
+
- AddNextSibling Adds a sibling directly after the selected node
80
+
- AddPrevSibling Adds a sibling directly in front of the selected node
81
+
```
82
+
> This was just a quick initial implementation (~3h), very open for discussions on how to make that better or do something entirely different
25
83
26
-
Lookup for all of those is done 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.
84
+
**Step 3)** Add the XML code that you want to have added, merged or as replacement inside the ModOp.
85
+
example:
86
+
```xml
87
+
<ModOp Type = "replace" GUID = '1337' Path = "/Values/Standard/Name">
88
+
<Name>ThisIsATestNameForGUID1337</Name>
89
+
</ModOp>
90
+
```
91
+
> This ModOp will replace the node under /Values/Standard/Name of the asset with GUID 1337 with: "```<Name>ThisIsATestNameForGUID1337</Name>```"
27
92
28
-
Example:
29
-
Adding a new zoom level
93
+
## Tutorial: Adding a new zoom level
30
94
31
95
Put this in a mod folder with the game path
32
96
so this would be in `mods/new-zoom-level/data/config/game/camera.xml`
33
97
34
-
> 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`
98
+
> 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`
35
99
36
100
```xml
37
101
<ModOpType="add"Path="/Normal/Presets">
@@ -43,40 +107,30 @@ so this would be in `mods/new-zoom-level/data/config/game/camera.xml`
43
107
```
44
108
45
109
You can find more examples in the `examples` directory.
46
-
To test what a 'patch' you write does, you can use `xml-test`, which will simulate what the game does.
47
-
48
-
```
49
-
xml-test game_camera.xml patch.xml
50
-
```
51
110
52
-
> This will write a patched.xml file in the current directory
53
111
54
-
Original whitespace should be pretty much the same, so you can use some diff tool to see exactly what changed.
55
-
56
-
## Other files
112
+
# Debugging
57
113
58
-
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).
114
+
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.
59
115
60
-
# Installation
116
+
> 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```
61
117
62
-
Short shitty video to show how easy it is to install the loader.
63
-
> Mods have to be installed seperately.
118
+
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.
64
119
65
-
<ahref="https://files.guettler.space/98e3009f-1232-4705-b2a0-5936bd7ba477.mp4"target="_blank"title="Watch the video"><imgsrc="https://files.guettler.space/98e3009f-1232-4705-b2a0-5936bd7ba477.jpeg"alt="Watch the video" /></a>
120
+
```
121
+
xml-test game_camera.xml patch.xml
122
+
```
66
123
67
-
Head over to the releases page and download the loader.zip from the latest release.
68
-
Unzip the contents to the location where Anno1800.exe is
124
+
> This patches game_camera.xml with patch.xml and writes the result as a patched.xml file in the current directory
69
125
70
-
> Uplay default path is `C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Anno 1800\Bin\Win64`)
126
+
Original whitespace should be pretty much the same, so you can use some diff tool to see exactly what changed.
71
127
72
-
You will be asked to overwrite python35.dll, just accept that.
73
128
74
-
You probably also need the VS 2019 Redist https://aka.ms/vs/16/release/VC_redist.x64.exe
75
129
76
-
And that's basically it.
130
+
## Other files
77
131
78
-
Mods will be loaded from `C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Anno 1800\mods` assuming default Uplay path.
79
-
For an example zoom extend mod see the `examples` directory.
132
+
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).
133
+
For resources it is heavily recommended to use the Anno 1800/data folder.
80
134
81
135
# Building
82
136
@@ -85,11 +139,6 @@ You can checkout `azure-pipelines.yml` and see how it's done there.
85
139
86
140
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.
87
141
88
-
# Debugging
89
-
90
-
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.
91
-
You can however do printf aka log file debugging, not as easy and fun, but will get the job done.
92
-
93
142
# Coming soon (maybe)
94
143
95
144
- 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.
0 commit comments