Posted: Fri Jun 12, 2020 7:25 pm Post subject:
Composition-based modding
Subject description: Should it exist? Can it exist?
I've been working for a bit on some polish features - audio cues, mainly - but the more I dig into the game, the more I'm struck by how little support there appears to be for mixing multiple mods.
The main codebase, obviously, is uniquely loaded. One DLL at a time.
Units and structures have lots of hardcoded references in that codebase, so unit mods are also uniquely loaded.
Data loaders - the XML that holds metadata, references to outside assets - these also seem to be unique. A modded copy of, say, SFXEventFiles.xml must include all the standard entries in the file, or the game crashes - which also means only one active mod may modify SFX.
This one is particularly unusual - considering the engine already includes load orders on mods, it would be no more difficult to simply load each mod's data loaders in sequence (and the base game) rather than only loading one of them.
All of this leads mods to override each other. Only one can typically be active at a time, and as a result, composition-based modding ranges from difficult to impossible. Even simple content or polish changes conflict with seemingly unrelated Quality of Life updates.
But EA/Petro supplied a menu and integration with a service that both allow multiple registration and activation - as though they wanted users to enable multiple mods at once.
Does anyone have some insight here? If composition is relevant, it's possible to write solutions for content - runtime registration, and composition rules over a rules.ini-like structure - but I don't see good solutions for the core code. And it's rather demoralizing to have the mods I want to write be simply incompatible with mods that add basic QoL. QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Mon Jun 15, 2020 12:59 pm Post subject:
Assets-only mods do not require a dll. While you can have only one core gameplay DLL, many asset mods can be stacked together without any issue. _________________ QUICK_EDIT
May I ask how? While the individual assets are in unique files, their references seem to be either aggregated into single huge files, or split into smaller files which are only loaded by a single core file. And those referencing files can conflict.
From my experimentation, a mod that extends one of the base asset XMLs (but doesn't change the XML list file) would be compatible with a mod that changes the list to add a new base asset XML, but at that point neither of them could load with any additional mods that affect the same system - there don't seem to be any more ways to get file references into the game.
Am I misunderstanding the XML loading process? QUICK_EDIT
I'm not up to snuff YET on my own knowledge of the DLL relationships.... but it is my vague understanding that the game.dll we can now upload as a mod can invoke other mods that is other dlls... Or is my understanding incorrect? QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Wed Oct 27, 2021 11:13 am Post subject:
niflthaena wrote:
Am I misunderstanding the XML loading process?
I wasn't talking about the XML loading. I was just making a note on how the combining mods feature is still useful despite the issues you mentioned, for lower-scope mods that just replace game assets. There are mods out there that only tweak graphics and sounds, and those can be combined without any problems as long as they don't replace the same things, and even then, one will simply have priority depending on the mod loading order.
for xml files and dlls this is obviously different; they affect large parts of the game from a single file. So no, in general more complex mods that change the same xml files will not be combinable with each other. _________________ QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum