MPMPM - converting Mods to DLC format for Multiplayer use

Status
Not open for further replies.
I tried more around my problem with the missing text and noticed that the problem seems to lie in connection to the CIV5Units_Mongol.xml file. Could it be related to DLC? I have all DLC and noticed that the working version of R.E.D. that you, Gedemon, posted does not have anything related to for example the Viking scenario in it. Now I know that the packs created don't work with scenarios yet, but maybe the lack of information in the file could also cause those text problems in a normal single player game?

PS: I tried with just G&K, BNW and the Mongol pack activated, as you mentioned in the R.E.D. thread, but ended up at the same result.
 
I tried more around my problem with the missing text and noticed that the problem seems to lie in connection to the CIV5Units_Mongol.xml file. Could it be related to DLC? I have all DLC and noticed that the working version of R.E.D. that you, Gedemon, posted does not have anything related to for example the Viking scenario in it. Now I know that the packs created don't work with scenarios yet, but maybe the lack of information in the file could also cause those text problems in a normal single player game?

PS: I tried with just G&K, BNW and the Mongol pack activated, as you mentioned in the R.E.D. thread, but ended up at the same result.

I never seriously investigated the issue, because it was minor, but I found what it was just looking for the reported situations in CIV5Units_Mongol.xml. In the original game files there are certain places where text is written as "<<"", for instance in CIV5GameTextInfos_Espionage_Expansion.xml:

Code:
<Row Tag="TXT_KEY_NOTIFICATION_KILLED_A_SPY">
			<Text>Your spy {1_SpyRank} {2_SpyName} killed {TXT_KEY_GRAMMAR_A_AN &lt;&lt; {3_CivAdj}} spy in {4_CityName} while they were trying to steal a technology!</Text>
</Row>

Within the newly created CIV5Units_Mongol.xml, it ends up being written instead as <<, since that's probably what ended up within the game database. For instance in the hover text for the unit upgrade:

Code:
<Replace Tag="TXT_KEY_UPGRADE_HELP"> 
			<Text>
				Upgrade the unit to {TXT_KEY_GRAMMAR_A_AN << {@1_UnitName}}. This requires {2_Num} [ICON_GOLD] Gold.
			</Text>
</Replace>

I have checked, and this issue seems to explain all the text errors that have been reported.

It appears you can correct the issue for now by using ctrl+f and replace to turn all << back into &lt;&lt;. Civ5Units_Mongol.xml is the only file it turns up in. I have not tested this, but I would be very surprised if that didn't fix it.

I'll work on a lua fix, but if you've already made your custom dlc, ctrl+f and replace is much faster.

EDIT: I have tested it. The text errors appear to be fixed.

EDIT2: I've adjusted the lua to search for all "<<" strings and replace them with "&lt;&lt;" before writing, which should correct the text problem. I have not rigorously tested this, so let me know if there are problems.

EDIT3: I should have mentioned that this also incorporates http://forums.civfanatics.com/showpost.php?p=13287309&postcount=74 , so you should do what that post says or else some game sounds will be missing.
 

Attachments

  • MultiPlayer ModsPack Maker (v 1).rar
    1.1 MB · Views: 1,256
I never seriously investigated the issue, because it was minor, but I found what it was just looking for the reported situations in CIV5Units_Mongol.xml. In the original game files there are certain places where text is written as "&lt;&lt;"", for instance in CIV5GameTextInfos_Espionage_Expansion.xml:

Code:
<Row Tag="TXT_KEY_NOTIFICATION_KILLED_A_SPY">
			<Text>Your spy {1_SpyRank} {2_SpyName} killed {TXT_KEY_GRAMMAR_A_AN &lt;&lt; {3_CivAdj}} spy in {4_CityName} while they were trying to steal a technology!</Text>
</Row>

Within the newly created CIV5Units_Mongol.xml, it ends up being written instead as <<, since that's probably what ended up within the game database. For instance in the hover text for the unit upgrade:

Code:
<Replace Tag="TXT_KEY_UPGRADE_HELP"> 
			<Text>
				Upgrade the unit to {TXT_KEY_GRAMMAR_A_AN << {@1_UnitName}}. This requires {2_Num} [ICON_GOLD] Gold.
			</Text>
</Replace>

I have checked, and this issue seems to explain all the text errors that have been reported.

It appears you can correct the issue for now by using ctrl+f and replace to turn all << back into &lt;&lt;. Civ5Units_Mongol.xml is the only file it turns up in. I have not tested this, but I would be very surprised if that didn't fix it.

I'll work on a lua fix, but if you've already made your custom dlc, ctrl+f and replace is much faster.

EDIT: I have tested it. The text errors appear to be fixed.

EDIT2: I've adjusted the lua to search for all "<<" strings and replace them with "&lt;&lt;" before writing, which should correct the text problem. I have not rigorously tested this, so let me know if there are problems.

:thanx:, cicero225!

I didn't try your revised lua file yet, but after replacing the characters in the .xml file the upgrade tooltips show, and as unexpected, but very welcome bonus, even the text on the city banner "xx will produce yy in x turns" which was missing before as well. :)
 
I'm fairly new at this, so I'm sure the error I've made is totally stupid, but when I open FireTuner I can't find the Lua that I need. It just isn't there. I have enabled FireTuner in the Config file, and the mod shows up in my mod list on civ, but not in the Lua dropdown. Do I have to change some properties of the build? All I've done is add the components and compiled them, so otherwise I haven't added any triggers or activators. Sorry about this.
 
I'm fairly new at this, so I'm sure the error I've made is totally stupid, but when I open FireTuner I can't find the Lua that I need. It just isn't there. I have enabled FireTuner in the Config file, and the mod shows up in my mod list on civ, but not in the Lua dropdown. Do I have to change some properties of the build? All I've done is add the components and compiled them, so otherwise I haven't added any triggers or activators. Sorry about this.

I'm hardly a master of this or civ modding, but I've got it working now and had your problem before. 2 of your mods conflict in some manner. I suggest you enable mods from the list 1 or 2 at a time and then launch a game on tiny until you enable one that causes it to disappear from the list.

It's kinda sporadic and random, but that worked for me.
 
I'm fairly new at this, so I'm sure the error I've made is totally stupid, but when I open FireTuner I can't find the Lua that I need. It just isn't there. I have enabled FireTuner in the Config file, and the mod shows up in my mod list on civ, but not in the Lua dropdown. Do I have to change some properties of the build? All I've done is add the components and compiled them, so otherwise I haven't added any triggers or activators. Sorry about this.

His MPMP mod is reliant on a custom dll, so if any of your other mods use a custom dll, it has to be taken out first to avoid conflicts. (You can put it back in later, but of course having more than one custom dll in your modpack is not a thing that ever works).
 
Thanks for the quick responses ElliotS and cicero, but the problem looks like I haven't built the MPMP properly. I deactivated all my mods except the MPMP and it still didn't appear on the LUA list, then I tried again with the MPMP and a mod that doesn't use any .dll's and again it didn't show up.

I don't know if you can just "tell" whats wrong from a screenshot, but have I noticably done anything stupid here? http://postimg.org/image/o8t0ja8wb/ I'm at a loss for whats wrong :cry:
 
Thanks for the quick responses ElliotS and cicero, but the problem looks like I haven't built the MPMP properly. I deactivated all my mods except the MPMP and it still didn't appear on the LUA list, then I tried again with the MPMP and a mod that doesn't use any .dll's and again it didn't show up.

I don't know if you can just "tell" whats wrong from a screenshot, but have I noticably done anything stupid here? http://postimg.org/image/o8t0ja8wb/ I'm at a loss for whats wrong :cry:

There's nothing wrong I can see. You could try using the version I left as an attachment earlier in the thread (forums.civfanatics.com/attachment.php?attachmentid=378110&d=1404021000). That one is just a direct copy paste into the civ 5 mods folder (C:/Users/[Your Username]/Documents/My Games/Sid Meier's Civilization 5/Mods.
 
There's nothing wrong I can see. You could try using the version I left as an attachment earlier in the thread (forums.civfanatics.com/attachment.php?attachmentid=378110&d=1404021000). That one is just a direct copy paste into the civ 5 mods folder (C:/Users/[Your Username]/Documents/My Games/Sid Meier's Civilization 5/Mods.

Still not working for me. The only thing I can think of is that my Civ V and Steam are both installed on an external hardrive, so maybe the lua console can't find the right path? If its not that, I have no clue.

Just to make sure, its definately not on the list, right? I don't think I skipped over it, but...
http://postimg.org/image/g8b1jt0gb/
http://postimg.org/image/q6w06a9vv/
 
Still not working for me. The only thing I can think of is that my Civ V and Steam are both installed on an external hardrive, so maybe the lua console can't find the right path? If its not that, I have no clue.

Just to make sure, its definately not on the list, right? I don't think I skipped over it, but...
http://postimg.org/image/g8b1jt0gb/
http://postimg.org/image/q6w06a9vv/

Yeah it's not there. I'd suggest playing a game and waiting a bit without it, then coming back. Maybe you missed something minor, maybe the thing's just finiky like that, IDK.

I'm going to PM the author of this thread and see if I can upload a version of my modpack somewhere for less technically inclined users that want a solid summer/fall balance patch.
 
After building v2 of my group's personal modpack, I figured out a solution to a problem I was having.

If you type CreateMP() and get an error with something about a nil value, it means the dll isn't working.

For me this was because I didn't realize that when you build the mod, you need to rename the dll file to CvGameCore_Expansion2.dll for it to load properly. Don't just rename the file, rename it in modbuddy before building the solution.
 
Yeah it's not there. I'd suggest playing a game and waiting a bit without it, then coming back. Maybe you missed something minor, maybe the thing's just finiky like that, IDK.

I'm going to PM the author of this thread and see if I can upload a version of my modpack somewhere for less technically inclined users that want a solid summer/fall balance patch.

Well, thats a shame =/ Still, thanks for your support, I appreciate it, I'll just wait awhile as you say. Back to nuking my friends the unmodded way! :c5razing:
 
Just started experimenting with this last night, it's been very interesting so far. I tested the Civ IV Leader Traits in Civ V mod in single player as DLC, playing a short game to completion with no problems. For now I'm just seeing if I can get mods to work in basic single player, since my friends aren't around for multi. Later today or tomorrow I should have some people to help me test though, then I'll find out about any sync issues or whatever might cause problems in multiplayer. Still, success in circumventing the mod menu is encouraging.

Also, I love EUI, so I decided to investigate the problem people were having with their city screen. Trying it out I had the same problem as everyone else, but a look at the Lua.log showed a few errors with CityView.lua. I found a copy of CityView.lua in the MP_MODSPACK folder, which is presumably being loaded over the EUI CityView.lua in the UI_bc1 DLC folder (EUI installs as a DLC, for those not aware). The MP_MODSPACK file was the same as the vanilla BNW file, and nothing seemed dependent on it (at least for my mods, maybe others differ?) so as a quick and dirty fix I backed up the file and copied over the EUI CityView.lua. It works fine for me now.

Alternatively, since EUI is fairly modular in design you could remove the CityView folder from your EUI install if you can't get it working. While this would disable the enhanced city view, the rest of EUI should work fine.
 
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

I'm having the same problem as you and I have no idea what to do.
It only seems to happen when I try to use the Colonialist Legacies Civs, but I haven't tried to add any other custom Civ yet.
 
After building v2 of my group's personal modpack, I figured out a solution to a problem I was having.

If you type CreateMP() and get an error with something about a nil value, it means the dll isn't working.

For me this was because I didn't realize that when you build the mod, you need to rename the dll file to CvGameCore_Expansion2.dll for it to load properly. Don't just rename the file, rename it in modbuddy before building the solution.

I tried building the mod with both default names and renamed. However, on certain mods, the Community Patch in particular, I get the following error.

Runtime Error: B:\My Documents\My Games\Sid Meier's Civilization 5\MODS\MultiPlayer ModsPack Maker (v 1)\MPMP_Maker.lua:90: attempt to call field 'DeleteMPMP' (a nil value)
\My Documents\My Games\Sid Meier's Civilization 5\MODS\MultiPlayer ModsPack Maker (v 1)\MPMP_Maker: Deleting previous ModPack if exist...

Is this what you got?

I can make a Modpack using Whowards .dll with addons and countless other mods, but it doesn't work for the community patch and I'm not sure why I'm getting the error. Any ideas? I am of source removing any .dll from mods during the Modpack creation.
 
I just tested with Whowards .dll. It works for v53, but not v60. So something changed in one of the versions. I'm going to test each of them now.
 
I just tested versions 53-60 (couldn't find 55). Only v53 of Whowards .dll allows me to create the pack, the rest giving the error posted above.
 
Been playing around with this thing for a month or so and came across an idiotically simple solution to the "invalid pattern capture" error while attempting to compile some of Vicevirtuoso's various fictional civs. My IRC group wants to put together a big trainwreck of some 20 civs, and all but one compiled OK. Turns out the odd one out had the SupportsMultiplayer flag set to 0; if you're sure the mods you're trying to add won't wind up compromising MP, you can just set it to 1 in the .modinfo file before compiling.

Hoping this is the same issue Adonis is running into with DMVC v60; we're hoping to upgrade our megapack (revolving around Vice's "Wish For The World" Madoka Magica conversion, so far proven stable with Wish v14/DMVC v53) but haven't gotten the chance to fire up CiV in the past week and unpack the necessary ingredients.
 
Currently hitting "DeleteMPMP nil value" errors when attempting to compile. Trying to compile mods around Whoward's Various Mod Components v60; manually flipped the SupportsMultiplayer flag in its .modinfo as outlined in my previous post. Been using Cicero's hotfix from the top of Page 5, and compiled DVMC v53-centric modpacks with it without having to fiddle with removing and replacing .dll files.

Problem is, even when I try that with v60, I keep getting the "nil value" error. Any previous MP_MODSPACK I have has been manually deleted from C:\(game install)/Assets/DLC already. Why, then, would a nil value be problematic for the DeleteMP() and CreateMP() commands?
 
I'm getting the error with v61 of Whowards' mod. I tried flipping MP on in all of my mods (<3 notepad+'s replace in files feature. 36 files changed in 30 seconds.)

Someone else mind trying v61 and letting me know if they're getting it there too? The link was proveded by Whoward and is near the end of his main thread, in a response to me.

Edit: I'm going to guess it has something to do with the unified yields introduced in v54. Consider looking into that if you know how. I'll try to as well, but I'm a noob to modding civ 5.

Edit 2: Reinstalled MPMP modpack (deleted and re-added) and it works now with v61. There are a few bugs I need to work out, but they shouldn't take too long.
 
Status
Not open for further replies.
Top Bottom