Changes with Anno 117¶
Important¶
- Changed Paths - Paths to
assets.xmland others have changed. (1) - Modinfo - Only mods with game version
8are loaded. (2) - No changes to GUID Ranges (3) or Mod Folders. (4)
-
Most base game files are also under
data/basenow.E.g.
data/base/config/export/assets.xml -
Only mods with game version
8inmodinfo.jsonare loaded.{ "Anno": 8, "Version": "1.0.0", "ModID": "first-mod-jakob" // .. } -
Reserve your GUID range.
Open a PR on GuidRanges or ask on Discord.
-
The mod folders for manual installation are:
<user>/Anno 117/mods/<install>/Anno 117/mods/
Templates in Visual Studio Code
Press F1 in Anno Modding Tools and run Anno: Create Mod from Template to generate a template.
Changes¶
- Localization - Texts use LineIDs now instead of GUIDs.
- Modinfo - New
Difficultyentry is mandatory, but mods load without it. - InfoTips - The format has changed for better readability.
- Dependencies - Changed dependency entries in modinfo.
New Features¶
- Short ModOps (1)
- Add Asset without a ModOp (2)
- Mod Profiles (3)
- Options
- Lookups for Property in Assets (4) and GUID in InfoTips (5)
- Loop Groups with MaxRepeat (6)
- XPath Functions (7) and ModID Variables (8)
- Inline ModOps - Merge enums (9), insert local content (10) and other
Contentimprovements. - ModItem - More control over merging items and lists with items.
- Lua Scripts
-
ModOps can be shortened with
Merge=<XPath>instead of the old long formType="merge" Path=<XPath>.<ModOp GUID="1010372" Merge="Building"> <AllowChangeVariation>1</AllowChangeVariation> </ModOp><ModOp GUID="1010372" Type="merge" Path="/Values/Building"> <AllowChangeVariation>1</AllowChangeVariation> </ModOp> -
117 (not in demo)
Directly drop assets into your file without
ModOp. The order ofBaseAssetGUIDis automatically handled.<ModOps> <Asset> <BaseAssetGUID>100780</BaseAssetGUID> <Values> <!-- .. --> </Values> </Asset> </ModOps><ModOps> <ModOp Type="addNextSibling" GUID="100780"> <Asset> <BaseAssetGUID>100780</BaseAssetGUID> <Values> <!-- .. --> </Values> </Asset> </ModOp> </ModOps> -
The game loads mod activations from a text file at
<user>/Anno 117/active-profile.txt. -
New lookup helper to select properties.
<ModOp Property="ModuleOwner" Merge=".[FarmType='PlantFarm']"> <ModuleOwner> <ModuleBuildRadius>20</ModuleBuildRadius> </ModuleOwner> </ModOp><ModOp Type="merge" Path="//ModuleOwner/[FarmType='PlantFarm']"> <ModuleOwner> <ModuleBuildRadius>20</ModuleBuildRadius> </ModuleOwner> </ModOp> -
New lookup helper to select InfoTips.
<ModOp GUID="500934" Add=""> <!-- .. --> </ModOp><ModOp Add="@500934"> <!-- .. --> </ModOp><ModOp Type="add" Path="//InfoTipData[Guid='500934']"> <!-- .. --> </ModOp> -
Repeat until
Conditiondoesn't match anymore with settingMaxRepeat.<Group Condition="@123/List/Item" MaxRepeat="10"> <!-- .. --> </Group> -
<ModValue Insert/>and<ModOp Content/>fully support XPath 1.0 functions.<ModOp Property="Maintenance" Merge="Workforce"> <Workforce><ModValue Insert="self::node() + 10" /></Workforce> </ModOp> -
Evaluate mod IDs with XPath operators like
andandor.<Group Condition="#mod-a or #mod-b"> <!-- .. --> </Group> -
Use
<ModValue Merge="Your;Flags" />to insert one or more flags if not already present, instead of overwriting the existing flags value. -
Use
<ModValue Insert="<local path>" />to copy data from a local path without specifyingGUID.
Extra Notes¶
Safe Ranges¶
Reserve your range
Open a PR on GuidRanges or ask on Discord.
The GUID ranges safe to use for mods have not changed.
| Name | Range |
|---|---|
| GUIDs | 1.337.471.142 - 2.147.483.647 |
| LineIDs | 1.337.471.142 - 2.147.483.647 |
| Personal use | 2.001.000.000 - 2.001.009.999 |
| Enums | will come with future releases |
Localization¶
Text IDs are based on Oasis Line IDs now instead of GUIDs.
Vanilla text IDs are always negative numbers like -6911555031864321364 (or A015 3951 4829 DAAC in hex).
For modding purposes it is best to simply use the same range as GUIDs. E.g. matching LineID of a building name with the GUID of the building asset.
<ModOp Add="/TextExport/Texts[1]">
<Text>
<Text>Happy Modding</Text>
<LineId>2001000000</LineId>
</Text>
</ModOp>
<Values>
<!-- ... -->
<Text>
<OasisId>2001000000</OasisId>
</Text>
</Values>
<ModOp Add="/TextExport/Texts[1]">
<Text>
<Text>Happy Modding</Text>
<GUID>2001000000</GUID>
</Text>
</ModOp>
<Values>
<!-- ... -->
<Standard>
<GUID>2001000000</GUID>
</Standard>
</Values>