MapFinder

HoF Map Finder/Generator Utility 2016-10-05

Will give it a try. Thanks a lot. I can't wait to see if Moonsinger can make this program work with modified rule sets. I am dieing to find a good map to start a real try at finishing an Emperor game and have spent most of the night restarting manually attempting to find one that I like.

I'm just curious, what would the settings for this program be if I wanted, lets say, a hill with gold next to a river with two cows for my starting position?

Or at least river and two food bonuses consisting of Cow, Game, Wheat, or Wine?
 
Originally posted by superslug
If I'm understanding things correctly (not likely), then the latest version of Mapfinder is supposed to relaunch C3C after a certain number of maps, correct? I ask because mine's not. Could this possibly be due to the fact that I currently have Conquests installed in a custom directory rather than the default?

Since the location of "Civ3Conquests.exe" file is based on the location of the AUTO save directory, if you give it the correct auto save directory, it should work. For example, let's say my auto save directory is as follows:

c:\games\civ3\Conquests\saves\auto

which means the Civ3Conquests.exe must be in the c:\games\civ3\Conquests directory. Also since C3C runs slower than PTW or vanilla Civ, you should give it extra delay time too. In any case, just set your restart counter to 2 (that's the minimum) to see if it restart after 2 iterations. Btw, there will be a long delay (up to a minute before you see C3C restart....the reason for this is because the system need to take a break and that's perfectly normal); you should not touch your keyboard during this time.;) Anyway, what is your current time delay setting and your system speed? My system is running at 3.4 GHz and my loading delay is set at 9 seconds and saving at 8 seconds. Unless your system is faster than mine, your delay for loading should be at least 9000 ms and your delay for saving should be at least 8000 ms for C3C. As for PTW or vanilla, I set my loading delay at 5 seonds and saving at 4 seconds. Note: 4 seconds is really equal to 4000 ms (mili seconds) in MapFinder setting.
 
Originally posted by Rellin
If you have ever played a Scenario it is the exact same. Just my scenario does not have a map attached to it so it randomly generates one.

Open C3C, Click "Civ-Content" (instead of clicking "New Game"), Click the Scenario/File you wish to load to select it (This being my mod file and the Scenario/File you last loads stays selected when you go click Civ-Content the next time), Click Scenario/File again to load it, Select Map Options, Select Opponents and Difficulty Level.

Ok, I will check that out tonight. Sorry, but I don't have my C3C CD with me at the moment and I'm currently not at home.
 
Originally posted by widdowmaker
You moonsinger and deltharius are a god send.Ima C++ programmer of sorts. Mostly hobbiststuff. But so fari haventbeen able to crack into the Civ3 C#C code. If you mind could you PM me so that we can talk? If i can crack the game open im certain i could make some worth mods.

Not really! I haven't done any serious C++ programming during the last decade. Sure, I can read and understand someone else code, but I have no idea on how to compile my own code. Of course, if I really want to, I could always learn it back within a week or so. As I mentioned in the first post of this thread, Dianthus took care of the core C++ part.;)

PS: The "domination limit" is ....once your reach this limit, you win by domination - exactly what Rellin said!
 
@Moonsinger:
I turned all the time settings up to 15 seconds and downed the iterations to 2 as you suggested. It appears to work at 15 seconds, so I'll likely leave at that for now (my system is only ~1.3ghz).

I should've thought to bump up the timers already, that seems to be the most common advice in this thread! :thanx:

Now I get to watch my computer run Mapfinder for a few weeks. Finding the start position I'm looking for is going to take significant time (huge, 60%, archipelago, start at a four turn factory position and pop a settler out of the first hut, domination limit no lower than 4400...:cringe: )
 
Originally posted by Rellin
I'm just curious, what would the settings for this program be if I wanted, lets say, a hill with gold next to a river with two cows for my starting position?

Just set the minimum food to at least 1 (note: 0=off; 1 >= on) and bonus to +2. In this case, you will get at least 2 food bonus. Which means it could be 2 floodplains, 2 wheats, 2 cows, or 1 cow and 1 wheat, etc. Of course, the ninimum number of river = 1 (at least one river at the starting location is all you really need).


Or at least river and two food bonuses consisting of Cow, Game, Wheat, or Wine?

View the report at the end, run a slideshow on those JPEG screenshots and let your brain do the rest.;) The MapFinder usually already eliminates at least 90% of the bad map, you just have pick the rest yourself.
 
Moonsinger and Dianthus, wow, thanks for a really cool utility! I have one problem (that's probably due to my own stupidity somehow, I'm sure ;)), and a related request. Just FYI, I'm running on XP Pro (SP1) with an Athlon 2.0G and 1G RAM.

First, my problem is, while I have no problem finding and saving so far many dozen maps (at huge pangaea 60% water in C3C with min 3800 domination), for some reason Mapfinder never properly generates the html analysis page for me. After finishing (whether on its own, or because I decided to end it with alt-tab), it (usually, but not always) opens IE and proudly displays the results table, which so far has never had any entries in it, even if it found plenty of maps! :(

Second, my request is, could you add a button to the Mapfinder which would simply run the code to generate the html summary for all the maps in the currently selected directory? This would be nice for my problem, so I could just generate the analysis afterwards if it decided not to work for some reason, but could also be used to generate nice starting position summaries for any directory of .sav files (if for instance you start regrouping some newly found .sav files with some old ones and want a nice new html summary for the whole new group).

Anyway, thanks again, and hope my problem/request is an easy one :)!
 
Originally posted by Coilean
First, my problem is, while I have no problem finding and saving so far many dozen maps (at huge pangaea 60% water in C3C with min 3800 domination), for some reason Mapfinder never properly generates the html analysis page for me. After finishing (whether on its own, or because I decided to end it with alt-tab), it (usually, but not always) opens IE and proudly displays the results table, which so far has never had any entries in it, even if it found plenty of maps! :(

When you said that it found plenty of maps, do you mean there were actually files in your output directory? If not, it didn't find any.

There are two possible problems here:

1. Your timing may be too fast. As I said in my previous post, unless you guys system can run faster than mine P4@3.4 GHz, do not set the loading time any less than 9000 ms and the saving time any less than 8000 ms.

2. Make sure that you point it to the correct AUTO save directory. For starter, run a sample with the domination limit of mininum of 1000 to see if you get anything on the report. Once you know that all the timing are correct, do it for real at 3800 or above.:)


Second, my request is, could you add a button to the Mapfinder which would simply run the code to generate the html summary for all the maps in the currently selected directory? This would be nice for my problem, so I could just generate the analysis afterwards if it decided not to work for some reason, but could also be used to generate nice starting position summaries for any directory of .sav files (if for instance you start regrouping some newly found .sav files with some old ones and want a nice new html summary for the whole new group).

The only catch is that if you don't mind me renaming your file. For example, if your original sav is "Whatever of the Babylonian 4000BC.sav" would be renamed to "0000134-??-?-??-? or something like that. Of course, the screenshot of the starting position may not be available. You know what? This may be a can of worms! Since it's so easily to generate new maps, why would you care about old files anyway? As for all files generated by this MapFinder program, it will automatically included all files in that directory on the new report everytime you attempt to run it again.
 
Oh, had a random thought for a simple addition. It occurs to me that in C3C an agricultural civ doesn't mind some starting spots as much as other civs (i.e. being in a bunch of desert). To take this into account in a simple way, perhaps you could add an "agricultural" checkbox which would count all desert tiles as having 1 more food than they really do.
 
Originally posted by Coilean
Oh, had a random thought for a simple addition. It occurs to me that in C3C an agricultural civ doesn't mind some starting spots as much as other civs (i.e. being in a bunch of desert). To take this into account in a simple way, perhaps you could add an "agricultural" checkbox which would count all desert tiles as having 1 more food than they really do.

Why settling for the second best when you can have it all? Would you rather have grassland with cows and river than desert land with cows and river?
 
Originally posted by Moonsinger
When you said that it found plenty of maps, do you mean there were actually files in your output directory? If not, it didn't find any.
Yep, there are files in my output directory. It seems to find the maps just fine, and even generates an index.html, but there are only blank entries in the html table.


There are two possible problems here:

1. Your timing may be too fast. As I said in my previous post, unless you guys system can run faster than mine P4@3.4 GHz, do not set the loading time any less than 9000 ms and the saving time any less than 8000 ms.
I *was* running it fairly fast at 5000/4000 (using quick start). I relaxed the timings as far as 25000/20000 and it still did same thing: it saves the maps fine in the specified output directory, but makes blank entries in the html summary file. Since there are no .jpegs generated either, maybe the screenshot generation is at fault somehow here? I let the task manager run on top while Mapfinder was going, and Mapfinder was eating every spare CPU cycle the whole time it was finding maps, is this normal? I had the timing set to 25000/20000 while I was watching, so I would assume at some point in those 20 seconds, Mapfinder should stop eating CPU for a while after its saved the map and generated the screenshot and is just waiting for the next map to be loaded?


2. Make sure that you point it to the correct AUTO save directory. For starter, run a sample with the domination limit of mininum of 1000 to see if you get anything on the report. Once you know that all the timing are correct, do it for real at 3800 or above.:)
Since it does find and save maps just fine, this seems to be set properly.
 
RE: my request for a button to generate the html analysis of the starting positions in the selected directory:

Moonsinger wrote:
The only catch is that if you don't mind me renaming your file. For example, if your original sav is "Whatever of the Babylonian 4000BC.sav" would be renamed to "0000134-??-?-??-? or something like that. Of course, the screenshot of the starting position may not be available. You know what? This may be a can of worms! Since it's so easily to generate new maps, why would you care about old files anyway? As for all files generated by this MapFinder program, it will automatically included all files in that directory on the new report everytime you attempt to run it again.

Ah, I wasn't aware the screenshots were generated at a different time than the html table. I figured the table and screenshots were made at the same time after Mapfinder was done looping through maps. It might not be hard to make it work this way (after the mapfind looping, it could generate a screenshot for all the .savs in the directory, assuming no screenshot was there already, and then make the html table), if this feature is thought to be useful. But if I'm the only one who cares, then no sense in changing anything of course! :D

I was mostly interested in this as a means to possibly combine or recategorize directories of maps that Mapfinder generated during different sessions, but it sounds like I could accomplish what I want anyway by using Mapfinder to find just 1 map in a directory with the other maps I wanted "combined" into a single html analysis. If I could get the html feature to work for me in the first place that is! ;)
 
Originally posted by Coilean
Yep, there are files in my output directory. It seems to find the maps just fine, and even generates an index.html, but there are only blank entries in the html table.

Do files in the output directory in the following format?

NNNNNN-NN+N-NN+N-NN+N-N-NNNN.sav

For example:

0007268-14+1-04+2-05+0-5-4420.sav

Translation ->

Iteration #7268
Food = 14 +1 bonus
Shield = 04 + 2 bonus
Gold = 05 + 0 bonus
# of river = 5
Domination limit = 4420

Basically, I store the map info on the filename.;)
 
Originally posted by Coilean
I let the task manager run on top while Mapfinder was going, and Mapfinder was eating every spare CPU cycle the whole time it was finding maps, is this normal? I had the timing set to 25000/20000 while I was watching, so I would assume at some point in those 20 seconds, Mapfinder should stop eating CPU for a while after its saved the map and generated the screenshot and is just waiting for the next map to be loaded?

Please do me a favor! Run the task manager on top while Civ3/PTW/C3C running (while MapFinder is not running) to see if your CPU is eating up or not?;) Are sure you it wasn't Civ3/PTW/C3C that's always hungry for CPU time?

Originally posted by Coilean
I was mostly interested in this as a means to possibly combine or recategorize directories of maps that Mapfinder generated during different sessions, but it sounds like I could accomplish what I want anyway by using Mapfinder to find just 1 map in a directory with the other maps I wanted "combined" into a single html analysis. If I could get the html feature to work for me in the first place that is! ;)

Yes, I will add a pop up menu for that, so can regenerate the report anytime you want (very useful after you delete some of the maps that you don't like).:)
 
Please do me a favor! Run the task manager on top while Civ3/PTW/C3C running (while MapFinder is not running) to see if your CPU is eating up or not? Are sure you it wasn't Civ3/PTW/C3C that's always hungry for CPU time?

It's definitely Mapfinder :(. Just to make sure I'm not a total idiot, the 2v5 version is the correct one, right?

I was reporting the process usage from the process list, not just the graph. C3C idles at 13-5% and runs at 30-85% if its actually doing something, while Mapfinder always takes up the remaining CPU, even if it's just sitting there for 10 seconds after the save is finished.

Since as far as I know, this seems to be working fine for everyone else, it must be some kind of issue/conflict with the way my system is set up.

Question, are the screenshots done during the map save, or after Mapfinder is done looking at maps? As I said before, I am not seeing any jpegs, just a bunch of save files named like "0003608-17+1-01.SAV". These save files have worked fine every time I tried to load one in C3C (probably a dozen or so of them).
 
Originally posted by Coilean
Question, are the screenshots done during the map save, or after Mapfinder is done looking at maps? As I said before, I am not seeing any jpegs, just a bunch of save files named like "0003608-17+1-01.SAV". These save files have worked fine every time I tried to load one in C3C (probably a dozen or so of them).

That's it! You just located the problem. The logic for my reporting subroutine is as follows:

For every SAV file in the output directory, there must also be a valid JPG file to go along with it. Otherwise, no report!

What is your OS anyway? May be the screen capture subroutine got hang up somewhere and eating up your CPU time or something. That would explain why you have no screenshot files.
 
RE: agri civs and desert tiles, there is one significant thing I can think of: oasis is a bonus food tile (3 food when irrigated) under despotism if you are agricultural, but not otherwise.

Also, I am not advocating counting deserts as having 1 more food for agri civs so that I can have a bunch of desert maps to play, I still want cows ;)! I just wouldn't want desert to be considered any worse than a plains when I am using the minimum food filter. Granted desert is not quite the same as plains even if you are agri, since you can mine a plains and still get 1 food, but deserts are still not nearly as bad for agri civs in general.

For example, say you are using the minimum food filter (I like 9). For an agri civ, I wouldn't consider a start of 4 desert tiles, an oasis, 2 plains with cow, and 2 hills to be much different than if those deserts were plains. However, if I had set the minimum food filter to 9, I would lose the desert start but not the plains one.

Anyway, like I was saying before, it was just a random thought I had while playing with this thing generating maps for the newly agricultural Aztecs in C3C. It might only wind up saving something like 1-2 maps more of every 100 (if that) anyway, so it's probably not a terribly big deal. :)
 
Originally posted by Coilean
I was reporting the process usage from the process list, not just the graph. C3C idles at 13-5% and runs at 30-85% if its actually doing something, while Mapfinder always takes up the remaining CPU, even if it's just sitting there for 10 seconds after the save is finished.

I can now confirm that you are absolutley right about that. I just do a simulation on the TimeWait API and while it's waiting, it's actually killing off CPU time which mean it's true that while MapFinder is running, it's using about 3% of CPU time (on my system), but while it's waiting, it will use most of the CPU time. Of course, I did not implement the TimeWait API; therefore, I will try to search for a better function.
 
What is your OS anyway? May be the screen capture subroutine got hang up somewhere and eating up your CPU time or something. That would explain why you have no screenshot files.
Windows XP Pro, SP1 installed. I have purposely avoided installing .NET until now, I sure hope that's not the root of my problem :P.
 
Good news! I have found a better Wait function here:

http://www.merlyn.demon.co.uk/pas-wait.htm#Wait

Will definitely release the stress of your CPU within a day or so.[dance]


Btw, I'm using WinXP Pro too. I don't know why the screenshot doesn't work on your system, but I will review my code tonight.
 
Back
Top Bottom