MPMPM - converting Mods to DLC format for Multiplayer use

Status
Not open for further replies.
I tested v61 this morning and also still get the same error. I also thought that the unified yields for the CPP might be giving trouble, though I don't know enough to figure out exactly why, or how to fix it.
 
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?

Sorry, haven't looked at this thread in a long time.

The meaning of the nil value error is essentially that DeleteMPMP doesn't exist in its workspace. It's trying to call Game.DeleteMPMP() and cannot find it. It means the dll is not being loaded.

My understanding is that civ 5 scans all loaded mods for a .dll that starts CvGameCore... and uses whichever .dll gets loaded last by a mod. If there is none, it uses the default civ 5 dll.

Carefully check to make sure that when you're trying to run it, the folders your mods are in contains CvGameCore_MPMPMaker.dll and no other .dll files. That should hopefully get rid of it.

If you want, you can give me a list of the mods you want to run and I might have time to try compiling myself.
 
Sorry, haven't looked at this thread in a long time.

The meaning of the nil value error is essentially that DeleteMPMP doesn't exist in its workspace. It's trying to call Game.DeleteMPMP() and cannot find it. It means the dll is not being loaded.

My understanding is that civ 5 scans all loaded mods for a .dll that starts CvGameCore... and uses whichever .dll gets loaded last by a mod. If there is none, it uses the default civ 5 dll.

Carefully check to make sure that when you're trying to run it, the folders your mods are in contains CvGameCore_MPMPMaker.dll and no other .dll files. That should hopefully get rid of it.

If you want, you can give me a list of the mods you want to run and I might have time to try compiling myself.

If you could figure out how to get any of WhoWards newer versions of the modified .dll (v54 and up give the null error for me) that would be amazing. http://www.picknmixmods.com/mods/d1b6328c-ff44-4b0d-aad7-c657f83610cd/mod.html
 
If you could figure out how to get any of WhoWards newer versions of the modified .dll (v54 and up give the null error for me) that would be amazing. http://www.picknmixmods.com/mods/d1b6328c-ff44-4b0d-aad7-c657f83610cd/mod.html

I'm still waiting for it to finish compiling, but I was about to circumvent the the nil error by opening the .modinfo for whoward's mod and removing this line:

Code:
<File md5="D8364C0AE6022C8569AF1202E90B29BA" import="0">CvGameCore_Expansion2.dll</File>

(I also flipped the multiplayer switch to 1, because the thread suggested to)

I'm unsure if you have to put it back after the dlc is made. Still waiting for it...

To be frank, I have no idea why this fixes it. v53 has the same line, but you say it works. That being said, the ancient version of whoward I had previously that I wasn't using (v18!) didn't have an error, and it said:

Code:
<File md5="{I'm typing this from memory, so I dunno the md5}" import="1">CvGameCore_Expansion2.dll</File>

and the packs I've done in the past with a .dll also have it as 1. Does flipping 0 to 1 fix it? I don't know. I'm unwilling to stop this now, so I'll have to test it again once it's done in...probably 40 minutes. I might be asleep by then.

(v53 has 0, though...)

EDIT: Okay, I forcequit compilation and tried. Nope, flipping it to 1 does not help. The line has to be deleted entirely. My expectation is that if you delete the line, compile, then put the line back later, it should work fine. But that's just a guess.

BTW, I forgot to mention this in my post at top of page 5, but the page 5 version also includes the stuff from the older http://forums.civfanatics.com/showpost.php?p=13287309&postcount=74 . Namely, you have to repeat those steps or some sound effects will be missing. Should still run though. I' might make a new post later with updated full directions.
 
My first attempt with the "Civ IV Leader Traits in Civ V" mod worked fine in multiplayer, so I thought I would try adding some more. I'm not sure what mods people in my group will want to try out, so I decided to mess around in single player with these while I wait:

  • Separate Great People Counters (v 3)
  • Reform and Rule (BNW) (v 24)
  • Race for Religion (BNW) (v 8)
  • Promotions - Expansion Pack (v 8)
  • Longer Eras - Historic (v 8)
  • Gibraltar, Reef, and Krakatoa Fixes (v 101)
  • Civ IV Leader Traits in Civ V (v 2)
  • Barbarians - Unlimited Exp (v 2)

Just a random assortment of mods I already had. Compiled fine, and worked fine in single player once I dealt with some EUI conflicts: InfoTooltipInclude.lua from Reform and Rule was removed (a known conflict between the two mods), and the LeaderHeadRoot.lua and CityView.lua files from the modspack ui folder were removed as well.

Oh, and a small public service announcement: If Firetuner takes forever to create a modpack, try checking your cpu usage to see if another program is slowing it up. Microsoft Security Essentials real-time protection was going a little overboard and making my modpack take an hour to build, but if I temporarily disable that it only takes 20-30 seconds.
 
Cicero, I'll try your suggestion with v60 this evening and see if that works. In the meantime, here is the list of mods that I'm playing with if anyone is looking for a decent MP pack.
  • AI - Secondary Workers and Settlers (v1)
  • AI - Smart (v2)
  • Better Polynesian City Names (v1)
  • Buildings - Lighthouse Near Sea (v2)
  • City-State Diplomacy Mod (CSD) for Brave New World (v23)*
  • CIV IV Diplomatic Features (v10.03)
  • CIV-Linked Great Generals (v2)
  • Diploacy - City States (v4)
  • Diploacy - CivIV Features (v1)
  • DLL - Various Mod Components (v53)
  • Ethiopia Color Fix (v1)
  • Example - Simple Clock (v8)
  • Faster Aircraft animations (v3)
  • Feudal Ranks (v5)
  • Gibraltar, Reef, and Krakatoa Fixes (v101)
  • Global - Barbarian XP Level 3 (v2)
  • Global - City Bombard Range (v1)
  • Global - City Forest Bonus (v3)
  • Global - Enable Magellan (v7)
  • Global - Local Generals (v2)
  • Global - Passable Forts (v3)
  • Global - Pro-rata Buildings Purchase (v2)
  • Global - Remove Ghost Routs (v2)
  • Global - Units Awake in Danger (v2)
  • Global - Venice Keeps Resources (v1)
  • Global Relations (v7)
  • JFD's The Kingdom of Denmark Revised (v1)
  • Lake Victoria Fix (v2)
  • More City-Sates Luxuries (v3) (yes sates)
  • More Luxuries (v152)
  • More Pantheons - Addon (v120)
  • Promotions - Extra Cargo (v5)
  • Promotions - Flagship (v1)
  • Promotions - Jet Long Range Recon (v3)
  • R.E.D. Modpack (v27)
  • Reforestation (v7)
  • Ressource - Mint Include Copper (v2) (yes Ressource)
  • Strange Religions (v9)
  • The Goths (BNW or GK) (v47)
  • Trade - Marble Shipments (v1)
  • UI - Condensed Promotions (v14)
  • UI - Trade Routes Enhancments (v6)
  • Unique Building - Dojo (v8) (Whowards)
  • Units - Cheap Workboats (v2)
  • Units - Herdsman (v10)
  • Units - Scout to Explorer (v10)
  • Units - Sub Upgrades (v5)
  • Units - Subs Immune Under Ice (v2)
  • Units - Super Carrier (v10)
  • War - Less Damaged Captured Cities (v3)

*For CSD, I turned off the global difficulty changes as that is covered by Feudal Ranks. Additionally, I enabled the change to Sweden's ability.

I had made the previous one with a few more of JDH's civs, mainly the religions ones. I had about 15 desyncs throughout an epic game with my roommate the other night, but continuing the game the next 2 days had none. I'm not sure what caused it, so I didn't put those in the above list.
 
EDIT: Okay, I forcequit compilation and tried. Nope, flipping it to 1 does not help. The line has to be deleted entirely. My expectation is that if you delete the line, compile, then put the line back later, it should work fine. But that's just a guess.

Doing tests with v61 now. I don't even use any of Whoward's actual mods; I just use DVMC because it's a prerequisite for Vicevirtuoso's Madoka conversion. So far the golden rule appears to be "when in doubt, flush cache." Seems like whenever I compile with MPMPM after getting rid of Civ5(Core/Debug/Mods)Database.db, I don't have to worry about DLL overlap with DVMC.

In fact, for reasons probably obvious, the old "remove CvGameCore_Expansion2.dll before compiling and replace later" trick has become even less stable since the v53 days, resulting in the game failing to grab that DLL from the resultant MP_MODSPACK and somehow ending up with the entirety of the game's Lua Missions stricken from the database. This results in a CTD when attempting to Set Up Game (in SP, MP, or Mods SP) because the game can't find a non-nil value for Worlds.

Have managed to create a stable candidate with just Wish For The World v16 and DVMC v61, and hope the Actual Release Candidate I'm compiling now (with 300% more anime chaff!) is fit to boot.
 
Can anybody share information like how long this typically takes and what is the last operation to perform?

I have been stuck on " \Users\USER\Documents\My Games\Sid Meier's Civilization 5\MODS\MultiPlayer ModsPack Maker (v 1)\MPMP_Maker: Copying: Language_en_US" for a long while.
 
Language_en_US is generally the longest-running process of the lot. Since it has to grab script from the official Civs as well as your included mods (including other game texts such as Civilopedia), it easily takes up the final 60-80 minutes of a compile that normally goes around 2.5 hours (on a medium-spec computer with Complete Edition-alike content).

It is not, however, the absolute last operation performed by MPMPMaker; that would be the various Audio scripts copied right after. You'll know you're done if the following occur:

A) MPMPMaker asks "Do you crash here?" after finishing its last processes.
And one of either:
B) The music for the official/robustly-coded mod civ you're playing as loops to the next Peace music track.
OR
C) The music for your not-so-robustly-coded mod civ loops off Terra Novum.
 
I said I would do this since Gedemon seems to be gone, so here's an updated instructions post:


If you are okay with using a precompiled multiplayer modpack, consider downloading some of the following. Copy paste into Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC. Note that you will not be able to play regular civ 5 unless you remove the folder.


Amazingly precompiled dlc packs work with Mac too! (for some of us anyway), though compiling doesn't work because of the lack of firetuner.
You will probably have to use command+shift+period to reveal hidden files.
1. Navigate to Macintosh HD/Users/{Username}/Libraries/Application Support/Steam/SteamApps/common/Sid Meier's Civilization V
2. Right_click -> Civlization V -> Show Package Contents
3. Place dlc folder in Contents/Home/Assets/DLC

Cicero225's Anime Pack (Includes Communitas map, Vice Virtuoso's Nanoha, Miku, and Madoka civs (not Wish for a World), Railgun, Hidamari, Recettear, and a bunch of Touhou. Up to date as of June 28 2014) - Not 100% test, but worked in test game.

Haken Browning's Wish for a World-centered Anime Pack (Link is to his post, since he explains it better than I can).

Those of you who have made working modpacks, I strongly encourage you to post download links to the compiled version, and I will link them here for those who don't want to go through the process.

(I considered making a new thread for this, because I can't edit Gedemon's first post. Do you guys think that's a good idea? I don't know how much demand there is.)


Making your own Modpack! (This assumes you have existing experience working with Civ 5's mod tools.)

Preparation:
1. Ensure you have Firetuner 2 installed and civ 5 logging turned on in the config.ini file in your "..\Documents\my games\Sid Meier's Civilization 5" folder. Also, if "EnableTuner = 0" then change it to "EnableTuner = 1" then save the file.
2. Review the mods you want to include and ensure there are no conflicts.
3. If you have a dll mod (one that contains a CvGameCore_Expansion2.dll), remove the dll and store it somewhere you'll remember.
4. Download this and extract the folder into Documents\My Games\Sid Meier's Civilization 5\MODS.

Main Step
1. Start Firetuner
2. Start Civ 5
3. (Highly Recommended) Set Civ 5 graphics to Windowed mode. This will provide easy access to Firetuner and will let you do other things on your computer while waiting later on. You may also want to turn the music and ambiance off, for now, unless you really enjoy the music.
4. In the Mods menu, load all desired mods, as well as "MultiPlayer ModsPack Maker (v 1)" (which should be on the list)
5. Start a single player mod game with any settings.
6. Once game is loaded, switch to fire tuner. tThe 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").
7. The real-time protection of microsoft security essentials/Windows Defnder will hyperventilate on step 8, turning a 20 second process into a 2-hour process. It is best to disable it, unless you're feeling paranoid.
8. Type CreateMP() into the command line at the bottom and press enter.
9. If you did not do step 7, then go make lunch, eat lunch, etc. It will take a while, ~2 hours. This is normal. It will seem to be stuck forever on "\Users\USER\Documents\My Games\Sid Meier's Civilization 5\MODS\MultiPlayer ModsPack Maker (v 1)\MPMP_Maker: Copying: Language_en_US". That is also normal.
10. Once civ 5 begins working again, and if there are no errors noted in firetuner, exit out of civ 5 entirely.
11. If you have a dll from step 3 of the preparation stage, copy it now into "\Steam\steamapps\common\sid meier's civilization v\Assets\DLC\MP_MODSPACK". Also copy it back into its original location, so the mod will work.
12. The next time civ 5 starts, both single player and multiplayer should include all mods. All players in a multiplayer game must have the dlc pack for it to work! Distribute the folder "\Steam\steamapps\common\sid meier's civilization v\Assets\DLC\MP_MODSPACK" to all players and have them copy it into the same place! If you wish to play normal civ 5 again, you must remove this folder.

Additional Operations (Highly Recommended, but a bit involved)

Double check the database.log (in Documents\My Games\Sid Meier's Civilization 5\Logs) for any errors. Unfortunately, there will be many errors even if it's working fine. See here for a database.log for a working dlc pack (none of these errors are meaningful). Be especially worried about "No such table" errors.

To fix some missing sound effects:
1) Go to "...\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion\Sounds\XML", find Audio2DScriptsExpansion1.xml and AudioDefinesExpansion1.xml
2) APPEND their contents into the same files in "\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\MP_MODSPACK\Override" (Don't delete what's already there!) Append the stuff within the outermost brackets (<Script2DFile> and <AudioDefinesFile>), of course. (If you know xml, you know what I'm talking about).

Troubleshooting

Problem 1: Game crashes at start. Database.log (in Documents\My Games\Sid Meier's Civilization 5\Logs) contains "no such table" errors.
Possible Solution 1: Many mods, particular the older ones, include xml files that are named the same as core game files (i.e. Civ5Units.xml, Civ5Buildings.xml, etc.--the older Touhou civs are a big offender in this regard).

If this is a problem, the corresponding .xml file will show up in the .log file. Within the dlc,these files must be renamed (I recommend Civ5Units_{CivName}.xml), and then you must edit the corresponding .modinfo to reflect the changed filename. i.e., you must change something like:

Code:
<File md5="22C4A1C45307CE9B3985A6AFB60356E7" import="0">XML/Civilizations/Civ5Traits.xml</File>

to

Code:
<File md5="22C4A1C45307CE9B3985A6AFB60356E7" import="0">XML/Civilizations/Civ5Traits_{CivName}.xml</File>

Problem 2: Trying to run CreateMP() gives a "invalid pattern capture" error.
Possible Solution 2: Go back over the .modinfo file in all the mods you're using within "Documents\My Games\Sid Meier's Civilization 5\MODS". If any of them has SupportsMultiplayer set to 0, change it to 1.

Problem 3: Trying to run CreateMP() gives "attempt to call field 'DeleteMPMP' (a nil value)". There is a dll mod included in the set of mods.
Possible Solution 3: Ensure that your dll mod has "CvGameCore_Expansion2.dll" temporarily removed. If the error still occurs, open the .modinfo for the dll mod and temporarily remove the following line (YOURS WILL BE DIFFERENT):

Code:
<File md5="{Your md5 will vary}" import="0">CvGameCore_Expansion2.dll</File>

DO NOT LOSE THIS LINE. PASTE IT SOMEWHERE AND SAVE IT.

After compiling, copy this line back into the .modinfo in both ""\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\MP_MODSPACK\" and the original mod in
"Documents\My Games\Sid Meier's Civilization 5\MODS".

Problem 4: Certain core game sound effects are missing.
Possible Solution 4: See Additional Operations above.

Problem 5: Custom mod music is missing/some game text is missing
Possible Solution 5: Ensure that you have downloaded the version of the mod pack maker included in this post (this) and not the old version in the OP of this thread.

Problem 6: Custom mod unit sound effects are missing.
No Current Solution: Currently, custom unit sound effects is not supported. Ask in the thread and someone may hotfix it.

Problem 7: Custom unit action buttons are missing/Enhanced UI doesn't work/Beyond the Future doesn't work
No Current Solution: These are known, reported problems. However, recent hotfixes may have repaired the issue.

Problem 8: The dlc pack is HUGE.
No Current Solution: Your mods have a lot of custom music. There is nothing that can easily be done about that.

Problem 9: Cannot start multiplayer game; one of the players reports a "Cannot select civilization error"
Possible Solution 9: Ensure once again that all players (and the player with the error in particular) have identical copies of the modpack.

Problem 10: Multiplayer games keep de-syncing at the end of the turn!
Possible solution (for Vice Virtuoso's non Wish for the World Madoka Modpack only): Ultimate Madoka's Great Person script causes a desync that can be fixed with a simple patch: https://mega.co.nz/#!vMUFSDpD!1PG7LOauft_SQoa5xr3jN0qZ9mLJ2BtMnaWMakrz2Xo . This file needs to be copied into "Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\MP_MODSPACK\Mods\Madoka Magica Civilization Pack -- Rebellion [BNW] (v 10)", overwriting the version already there. It is up-to-date as of Sep 2, 2014.
Possible Solution 10: If attempting to use the communitas map, this is a known problem that has not yet been resolved. Use a different map.
Possible Solution 10: Ensure once again that all players (and the player with the error in particular) have identical copies of the modpack.
No Current Solution: Multiplayer games do not play well together with the Events family of event handlers. Many of these, including the one that fires at the end of a turn, cause desyncs. It is possible that one of the mods you use has such a function. If you are skilled enough, you can try to fix it...or you can ask the guy who made the mod.
 
The preceding post is a godsend. I had an inkling the Graan/Huitzil Touhous would need an XML overhaul (or were otherwise responsible for the CTDs in my latest Wish For The World modspack attempt), but a compilation recompile I made with all the files renamed kicked up an Invalid Pattern Capture error despite me setting SupportsMultiplayer to 1. If desired, I can provide a .civ5mod or .civ5proj for analysis.

Problem 7: Custom unit action buttons are missing/Enhanced UI doesn't work/Beyond the Future doesn't work.
No Current Solution: These are known, reported problems. However, recent hotfixes may have repaired the issue.

Planning to look into this on some spare weekend or another. Previous attempts to put Militaires Sans Frontieres and 3rd Street Saints into a Wish-centric pack ended in this error. There is a UnitPanel.lua conflict going on, and either replacing the ones in MSF/Saints with the Wish one or deleting the MSF/Saints ones outright will stabilize the mods otherwise (for instance, TableSaverLoader indexing for incrementing Salvage/Respect for the right players). Wish's mission buttons work, theirs don't.

Running hypothesis is a load order error; affected Civs must have either a Dependency on DLL - Various Mod Components or a Reference to Wish For The World (if deleting UnitPanel.lua, preferably the latter) to hook Lua entry points to Wish's UP.lua after introduction of DVMC's new CvGameCore_Expansion2.dll. Please report findings if this works out for you; it'll save ViceVirtuoso another round of recoding.

(For Touhou users, the same applies to Mamizou, who uses the same replacement UnitPanel.lua as MSF and Saints, and is similarly affected when supplanted with the copy from Wish.)
 
The preceding post is a godsend. I had an inkling the Graan/Huitzil Touhous would need an XML overhaul (or were otherwise responsible for the CTDs in my latest Wish For The World modspack attempt), but a compilation recompile I made with all the files renamed kicked up an Invalid Pattern Capture error despite me setting SupportsMultiplayer to 1. If desired, I can provide a .civ5mod or .civ5proj for analysis.

Can you give a lua line on which the Invalid Pattern Capture occurred?
 
The logs are lost to me, I'm afraid. And they've never been substantive for me whenever MPMPMaker faults on an IPC or DeleteMPMP Nil Value error anyway. Thankfully, the "official" builds of those mods worked fine after performing the XML rename fix.

My group's working builds are currently updated and monitored via a Google Doc, including legacy builds and ancillary utilities. Version 5 is our latest stable Wish For The World-centric build, with fallback plans in place for building around the Rebellion pack should something go awry. A 4-part Dropbox DDL and an in-one-go Mega DDL are offered as your bandwidth needs permit.

Version 5 (Wish v16/DVMC v61 stable) contents:
- Madoka Magica - Wish For The World v16
- DLL - Various Mod Components v61
- Hatsune Miku v4
- Nanoha v3
- Recettear v3
- Fate/Zero - Arturia v7
- Fate/Zero - Gilgamesh v7
- Touhou (Graan/Huitzil era) - Remilia v5, Eirin v2, Cirno v8, Utsuho v5
- Great Admiral Aquaculture v1
- New Beliefs v...I guess 5. Rob Ford keeps not changing the version number.

Stuff planned for SOON:
- BouncyMischa's Touhous! Suika, Kanako, Keine, maybe the PC-98 nutters too.
- Aranicar's Touhous! One of our group's number is a diehard Alice fan and she won't take no for an answer for Civ Pack DEV integration.
- Fire Emblems! The Beorc pack is all-XML. It's also beyond my mortal ken because to me, Fire Emblem is still "the SRPG series Nintendo balked at selling to America".

Stuff planned for LATER:
- Desperate stabs at UnitPanel.lua harmony! Saints Must Flow! Can we put up a stable nightly before the release of Gat Out Of Hell?
- Metal Gear!? See above.
- More QoL goodies! Maybe I'll use DVMC for more than just a pre-req for Wish For The World!
- Decisions! Vicevirtuoso is adding compatibility to many civs in his mass SQLification, so why not once it's stable?
 
Oh, and a small public service announcement: If Firetuner takes forever to create a modpack, try checking your cpu usage to see if another program is slowing it up. Microsoft Security Essentials real-time protection was going a little overboard and making my modpack take an hour to build, but if I temporarily disable that it only takes 20-30 seconds.

Thought this was important enough to mention: CarlWinslow is absolutely right. Disabling MSE real-time protection (or Windows Defender real-time protection in Windows 8) makes the process take seconds instead of hours. It's a HUGE difference.
 
Hey guys...

been using this for CiV for quite some time now, and it is awesome.. but i have a question.
Will this also work for CivBE and/or will it be ported to CivBE?
 
Status
Not open for further replies.
Top Bottom