MapFinder

HoF Map Finder/Generator Utility 2016-10-05

watorrey said:
All this discussion about timing makes me wonder if Mapfinders defaults shouldn't be set perhaps twice as long as needed for a slow system and let the players with fast systems tweak it if they desire. A readme.txt would be a good place to put the instructions. I actually haven't tried it yet because the lack of a readme.txt file and this discussion makes it sound like a trial and error till it runs right utility.

In the latest release, I did adjust those default values to be compatible with a 2GHz machine. The original default will work fine for a 3.6 GHz system (which happened to be the clock speed of my system). Any way, if I'm going to recompile it, I will set the default to be compatible with a 400MHz machine...that is the minimum system requirement for Civ3.
 
I've gotten a couple more ideas for the program. However, I think it could be a secondary program in itself. If it's not possible I understand. These are just glitzy additions that may be beneficial to some people. I suppose if enough people like the ideas maybe they could be incorporated somehow....

1) I'd like to have the ability to sort the final results (or any report I generate) by any one of the terrain/food bonus/luxury items. I think the very top header icon could be used for the re-sort link.

2) I'd like to see the difficulty level for each map listed. The first letter of each would suffice (C, W, R, M, E, D, S). Some people may run Mapfinder at different levels for different reasons.

******
I've noticed something with the report generator. If Mapfinder finds the correct # of acceptable maps it will show only those maps in the report. If I tell Mapfinder to stop it will only show what has been found so far. However, if Mapfinder is shutdown by an error it will show all maps in the save directory not the ones found only so far.
Therefore, the results when there has been an error are skewed. There maybe a map that fits the search critera, but it was saved on a different difficulty level at an earlier time. This is where #2 above would come in handy. And #1 would allow you to sort the maps by difficulty, effectively moving most unwanted maps to the bottom.
 
Tzar Sasha said:
I've gotten a couple more ideas for the program. However, I think it could be a secondary program in itself. If it's not possible I understand. These are just glitzy additions that may be beneficial to some people. I suppose if enough people like the ideas maybe they could be incorporated somehow....

1) I'd like to have the ability to sort the final results (or any report I generate) by any one of the terrain/food bonus/luxury items. I think the very top header icon could be used for the re-sort link.

That's cool but unless enough people are wanting that feature, I'm sure we can get buy without it. Of course, you could use VB or whatever language you like to sort it any way you like.

2) I'd like to see the difficulty level for each map listed. The first letter of each would suffice (C, W, R, M, E, D, S). Some people may run Mapfinder at different levels for different reasons.


******
I've noticed something with the report generator. If Mapfinder finds the correct # of acceptable maps it will show only those maps in the report. If I tell Mapfinder to stop it will only show what has been found so far. However, if Mapfinder is shutdown by an error it will show all maps in the save directory not the ones found only so far.
Therefore, the results when there has been an error are skewed. There maybe a map that fits the search critera, but it was saved on a different difficulty level at an earlier time. This is where #2 above would come in handy. And #1 would allow you to sort the maps by difficulty, effectively moving most unwanted maps to the bottom.

You could easily solve all those above problems by organizing your file folder appropriately. Before you run MapFinder, just start out with an empty directory (btw, you can name those folder as Deity, Sid, or whatever name you like to help you keeping track of them). Of course, you can always rename or move your map anyway you like after using MapFinder.

There are a lot of things I could add to this program...for example, I could auto-dectect the speed of your system and have it automatically setup all the Delay timers. I could even give MapFinder voice recognition's ability, but why? Since this isn't a commercial application and not too many people are using it, I really don't see the need for all those bells and whistles (at least, not yet).
 
Moonsinger said:
That's cool but unless enough people are wanting that feature, I'm sure we can get buy without it. Of course, you could use VB or whatever language you like to sort it any way you like.

I took your advice and figured out how to sort the data. Unfortunately, it only sorts in an ascending order so the maps that are wanted are at the bottom of the list. I'm going to attach a sample of my work for you to see. If you want to incorporate it, that is fine. If you don't want to, that's fine too.

A bit of description/instruction:
Open MFindex.htm in your browser. The top frame contains the title, timestamp of the generated report, and text/graphic header. The second frame contains one blank header row with clickable underlines followed by the map data.
To sort simply click on the appropriate underline. The data will re-sort without reloading the page thanks to a free javascript. NOTE: Screen Shot and Save Game links only work on my pc. I did not include those files.

If I knew how to get the data from the save files into the HTML table I'd go ahead and put this together as a "MapFinder Companion" but alas I know not how... :(

If you decide you want to use this, and would like to have a noframes option your current report would work great for that albeit unsortable...
To make inputing data from Mapfinder into the HTML table easier, the timestamp can be put into the data frame instead of the title frame.
 
Tzar Sasha said:
If I knew how to get the data from the save files into the HTML table I'd go ahead and put this together as a "MapFinder Companion" but alas I know not how... :(


That's easy! Since all the information you need are stored on the filename, you don't need to deal with the SAV files. Here is the format of the filename:

Iteration # (7 digits long) + grassland + floodplain + plain + forest + hill + jungle + desert + tundra + mountain + coastal + marsh + fresh water + cattle + fish + game + gold + oasis + sugar + tobacco + fruit + wheat + ivory + wine + dyes + furs + gems + incense + silks + spices + domatination limit (5 digit long)

Other than the Iteration # of 7 digits long and the domination limit of 5 digit long, the rest of them are single digit encoded in hex format. For example, "0000502-G00000001005-00000000200000000-04445.sav" -> iteration #502, 16 grassland (note: G=16; a normal 1 byte can store a hex digit of 0 to 15; from 16 to 25, it will be G,H,I,J,K,L,M,N,O,P accodringly; therefore P=25), 1 mountain, 5 fresh water source, 2 wheats, and domination limit of 4445.
 
Moonsinger said:
That's easy! Since all the information you need are stored on the filename, you don't need to deal with the SAV files. Here is the format of the filename:

Iteration # (7 digits long) + grassland + floodplain + plain + forest + hill + jungle + desert + tundra + mountain + coastal + marsh + fresh water + cattle + fish + game + gold + oasis + sugar + tobacco + fruit + wheat + ivory + wine + dyes + furs + gems + incense + silks + spices + domatination limit (5 digit long)
I knew this. But I don't know how to tell the html page to read the filenames and input the data into the correct table cells. Isn't this something that is incorporated into the Mapfinder DLL or EXE?

Moonsinger said:
Other than the Iteration # of 7 digits long and the domination limit of 5 digit long, the rest of them are single digit encoded in hex format. For example, "0000502-G00000001005-00000000200000000-04445.sav" -> iteration #502, 16 grassland (note: G=16; a normal 1 byte can store a hex digit of 0 to 15; from 16 to 25, it will be G,H,I,J,K,L,M,N,O,P accodringly; therefore P=25), 1 mountain, 5 fresh water source, 2 wheats, and domination limit of 4445.

Now that just confuses me....



I guess I'll just wait and see if anybody else likes the idea. If enough do, maybe you'll add it. If not, oh well. I can generate the report with an earlier version and copy/paste the data table into the sortable table page for myself at least..........
 
DaveMcW said:
There are some very nice html table sort scripts out there. Here is a sample.

The 4 changes you need to make to Index.htm are marked inside the file.

Thanks Dave! That script is very cool! Just change four easy line of codes and the html table will be sorted.:) I was about to go ahead with the modification then I remember something....they also want the header to be repeated in every 20 or 25 rows; therefore, defeating the purpose of sorting! Would you all talk it over and tell me what to do next?

Option #1: Table can be sorted by column header
Option #2: Column Header will be repeated in every 25 rows.

Please tell me which one you would like. Either #1 or #2 but not both! Of course, I could add a switch for each of you to pick which report style that you like best, but do we really want to go there? Personally, I like to go with option #1.
 
TimBentley said:
Would it be possible to find goody huts in the starting radius?

You need to ask Dianthus about that!
 
Moonsinger said:
Please tell me which one you would like. Either #1 or #2 but not both! Of course, I could add a switch for each of you to pick which report style that you like best, but do we really want to go there? Personally, I like to go with option #1.
I would prefer #1 if I had to choose. Hopefully the sorting will be able to bring the ones I'm most interested in to the top anyway, so excessive scrolling wouldn't be necessay.



Moonsinger said:
TimBentley said:
Would it be possible to find goody huts in the starting radius?
You need to ask Dianthus about that!
Yes, that's possible. I'll add that information to the SAVUtils.dll and pass it on to Moonsinger at some point.
 
I vote #1.

Thank you Moonsinger & Dianthus for all the time and effort you've put in on this program! :goodjob: :goodjob: (Firaxis would be smart business people to be watching this thread.................in fact, if they want to produce a Great Civ 4, they'd better have someone assigned to study the whole CFC!)

P.s. Hmmmm, thinking out loud.....Is there a way to require "Shielded Grassland" in the selection criteria.......this really is a super Bonus for the starting city. :)
 
EMan said:
P.s. Hmmmm, thinking out loud.....Is there a way to require "Shielded Grassland" in the selection criteria.......this really is a super Bonus for the starting city. :)
Currently I don't provide that information to Moonsinger. Maybe I'll add that to SAVUtils.dll at the same time I do the goody huts ;).
 
Dianthus said:
Currently I don't provide that information to Moonsinger. Maybe I'll add that to SAVUtils.dll at the same time I do the goody huts ;).

Shielded grassland would be a great addition! Thanks Dianthus!:)

FYI: MapFinder has been running none stop four almost 3 straight day now at my old P3-1GHz machine here in the office. So far, it has generated more than 17 thousand maps and still going, I'm telling you...this version is extremely stable.:):):) If it doesn't work on your system, it usually means that you aren't giving it enough DELAY time. Therefore, I probably will include a new feature to automatically detect the speed of your system and adjust the DELAY timing accordingly (of course, you can always manually fine tune it, but I will give you some warnings if your input values are too small or too big). Btw, it has accepted only about 100 maps so far; the maximum domination limit is 4548...will see if it gets any bigger. Anyway, I'm going to let it continue to run for another week to see what happen...
 
Moonsinger said:
Btw, it has accepted only about 100 maps so far ... Anyway, I'm going to let it continue to run for another week to see what happen...
You mentioned previously that the problem might be related to the number of acceptable maps rather than the number checked as the screenshot is only taken for the acceptable ones. I was using quite a loose acceptance criteria. I had no limit on the domination. The only limit was 1 or more cattle. This was accepting roughly 1 in 20 maps. I've changed this to 2 or more cattle for today's run. Another thing I was wondering. Could it be related to the size of the screenshot? What screen resolution are you using for Civ? Maybe I ought to revert to 1024x768 for civ when using MapFinder?
 
Dianthus said:
I would prefer #1 if I had to choose. Hopefully the sorting will be able to bring the ones I'm most interested in to the top anyway, so excessive scrolling wouldn't be necessay.

I believe it's possible to script the column label as footer floating at the bottom of the screen at all time. Therefore, it doesn't matter how far we have to scroll, the column header would always be there on the screen. Sadly, I don't know much about HTML and Java script! So if anyone can teach me how to do that, I will be happy to include it in the report. Thanks!
 
Dianthus said:
You mentioned previously that the problem might be related to the number of acceptable maps rather than the number checked as the screenshot is only taken for the acceptable ones. I was using quite a loose acceptance criteria. I had no limit on the domination. The only limit was 1 or more cattle. This was accepting roughly 1 in 20 maps. I've changed this to 2 or more cattle for today's run. Another thing I was wondering. Could it be related to the size of the screenshot? What screen resolution are you using for Civ? Maybe I ought to revert to 1024x768 for civ when using MapFinder?

Good point! Since I set it to stop at 1000 acceptable maps, will see if it blows up when it finds more acceptable map... Let me see...3 days for 100, that mean it will take about a month to get all the way to 1000 acceptable maps.

PS: 1024x768 is my screen resolution. It's an old system and its video card won't support anything higher than that.
 
Moonsinger said:
Good point! Since I set it to stop at 1000 acceptable maps, will see if it blows up when it finds more acceptable map... Let me see...3 days for 100, that mean it will take about a month to get all the way to 1000 acceptable maps.

PS: 1024x768 is my screen resolution. It's an old system and its video card won't support anything higher than that.
It might be easier to test it with MapFinder set up to accept ALL maps. I'll give this a try tonight with different screen resolutions and let you know how I get on.
 
Moonsinger said:
Option #1: Table can be sorted by column header
Option #2: Column Header will be repeated in every 25 rows.

Please tell me which one you would like. Either #1 or #2 but not both! Of course, I could add a switch for each of you to pick which report style that you like best, but do we really want to go there? Personally, I like to go with option #1.

#1 of course :D
 
Well, I've done a number of runs with the criteria set so that all maps are accepted. I managed to repeat the clipboard problem every time, but after varying numbers of iterations. After some of these the clipboard wouldn't capture a full screen even after shutting down both Civ and MapFinder. I rebooted before each of these tests just to make sure. In 1600x1200 it failed after 51, 52 & 48 iterations, at 1024x768 it failed after 104 & 156 iterations. I guess I'll just have to run in 1024x768 and make sure my acceptance criteria are more selective. I don't know what I was thinking setting cattle to 1 anyway!
 
Back
Top Bottom