1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

MPMPM - Multiplayer Mod DLC-hack (Updated!)

Discussion in 'Civ5 - Utility Programs' started by cicero225, Sep 2, 2014.

  1. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Sorry, I will try to look at this later. Right now playing Beyond Earth with most free time. I would note that in testing I had series desync problems with the communitas map (just the map) for some reason, so it's not surprising there might be other issues. The question is why this occurs.

    (You have malloc(k); at the end of your post. :goodjob::)
     
  2. Athaboros

    Athaboros Chieftain

    Joined:
    Jan 27, 2010
    Messages:
    26
    I updated my Quality of Life Modpack to v.5 -- find it here: http://www.mediafire.com/download/0ognxo6m0o4ufb5/QoL_Modpack_v5.zip.

    This version is singleplayer-only (good for achievements).

    The mods included are:

    Code:
    - Antiquity Sites Icon Finder (v.1): allows filtering the resources view to show only antiquities
    - Civ-Linked Great Generals (v.7): adds new great general names based on owner's civilization
    - Dynamic Culture Overview (v.6): reads culture from included mods (by request)
    - Expanded Civilopedia Entries (v.34): fixes typos and outdated information, explains mechanics
    - Gibraltar and Reef Optimizations (v.1): tweaks Gibraltar/reef placements to fix mapgen issues
    - Great Prophet Historical Names (v.30): gives prophets names in the fashion of generals, etc.
    - Historical Religions Edit (v.44): adds many new choices for religions
    - InfoAddict (v.22): adds interface elements that provide more information to the player
    - Krajzen's Great Musicians Pack (v.1): adds new great works of music for flavor
    - Krakatoa Fix (v.100): tweaks Krakatoa placement to fix some map generation issues
    - More Great Works (v.3): adds many new artist and writer great works
    - Quick Turns (v.10): automatically skips AI unit movement/combat based on player-set criteria
    - R.E.D. Modpack (v.28 unofficial): adds flavor graphics and rescales units based on civ
    - R.E.D. Smaller Landmarks (v.5): makes buildings/improvements scale relative to units
    - Unique Cultural Influnece (v.4): makes culture influence messages different by civ
     
  3. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    First post edited.

    As an update: Someone has offered to help me reimplement the dll functions in MPMPM, since I have not heard from Gedemon at all (apparently he hasn't been spotted active in nearly a year). With access to the source code, it should be possible to make considerable convenience fixes (checking for xml files named poorly--as in some of the Touhou civs--and making it immune to changes in the folder names--which creates problems with, for example, the Colonialist Legacy Civs.

    The following is a discussion of modpack modularity, and of the limits of what is and isn't possible in that regard:

    In MP_MODSPACK, there are 3 folders and one file:
    1. Mods
      -Contains folders for each individual mod, though with no directory structure
      -For example, if one the mods included was Hidamari Civ (v 2), there will be a Hidamari Civ (v 2) folder containing everything file from Hidamari Civ (v 2) dumped into folder
      -Primarily for custom music, art, and lua-the sql and xml doesn't influence anything
    2. UI
      -Stores any lua files from the mod that override parts of the in-game interface, i.e. CityView.lua
    3. Override
      -Real key to the modspack
      -Stores the game database from when the modspack was made, i.e. when all mods were loaded in the single player mods menu
      -Overrides original game database
    4. MPModsPack.Civ5Pkg
      Configuration file, signaling (falsely) to Civ 5 that the modpack is a new DLL and should be included. Is identical for all ModsPack

    First the bad news: While #1,2, and 4 can be completely modularized (and fairly trivially, at that), #3 can only be reliably constructed with all the mods at once. To see why, imagine that you have one mod that adds a custom wonder, and then a second one that uses .sql to look for all wonders and add +1 production or whatever. The combination of both mods if different from taking the results of each mod on the database and performing the union. .sql files are in fact what sticks the other mod manager.

    You might ask: why not reconstruct the database on the fly, outside of civ 5? Well, that would require reimplementing the civ 5 VFS and SQLite engine, and remaking the database. The easiest way would just be to call the civ 5 dll functions that do these...at which point, you might as well just do the current MPMPModpack procedure, since it would still have to be done offline (we don't have access to the Civ 5 main menu and multiplayer source code) and does exactly the same thing as just going to the mods menu and starting a game.

    So, tl;dr: Without more access to the game source code, which isn't going to happen, folder #3 must be remade for every combination of mods used.

    Now for the good news:
    Folder #3 is only about ~20mb. The majority of the size of the modpacks are actually in Folder #1, with all the music and art assets, which is modular. In theory, it's possible to just make a Folder #3 for every combination of mods you want to play with and store it somewhere. Everytime you want to play a MP mods game, Folders #1,2 and 4 can be pieced together from the mods folder and Folder 3 copied in, without having to open Civ 5. No more passing around 1gb each time the modspack changes-instead only pass folder #3 and whatever mods changed.

    This would be a pain to do manually. The guy who offered to reimplement Gedemon's DLL functions has also offered to write an out of game toll for this, however. Look forward to that!

    Finally:
    I am of course pondering extending this whole to Civilization: Beyond Earth. However, I think it would be advantageous to first see how dlc/expansions for Beyond Earth look, configuration wise.
     
  4. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    I have been able to spend some time to look at it. The good news is, I was able to fix the initial viewing distance problem by the trivial expedient of making a Gameplay folder and copying AssignStartingPlots.lua into it. (Okay, I'm not sure that was it-I actually copied everything that should be in UI into UI and everything that should be in Gameplay in to Gameplay, based on the original civ 5 directory structure).

    The bad news, there's something pretty deep going on with the missing unit info. Many of the initial loading scripts for Communitas (TW_INIT in particular) are never running, and I'm not sure why. If you know the people who made Communitas, go you ask how exactly they make sure their lua scripts run when the game starts? It may be specific to mods. For instance, I've noticed that ModTools.lua, which seems to be included in a lot of the what they do, calls Modding.OpenSaveData()...which obviously will cause problems in a "normal" game.
     
  5. Athaboros

    Athaboros Chieftain

    Joined:
    Jan 27, 2010
    Messages:
    26
    This sounds like great news, cicero225. Thanks for letting us know! I look forward to hearing how this develops.
     
  6. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    And...I feel stupid, because Gedemon's source code has been on his repository the entire time. It was just outside the MPMP folder and labeled "Civ 5 DLL" so I was assuming it was just the normal game DLL. :blush:

    Misleading labeling for the loss... Well, glad someone noticed it for me.
     
  7. Cousken

    Cousken Chieftain

    Joined:
    Oct 30, 2014
    Messages:
    32
    Location:
    Malmö, Sweden
    I fear this might be off topic, but have to ask... does this work for Beyong Earth as well? Can i just use the file attached to the first post?
     
  8. emeralis00

    emeralis00 Chieftain

    Joined:
    Jul 19, 2014
    Messages:
    33
    Location:
    WI, United States
    No. It uses the Civ5 dll.
     
  9. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    I'm plotting a possible implementation for BE, but without the BE dll source code, it'd take manual copying and outputting databases into log files...assuming it works. Inelegant, but it could work. We'll see.
     
  10. AskingForHelp

    AskingForHelp Chieftain

    Joined:
    Aug 19, 2014
    Messages:
    2
    Hey guys, question.

    Can I pack this mod (BNW Mass Effect Civilizations) into a DLC format and have it function in multiplayer?

    http://steamcommunity.com/sharedfiles/filedetails/?id=172933304

    The only reason I'm unsure is that it uses SQL, and I can't seem to find a definitive answer on how that would affect this process. Thanks.
     
  11. emeralis00

    emeralis00 Chieftain

    Joined:
    Jul 19, 2014
    Messages:
    33
    Location:
    WI, United States
    Absolutely. Many of the mods already packaged are a hybrid of SQL and XML.
    EDIT: Though the current downloadable version is for the game before recent patch I think.
     
  12. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    It should be fine. I just tried it with the old dll, and it works. (I'm the process of patching a few things, but that won't be for a while)
     
  13. Gizomot

    Gizomot Chieftain

    Joined:
    Jun 25, 2014
    Messages:
    9
    Location:
    Sweden
    Hello!

    I've tried out this process and I find it too hard with the lack of skills that I have.

    I'm just gonna post a short thread since I just posted a similar question in another thread. I want to convert JFD's civilizations for multiplayer use. Has anyone done that? It would be lovely if you can upload those converted files so that me and my friends can use his amazing customized civilizations in multiplayer.

    Best regards,
    Giz
     
  14. Deluxe

    Deluxe Warlord

    Joined:
    Mar 3, 2013
    Messages:
    249
  15. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Hi all,

    It's taken me a while since I've been busy, but I've updated the code in the first post.

    The dll is now updated to the latest patch (though I'm pretty sure that doesn't actually matter), and should now handle some of the older Touhou civs properly (without requiring manual intervention).

    Gory details:
    Spoiler :
    Many of the older Touhou civs (Cirno, Remilia) had a bad habit of naming mod xml files the same as civ 5 core files (things like Civ5Buildings.xml, etc.) When loaded as a fake dlc, this causes the game to override the core files, breaking the game. It was originally necessary to manually rename all these files in the MPMODSPACK by hand. Now, the dll automatically checks for xml files from the following list:

    and appends _RENAMED to the filename. This fixes the issue.


    I have tested this with Cirno and Remilia, and these two civs, and presumably others, will now be converted properly without manual intervention.

    Next up: Checking for folder names properly so that mods with odd folder names will no longer require the folders to be renamed ahead of time (This principally affects the Colonialist Legacy Civilizations)
     
  16. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Hi,

    As I mentioned in the previous post, I've been too busy to do as much as I'd hoped in this thread. I'll try to take a look later in the week, though no promises.
     
  17. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Sadly, it is unlikely that it would work. Even the previous, non-DLL, communitas patch has serious known incompatibilities, and this one would only be worse. It could possibly be dealt with if I worked together with the people working on it, but that would take special, dedicated effort..
     
  18. Haken Browning

    Haken Browning Chieftain

    Joined:
    Aug 24, 2014
    Messages:
    32
    Sorry I've been out of the publishing/support scene for a while. Database corruption bug hit me, shortly followed by Smash and PSP Gundam games. Version 8 of the Crystal Fire pack should be available within hours, but first I'd like to address the new feature of the v2 MPMPM mod:

    While the list of checked XML files is exhaustive, it is sadly not all-encompassing. In the CF mod candidates alone, several instances of duplicate "ExpandedDiplomacy.xml" and "BNWDiplomacy.xml" remain. Neither would force a crash at main game state initialization, nor would they overwrite Firaxis instances of these files at runtime (G&K and BNW instead store these as "%Expansion(2)/Gameplay/XML/Text/en-US/LeaderDialog/Civ5_Dialog__GENERIC"), but they could wind up fighting with each other with the same "last to compile wins" rules in place when running multiples of Huitzil's Touhous as AIs at once through Mods > SP. As few modciv makers go to the trouble of separate XML files for G&K/BNW-specific diplomacy messages, and fewer still use standardized filenames, this must be addressed with manual renames.

    Oni Clans is one of BouncyMischa's Touhous, which all follow the "unique names for all XML" rule and are thus untouched by the rename function. This would've been caught if the second test subject were any of Huitzil's other three Touhous (Utsuho, Eirin, Yuuka) or Graan's Remilia Scarlet.

    MORE EDIT: For some unknown reason, v8 is being uppity and giving me the exact error the rename function is supposed to avoid (even though I used the same manual renaming fix, for reasons enumerated above). I will probably not have time to make a full fixed release before going on vacation into Sukritact's backyard, but I can at least put out a v8r0 so you can at least play multiplayer Wish in 1.0.3.276 without hiccups.
     
  19. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    And I totally meant Remilia. Bah. You misunderstand. I tested with Cirno+Railgun, then Remilia+Misaka. In retrospect I should have done all 3.

    Well there is a reason I have always tried to add _CIVNAME to everything in my mods...

    But actually, I'm not sure having the same name matters at all if it's not already in the basegame. Intuitively, it seems like it should, but I've actually made all my MPMODSPACKS just renaming Civ5Traits,xml to Civ5Traits2.xml for every single Touhou civ with this problem, and I've never noticed any issues. Looking at my old modspacks, I have simultaneously run Remilia/Cirno/Eientei/Earth Spirits with multiple copies of Civ5Buildings2.xml, Civ5Units2.xml, etc. without any evident issue. This is, in fact, why I just rename all files _RENAME, instead of doing _{mod ID}.

    I'll test again with all 4 of those civs, just in case.

    (For what it's worth, the current list isn't hard-coded. It's actually directly modifiable by editing "MPMP_Maker.lua", which seemed like the easiest combination of easy editing/no files to read in/database modification.

    If what you suggested turns out to really be an issue, then the thing to do would be to precheck all mod files for duplicates, which would be painful but doable...)

    EDIT: Yup, just tried Remilia/Cirno/Eientei/Utsuho, played MPMODSPACK single-player for ~50 turns as Utsuho, no issues, civilopedia was fine, civs showed up properly on menu... It looks like the game keeps files properly separate even if they're the same name, as long as they're not named Civ5Traits.xml, etc., though I'm not sure why there's a distinction here.

    MORE EDIT: Hmm, I don't know why you're having issues. What civs are coming up as culprits in the logfiles?
     
  20. DKMDD

    DKMDD Chieftain

    Joined:
    Dec 13, 2014
    Messages:
    10
    Hello,

    i try to input a CIV-mod in your "fake DLC" (/assets/DLC/MODS) but i can't find this civilization in your MOD-Multiplayer menu. Why?

    Your mode give a chance to include "new civilization-mods" right?

    Please help me, because my head is banging by searching for the solution :crazyeye::goodjob:

    thank you!


     

Share This Page