How to reload a mod without relaunching Civ5?

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.
 
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
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.

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.
 
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.
 
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.
 
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.

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...
 
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.

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.
 
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.
 
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.
 
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)
 
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)
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?
 
Top Bottom