MPMPM - converting Mods to DLC format for Multiplayer use

Discussion in 'Civ5 - Utility Programs' started by Gedemon, Mar 28, 2014.

Thread Status:
Not open for further replies.
  1. Kyp Durron

    Kyp Durron CP5

    Joined:
    Jun 12, 2009
    Messages:
    418
    Location:
    Charleston, SC
    Cant figure out the firetuner part of this.
     
  2. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,035
    Location:
    France
    I've updated the gitHub version with a quick'n'dirty fix for the problem with mods using the same filename than the original gameplay files.

    I've edited the OP with more details on that part, let me know if it's enough.

    I don't think I'll have enough free time to help on the programming part, but the first step would be to list all needed changes, prioritize them, then ask which ones can be done in a mod.
     
  3. CanuckSoldier

    CanuckSoldier Emperor

    Joined:
    Oct 29, 2001
    Messages:
    1,836
    Location:
    Canada
    Yes I do have a thread started at Civplayers to do just that, make a list of changes we would like to see. But in parallel I have to find a code guy....

    CS
     
  4. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    I believe you made a mistake MPMP_Maker.lua. Your CopyAudioDatabase() refers multiple times to LastGamePlayFileName, a variable you never fine. I believe you mean AudioFileName. It borks the transfer of the audio xml.

    That being said, I don't think that's the reason my civ 5 is crashing on startup when I try to use it. Will be back...
     
  5. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    There is still a problem with mods with files like "Civ5Units.xml" and "Civ5Buildings.xml". The only way I could get it to not crash was to rename these irresponsible files in some of the mods I was trying to load...and of course I have to edit the mod pkg as well.

    I suppose you could explicitly check for that in your program and fix it, but I would imagine it'd be annoying.

    EDIT: To be clear, though, ONLY Civ5Units.xml and Civ5Buildings.xml in mods seem to bother it. There was also a lot Civ5Traits, etc. strewn about that don't seem to crash it.

    EDIT: Actually, I take that back. Errors are still showing up in my logs. Just not crashing game. It seems anything named that overrides a game file can still cause problems. However, I've gotten as far as starting a SP game...but the music is broken. Looking into it.

    EDIT: Well, I can't get the music working. I think the way the game loads built-in music and mod music is just too different. If only there was some way to force it to reload the audio system like it does for certain mods... ALSO, to be clear, I mean only that custom music is broken. Normal music is fine.
     
  6. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Further reporting: MP appears to work. No time to test rigorously, but we'll try a 3 player game later in the week.
     
  7. Civitar

    Civitar Adventurer

    Joined:
    Mar 23, 2014
    Messages:
    1,507
    Gender:
    Male
    Location:
    Switzerland
    This looks awesome, but does it require BNW to work? If this worked with all versions, heck, I think you'd have just stolen Jaii der Herr's project out from under his nose.

    No offense intended, JdH.

    Since I live nearly on top of the Large Hadron Collider, I very much appreciate the warning...but does that mean I shouldn't use this? ;)
     
  8. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,035
    Location:
    France
    You're right, I'll correct that ASAP.

    thanks for the report.

    I'll have to test a mod with custom music to see if I can correct that.

    And yep, if I want to polish the mod, I'll parse the modinfo files to copy ONLY the needed files in the DLC folder (those with VFS to true or from the content tag)

    But I do hope that Jaii der Herr's tool we'll be out before I'll have the need to do that.

    Let me know :)

    It does require BNW, the DLL used is made using BNW source code. It can be ported to Vanilla or G+K, but see above :D

    You can use it, don't worry, if something goes wrong (say I've forgotten to check for a 0 before a division), there'll be no-one left to sue you or me.
     
  9. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Ah, since you're here, I might as well mention that I also spotted some missing text in-game while trying a SP game. Nothing big, but the upgrade unit button doesn't say anything except "UPGRADE UNIT" when you mouse-hover, though the button still works. The text for "You do not have enough money to upgrade" is fine, though. Forgot to check the one for "cannot upgrade unit is outside borders".

    Also missing is:

    When you capture a barbarian settler or worker, the dialog that pops up only says "Do you wish to return this unit?" without mentioning former owner or any other details.

    The mouse-hover dialog for the button on the right side for "Your spy has killed a spy from Player X" is missing, but if you click the button it still takes you to the Player X diplomacy screen. Other spy buttons (Player X has stolen Astronomy! An unknown player has stolen Refrigeration! Player Y has attempted a coup but failed!) behave as normal, but I never encountered certain buttons, since I never had to spy on anyone for tech or to discover their secret plans. Also, I never saw a single "Your influence has mysteriously dropped due to enemy spies" button, which is very weird, because I usually get a ton of those. Also, no one ever warned me about anyone's secret plans to attack me, but I could have just been too powerful ;).

    All in all, it was a surprisingly smooth ride, though.
     
  10. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Okay, so we tried a 3-player multiplayer game. It mostly went fine, except:

    One of the mods had a unit with a unique button action (with its own lua script). That was missing. Units with standard actions (found religion, etc.) were fine.

    Also, the game crashed on turn 120 when I was clicking the demographics window while a new turn was processing. I'm unsure if that was related to this or it was something with Civ 5 Multiplayer and one of the mods.

    For what it's worth, here is a link to the log files. Most of it I find unenlightening. However, I think the errors in Localization.log may explain why there's missing text in the game.

    I might try loading a turn 120 autosave later, and see if it reliably crashes there.
     
  11. Vicevirtuoso

    Vicevirtuoso The Modetta Man

    Joined:
    May 14, 2013
    Messages:
    775
    Location:
    The Wreckage, Brother
    :sad:

    I guess that saves me the trouble of testing this myself.
     
  12. ErichTWade

    ErichTWade Chieftain

    Joined:
    Apr 24, 2014
    Messages:
    2
    Location:
    Arkansas
    I've got a 3-player game going right now. So far most things have been fine; we kept getting a crash from CivIV Diplomacy when the .dll was included so we ended up running without it. One of the players reported some Unit Path Viewer weirdness in which a unit didn't take the indicated path to a destination, but other than that we're having a blast.
     
  13. CleverAdvisor

    CleverAdvisor Chieftain

    Joined:
    Mar 5, 2014
    Messages:
    26
    I tried to load CSDv22 and the game crashes when I try and and hit start game. When i load up FireTuner, I get run time errors in the dialog box is that normal? I took out the dll file before loading the mod.I can load any other mods just fine. Any help?

    ::edit:: got it to load but the tech tree is missing and can never learn writing
    ::edit#2:: Got the tech tree to show but now the units dont show up =/
    ::edit #3:: finally got it working lol
     
  14. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Yeah, sorry, them Kyubeys are broken. One of the players even saw Homura walking around with a normal scout at the beginning of the game, somehow...

    For what it's worth, I did have a custom dll and it worked fine, but it makes incredibly minor changes.

    EDIT: Actually, it was demon Homura. Maybe she's supposed to have normal scouts. I don't recall...
     
  15. Vicevirtuoso

    Vicevirtuoso The Modetta Man

    Joined:
    May 14, 2013
    Messages:
    775
    Location:
    The Wreckage, Brother
    Yeah, Akuhomu has regular Scouts. Her Incubator unit is the Incubator Slave, replacing the Worker.


    Just noticed this part. Do you have the latest version of the Civpack (v6)? v4 and earlier had CTD issues even in single player.
     
  16. cicero225

    cicero225 Warlord

    Joined:
    Jan 19, 2014
    Messages:
    294
    Before I performed the procedure in the OP, about two weeks ago, I had the mod manager update everything to latest version. I'm not on the right computer to check explicitly, though.

    (this is also why I haven't tried reloading turn 120 yet...because I left the country on a trip and forgot to copy the save file)
     
  17. Phe0n1x

    Phe0n1x Chieftain

    Joined:
    Apr 27, 2014
    Messages:
    2
    Hello! I used your MPMPM to create a multiplayer version of Communitas. Everything seemed to work until I tried to see what stats the buildings and unit had. For some reason, none of the information shows up in Civlopedia OR in the tooltips. I imagine this is because the Communitas folks rewrote the information. However, the tooltips for technologies work just fine.

    Database.log
    http://pastebin.com/aQ7nbQZd

    stopwatch.log
    http://pastebin.com/hGDp9tKZ

    Lua.log just had a bunch of "Game = nil"

    MPMPM:
    http://imgur.com/cw6aEz6

    SP With Mods:
    http://imgur.com/Eu5PIHX
     
  18. looter

    looter Chieftain

    Joined:
    Apr 15, 2013
    Messages:
    23
    Seeing progress in this area of Civilization 5 after all these years gives me great hope. This is something I was researching last year but gave up due to no interest from the community, incredibly happy some others have started to look into this.
     
  19. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,035
    Location:
    France
    Yes, there have been multiple discussions on the subject, and to give original credit I think that Nefliqus was the first to release a MP mod using the DLC format.

    What has changed now is that the game is "final", and so some of us have lost hope in official mod support for MP. If I could have avoided to make this tool, I would have, it's a lot of time lost for my other mods.


    @all: thanks for the test and reports, I'll have a look.

    I think I will have to add something to make sure there are no special characters in the texts file, because it could make the whole file ignored (which result in no texts at all from mods, just TXT_KEY_)

    I'm not sure that Communitas could work in MP without desyncs, but I'll try at least to see if that part about the initialization of "Game" could be fixed, IIRC the mod try to attach a lot of functions to this.
     
  20. looter

    looter Chieftain

    Joined:
    Apr 15, 2013
    Messages:
    23
    Thanks for all your hard work, if I was more familiar with general Civilization 5 modding I would throw some pull requests your way but as of right now I'm pretty rusty.

    I'm going to try and whip up a modpack for some friends soon and just have a couple questions. Is converting the SQL databases to XML format risky for certain mods, or is their SQL database mostly static? With gameplay altering mods, could we get together a list on the github repo's wiki for some common code conversions that should be performed, like the random number function mentioned earlier that plays nice with MP, basically a list of things to patch or avoid to prevent desync's.
     
Thread Status:
Not open for further replies.

Share This Page