MPMPM - converting Mods to DLC format for Multiplayer use

Status
Not open for further replies.
Yes, there have been multiple discussions on the subject, and to give original credit I think that Nefliqus was the first to release a MP mod using the DLC format.

What has changed now is that the game is "final", and so some of us have lost hope in official mod support for MP. If I could have avoided to make this tool, I would have, it's a lot of time lost for my other mods.


@all: thanks for the test and reports, I'll have a look.

I think I will have to add something to make sure there are no special characters in the texts file, because it could make the whole file ignored (which result in no texts at all from mods, just TXT_KEY_)

I'm not sure that Communitas could work in MP without desyncs, but I'll try at least to see if that part about the initialization of "Game" could be fixed, IIRC the mod try to attach a lot of functions to this.

Thanks! My buddy and I played about 20-25 turns before giving up due to lack of text and stats. We didn't have any desyncs.
 
Thanks for all your hard work, if I was more familiar with general Civilization 5 modding I would throw some pull requests your way but as of right now I'm pretty rusty.

I'm going to try and whip up a modpack for some friends soon and just have a couple questions. Is converting the SQL databases to XML format risky for certain mods, or is their SQL database mostly static? With gameplay altering mods, could we get together a list on the github repo's wiki for some common code conversions that should be performed, like the random number function mentioned earlier that plays nice with MP, basically a list of things to patch or avoid to prevent desync's.
The DB does not changed once the game is loaded, there is no difference between filling it using SQL or XML. (technically we can change it after loading a game, but the change won't take effect unless you've coded a custom DLL for that...)

There is a well made tutorial in the civ4 forum about modding for MP that could also help for Civ5 I think.

for specific functions, well, using mods in MP is also very new for me :D

I can just warn for the correct function for random numbers and functions called for the active player (using netmessage and not pushmission for example, or prefer to use the PlayerDoTurn game event)
 
So, me and some friends have been trying out different mods online using this. Your RED Modpack works perfectly which is great, as that's something we have wanted in multiplayer for a long time. I tried a mod that modified luxury resources that didn't work online unfortunately, and I just tried Fortress Borders which worked up until some desync-ing due to workers building improvements within the borders, so that's now disabled.

I am curious to try out JFD's Civilizations within a pack, to see if new civ's play nice - It seems as if new civilizations have always been possible online through DLC editing, but has anyone had any experience trying it out with MPMPM? The only issues I can forsee is some civs having non-mp friendly Lua code for their specials, and maybe RED Modpack not playing nice with their units.
 
I am curious to try out JFD's Civilizations within a pack, to see if new civ's play nice - It seems as if new civilizations have always been possible online through DLC editing, but has anyone had any experience trying it out with MPMPM? The only issues I can forsee is some civs having non-mp friendly Lua code for their specials, and maybe RED Modpack not playing nice with their units.
It'll be up to the mods themselves I imagine; but I had no problem using JFD's France.
 
I am curious to try out JFD's Civilizations within a pack, to see if new civ's play nice - It seems as if new civilizations have always been possible online through DLC editing, but has anyone had any experience trying it out with MPMPM? The only issues I can forsee is some civs having non-mp friendly Lua code for their specials, and maybe RED Modpack not playing nice with their units.

I had the same issue with JFD's Civilizations - MPMM returned 'invalid pattern capture' each time I tried to compile one of the mods into a pack.

Other than that, the program has been extremely useful so far, as the vast majority of mods we've tested posed no issues whatsoever! :)
 
Would anyone be able to try out any of the Colonialist Legacies mods in MP?
 
Would anyone be able to try out any of the Colonialist Legacies mods in MP?

I can confirm that Canada and Mexico work seemingly without issue both on their own and with a large selection of other mods I also included. I ran into the same "invalid pattern capture" issue with Australia, so do you know if that civilization shares any similarities of note with JFD's civilizations? I have yet to try Vietnam or the Philippines, but I'll get back to you with the results of those shortly. :)
 
Hello

May I congratulate you on a brilliant tool.

I am having a "problem" and as one potential answer isn't covered by your "prerequisites" I was hoping someone could help.

I currently have 4 mods that each have a .dll file as part of their files, all with the same file name CvGameCore_Expansion2.dll meaning I can only place one of the dll's in the MP_MODPACK 'root' directory.
The question is: should I be combining the dll's if I want to use all the mods (if so; how?), am I placing it in the wrong place in the mod pack or is there something else I need to be doing?

Thank you anyone for any help.
 
I currently have 4 mods that each have a .dll file as part of their files
You're not using them together now (whether you realize it or not). DLL mods don't work together whether you use MPMPM or not.

should I be combining the dll's if I want to use all the mods (if so; how?)
You're not going to be able to merge DLLs unless you know C++ and have the time and energy to dive into that--here's your starting point.

Otherwise, you pick one.

Note that there's this combined DLL for DLL - Various Mod Components, Civ IV Diplomacy Features, and City State Diplomacy, in case those are some of the DLLs you're using. Note that the supported versions might be somewhat behind the latest.

There are partial attempts to fold in other DLLs (e.g., R.E.D. WWII, Smart AI), but it's often a difficult prospect, conflicts arise, and the mod authors would need to work together to make it happen...
 
We tried to play a pack with Communitas, InfoAddict, Unlimited Barb XP and Capture Great People to test the tool. Everything went great without desyncs or somesuch, but lots of events didn't fire. No random events, Terracotta didn't give 3 city radius, no free culture buildings from Tradition and no free defense unit from the Honor Policy. Besides that, most of the tooltips were missing, as mentioned earlier in the thread.

Surprisingly stable though and a great tool.
 
Ok filtered out all bar the combined dll capable one but come up against two problems, one I dont expect much of an answer as it's impossible to answer but anyway.

1. (Maybe a newbish question) Are map scripts considered Scenarios? This is because Small Continents Delux (http://steamcommunity.com/sharedfiles/filedetails/?id=90016576) works in mods but has no effect when included in modpack.

2. Has anyone had success loading all 3: DLL - Various Mod Components, Civ IV Diplomacy Features, and City State Diplomacy, using a modpack? At the moment for me when combined all three (but not with just DLL, still testing) they cause a runtime error in the SinglePlayer.lua UI element at line 70 with a nil value for World (or some such) CTD the game when you click setup game.

I know there is so much potential conflict that no one can probably give me much help but no harm asking right =).
 
Hello, wondering what I'm doing wrong here. I (hopefully) correctly installed the mod. It shows up fine in the mods menu. I loaded up the mods I wanted without trouble, tried to follow directions in FireTuner, but the Lua Console option wasn't available. So I decided to test for the problem, starting by removing ALL other mods and just loading up the MPMaker one. I also removed EVERYTHING except BNW in the DLC menu. Loaded up just fine, headed over to FireTuner. Looked in the Lua Console for the state, and it wasn't there. It wasn't truncated, or renamed. It wasn't there.

Can anyone shed some light on this?

Note: I would put some logs in, but I don't know which to put in.

Edit: Cleared cache and tried again. Nothing.
 
Hello, wondering what I'm doing wrong here. I (hopefully) correctly installed the mod. It shows up fine in the mods menu. I loaded up the mods I wanted without trouble, tried to follow directions in FireTuner, but the Lua Console option wasn't available. So I decided to test for the problem, starting by removing ALL other mods and just loading up the MPMaker one. I also removed EVERYTHING except BNW in the DLC menu. Loaded up just fine, headed over to FireTuner. Looked in the Lua Console for the state, and it wasn't there. It wasn't truncated, or renamed. It wasn't there.

Can anyone shed some light on this?

Note: I would put some logs in, but I don't know which to put in.

Edit: Cleared cache and tried again. Nothing.

Do you have the firetuner link enabled in the options textfile for civ? See this:


Firetuner How-to


Cheers,
G
 
Can anyone write simpler guide? I dont know how build a project with Modbuddy for example
Or can you just compile for me Smart Ai mod and Info Addict?
 
Trying to do this with the wonderful Colonialist Legacy mods and I keep getting a runtime error in the FireTuner's LUA. Am I doing something wrong, or are the mods I'm trying to use incompatible?
 
What's the error message ?
 
I've since had some bad computer problems, so it MAY be unrelated. I only remember that it said "runtime error," but now I can't run Civ at all, so I'll have to get back to this when I fix my install.
 
I receive the following error message after it says it is copying DLL - Various Mod Components.

Code:
Runtime Error: C:\Users\[USERNAME]\Documents\My Games\Sid Meier's Civilization 5\MODS\MultiPlayer ModsPack Maker\MPMP_Maker.lua:160: invalid pattern capture
 
So I've finally gotten custom music to work with this, but it's not pretty. The good news, it can probably be automated in the lua script. The bad news is, it's as subtle as a battering ram.

First, any custom audio data must be converted from the mod-specific format to the one used by DLC civs. Specifically:

<GameData>
<Audio_Sounds>
<Row>
<SoundID>SND_DOM_SPEECH_CHIME</SoundID>
<Filename>Chime</Filename>
<LoadType>Streamed</LoadType>
</Row>
...
</Audio_2DSounds>
</GameData>

needs to be turned into:

<AudioDefinesFile>
<SoundDatas>
<SoundData>
<SoundID>SND_DOM_SPEECH_CHIME</SoundID>
<Filename>Chime</Filename>
<LoadType>Streamed</LoadType>
</SoundData>
...
</SoundDatas>
</AudioDefinesFile>

and

<GameData>
<Audio_Sounds>
<Row>
<SoundID>SND_DOM_SPEECH_CHIME</SoundID>
<Filename>Chime</Filename>
<LoadType>Streamed</LoadType>
</Row>
...
</Audio_2DSounds>
</GameData>

needs to become

<Script2DFile>
<Script2DSounds>
<Script2DSound>
<ScriptID>AS2D_LEADER_MUSIC_YUNO_PEACE</ScriptID>
<SoundID>SND_LEADER_MUSIC_YUNO_PEACE</SoundID>
<SoundType>GAME_MUSIC</SoundType>
<iMaxVolume>60</iMaxVolume>
<iMinVolume>60</iMinVolume>
<bIsMusic>true</bIsMusic>
<iPriority>1</iPriority>
</Script2DSound>
...
</Script2DSounds>
</Script2DFile>

I did this manually, but fortunately, this can be done relatively easy by reading the in-game mods database and outputting a file with your lua script (note that iPriority is 1 for most files, and just sets how often certain variations of the music play).

What got me was, no matter how I fiddled with the file locations and civ5Pkg, even when I imitated exactly what Expansion 1 and 2 were doing, I could not get the game to read the information. this was very puzzling, and I tried for a long time.

I finally managed it by brute-forcing:

1. Copy from Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion\Sounds\XML the files AudioDefinesExpansion1.xml and Audio2DScriptsExpansion1.xml into the MP_MODSPACK folder
2. Copy-paste everything necessary for the custom sound xml directly into these two files (which provide their own Script2DFile tags), making sure to put the audio defines in the audio defines file and the scripts in the scripts file.

This seems to work because the MP_MODSPACK version of the files overrides the version already called on by Expansion 1.

[Note: I also put the xml files into MP_MODSPACK/Sounds/XML and all music into MP_MODSPACK/Sounds, as well as adding <Directory>Sounds</Directory> into the Civ5Pkg. I don't think this is actually necessary, but just noting.]

I'm sure there's a prettier way to do it, but this seems to work.

Gedemon, if you want me to explain more clearly, I'd be glad to. I might even try my hand at expanding the lua script to do this.
 
Status
Not open for further replies.
Top Bottom