MPMPM - Multiplayer Mod DLC-hack (Updated!)

Has someone already produced a pack containing Colonialist Legacies, More Civilizations or Tomatekh like the JFD one?

I have issues creating one myself because half of the mods don't load.

I do not believe so. Regarding Colonialist Legacies specifically, a good number of his mods have coding quirks that require specific edits for multiplayer (the unique improvement in the Inuit civ, for example, only performs it function if it detects the owning player is the "Active Player". This causes desyncs every turn in multiplayer once the improvement is built, because in the multiplayer the other human players are never the "Active Player" on any given computer).

Part of the reason the JFD pack exists is that JFD codes his lua extremely scrupulously, I believe because he has done multiplayer stuff before. Hence, his civs are usually plug and play with multiplayer.

EDIT: That being said, I can try to debug why they don't load when you make your modpack? What exactly is the issue?
 
I do not believe so. Regarding Colonialist Legacies specifically, a good number of his mods have coding quirks that require specific edits for multiplayer (the unique improvement in the Inuit civ, for example, only performs it function if it detects the owning player is the "Active Player". This causes desyncs every turn in multiplayer once the improvement is built, because in the multiplayer the other human players are never the "Active Player" on any given computer).

Part of the reason the JFD pack exists is that JFD codes his lua extremely scrupulously, I believe because he has done multiplayer stuff before. Hence, his civs are usually plug and play with multiplayer.

EDIT: That being said, I can try to debug why they don't load when you make your modpack? What exactly is the issue?

I'll be honest, I've been using the DLC in single-player mode because it's surprisingly handy for that. It just feels really clean! :rolleyes:

When I get the mods from the steam workshop they often don't show up in the list, preventing me from even using them (but that's a quirk of the workshop).

When I manually install them (unzipping them), they do show up, but after loading they do not seem to work ingame. The civs I am speaking of simply do not show up in the civ list or even in the civilopedia even though they are listed as loaded. Ergo, I can't even attempt to make a modpack.

Also, I read on the workshop that you can only have 1 pack active at a time. Is there any way around this? I was originally planning to have a pack at the ready and uploaded here for each big civ line (JFD, MC, CL, LITE, etc) that could be switched out and combine whenever wanted, but I guess that isn't in the cards then!

Still, this is amazing. :goodjob:

EDIT: I'd like to note that it probably a personal issue, not one of the civs themselves. However, this http://forums.civfanatics.com/showthread.php?t=552222 shows that I'm not the only one with that issue.
 
If anyone has had any trouble with running any of the following civs in MP, now is the time to let me know: Russia (Peter I), Sweden (Karl XII), Switzerland, Prussia. I am preparing to update all of these at once (and release two new ones alongside), and to release a pack of these together. I hope to also include a MP pack of them all, too (it will be the first of such packs that I've created for MP). I do know that a few of my civs have trouble with MP (Roosevelt, Lincoln), and I'll be looking into them eventually (when I do my WW2 and Industrial Era updates, respectively).
 
Hey JFD, just yesterday I tried to include Cultural Diversity into a modpack (with disabled events for MP), and somehow this will break the Civilopedia:
When you try to open an entry for any unit, everything will be empty with just a few question marks inside, and all you can do is to shutdown Civ 5.

When I temporarily removed the CD-folders from the modpack (to see it this was the cause) and created a new game, it gave me a few warning popups about missing fonts in xml-files, if that helps to identify the problem.

Do you know what I could try to solve this?
 
I'll be honest, I've been using the DLC in single-player mode because it's surprisingly handy for that. It just feels really clean! :rolleyes:

When I get the mods from the steam workshop they often don't show up in the list, preventing me from even using them (but that's a quirk of the workshop).

When I manually install them (unzipping them), they do show up, but after loading they do not seem to work ingame. The civs I am speaking of simply do not show up in the civ list or even in the civilopedia even though they are listed as loaded. Ergo, I can't even attempt to make a modpack.

Also, I read on the workshop that you can only have 1 pack active at a time. Is there any way around this? I was originally planning to have a pack at the ready and uploaded here for each big civ line (JFD, MC, CL, LITE, etc) that could be switched out and combine whenever wanted, but I guess that isn't in the cards then!

Still, this is amazing. :goodjob:

EDIT: I'd like to note that it probably a personal issue, not one of the civs themselves. However, this http://forums.civfanatics.com/showthread.php?t=552222 shows that I'm not the only one with that issue.

Hey JFD, just yesterday I tried to include Cultural Diversity into a modpack (with disabled events for MP), and somehow this will break the Civilopedia:
When you try to open an entry for any unit, everything will be empty with just a few question marks inside, and all you can do is to shutdown Civ 5.

When I temporarily removed the CD-folders from the modpack (to see it this was the cause) and created a new game, it gave me a few warning popups about missing fonts in xml-files, if that helps to identify the problem.

Do you know what I could try to solve this?

In both of your cases, it would be great for debugging purposes to enable logging (See http://forums.civfanatics.com/showthread.php?t=487482 ) and then inspect the logs (or post them here) after deliberately triggering the error (probably just starting a game for Fenragon, and opening the Civilopedia for Lynnes). The errors that show up in the logs are often a big hint as to the ultimate source of an issue.

Thanks!
 
If anyone has had any trouble with running any of the following civs in MP, now is the time to let me know: Russia (Peter I), Sweden (Karl XII), Switzerland, Prussia. I am preparing to update all of these at once (and release two new ones alongside), and to release a pack of these together. I hope to also include a MP pack of them all, too (it will be the first of such packs that I've created for MP). I do know that a few of my civs have trouble with MP (Roosevelt, Lincoln), and I'll be looking into them eventually (when I do my WW2 and Industrial Era updates, respectively).

Hurrah! Good news abound today!

Really, the only ones that need fixing are the a) currently bugged/broken ones (no offense) such as Roosevelt, Lincoln, and Novgorod. (I still can't figure out what about Lithuania is bugged :P) Nri I've heard of potential problems, but nothing concrete.

Also, I haven't tested all of your civs, but it would be pertinent to see if your coding allows for UI in MP (Normandy and Bavaria). I've heard of CL's Inuit to Desync the game because it calls Human Player. Hopefully your coding is slightly more tight than that :p

One final note, De Gaulles Cafe should be both checked for MP compatibility, and updated so that it cannot be sold in cities by conquering players.
 
I should mention to the community that in light of this news, I will be taking my JFD Modpack down. Apologies if you were planning on downloading it, but I would recommend you wait for the version created by the Civ creator himself.
 
Could someone please explain how exactly civs with custom UIs (interfaces, not improvements) interact poorly with MP, and how one should go about avoiding this.

The vast majority of things done in Lua affect the local machine only. Generally, if you aren't using something from the Network API, it's only making changes to the game state on the local machine, which leads to desyncs.

However, I have figured out a way to hijack the Network.SendSellBuilding function to allow for custom UIs to be able to push changes they make to the game out to the Network. I use it in my Neptunia Civilizations and my Broken Lords Civilization without a problem. I have actually been working on a project which aims to streamline the use of this trick and allow it to be used between multiple mods without any conflicts, but I just haven't had the time to work on it lately.
 
Could someone please explain how exactly civs with custom UIs (interfaces, not improvements) interact poorly with MP, and how one should go about avoiding this.

I'm not sure what exactly Kesler is referring to, nor have I personally ever played Normandy or Bavaria, so he'll have to be the one to verify what he's talking about. However, I glanced through Bavaria, and I think it will end up having the same problem Events and Decisions has, which is:

Code:
unction OnSelectButton()
	Controls.MainBG:SetHide(true)
	Controls.Main:SetHide(true)	
	local iProductionReward = math.ceil(Players[Game.GetActivePlayer()]:GetTotalJONSCulturePerTurn() * 5)
	Players[Game.GetActivePlayer()]:GetCityByID(citySelectedID):ChangeBuildingProduction(Players[Game.GetActivePlayer()]:GetCityByID(citySelectedID):GetProductionBuilding(), iProductionReward)
end
Controls.SelectButton:RegisterCallback(Mouse.eLClick, OnSelectButton)

The problem here is two-fold -- the current code has no way to convey the fact that a city has been clicked to all the other players in a multiplayer game, and if the game is played in simultaneous or hybrid multiplayer mode, any other player that calls Game.GetActivePlayer() will have it return themselves, rather than the player intended by this function. The turn after this box is clicked, the difference in production levels on the building will cause a desync.

Sadly, I do not know of a good workaround for this; this could be a simple matter of ignorance on my part.

[Mid-post EDIT: Actually, see Vicevirtuoso's post above. I had not heard of this trick. Maybe someone can try to fix Events and Decisions with it...]

As far as I am aware, though, there is nothing fundamentally wrong with a custom interface, per se. The problem is when is the interface is used to make a change to the game state that the Civ 5 netcode does not automatically transmit over the network (As an illustration of this, the custom cultural overview lua works fine in multiplayer because the civ 5 netcode apparently automatically updates whenever a work of art is moved).

(Another problem can arise if you make a custom entry point, like is done in some of the Pick'n Mix mods. There is a fairly simple workaround, though...)

[EDIT: Also, one important useful pseudo-exception to only the Network API updating all machines is Game.Rand(), which initializes with the same seed whenever a MP game starts or is resynchronized. As long as there is no discrepancy in how and when Game.Rand() is called on different machines, it will return the same on all machines. Hence, Game.Rand() is the superior option to the lua generic math.random()...though confusingly enough, the two functions have a slightly different argument structure, and when called for an integer N, Game.Rand() returns a value from 0 to N-1, and math.random() returns a value from 1 to N...)]
 
The vast majority of things done in Lua affect the local machine only. Generally, if you aren't using something from the Network API, it's only making changes to the game state on the local machine, which leads to desyncs.

However, I have figured out a way to hijack the Network.SendSellBuilding function to allow for custom UIs to be able to push changes they make to the game out to the Network. I use it in my Neptunia Civilizations and my Broken Lords Civilization without a problem. I have actually been working on a project which aims to streamline the use of this trick and allow it to be used between multiple mods without any conflicts, but I just haven't had the time to work on it lately.

this is exactly the problem of question number 4 here:
http://forums.civfanatics.com/showthread.php?t=550217
Maybe one of you can convince whoward or gazebo to also work on this problem ;)
Gedemon wrote something about it, but I'm not able to do anything he suggested.

@Vicevirtuoso: of course it would be great, if you have an solution which can easily implemented to all existing mods :) So please keep on working.
 
I'm not sure what exactly Kesler is referring to, nor have I personally ever played Normandy or Bavaria, so he'll have to be the one to verify what he's talking about. However, I glanced through Bavaria, and I think it will end up having the same problem Events and Decisions has, which is:

The problem I was referring to was in relation to CL's Inuit Unique Improvement (Inukshuk) I had heard that because of the way it was programmed, it called on the Human Player (or something or other) which wouldn't work in a MP game because there are multiple humans, and causes a Desync as a result.

From what I can tell, JFD has sturdier coding, so his Civ's Unique Improvements probably sync up among all players. Still, I just wanted to provide a heads up, just in case.
 
this is exactly the problem of question number 4 here:
http://forums.civfanatics.com/showthread.php?t=550217
Maybe one of you can convince whoward or gazebo to also work on this problem ;)
Gedemon wrote something about it, but I'm not able to do anything he suggested.

@Vicevirtuoso: of course it would be great, if you have an solution which can easily implemented to all existing mods :) So please keep on working.

Yep, that would be amazing!
 
So I'm a bit confused because I figured this would be in the first post.

If I want to play this: http://forums.civfanatics.com/showthread.php?t=528034 (Community Patch Project Full (EUI Version))

I installed it via the installed and it asked for where my DLC folder was so I thought it'd make it multiplayer compatible. Did I miss something?

Me and two other friends want to play this in multiplayer.
 
So I'm a bit confused because I figured this would be in the first post.

If I want to play this: http://forums.civfanatics.com/showthread.php?t=528034 (Community Patch Project Full (EUI Version))

I installed it via the installed and it asked for where my DLC folder was so I thought it'd make it multiplayer compatible. Did I miss something?

Me and two other friends want to play this in multiplayer.

The installer for the CP installs the mod itself, which can be enabled via the mods-option from the main menu (no multiplayer).
To create a multiplayer compatible modpack, you also have to run this tool and follow the steps in the first post.
It creates a fake-DLC, which will always be active (no need for the sluggish mods-menu anymore) and therefore lets you access multiplayer with a modded game.
 
The installer for the CP installs the mod itself, which can be enabled via the mods-option from the main menu (no multiplayer).
To create a multiplayer compatible modpack, you also have to run this tool and follow the steps in the first post.
It creates a fake-DLC, which will always be active (no need for the sluggish mods-menu anymore) and therefore lets you access multiplayer with a modded game.

I tried following the instructions and I get a runtime error when doing the CreateMP():

Runtime Error: C:\Users\\Documents\My Games\Sid Meier's Civilization 5\MODS\Multiplayer Mods Workaround (v 1)\MPMP_Maker.lua:124: attempt to call field 'DeleteMPMP' (a nil value)
\Users\\Documents\My Games\Sid Meier's Civilization 5\MODS\Multiplayer Mods Workaround (v 1)\MPMP_Maker: Deleting previous ModPack if exist...

I also realised that the reason they want the DLC folder is to create the EUI specific for CBP, so won't everyone need to install that anyway?
 
Well, I was somewhat hoping this would be unnecessary, but try enabling lua logging: http://forums.civfanatics.com/showthread.php?t=487482 . Then, if you could, send me your lua log right after attempting to start a multiplayer game (and presumably crashing)

This is the only thing writen in the Lua.log when the game crash.

[6207.404] Initializing Lua 5.1.4
[6366.338] InstalledPanel: Refreshing Mods
[6366.338] InstalledPanel: GetModBrowserListings()
[6366.650] InstalledPanel: Refreshing Mods
[6366.650] InstalledPanel: GetModBrowserListings()
 
I tried following the instructions and I get a runtime error when doing the CreateMP():

Runtime Error: C:\Users\\Documents\My Games\Sid Meier's Civilization 5\MODS\Multiplayer Mods Workaround (v 1)\MPMP_Maker.lua:124: attempt to call field 'DeleteMPMP' (a nil value)
\Users\\Documents\My Games\Sid Meier's Civilization 5\MODS\Multiplayer Mods Workaround (v 1)\MPMP_Maker: Deleting previous ModPack if exist...

Go to your mods folder and open the one for the Community Patch (not CBP):

1. remove the CvGameCore_Expansion2.dll, put it somewhere safe (you will need to add it again after the modpack is created)

2. open the modinfo file and search for this entry and delete it:
<File md5="666C1D01C1CBEDDA4BF1B92A0FB573F2" import="1">CvGameCore_Expansion2.dll</File>

note: this line is the one of CP v.18-9, it will be a bit different for every release, so make sure to save it as well

3. now you should be able to run MPMPM. when it's done...

4. ...go to your assets\DLC\MP_Modspack folder and put the DLL from step 1 right there

5. also in the modspack-folder, open the mods\community patch-folder, open the modinfo file and put the line from step 2 back in (you can alternatively put the DLL from step 1 into this folder, whatever you prefer)

Done. Now start the game and enjoy a well modded game without having to use the ingame mod-option, which is just lame.

I also realised that the reason they want the DLC folder is to create the EUI specific for CBP, so won't everyone need to install that anyway?

Not sure what the question is, but all of your friends need the modpack you created. Just give it to everyone, don't let them create it on their own, this would make your lifes only harder, trust me.
As soon as everyone copied the modpack into the assets\DLC-folder, just start an online game as you normally would.


Oh and one more thing: When playing multiplayer with the CBP, could you please post your experiences (any crashes? desyncs? everything fine?) into this thread? It would help Gazebo (guy who created CP/ CBP) to fix any issues you may encounter, and "everything went just fine" is also welcome, I guess. ;)

Have fun!
 
Go to your mods folder and open the one for the Community Patch (not CBP):

1. remove the CvGameCore_Expansion2.dll, put it somewhere safe (you will need to add it again after the modpack is created)

2. open the modinfo file and search for this entry and delete it:


note: this line is the one of CP v.18-9, it will be a bit different for every release, so make sure to save it as well

3. now you should be able to run MPMPM. when it's done...

At this stage the first time I got this I got a huge amount of runtime errors. It was the same one over and over I think it was missing dll or something but don't quote me on that since I forgot to copy it. It spammed the Lua for ages so I alt+f4ed out of it, closed and reopened Civ.

Now I get:
Runtime Error: _cmdr = {CreateMP()}:1: attempt to call global 'CreateMP' (a nil value)
stack traceback:
_cmdr = {CreateMP()}:1: in main chunk

Not sure what the question is, but all of your friends need the modpack you created. Just give it to everyone, don't let them create it on their own, this would make your lifes only harder, trust me.
As soon as everyone copied the modpack into the assets\DLC-folder, just start an online game as you normally would.

CBP comes with Enhanced User Interface for it so I think they have to install it anyway to get that set up.

Oh and one more thing: When playing multiplayer with the CBP, could you please post your experiences (any crashes? desyncs? everything fine?) into this thread? It would help Gazebo (guy who created CP/ CBP) to fix any issues you may encounter, and "everything went just fine" is also welcome, I guess. ;)

Have fun!

Sure can do this.
 
Now I get:
Runtime Error: _cmdr = {CreateMP()}:1: attempt to call global 'CreateMP' (a nil value)
stack traceback:
_cmdr = {CreateMP()}:1: in main chunk

CBP comes with Enhanced User Interface for it so I think they have to install it anyway to get that set up.

Could you give us your modslist, please?

@EUI: Oh I see, just put the folder called UI_bc1 into your modpack folder and send it along with the rest to your friends, they don't have to install something manually.
As soon as they put the modpack (including the EUI-folder) into their assets\DLC, it is ready to go.
 
Back
Top Bottom