MPMPM - Multiplayer Mod DLC-hack (Updated!)

Just to make myself more precise - the first method works (putting code in the middle of the file), not the second one (putting the code at the end of the file)!
 
Do you want me to link this in the OP?

Regarding files with the same name, if a mod contains a file with the same name as a file in the base game, this is almost certainly deliberate, to override a file in the base game (not always though). Multiple mods with the same file are a bit trickier: if they all override a base game file, then it may pose a problem, though many of the most popular mods have already hashed that out between themselves (because this is a problem even when playing with normal mods). If they all jsut happen to have a file of the same name, though, it doesn't matter if it's .xml, but it does matter if it's .lua.

thanks for the explanation :)

I guess this modpack does not work correctly, because at least the Feature mod is not compatible to EUI =/ (I decided to not use the City State mod in my modpack project).

I tried to solve the incompatibility here:
http://forums.civfanatics.com/showthread.php?p=13773999#post13773999
maybe you know what I did wrong? I just tried to have just one .lua file that overwrites the base game files, instead of two.
 
Just to make myself more precise - the first method works (putting code in the middle of the file), not the second one (putting the code at the end of the file)!

Yeah, I caught that earlier when you mentioned it. Thanks. I've decided not to put a custom fix for those two mods into the base code - I don't want to create too many special cases. But I did link the post in the OP.
 
thanks for the explanation :)

I guess this modpack does not work correctly, because at least the Feature mod is not compatible to EUI =/ (I decided to not use the City State mod in my modpack project).

I tried to solve the incompatibility here:
http://forums.civfanatics.com/showthread.php?p=13773999#post13773999
maybe you know what I did wrong? I just tried to have just one .lua file that overwrites the base game files, instead of two.

Have you looked at this post: http://forums.civfanatics.com/showpost.php?p=13720043&postcount=352 ? I know it's not necessarily satisfying, but whoward almost always knows what he's talking about - it's time to comb your other mods.
 
Have you looked at this post: http://forums.civfanatics.com/showpost.php?p=13720043&postcount=352 ? I know it's not necessarily satisfying, but whoward almost always knows what he's talking about - it's time to comb your other mods.
Thanks :)
Interesting that whoward did not post this version of Civ IV Diplo in his main thread... I will try it, but I was not able to figure out, which bug he aims to solve with this new version... I guess it was not the incombatibility to EUI.
edit:
tested it and it does not solve the EUI problem =/
 
Yeah, I caught that earlier when you mentioned it. Thanks. I've decided not to put a custom fix for those two mods into the base code - I don't want to create too many special cases. But I did link the post in the OP.

And just to be a party pooper - this method works for everything apart from Wonders Overlay (http://www.picknmixmods.com/mods/e915c6ee-16bc-44cf-9a2f-15746f414c63/mod.html). I was trying to add this one to the mix, strictly followed your instructions, and what it does is that the whole minimap disappears. I've been comparing all the files from this mod with other overlays and I have found nothing suspicious that would make this overlay different to others.

That's what happened according to lua log:
[18300.695] MiniMapPanel: This is the modded MiniMapPanel from 'UI - Overlay Antiquities'
[18300.695] OverlayLuxuries_MiniMapOverlayHook: Adding Luxuries to group luxuries
[18300.695] OverlayAntiquities_MiniMapOverlayHook: Adding Antiquities to group other
[18300.711] OverlayWonders_MiniMapOverlayHook: Adding Wonders to group terrain
[18300.711] OverlayResources_MiniMapOverlayHook: Replacing Resources in group resources
[18300.711] OverlayRoadAndRail_MiniMapOverlayHook: Adding Roads and Rails to group routes
[18300.711] Runtime Error: Assets\DLC\MP_MODSPACK\UI\InGame\MiniMapPanel.lua:116: attempt to index field 'Minimap' (a nil value)
[18300.711] Runtime Error: Error loading Assets\DLC\MP_MODSPACK\UI\InGame\MiniMapPanel.lua.

and a moment later:
[18302.848] Runtime Error: Assets\DLC\MP_MODSPACK\UI\InGame\MiniMapPanel.lua:105: attempt to index field 'Minimap' (a nil value)
[18302.848] Runtime Error: Assets\DLC\MP_MODSPACK\UI\InGame\MiniMapPanel.lua:105: attempt to index field 'Minimap' (a nil value)

I will try to ask WHoward in his thread about possible reasons, but for the time being I think you have to mention in the OP that this method doesn't work on Wonders Overlay...
 
Some questions about MPMPM:

1) Does the MPMPM not support more languages than english? I translated half of the mods and some other mods had additional german textchanges. But neither my translation nor the german textchanges seems to work in the modpack (I will try tomorrow if one of the mods causes this, but it's quiet sure that MPMPM is causing it)
edit: yes MPMPM is causing it =/ this is not good, since textchanges does not appaer in game... I would have to set the whole game to english, to play.

2) after creating the modpack, are changes in the mods xml files still possible? or do I have to create a new modpack after it?

3) Why is it not possible to select modpack like DLC?
 
And just to be a party pooper - this method works for everything apart from Wonders Overlay (http://www.picknmixmods.com/mods/e915c6ee-16bc-44cf-9a2f-15746f414c63/mod.html). I was trying to add this one to the mix, strictly followed your instructions, and what it does is that the whole minimap disappears. I've been comparing all the files from this mod with other overlays and I have found nothing suspicious that would make this overlay different to others.

That's what happened according to lua log:
[18300.695] MiniMapPanel: This is the modded MiniMapPanel from 'UI - Overlay Antiquities'
[18300.695] OverlayLuxuries_MiniMapOverlayHook: Adding Luxuries to group luxuries
[18300.695] OverlayAntiquities_MiniMapOverlayHook: Adding Antiquities to group other
[18300.711] OverlayWonders_MiniMapOverlayHook: Adding Wonders to group terrain
[18300.711] OverlayResources_MiniMapOverlayHook: Replacing Resources in group resources
[18300.711] OverlayRoadAndRail_MiniMapOverlayHook: Adding Roads and Rails to group routes
[18300.711] Runtime Error: Assets\DLC\MP_MODSPACK\UI\InGame\MiniMapPanel.lua:116: attempt to index field 'Minimap' (a nil value)
[18300.711] Runtime Error: Error loading Assets\DLC\MP_MODSPACK\UI\InGame\MiniMapPanel.lua.

and a moment later:
[18302.848] Runtime Error: Assets\DLC\MP_MODSPACK\UI\InGame\MiniMapPanel.lua:105: attempt to index field 'Minimap' (a nil value)
[18302.848] Runtime Error: Assets\DLC\MP_MODSPACK\UI\InGame\MiniMapPanel.lua:105: attempt to index field 'Minimap' (a nil value)

I will try to ask WHoward in his thread about possible reasons, but for the time being I think you have to mention in the OP that this method doesn't work on Wonders Overlay...

Hmm, from a fast look I can't see why Wonders specifically would break that. I won't be able to look at it in detail until this weekend, so just pointing out I saw it.
 
Some questions about MPMPM:

1) Does the MPMPM not support more languages than english? I translated half of the mods and some other mods had additional german textchanges. But neither my translation nor the german textchanges seems to work in the modpack (I will try tomorrow if one of the mods causes this, but it's quiet sure that MPMPM is causing it)
edit: yes MPMPM is causing it =/ this is not good, since textchanges does not appaer in game... I would have to set the whole game to english, to play.

2) after creating the modpack, are changes in the mods xml files still possible? or do I have to create a new modpack after it?

3) Why is it not possible to select modpack like DLC?

1) it indeed supports only English, primarily for compactness reasons. That being said, it's very simple to modify it to support additional languages:
If you open MPMP_Maker.lua in a text editor, you can find the function:
Code:
function CopyTextDatabase()
	print2 ("Copying: Language_en_US")
	CleanWrite( textFileName, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- generated by MP Modpacks Maker (Gedemon) -->\n<GameData>\n	<Language_en_US>", true ) -- Create file
	local sDatabase = ""	
	local query = "SELECT * FROM Language_en_US;" -- to do: select by user language...
	for result in DB.Query(query) do
		if not (string.find(tostring(result.Tag), "TURN_REMINDER_EMAIL")) then -- to do : encode the HTML tags in those strings...
			sDatabase = "		<Replace Tag=\"".. tostring(result.Tag) .."\"> \n"
			sDatabase = sDatabase .. "			<Text>\n				".. tostring(result.Text) .."\n			</Text>\n"
			if result.Gender then
				sDatabase = sDatabase .. "			<Gender>\n				".. tostring(result.Gender) .."\n			</Gender>\n"
			end
			if result.Plurality then
				sDatabase = sDatabase .. "			<Plurality>\n				".. tostring(result.Plurality) .."\n			</Plurality>\n"
			end
			sDatabase = sDatabase .. "		</Replace>"
			CleanWrite( textFileName, sDatabase, false)
		end
	end
	CleanWrite( textFileName, "	</Language_en_US> \n</GameData>", false)
end

Just make a copy of this function with a different name, and replace references to Language_en_US with the right one for the language you want to do. Then find the line:
Code:
print2 ("Getting Texts...")
	CopyTextDatabase()

And just add your copy below that. In fact, it'd be easy for me to add support for all languages with a for loop. Perhaps I'll do that later...

2) Changes to your mods xml files will have literally no effect. You have to make your changes to the xml files in the Override folder.

3) If you're asking why there's no way to turn the whole pack off/on, I don't know, and I don't think Gedemon knew either. It's something about how offical dlc's are made that was never figured out.

If you're asking why it's not possible to toggle individual mods on/off, it fundamentally has to do with the fact that mods support SQL but not dlcs. See here for more detail. Otherwise, Jai de Herr's tool (link) would be the perfect solution, but unfortunately it can't deal with sql mods.
 
And just add your copy below that. In fact, it'd be easy for me to add support for all languages with a for loop. Perhaps I'll do that later...
Great, thanks! :)

2) Changes to your mods xml files will have literally no effect. You have to make your changes to the xml files in the Override folder.
Good to know :)

3) If you're asking why there's no way to turn the whole pack off/on, I don't know, and I don't think Gedemon knew either. It's something about how offical dlc's are made that was never figured out.
Yes, that was my question, since we build the mods "like DLC" why they do not act like DLC ^^ But okay, thanks for the answer :)
 
I'm probably just blind, but after downloading this mod again from the file here, I no longer get the mpmapmaker thing to show up in the firetuner dropdown.
 
I'm probably just blind, but after downloading this mod again from the file here, I no longer get the mpmapmaker thing to show up in the firetuner dropdown.

did you do all steps? unpacked the Multiplayer Mods Workaround file, copied it into your mods folder and activated it in the mods menu? And then the MPMP is on the top of the dropdown menu starts with name/documents...?

Here it does work, so I guess it is a problem on your side, if it does not show up.
 
did you do all steps? unpacked the Multiplayer Mods Workaround file, copied it into your mods folder and activated it in the mods menu? And then the MPMP is on the top of the dropdown menu starts with name/documents...?

Here it does work, so I guess it is a problem on your side, if it does not show up.

I just redid it just now. Noticed I had no future units still ticked, but even unticking that didn't make it show up.

I only enabled a bunch of a civs. Colonialist Legacies, JFD's, MC, Tarscio, Surkact, Patria Grande, Leugi's.. Not ALL of them, just several from each. I'll reinstall the SDK, see if that fixes it.
 
I'm probably just blind, but after downloading this mod again from the file here, I no longer get the mpmapmaker thing to show up in the firetuner dropdown.

Well, maybe the obvious solution will help. Are you sure you have checked at the beginning of the lua list? In my case the mpmp_maker is hidden, but it's the fourth from the top:

6. Once game is loaded, switch to fire tuner. The active tab should be "Lua Console". Below the tab name, there is a dropdown menu. Select the MPMP_Maker from that list (should be one of the first, the name may be truncated but will start with "\Users\[yourName]\Documents").
 
Well, maybe the obvious solution will help. Are you sure you have checked at the beginning of the lua list? In my case the mpmp_maker is hidden, but it's the fourth from the top:

6. Once game is loaded, switch to fire tuner. The active tab should be "Lua Console". Below the tab name, there is a dropdown menu. Select the MPMP_Maker from that list (should be one of the first, the name may be truncated but will start with "\Users\[yourName]\Documents").

Yeah, I only have 2 sets of numbers up there. 242 and 244 iirc.
 
Hi Serp and congratulations on finishing your massive modpack before me :)

Have you tested it in actual multiplayer games, or only as a modpack in single?
The reason I am asking is that some mods are working in single player Mpmpm game, but brake the multi.

In my recent multiplayer tests "Units - Multiple upgrades" was breaking the game causing resync and crash to desktop every turn after my opponent used this function (unfortunately already late in the game, so it's difficult to catch in the test not playing longer). Removing it from the pack fixed the problem. The lua log was showing crash due to reference to non existing unit. It may not be the case with your pack, maybe I had a conflict with some mods I've used, but it's worth checking.

Also I would reconsider using AI Smart - this mod is old, not properly tested and updated, and written without looking at the bigger picture. In my case it didn't make the AI smarter, on contrary - the Barbarians started behaving like idiots, leaving empty camps, and not being able to manage captured civilians, some civs forgot to expand focusing on other goals and ended up as miserable early losers on Deity. The only good thing from this mod is the "shoot after move" option. Which actually doesn't work anyway with the Gatling Guns ;)

I also have a question - did you encounter in the multi tests that in many turns the AI turn takes longer than it should? I didn't have it in single, but in multi quite often AI was making a 8 seconds warm up before even starting to play as a 1st civ.
 
Whoever suggested console 'print' statements may be at fault for sluggish gameplay with a lot of mods, as well as resyncs, thank you; I used Notepad++ to comment them all out and the game is running much more smoothly now.

Also, are 3D leader portraits supported by MPMPM?
 
Whoever suggested console 'print' statements may be at fault for sluggish gameplay with a lot of mods, as well as resyncs, thank you; I used Notepad++ to comment them all out and the game is running much more smoothly now.

Wow, somehow I missed this hint. Going to delete all the print statements in the mods I have used, as I am experiencing an annoying lag at the beginning of AI turns.
Just to confirm - whit will it do exactly to the mods? :)
 
Hi Serp and congratulations on finishing your massive modpack before me :)

Have you tested it in actual multiplayer games, or only as a modpack in single?
The reason I am asking is that some mods are working in single player Mpmpm game, but brake the multi.

In my recent multiplayer tests "Units - Multiple upgrades" was breaking the game causing resync and crash to desktop every turn after my opponent used this function (unfortunately already late in the game, so it's difficult to catch in the test not playing longer). Removing it from the pack fixed the problem. The lua log was showing crash due to reference to non existing unit. It may not be the case with your pack, maybe I had a conflict with some mods I've used, but it's worth checking.

Also I would reconsider using AI Smart - this mod is old, not properly tested and updated, and written without looking at the bigger picture. In my case it didn't make the AI smarter, on contrary - the Barbarians started behaving like idiots, leaving empty camps, and not being able to manage captured civilians, some civs forgot to expand focusing on other goals and ended up as miserable early losers on Deity. The only good thing from this mod is the "shoot after move" option. Which actually doesn't work anyway with the Gatling Guns ;)

I also have a question - did you encounter in the multi tests that in many turns the AI turn takes longer than it should? I didn't have it in single, but in multi quite often AI was making a 8 seconds warm up before even starting to play as a 1st civ.

Great you are able to test in in multiplayer! :)

I have a second laptop, but it is old and very slow, so after ~ 15 turns (took 30minutes) I stopped testing in multiplayer.
In some weeks I will test in in multiplayer with my friends, but until then it's fantastic you can test it :)

I played a fast testgame in singleplayer from industrial to end, but there were several features from mods, like the multiple upgrade or the terraincrossing promotions, that I did not use (because I had no units that were able to do so I guess)
I will take a look at the multiple upgrades lua code, maybe there is something to fix. Do you know if this issue (CTD) also happens in singleplayer, with all units, or a specific, and what line in code it was? (would be easier to test).

AI:
The "barbarian leaving camps" is from the "(BNW) Leugi's Barbarian Inmersion Enhancements" mod. But I think if a barbarian General is in the camp, they won't leave it.
I was not sure if I should use this mod or not, since I deactivated the textchanges anyway. But I had the feeling with this mod (and + the AI Smart) the barbarian are much harder.
Without these mods, you can farm barbarian camps by simply putting an archer next to it and shoot at any new unit, who will not leave the camp or shoot back, to kill you. So we need a mod that fixes this farming and makes at least the fighting AI smarter. Do you know other mods that makes AI/Barbarian smarter?
Or maybe we can adjust the "AI-smart" mod, by deactivating some of the changes (take a look at the xml file)?

I also have a question - did you encounter in the multi tests that in many turns the AI turn takes longer than it should? I didn't have it in single, but in multi quite often AI was making a 8 seconds warm up before even starting to play as a 1st civ.
Since my second laptop is really slow, I guess I won't notice this.

@ Poizen 87:
good idea to comment them out. I will also do this... at least with all mods that work well.
 
Back
Top Bottom