Can we create a subfolder (and files) in assets/DLC using a custom DLL ?

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
12,831
Location
France
Almost all is in the title, it would be a way to try to activate mods in MP without modifying any of the core game files or using external programs...
 
yep, that's how I'm doing my actual test too, still struggling with texts, but everything else is ok :)

now I'm looking for a way to automate the procedure, as it's not at all users friendly...

edit: what I want is writing in the dlc folder from in game using a mod with a custom DLL.
 
Not sure I understand... you would want the mod to install itself in the DLC folder ? AFAIK that's not possible. And asking people to unzip the mod in the DLC folder is not that difficult :crazyeye:

Well, there are a lot of posts in the installation problems thread of my WWII mod that are basically request on how to exctract from a 7zip or copy a file from one folder to another...

And that not so easy to package a modpack in the DLC folder, for example there is the problem of SQL files not loaded and the art defines that does not use the same syntax in a mod or in a DLC.

From my tests, here's what I think is needed to convert a group of mods for MP usage, most of it I'd like to automate (ideally from in game, if we can write to the game's folder using a modded DLL):

- launch the game, go in the mod's menu, activate the desired mods, click next to update the database
- create a subfolder (say "MPModsPack") in assets/DLC in the game's installation folder
- copy from the activated mods folders all files that should be in the VFS, the "UIaddins" files, and one modded DLL if needed (it may require a rename)
- create a UI subfolder to copy all Lua/XML related to the user interface
- create a Civ5Pkg file with a higher priority order than the last DLC/expansion to point to that UI folder and make sure other gameplay overrided files are loaded instead of the base game's files (see database conversion)
- copy the original InGame.lua to the UI folder, edit it to include all "InGameUIaddins" files from the mods
- copy one of the last loaded gameplay XML files from the base game in MPModsPack
- convert the game's database (at this point including the change of all mods) to the XML format used by the DLC, taking note of the tables definitions (in case of columns added by some mods, mine use that...)
- add that code at the gameplay XML file taken from the base game
- create the artdefines files too
- find a way to update the localization files with the texts added by the mods
- exit the game (I'm not sure that simply exiting from the mod's menu will load all the new files)
- copy the "MPModsPack" folder in the DLC folder of a second PC
- launch the game on both PC, start a local MP game to test
- have fun hunting desyncs (free tip: do not use random numbers in lua to make gameplay change :o )

Now I do hope that in the end a MP Manager tool will handle all that, but the way I'm going to update my mods from now on depend of the way they could be ported to MP, so I want to be sure that automation is possible for all of them, else I'll merge everything I need in a single DLC-format modspack, and only update that.
 
I had some troubles updating the game inplace. That's why I wrote an external tool instead of modding the dll file to load mods. If you can sort out those problems there shouldn't be any problem doing all the work my mod manager does in the game dll file.

Some things on your list are still on my todo list (I'm still waiting about an official statement about a comming patch (or no comming patch)).
 
If you're trying to make a mod manager using DLCs, that's indeed going to be difficult.
But if you want to make your RED mod into a DLC, so that it can be used in MP, that should be much easier than your todo list. Plus you could include scenarii such as your wwii (which would however be "mods" so not accessible in MP)
 
I had some troubles updating the game inplace. That's why I wrote an external tool instead of modding the dll file to load mods. If you can sort out those problems there shouldn't be any problem doing all the work my mod manager does in the game dll file.

Some things on your list are still on my todo list (I'm still waiting about an official statement about a comming patch (or no comming patch)).

yes, I'm following your progress with great interest, as I've lost hope for a MP patch in the near future for Civ5.

And I'm also itching to resume my work on different mods, and I need to be sure of what will be possible or not from an internal or external program before choosing how I will update them, as manually merging them for MP is tedious...

So as I know (and understand why, I've also done it for more than 3 years) that you're waiting a bit for an official announcement, I've started to try it my way, what's important is that in the end someone bring us a way to use mods in MP. But currently I'm not betting on Firaxis :D
 
So you want to write an SP DLL mod that will install an "MP mod" by writing all the necessary files as a DLC?

If nothing else you deserve a cookie for deviousness!

And the answer to the question in the title is (scarily) "yes"
 
But if you want to make your RED mod into a DLC, so that it can be used in MP, that should be much easier than your todo list.
Sadly not, as I use SQL to update the database for the thousandth of art defines entries for the units...

But once you've made the code to convert it to sql, it's faster, yes...

I'm currently using R.E.D. Modpack, Cultural Diffusion, RED DLL, Stacking and Combat Overhaul and a few other in a test game with my brother.

Plus you could include scenarii such as your wwii (which would however be "mods" so not accessible in MP)
loading the scenario (not a map) may be another difficulty, custom setup screens (like in YnAEMP) will also need a conversion.

So you want to write an SP DLL mod that will install an "MP mod" by writing all the necessary files as a DLC?

If nothing else you deserve a cookie for deviousness!

And the answer to the question in the title is (scarily) "yes"

Thanks, worth a try then :D
 
okay, I think I've got something working correctly for mods that does not require a custom setup screen (including scenario) or use a DLL.

it's not something that I can release publicly ATM (it lacks an UI to start for :o ), but I'll put it on GitHub for modders when I'll found the time to test it a bit more and be sure that it won't cause a computer to explode.

without going in details, it convert the whole modded database, including texts, so mods using SQL are convertible.

I don't know if we can check the mods in the pack for MP compatibility, and it still require a manual uninstall of the created DLC ModsPack.

But as we know that it can be done by an external program thanks to Jaii der Herr, I can finally resume work on my mods, and I'm happy to say that I will keep them as individual components :D
 
Back
Top Bottom