xforce / anno1800-mod-loader Goto Github PK
View Code? Open in Web Editor NEWThe one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML merging and Python mods.
License: MIT License
The one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML merging and Python mods.
License: MIT License
We need a game version check and have to notify the user to update if the version they are using is not compatible.
Right now it's tempting to use //Asset
XPath selector.
While that is easy and convenient to use, it's also quite slow, my tests show ~300ms per mod op, just to lookup the asset.
Attempts at auto optimizing those lookup have so far failed because the assets are not at the same depth in the XML tree.
If we could flatten the Groups/Group
hierarchy to a single Group which contains all assets, we could magically rewrite all XPaths from //Asset
like lookups to /Groups/Group/Asset
XPath selector,
those would be significantly faster.
This should be done after we have the caching system from #20 because it would make sense to cache the flattened version and check if the game version, so as to not do too much work.
make world fair fast in building
make world fair fast in preparation any thing
blueprints are not displayed when loaded via modloader
that's working:
<!--comment-->
<ModOp Type="add" Path="//Asset[Values/Standard/GUID=xxx]/some_path">
<NodeToChange>xxx</NodeToChange>
</ModOp>
that's not working:
<ModOp Type="add" Path="//Asset[Values/Standard/GUID=xxx]/some_path">
<!--comment-->
<NodeToChange>xxx</NodeToChange>
<!--comment-->
<NodeToChange>xxx</NodeToChange>
<!--comment-->
<NodeToChange>xxx</NodeToChange>
</ModOp>
Really stumped on this.
I installed .76. Saw that hot reload was fixed, so I edited one of my mods while the game was running. Updating some trader inventory. Did this all the time in previous versions (> Update 7, .75) without issue.
With .75, I had to reload the game every time. In .76, after closing the file, game crashed.
Now my mods don't work. I've deleted the cache folder, deleted the mods, re copied the mods, nothing. I've downgraded to .75, nothing.
Edit: I went to an older save, and cargostorage and commuter pier seem to be working again. Very bizzare. Not only were they no longer placed in a recent save, there was no option to build them, even though they were enabled and showed no errors in the modloader log.
Hi, mod loader is currently uncompatible with update 8.
error msg:
[2020-06-02 13:35:07.571] [error] Failed to find address in file
[2020-06-02 13:35:07.571] [error] Failed to find address, please create an issue on GitHub 4
[2020-06-02 13:35:08.290] [warning] Address search fall back to file search
Thank you very much :)
should exactly work like an add, but with a precheck if the added content is already there on the same level, in which case it does not add it.
Useful for making mods modular with building menu.
Example:
Mod A and Mod B should insert Buildings into the modded category 9000.
For no dependency between both mods the building category 9000 needs to be created and set up, and also added to the construction menu in both.
Problem is, if I add the category to the construction menu in both mods, it appears twice. But I only want to add it once even though both mods add buildings to the category 9000.
Some stuff like tutorials is organized in groups with guids that are linked or loaded/not loaded depending on the group they are in.
It would be helpful to move xml nodes around with a move modop, which takes in the xPath to the xml node to move, and then a second XPath as destination. (optional: support for Guid Arg maybe?)
That way I could move large and complex assets like tutorial quests between groups easily and without any worries that it will break in the future.
Just have to figure out how the UI system in Anno works, then we should be able to load custom UI are new UI for new things.
Depending on how that system works, it might be possible to add the option to just modify an existing UI slightly.
It’s really unfortunate that it expired on September 18.
I hope you can fix it,thx.
Just a little quality of life thing that isn´t urgent at all.
It would be great for testing proposes when you could just rename a mod folder so it starts with "-" and the mod loader would ignore it.
we need to increase sockets from 3 to 10 or more
i mean every building i can only put in it 3 items we need to increase it to 10 or more
I only did some small basic tests, it is looking good so far.
I know the merge op probably doesn't work 100% as expected, but that is not finished yet anyways, but does a good enough job for basic things.
Hi,
first up: great mod and tx for that.
This request is a little different from: issue #5 what i see basicliy tests the functionality of mod-loader itself.
Idea is a tool for mod devs:
a command like:
validate --mod-xml=/path/to/mod.xml --source=/path/to/asset.xml
or/and
build --mod-xml=/path/to/mod.xml --source=/path/to/asset.xml --target/path/to/target.xml
What should it do:
Gives hints like
path to '//Asset[Values/Standard/GUID='12345']/Values/foo/bar' not found. cannot merge. ignored.
As a mod dev have a debug possibility.
or/and:
The xml is completly transpiled.
The mod dev can see the result without starting a new game every time a small change is made.
bg desian
Apparently I just got the update to game version 7.2, and when I load the game now I see the "Your game version is not supported, please create a github issue".
So here I am doing that :)
Whenever I try to create an asset which uses an original game asset as baseAssetGuid the game will give me some kind of error, whether it's crash or a building upgrade which does not work.
Right now xml errors are only logged to the log file.
We should show a message box or something that something is wrong so the user doesn't miss it.
Hi,
I'm running Anno 1800 under Linux/Wine (Manjaro) and want to use your mod loader.
Following your instructions Anno 1800 is loading forever. If I switch back to the default dll Anno 1800 is working again. Loadin with modified dll stops after creating an empty mod-loader.log file.
Any clues what I'm missing?
Thanks in advance
we can only see 6 player we can;t scroll dawn to get more player please fix it
The game won't start with the python.dll from the modloader.
I disabled all mods, no game start either.
Playing on latest version (steam).
Many thanks to the author for creating this modloader, it has made my Anno 1800 games many times better : )
Sadly the most recent Patch 7.3 appears to have broken it. Is this just for me? or has anyone else also faced this problem?
The title speaks for itself. When trying to load the original dds file which was extracted from the rda the game just shows nothing where the texture should be. Everything else works fine (no crash etc.)
I did, however, rework the texture files from PR #8 with RC7 and the according mipmap counts. So they are working now as expected in DX11 on all texture quality settings. But obviously not in DX12 because the game currently doesn't even load its own dds files. So I´m waiting to PR that example again until this issue is fixed.
I will try looking into it myself later but I think you'll be able to analyze this issue much faster.
Thanks a lot in advance.
One should be able to replace binary files such as dds files or non xml based text files.
we need to increase oil storage from 50 to 500
first of all thanks a lot for your project, it´s awesome work.
I tried to build it myself with bazel and only got the xmltext.exe but wasn´t able to get the python35.dll needed to get the game loading mods. Isn´t the source for it public or am I doing something wrong?
I´d really appreciate your help.
thanks a lot
<ModOps>
<ModOp Type="replace" Path="//Asset[Values/Standard/GUID='101373']/Values/ItemContainer">
<ItemContainer>
<SocketCount>1234</SocketCount>
<SocketAllocation>Ship;SteamShip;Warship</SocketAllocation>
<SlotCount>1234</SlotCount>
</ItemContainer>
</ModOp>
<ModOp Type="replace" Path="//Asset[Values/Standard/GUID='101373']/Values/Walking">
<Walking>
<ShortenSailsAfter>0</ShortenSailsAfter>
<ReservationLength>16</ReservationLength>
<ReservationWidth>6</ReservationWidth>
<PathPlannerLayer>Water</PathPlannerLayer>
<ExpensiveDirSmoothing>1</ExpensiveDirSmoothing>
<TurnAroundRadius>6</TurnAroundRadius>
<Acceleration>1.8</Acceleration>
<Deceleration>1</Deceleration>
<TurnSpeed>90</TurnSpeed>
<LeaningSpeed>0.5</LeaningSpeed>
<LeaningMaxAngle>10</LeaningMaxAngle>
<ForwardSpeed>7.5</ForwardSpeed>
<WindMinSlowdownFactor>1</WindMinSlowdownFactor>
<WindMaxSpeedupFactor>1</WindMaxSpeedupFactor>
<CargoFullFactor>0.7</CargoFullFactor>
<DamageFullFactor>0.5</DamageFullFactor>
<MinSlowdownFactor>0.5</MinSlowdownFactor>
<CurveSegmentDensity>High</CurveSegmentDensity>
</Walking>
</ModOp>
</ModOps>
results in every child after </Walking>
getting removed.
Trying to Coop in Multiplayer with Mods (from the Spice it up package) enabled (and the replaced .DLL-files) gives an error message when my friend tries to join my lobby or when I try to join his. It says "Check Game Version" (roughly translated from German where it says "Spielversion prüfen") Me and my friend both tried different versions of the .DLL-files with no success. Without the .DLL-files we can play together and join each other's lobbies just fine, just none of the mods work in the game as far as we could see until now.
Singeplayer with the .DLL-files works fine and most of the mods seem to work.
We're both on the Steam version of the game. I am on Win7, my friend is on Win10, we both updated the VS 2019 Redist package from Microsoft.
https://github.com/zyantific/zydis
Always wanted to create my own in a proper way, perfect opportunity.
For now the shitty stuff that is there will work.
Wird xmltest.exe source.xml patch.xml
ausgeführt ergibt sich patched.xml.
<foo> <bar> <baz>1</baz> </bar> </foo>
<ModOps> <ModOp Type="replace" Path="/foo"> <bar> <foo>1</foo> </bar> </ModOp> </ModOps>
Patched,xml:
<bar> <foo>1</foo> </bar>
Das erwartete Ergebnis wäre:
<foo> <bar> <foo>1</foo> </bar> </foo>
So, the xml Structure for AttackRange goes like this:
<Asset> <Values> <Attacker> <AttackRange>Value</AttackRange> </Attacker> </Values> </Asset>
Compare the following ModOps:
<ModOp GUID='1010524' Type="merge" Path="/Values/Attacker"> <AttackRange>200</AttackRange> </ModOp>
<ModOp GUID='1010524' Type="replace" Path="/Values/Attacker/AttackRange"> <AttackRange>1530</AttackRange> </ModOp>
Both should end up in the exact same result, but in Reality, the first one has no effect (even tho the Node exists!), while the second one works fine.
Since the update with the latest DLC came out Anno 1800 doesn't launch when using the modified .dll file, as soon as you revert back to the original it loads fine but without the mods.
I'm not sure whether this is my fault or not, but I constantly have the issue that the game freezes on startup (at the initial epilepsy warning).
Is the current version of the loader still fully compatible to the current game version?
Modloader is not requiring mods to provide base information about what version of modloader and what version of game mod is supporting. Because of this outdated mods can be loaded, and this can result in people searching for errors in completely wrong places. Outdated mod can result in game crashes and other problems, first thought of many people is blaming game or modloader for that.
Mods should be required to provide informations:
Modloader at start should at least warn about using outdated mods, which can result to potential problems and maybe save the list of mods it tried to load during last run to anno main directory, together with versions of the mod and supported versions of game and modloader for each mod.
this version is not compatible with your correct game version.
Title
As I currently only have access to the Uplay version, it likely won't work as-is with the Epic or Steam version, no idea if the binary is actually the same or not.
Would be nice to have some more examples 😸
Because enabling/disabling mods is based on directory name, it can cause mods duplications while updating mods, if default state of the mod is different from the one already installed. This is especially the problem when installing new version of mod packs (like Spice It Up) because it is much harder to find out which mods are duplicated, as package contains almost 70 modifications.
Example: if I install mod "[Gameplay] Commuter pier for New World", that is enabled by default, and I already have previous version installed but disabled, instead of updating already installed version there will be created duplication of that mod which will result in having to folders mods directory: "[Gameplay] Commuter pier for New World" and "-[Gameplay] Commuter pier for New World". Same situation occurs when updating enabled mod that is disabled by default.
Proposed solution would be to change a way how it is determined if mod is disabled or enabled. I think best way to make it work would be to determine state of the mod by the config file in the main directory of the mod. For backward compatibility modloader on launch could on launch inform about detecting mods that are using unsupported way of enabling the mod, maybe with exporting list of found unsupported mods in the main anno directory, with quick instruction how to update them manually.
The state of unlock triggers is stored in the save game.
While for shipping mods you can just create new trigger to make your mod work for old save games, it would be nice for testing to have a way to re-evaluate triggers on mod load.
Especially for bugfixing it would be incredibly helpful if you get the Name of the mod shown in the logfile for each Warning that gets printed.
So instead of this
[2019-09-14 13:36:56.558] [warning] No matching node for Path //Asset[Values/Standard/GUID='192069']/Values/RewardPool/ItemsPool/Item[ItemLink = '193739']
You would get something like this:
[2019-09-14 13:36:56.558] [warning] Modname: No matching node for Path //Asset[Values/Standard/GUID='192069']/Values/RewardPool/ItemsPool/Item[ItemLink = '193739']
New game patch caused the game from starting up with current python patches it pretty much loads with the seizure warning and hangs there
My game launches but does not recognising DLC and crashes soon after. Not sure if this is an issue just at my end or is anyone else is also facing this issue?
PS
Ahh never mind an update dropped today link, so this is probably what broke the loader. Will eagerly await mod loader drop then : )
PS2
I dont suppose the Author has a patreon page?
I have received several reports that NPC quests are not working anymore after 0.6 update.
The most likely suspect at this time is the flat group structure because there are technically some groups missing which are probably important.
I will do some testing and benchmark and then decide on the best course of action on this.
It would be nice to have a layered on disk cache for modified XML files.
This would make starting the game with large complicated mods a lot faster for users that don't modify the XML files.
We should store a the a hash of the input, output and mod xml file for each mod in a sort of separate layer. So we can skip everything that didn't change and only re-apply everything that changed and all the mods that are applied after that.
HI first, I want to thank you for this amazing tool.
And can you please updated to new version which they released yesterday ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.