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

How to reload a mod without relaunching Civ5?

Discussion in 'Civ5 - Creation & Customization' started by rackam77, Oct 4, 2010.

  1. rackam77

    rackam77 Chieftain

    Joined:
    Jul 19, 2010
    Messages:
    12
    I would like to know how to reload a mod (for testing it) without relaunching Civ5 ?

    May be by using a LUA function in Firaxis Tuner?

    Thanks.
     
  2. ChaK_

    ChaK_ Chieftain

    Joined:
    Oct 3, 2010
    Messages:
    28
    Just alt tab lol

    It works that way, I keep alt tabbing modbuddy/civ 5.

    Just go again to the mod menu to reactivate it
     
  3. rackam77

    rackam77 Chieftain

    Joined:
    Jul 19, 2010
    Messages:
    12
    Thanks,

    But any function like 'reloadUI' or 'reloadmods' in Tuner?
     
  4. Nercury

    Nercury Warlord

    Joined:
    Aug 5, 2006
    Messages:
    126
    Location:
    Lithuania
    You can set FullScreen = 0 in GraphicsSettings****.ini, andalso window size with WindowResX and
    WindowResY = 932.

    To skip intro movie faster, hold ESC key when it starts playing.
     
  5. MerakSpielman

    MerakSpielman Warlord

    Joined:
    Oct 27, 2005
    Messages:
    217
    I usually just quit to menu, alt-tab to clean/rebuild the mod, and then alt-tab back, re-select the mod, and start a new game.
     
  6. Wirapuru

    Wirapuru a happy dog

    Joined:
    Nov 27, 2006
    Messages:
    122
    just adding to that: XML (and maybe SQL) commits to database are made when you hit the SINGLE PLAYER button on MODS menu. You don't need to go ingame if you need to test database changes.
     
  7. Dave Lawson

    Dave Lawson Chieftain

    Joined:
    Jan 6, 2008
    Messages:
    57
    Last night, I was tinkering with some basic modding -- mostly following the examples in Kael's guide. Much props to Kael for that btw. I was able to rebuild and redeploy the mod without restarting civ, just by going back to the main menu.

    Unfortunately, now, I'm working on making some other changes, and it is no longer the case. Now I have to exit the game entirely and relaunch civ 5. This is a real downer, as it takes a minute or more for the damn thing to get going. Given the nature of modding, and teaching oneself a new technology, it's hugely advantageous to be able to check that stuff works after every small change, and that simply isn't feasible with this.

    Anybody know what causes a mod to require relaunching of the entire app?

    EDIT:
    Just occurred to me that today I'm venturing into the land of overwriting core file (changing UI components) whereas yesterday's testing only involved adding new files. Maybe that why it's behaving as it is.

    EDIT2:
    The rules seem to have changed again, as now I am once again able to reload the mod without restarting the app.
     
  8. aeric67

    aeric67 Chieftain

    Joined:
    Mar 21, 2003
    Messages:
    29
    I have not been able to reload a mod once it has been rebuilt using ModBuddy. It doesn't even appear in the MOD menu once it has been changed.
     
  9. Dave Lawson

    Dave Lawson Chieftain

    Joined:
    Jan 6, 2008
    Messages:
    57
    Not have much luck tracking down what causes it to allow a hot swap and what requires relaunching.
    I just changed a text string in a custom xml file, compiled, and the mod disappeared from the list.
    I then changed it back, manually, recompiled, and the mod reappeared in the list.
    I then changed a reference to that same text in an overridden UI xml file, and the mod remained in the list.
    Can't make heads or tails of it yet.
     
  10. ArgentumStudios

    ArgentumStudios Warlord

    Joined:
    Sep 18, 2010
    Messages:
    122
    Location:
    Utah, US
    Sometimes I need to rebuild the mod after going back to the main menu even though the Output window in ModBuddy reports that everything built successfully.
     
  11. Evalis

    Evalis Prince

    Joined:
    Mar 2, 2009
    Messages:
    493
    Keep a seperate window open with 'explorer' (the file viewer, not the internet) and both delete the mod from the mods screen and delete the build from explorer. When you Build or Rebuild the mod it should show up properly without exiting.

    Often what happens is the game still registers the old mod as existing in cache and the new one is a duplicate so neither show up.
     
  12. Pazyryk

    Pazyryk Deity

    Joined:
    Jun 13, 2008
    Messages:
    3,584
    I haven't tested this yet, but an alternative idea would be to have an index number suffix on your mod name that you increment with each test. This might provide a little more confidence that you didn't forget one of Evalis's steps.

    Or is it looking at the md5 number rather than the mod name? It would be really nasty if it showed you the newly named mod in the browser but reloaded from cache because this number was the same. But if this is the case, there is a button that lets you generate a new one for your existing mod.
     
  13. Dave Lawson

    Dave Lawson Chieftain

    Joined:
    Jan 6, 2008
    Messages:
    57
    I just tried doing this, and it didn't seem to have any impact. Still unable to hot-swap my mod at the moment. I tried both cleaning the build, and actually deleting the folder called 'Build' that is generated by modBuddy, while at the same time either uninstalling the mod in the menu, or by simply deleting the installed mod folder.

    I wonder if there isn't functionality available to automatically increment the version number somehow...
     
  14. Dave Lawson

    Dave Lawson Chieftain

    Joined:
    Jan 6, 2008
    Messages:
    57
    Getting a new MD5 value seems to have done the trick. Not sure if that will screw up all concept of versioning later, though. Hopefully it continues to work.
     
  15. Nercury

    Nercury Warlord

    Joined:
    Aug 5, 2006
    Messages:
    126
    Location:
    Lithuania
    Yeah, that will screw up versioning. But you can change it back.
     
  16. Dave Lawson

    Dave Lawson Chieftain

    Joined:
    Jan 6, 2008
    Messages:
    57
    Well, turns out that md5 alone isn't enough either.

    Something strange did happen though. At first I thought it was a fluke. Then it happened a second, and finally third time, and I'm thinking it's a piece of the puzzle.

    I was in at the main menu, windowed mode, having just left a game testing a mod. I rebuilt my mod, and gave it a new md5 while I was at it. I went back to the mod screen, and it wasn't in the list. I figured damn... guess it didn't work. I decided I would give it a minute or two to refresh, assuming it's doing some sort of polling of the file system. Came back, still not there. Oh well. So I go to delete the folder in the neighboring window. The moment I clicked on the mod folder, the still visible civ window immediately refreshed showing the rebuilt mod. I didn't delete, rename, or anything else the folder, I simply clicked on it.

    EDIT: I've now rebuilt my mod at least a dozen times testing a variety of things, and just by leaving the folder highlighted in windows explorer, I haven't needed to quit civ 5 since trying this out.
     
  17. Nercury

    Nercury Warlord

    Joined:
    Aug 5, 2006
    Messages:
    126
    Location:
    Lithuania
    Very interesting. Looks like a bug in file system information usage.
     
  18. Dave Lawson

    Dave Lawson Chieftain

    Joined:
    Jan 6, 2008
    Messages:
    57
    I don't honestly know enough about the windows api to know how this could come about. But it was consistent. I never once had to relaunch civ once I had discovered this, and I must have rebuilt the mod at least 50 times. This saved me more than one hour's time just last night, in a five hour session.
     
  19. Pazyryk

    Pazyryk Deity

    Joined:
    Jun 13, 2008
    Messages:
    3,584
    I'm having similar problems even when exiting and restarting the game. Really hard to know what it is grabbing from the mod folder, from cache, or from somewhere else. Right now, for each addition or modification, I:
    1. Increment version number
    2. Regenerate md5 number
    3. Delete Mod from within mod browser
    4. Delete cache
    5. Delete Mod folder then rebuild
    6. Regenerate md5 number again just to be safe
    7. Make up an entirely new mod name
    8. Uninstall/reinstall civ5
    9. Wipe hard drive and reinstall everything (not from recovery disk, it has to be from scratch)
     
  20. Dave Lawson

    Dave Lawson Chieftain

    Joined:
    Jan 6, 2008
    Messages:
    57
    Oh. My. God.
    I sincerely hope you are joking.
    Everything that the game loads, that is mod related, is loaded from the MODs folder, hidden somewhere below My Documents. Nothing else should need changing. This is the folder I need to click on in windows explorer to get the mod list to refresh.

    Are you perhaps making changes to the original core files themselves?
     

Share This Page