Reseed!

OK, moving map from DLC to main map dir did not help. I exited the game and cleared the user cache dir, moved the map, started the game, loaded the mods, setup a new game with Continent Plus, and so far so good.

But Reseed gives me an error again, a different one this time:

line 777: attempt to perform arithmetic on field 'group' (a nil value)

I've tried to get a log, but weirdly that the "+" log button from CiVUP didn't work. So I'm going manual, but then again my config.ini doesn't have the line "LoggingEnabled" (nor EnableLuaDebugLibrary for that matter), so I'm adding both and trying the whole thing again...

EDIT: "LoggingEnabled" was there, I just didn't find it somehow, maybe typoed.
 
Wait! I just got a successful reseed with Continent Plus! But this time I was accidentally on Normal pace, whereas I was always on Quick before. Could this be a factor?

BTW, "game pace" should be added to the things that won't be changed in the tooltip help.
 
No, game pace is not it. I got several successful reseed with Quick, too. In fact, all game options were identical this time to #101. Only difference is the logging.

Assuming the logging itself didn't affect the bug (not a totally certain assumption, I know), it would mean the bug is not always, but sporadically reproducible. In fact, my problem now is that I can no longer reproduce it for you (so far as one can count "I'm not getting this bug any more" as a problem).
 
I've reproduced the bug after 15 consecutive successful reseeds (you know what they say, 16 is the charm):
 

Attachments

  • reseed_blkbird_120726.log.7z
    97.6 KB · Views: 94
Thank you very much for your time and that log Blkbird. :)
Now, actually, it was not needed, the error and line number were enough in this case. ^^
Actually neither the error nor the log can tell me the whole story: why the value was nil while it should not be? But I've got some suspicions I need to investigate, something that require to modify the code so I am the only one who can do that (unless a programmer wants to help but I do not expect that). Besides it's less painful for me than it is for you: I can make Reseed automatically chain map generations quickly until an error arises ; that should take about two seconds rather than 15 mins.
 
You're most welcome, and you're definitely the one most deserving to be thanked for all your efforts making those mods.

Now, I am in fact a programmer (never been pro, but I could be), so I can debug simple things, even in languages I don't know. Had Civ stayed in Python (my favorite language), I would've been much more involved. Lua isn't a language I'm familiar with, though, and I'm yet to learn any reason to get myself accountant to it.
 
i would just like to clarify something...

the DLC maps are in here:

C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\DLC_SP_Maps\Maps\

and the only content in my ..\Maps\ dir is what i put in the zip.

you seem to be saying if i do a cut and paste of the files from that dir, to this one:

C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\Maps

i will have access to all the maps, and be able to use them with reseed, outside of the small bug you guys are working on, right?

however, i am not versed in how this stuff works... so my concern would be that if i were to do that, i would "break" the mods or scenarios those DLC maps are supposed to work with in the related DLC content...?

is this not the case?

if i lose nothing to do this, then i will, but if it starts breaking elements of the exp, then i'd rather not.
 
i will have access to all the maps, and be able to use them with reseed, outside of the small bug you guys are working on, right?
This is correct.

however, i am not versed in how this stuff works... so my concern would be that if i were to do that, i would "break" the mods or scenarios those DLC maps are supposed to work with in the related DLC content...?
Technically that DLC (not the other ones) would be broken. But who cares since you will still benefit from all of its content? For you it will make zero differences, you won't notice any difference (aside of the DLC not being listed anymore in the DLC window but this is cosmetic).

if i lose nothing to do this, then i will, but if it starts breaking elements of the exp, then i'd rather not.
If I am wrong you could still ask Steam to repair your game. It would also repair DLC.



Now, one minor thing: you said you want to cut and paste the maps, but this would leave you without any backup of your DLC folder and the DLC_SP_Maps folder would still be there and that will probably cause civ5 to print an error. This is why I rather suggested you to move the whole DLC_SP_Maps folder somewhere else on your hard drive (it will be your backup), then copy and paste the maps.
 
i have a different idea...

i took all the files/maps, copied them, slightly renamed the files, and added them to ..\assets\Maps\ and this worked, the maps are just in the civ5 list twice.

what i need to know is what do i edit in the file, so in Civ 5 menus i can differentiate between "Continents Plus" in DLC and "Continents Plus" in ..\assests\maps\ ?

in other words, i want to change slightly the name of the map displayed in the civ menu, but what do i edit in the file to do this?
 
I've experimented with the beta some more and found that:

1. If I get a line 777 error (#101), I can simply click OK and then "Generate new map" right again, which would then work. So this error is non-disruptive, and a simple (but ugly) workaround could be putting the map generation code in a "while not success try generate() except error pass() else success = true" clause (or whatever the Lua equivalent of that is).

2. I can still get a line 698 error (#698) sometimes despite having moved the map from the DLC to the vanilla map dir. In that case any retry attempt would also end in line 698.

3. If I call up Reseed, reveal the map, close Reseed without generating a new map, then call up Reseed again and order a new map now, there is a greatly increased chance (don't remember if it were a certainty or just close to it) to run into an error. Whereas if I don't close Reseed between reveal and regenerate, the chance of running into error is rather small.
 
@Sinatra
You really do not want to remove that DLC (although it's perfectly safe). ;)
So you need to edit those .lua files and look for the "GetMapInfo" function and change the name. In ContinentPlus.lua, for example, it's the line #20, change into something like
Code:
Name = "Continent Plus***",
to name it: Continent Plus***


@Blkbird
Thank you for those reports!

1. Actually it would be better to fix the error cause. Unfortunately this line errror is not from a Reseed's line, so I cannot know what's the real cause. Maybe it's the same as #2.
2. Yep, this one has been fixed on the version I am working on. It's actually a bug with some map scripts but the standard map systems auto-fix them, so Reseed does too now.
3. Nope, it's just an illusion. ;)


A small update... I've been working on the next beta with the new UI and different optimizations, including a big one (I now use coroutines rather than a custom queue - I really hate LUA), and the bugfix I mentioned.
 
Are you sure its OK to change the map script alone? Because the all-cap string in

Name = "TXT_KEY_MAP_CONTINENTS_PLUS",

is a reference to the files "\Assets\Gameplay\XML\NewText\[LOCALE]\CIV5GameTextInfos_FrontEndScreens.xml" (where [LOCALE] is EN_US and so on), where it says:

<Row Tag="TXT_KEY_MAP_CONTINENTS_PLUS"><Text>Continents Plus</Text></Row>

So maybe it could raise some problem if "Continent Plus***" cannot be found in the corresponding XML?
 
ok, so i changed it to this:

Code:
Name = "TXT_KEY_MAP_CONTINENTS_PLUS2",

notice the "2" ...thats all i added to that line. and in the Civ5 menu, it actually says:

TXT_KEY_MAP_CONTINENTS_PLUS2

and doesn't seem to quite fit.

i was able to pick it and it seemed to work. i got to where i could order the settler if i wanted. so i did "new map" and it took a few minutes to get a new map, taking me back to the "begin your journey" thing. but again, it seemed to work, and i made 4 - 5 new maps without a problem, other than semi-long waits. (and i don't know how long "normal" waiting is)

so the only "issue" is the ugly appearance in the civ5 menu. any ideas? also, how long should "new map" take?

(i did have "city limits" enabled as well)
 
@Sinatra
Regarding the name, it displays exactly what you asked it to display.
With TXT_KEY_MAP_CONTINENTS_PLUS, it looks for the the translated version of the TXT_KEY_MAP_CONTINENTS_PLUS key, which is "Continent Plus" for English-speaking players.
With TXT_KEY_MAP_CONTINENTS_PLUS2, it looks for the the translated version of the TXT_KEY_MAP_CONTINENTS_PLUS2 key, realizes that there is no such key, so it sets the name to "TXT_KEY_MAP_CONTINENTS_PLUS2"
Just write directly a name that looks fine to you.

Now, regarding the map generation duration, the beta is by default configured for safety rather than speed. The next beta will have a UI to adjust that but right now you need to do it manually: change the "batchSize" value at the top of RSD_Process.lua. The current value is 50, just set it to 50000 and see if works for you (it should).
 
I have a RFE:

During Glance at Map, show a "Hide HUD" button which everything but the naked map. Keyboard shortcuts should still be functional, and ESC should restore the HUD.

Right now the Reseed menu takes up so much screen estate it's hard to see things.
 
Right now the Reseed menu takes up so much screen estate it's hard to see things.
Low resolutions kill me. ^^
Well, ok, I will add something. Maybe not for v5 though, I am already pretty busy with civ5 and lua throwing thousands of tons of **** at me.

Some of the things I experienced in my last session:
* Civ5 suddenly started to crash anytime I was doing changes to Reseed's source code (it is supposed to reload the whole UI but it's buggy: for some mods it suddenly decide to lock files and prevent you to update them, here it just crashes, ...)
* If an error occurs in a coroutine, civ5 does not display anything.
* I discovered a bug in one of the maps functions, that assigns nils to the plots' types because of an indices problem.
* A function with three args suddenly started to bug when I added a fourth arg without changing its source code nor changing the args' names! Sounds incredible and like a mistake from me but, no, it wasn't, I checked it ten times and there wasn't much to check anyway. I guess it's related to the fact that one of those args was a coroutine and the function was printing its stacktrace.
* I have a function without any argument that works if I call it at some point and not if I call it at another point. That function contains an "include" statement (to include the map script) and never caused any trouble before ; the include just suddenly stopped working (still successful but no functions are imported). No, no mistake, I didn't change its code anyway, the output is pretty explicit and it does not mess up with any global variable. I guess there is just some limit over the "include" implementation (which is not a standard lua keyword anyway but something added by Firaxis to deal with their VFS)
 
* I have a function without any argument that works if I call it at some point and not if I call it at another point. That function contains an "include" statement (to include the map script) and never caused any trouble before ; the include just suddenly stopped working (still successful but no functions are imported). No, no mistake, I didn't change its code anyway, the output is pretty explicit and it does not mess up with any global variable. I guess there is just some limit over the "include" implementation (which is not a standard lua keyword anyway but something added by Firaxis to deal with their VFS)
An update on that: so the "include-statement-within-a-function" bugs if the function is called from within a LuaEvent, whatever the context it takes place in and whatever the context that triggers it. it also bugs

Which also means that I need to move all my generation process to the UI LuaContext. :crazyeye:

EDIT: It also bugs when called from an Update hook (ContextPtr:SetUpdate). Works fine when called from a button callback through.
 
Well, don't you just hate it when your project relies on other projects for which you don't have source code access?

In the beginning of my programming days, when learning Pascal, I spend hundreds of hours reading through the source code of the standard library of Borland Pascal, and it was easily the most important source for my learning, due to the quantity, the complexity and the incredibly high quality of the code. To this day I'm deeply grateful to Borland for providing the their complete source code (just the libraries, not the compiler, of course). I don't know what kind of programmer (if one worthy that description at all) I would've turned out to be otherwise.
 
Top Bottom