Reseed!

Hello Freyasgirl and thank you for sending the lua log right away and providing your specs. :)

So that one is kinda unusual. From what I see in the log, the program hanged at the point the regeneration was finished and it was preparing to reload. There are two possibilities:
  • The fog was turned off and "reseed" tried to turn it on again, and hanged at that point. So was the fog turned off, and what happens if you don't turn it off, or if you turn it on again before regenerating?.
  • "Reseed" correctly closed and the program hanged when trying to load the savegame. Could you try to manually load the "__reseed" savegame and see whether something changes? Note1: the __ressed save is deleted when you reload Reseed. Note2: if it does not appear in the saves list, find it in My Documents/Civ5/Saves and rename it. You must be playing a modded solo game with "Reseed!" enabled to see this save.


Also, do you use a PC or a Mac? It it a legal, up-to-date, unmodified version of civ5?
 
Hello Mofasa. :)

Thank you for taking the time to make the log. Unfortunately I still can't figure out what the problem because everything looks perfectly fine. Well, at least I know what the problem is not.

So, sorry for the bother but I still need you to help me find what the problem is, starting with some questions. :(
* You did play Gandhi, did you? Because Gandhi had a settler and a warrior so it should not be a game over.
* Did you change the standard game options? Especially what were your victory conditions, did you set up a one city challenge, etc?

Besides I previously asked you to try to manually reload the "__reseed" (it was "__restart" on previous versions) savegame and you told me you couldn't find it. Here is what I would like you to do:
* Open RS_Loader.lua (in My Documents/Sid Meier's civilization 5/Mods/Reseed!") in a text editor.
* Delete or replace by a whitespace the #25 line (it contains "DeleteFiles("__reseed");") near the end.
* Save and close the text editor.
* Start or restart civ5. Try to regenerate a map. One more game over.
* Try to manually load "__reseed" in non-cloud saves (you must still have Reseed! enabled and be playing a modded solo game).
* If you cannot see it, go to "My Documents/Sid Meier's civilization 5/Mods/Reseed!" and rename the "__reseed" savegame to something else and restart civ5.
* Could you manage to load it?
 
Updating an old mod to prevent it to break the standard diplo corner registration.

What is this about?
  • The "diplo corner" is the set of four buttons (three big ones and a small one) on the top right corner.
  • Mods such as "Reseed!" often register themselves in the popup menu of the small button.
  • Before June 2012 there was no standard registration mechanism and those mods all used a common library to add an unofficial registration mechanism.
  • But now there is an official mechanism andthe older versions of this common library break it!. You need to replace this library with a new version.
  • This new version supports both the official and unofficial registration mechanisms.

How to update? (short version)
You want to replace the old version of DiploCorner.lua with the new version from "Utils - Modular Diplo Corner" by whoward69 (available on the Steam Workshop).
Once it's done you can unsubscribe Modular Diplo Corner.


How to update? (long version)
  • Subscribe "Utils - Modular DiploCorner" by Whoward69 from the Steam Workshop
  • Start civ5 to have it download this mod.
  • Close civ5.
  • Go to "My Documents/My Games/Sid Meier's Civilization 5/Mods".
  • The old version is in "Utils - Modular Diplo Corner/UI/InGame/WorldView/DiploCorner.lua".
  • The new version is somewhere in the mod you want to update.
  • Replace the old version with the new version. You can use drag'n drop between two windows, or copy (through the menu edit > copy) the new one, then go to the old version' folder and paste (through the menu edit > paste).
  • Restart civ5. If everything is fine you can now unsubscribe "Utils - Modular Diplo Corner".
  • Send your tanks to Whoward69. :)
 
Version 4 has been released.

Changes
  • I added a French translation and a partial Chinese translation.
  • Escape now closes the window.

Bugfixes
  • Should fix freezes that occurred when one tried to regenerate the map when the fog was hidden by putting the fog restoration before the map regeneration (civ5 bug).



Note: seems like the freezes can still occur if you try to reset a large map at an advanced era, with plenty of units and cities, but it's a civ5 bug and there is probably nothing I can do about it.
 
Hi, I can not find the Reseed button. I tried it with just your mod alone and with one another mod (Echo of Ages) all mods and CiV are up to date (I am playing Gods & Kings btw) here is my solo play set up:

Ethiopia
Large Map
Epic Speed
King Difficulty

Help!

Edit: lol wow I am absolutely ********.....I found it and it's in the smallest upper button :) thank you very much for this awesome mod!!
 
Seems like a very useful mod. Unfortunately, it doesn't seem to be working 100% properly.

Two problems.

One, the mod shows up in game and allows me to preview the map just fine. However, when attempting to actually reseed the map, it gives me an error. I have no other mods, it's legal and up-to-date, and I deleted the caches, yet it persists.

The second problem is that config.ini doesn't contain "EnableLuaDebugLibrary". At all. I'm not sure why this is. Should I have just added it? I don't know how these things work.

Instead, I attached a screenshot of the error. I don't know how helpful this will be, so if you would prefer the lua log, just let me know how to get it. It seems to think I have other mods/map scripts, but I've never really bothered before. I also don't have Gods & Kings, just a couple DLC.
 

Attachments

  • Reseed error.jpg
    Reseed error.jpg
    122.4 KB · Views: 249
Hello Ririchan and thank you for the report. :)

In this case, the error is enough, no need for a lua log. It teaches me I forgot to add a test to ensure this mod would be compatible without G&K. I will release a new version to fix that in the hours to come.

Regarding the EnableLuaDebugLibrary, I have no idea why you don't have it in your config.ini but it cannot do any harm to add it. Anyway, as I said, that won't be necessary here but thank you for trying. ;)
 
About crashes and such... The dirty side of civ5...
There are two problems that play a role.

The first one is a bug where civ5 can lock itself if we send it too many stuff to do. By stuff, I am not just talking about occupying the CPU for a few seconds: this does not lock civ5. I am talking about things like adding or killing units, modifying the terrain, etc. So we need to leave time to civ5 to breathe and handle the updates required after those changes.

Now, the fun thing about that is that not only the maximum number of events seems to depend on your computer (probably your CPU speed), but also it contradicts the very hack on which Reseed relies on: we need to kill units, regenerate map and place new units without letting civ5 breath! Or civ5 will declare game over before the new units are positioned...

Anyway, I managed to do something that should work on more computers than today. Indeed rather than bursting all operations, there are some of them we can do before we start to kill your units and regenerate the map: removing resources, killing most (but not all) of units, etc. So now all those steps (I call that pre-generation) have been sliced and spread across multiple frames. There is still a final burst your computer need to handle and because of that it will still crash on lowest computers. And there is nothing I can do about it. However, more computers should be able to handle it.


Now the second problem is also funny: if you ever founded a city, civ5 will declare you game over if you don't have any city left. But it does not always do that. For example it does not on turn 0: you can found your city and reset, no game over. Anyway, I need to find a trick to prevent that: either I must find a way to revive you before the game over screen pops up, either I will have to spawn a capital for you if you reseted at a point where you already had founded a city. If none of that is possible, I will have to forbid you to use Reseed after turn 0.



Finally... Some of those are speculations since we don't know the internals of civ5. And there may be more hidden bugs and behaviors I am not aware of.
 
The first one is a bug where civ5 can lock itself if we send it too many stuff to do. By stuff, I am not just talking about occupying the CPU for a few seconds: this does not lock civ5. I am talking about things like adding or killing units, modifying the terrain, etc. So we need to leave time to civ5 to breathe and handle the updates required after those changes.
Interesting... Do you have a way to force it to "breathe" ?
 
Interesting... Do you have a way to force it to "breathe" ?
There is no special trick, here. :)
I first collect all the changes I will need to do and store them in an array. Then I register a callback through ContextPtr:SetUpdate and, on every call, i process N entries from the array. That way civ5 processes one frame between every invocation.

I also had to use something similar in IGE for different reasons: sometimes calling a function didn't change things immediately but only one frame later. So at some points I had to schedule functions to run one frame later. If someone is interested by the way, there is a nice LuaEvents.IGE_Schedule that can be used for that purpose and allows the composition of multiple callbacks and automatically registers/unregisters the scheduler callback for updates.
 
There is no special trick, here. :)
I first collect all the changes I will need to do and store them in an array. Then I register a callback through ContextPtr:SetUpdate and, on every call, i process N entries from the array. That way civ5 processes one frame between every invocation.

I also had to use something similar in IGE for different reasons: sometimes calling a function didn't change things immediately but only one frame later. So at some points I had to schedule functions to run one frame later. If someone is interested by the way, there is a nice LuaEvents.IGE_Schedule that can be used for that purpose and allows the composition of multiple callbacks and automatically registers/unregisters the scheduler callback for updates.

Thanks, I'll have to test that :)
 
v4.5 has been released.
  • It fixes crashes for some people. Maybe we can fix them for more people, I don't know, I need more data. But we can't fix them for all people, this is a civ5 limit, please complain to Firaxis.
  • If you try to use Reseed! after a city has been founded, you will get an error popup instead, explaining that it would randomly result in a game over. I fought for hours against that but I had to throw the towel in the end because I think I tried about every possible trick.

The v5 will change the UI accordingly, with a popup shown right from the beginning (no more diplo menu) that will disappear as soon as you found a city, and other changes.
 
Back
Top Bottom