[Map Script] Full of resources

Hey Sto, I absolutely love your script, and think it would be perfect for balancing multiplayer starts, and breathing life into otherwise stale maps. I think you have been in contact with Penny from Civplayers? Do you have any ideas how we can get around the OOS when using FoR in MP? Or have you fixed it?
 
Hey Sto, I absolutely love your script, and think it would be perfect for balancing multiplayer starts, and breathing life into otherwise stale maps. I think you have been in contact with Penny from Civplayers? Do you have any ideas how we can get around the OOS when using FoR in MP? Or have you fixed it?

I've not tested the last version with 3.19 for OoS in MP games. However I don't think there should be a problem. But perhaps something with patch 3.19 introduce something in the exe that make that.

I'm away from home and even can't test OoS since I can't have someone to play with. If you want to make a test with me that would be great. I'll contact you by PM once i'm back.

But first :
Are you sure that all players have the same file "_Multiplayer_Config.cfg" located in "My documents\My Games\CivilizationIV Full of Resources". And not a file like "myMPconfig" ?
This file is saved when the host exit the FoR screen in the MP lobby. So before launching the game, you have to send this file to other players and they put it in the document folder.
Unfortunately, there is no feature that allow me to send the data to other players before the generation of the map.

If you have all well done ... so there should be a problem with my version for 3.19. Have you checked the file "MapGenerationDbg.txt" to see if there was a bug ? (look for "error" with notepad but after generating the map).

If you still have some problems. The only solution for the moment is for all non-hosting players to disconnect and reconnect the game.

Tcho !
 
First, thank you for what looks like its going to be an incredible boost to my Civ playing.

Second, I may be a complete idiot, but I could use some help. I put the file in Civ4/PublicMaps, and it works just fine when I launch Vanilla Civ. However, when I launch BTS, there is no "FullOfResources" in the map choices. Am I missing something obvious? I'm playing BTS (but not Vanilla) through Steam, if that makes a difference.

Thanks in advance!
 
First, thank you for what looks like its going to be an incredible boost to my Civ playing.

Second, I may be a complete idiot, but I could use some help. I put the file in Civ4/PublicMaps, and it works just fine when I launch Vanilla Civ. However, when I launch BTS, there is no "FullOfResources" in the map choices. Am I missing something obvious? I'm playing BTS (but not Vanilla) through Steam, if that makes a difference.

Thanks in advance!

That may be me the complete idiot :). I don't know steam. I've taken a look at the site and not fully understand. If BtS is installed on your machine, there should have no problem or the game is hosted on a server !?.

An only copy of Full of Resources in the vanilla folder should be enough for BtS except for a few MODs that don't allow public map scripts. You can try to put a copy of the script in the folder "Civ4/Beyond the Sword/Public Maps" to check if that help.
If not, what the difference in a term of installation when playing through steam? is the game installed on your machine entirely ?

Tcho!
 
i got the following starting location after a few cycles of "regenerate map" :eek:
WaterStart.jpg

I presume this is a bug of some kind, or that I've accidentally set some strange combination of options. I've attached the save file. Here are the options I selected; everything not shown was standard.

Edit: save and images of option settings deleted.
 
Thank you for so many details, but that doesn't help. It's written in the welcome page of the screen. You can't use "regenerate map" with this script. The reason is that when you use regenerate maps, the process doesn't restart all functions included in a map script. I don't know why. But that probably skip a lots of globals initialized before the plot generation.

The next time you encounter a bug, the debug file in the Full of resources folder (My Documents/My Games) is enough for me to check all your options selected ;) (and regenerate it).

If you want to restart a game, you have no choice but to return into the lobby, sorry.

Tcho !

Edit :

Looking at your settings:
_ If you put the option that resources can be placed in lakes, that works only for added resources and do nothing if you choose standard generation. You may also just choose a percentage of water resources to do that. Or erase all resources and define yours.
_ Not sure if you have tried to multiply some resources quantity or try to add some starting resources. But no resources were selected with your screen shot.
 
Thanks! Sorry I didn't spot that "no regenerate" warning. I probably won't be able to use the script for the current game, then, since I need to set up specific opponents and those don't get remembered when returning to the lobby. However, I look forward to using it for other games.

I guess even after your explanation and the in-game help I don't understand how to set up the extra resources properly; is there more documentation somewhere?
 
Thanks! Sorry I didn't spot that "no regenerate" warning. I probably won't be able to use the script for the current game, then, since I need to set up specific opponents and those don't get remembered when returning to the lobby. However, I look forward to using it for other games.

I guess even after your explanation and the in-game help I don't understand how to set up the extra resources properly; is there more documentation somewhere?

Sorry, there is no extra documentation. I've just added the in game help for some details thinking the rest would be easy to understand.

Just click in one of the resources button (strategic, ...) and select what you want. Once you have done that a new blank one will open so you can enter another selection. For an example, if you want to multiply all resources by 1.2. You have to make 3 entries with "all of the resources" for strategic, health and happiness.

Tcho !
 
There's alot of stuff that doesn't happen when you regenerate the map. I wanted to see if I could find exactly what's missing in the SDK, but I couldn't find it. I was hoping I could force it some way for my map scripts. Better to do it twice or once, rather than once or nonce I was thinking.

Do you know exactly what's left out Sto?
 
There's alot of stuff that doesn't happen when you regenerate the map. I wanted to see if I could find exactly what's missing in the SDK, but I couldn't find it. I was hoping I could force it some way for my map scripts. Better to do it twice or once, rather than once or nonce I was thinking.

Do you know exactly what's left out Sto?

O_o that's too much for my memory :). I remember that I've taken fractal and added all the scripts entries with a log. I remember also have found the track in the SDK. But because of the units, etc i add with Full of Resources, I've stopped the search since that was not my priority and hard to do.

I'll be able to check that soon and give you where to look.

Tcho !
 
There's alot of stuff that doesn't happen when you regenerate the map. I wanted to see if I could find exactly what's missing in the SDK, but I couldn't find it. I was hoping I could force it some way for my map scripts. Better to do it twice or once, rather than once or nonce I was thinking.

Do you know exactly what's left out Sto?

Ok ,home sweet home. The process that regenerate map is simply CvGame::regenerateMap. The only function skipped is beforeInit. But also all the call for grip size, wrap, isBonusIgnoreLatitude (remembered that you got a problem with wheat), .... The real problem is that you can't do nothing because this may be called in another game cession (a leak of the process). So all globals defined there may be changed if not hardcoded. That's imply that you must get all of them from the game for all functions after beforeInit -> too much troubles for me without counting the aspect with units and such that's not easy to control.

Tcho !
 
That may be me the complete idiot :). I don't know steam. I've taken a look at the site and not fully understand. If BtS is installed on your machine, there should have no problem or the game is hosted on a server !?.

An only copy of Full of Resources in the vanilla folder should be enough for BtS except for a few MODs that don't allow public map scripts. You can try to put a copy of the script in the folder "Civ4/Beyond the Sword/Public Maps" to check if that help.
If not, what the difference in a term of installation when playing through steam? is the game installed on your machine entirely ?

Tcho!

I had to dig around a bit, but I found where Steam was hiding the BTS folders, and when I put the file in the BTS PublicMaps it appears to work perfectly. For anyone in my situation, the BTS folder hides itself at C:/Users/YourName/Documents/My Games/beyond the sword/PublicMaps. Of course, I'm apparently in an oddball situation, having bought the vanilla CD in the store but BTS through Steam. I tried to install Steam BTS on top of vanilla CD on my dad's computer today, and it wouldn't even let me do it. Apparently I'm grandfathered in.

Anyway, thanks much for the help!
 
I had to dig around a bit, but I found where Steam was hiding the BTS folders, and when I put the file in the BTS PublicMaps it appears to work perfectly. For anyone in my situation, the BTS folder hides itself at C:/Users/YourName/Documents/My Games/beyond the sword/PublicMaps. Of course, I'm apparently in an oddball situation, having bought the vanilla CD in the store but BTS through Steam. I tried to install Steam BTS on top of vanilla CD on my dad's computer today, and it wouldn't even let me do it. Apparently I'm grandfathered in.

Anyway, thanks much for the help!

Good to know you can play the script with BtS. And thank you for the feed back.That' ll help if someone else encounter the same problem.

Tcho !
 
Hey Sto.

Just saw this and wanted to ask a few questions.

First, am i correct in understanding changing the resource value from the original 27 i think it was, to say, 36, would increase the number of total resources by 33%?

Second, I like playing big maps and so use the XXL world modcomp; however, i dont think these maps create enough resources for the bigger size maps. So, i tried to add the full of resources python script into the private maps folder of the XXL modcomp file, however, the map would not generate and my computer froze. Is there anyway to get this to possibly work?

Thanks alot for the great script!

EDIT: I tried again, this time normal BTS, and again only got to the 'initialising' phase of the map generation. Ill attatch the debug
 

Attachments

Hey Sto.

Just saw this and wanted to ask a few questions.

First, am i correct in understanding changing the resource value from the original 27 i think it was, to say, 36, would increase the number of total resources by 33%?

No, the value entered in the "set" value is not the standard value since that may be different with several mods. This is written in the help text (remember about 7-10 % ... probably near 9% with 3.19). However this value depend a lot on terrain also.

Second, I like playing big maps and so use the XXL world modcomp; however, i dont think these maps create enough resources for the bigger size maps. So, i tried to add the full of resources python script into the private maps folder of the XXL modcomp file, however, the map would not generate and my computer froze. Is there anyway to get this to possibly work?

Thanks alot for the great script!

EDIT: I tried again, this time normal BTS, and again only got to the 'initialising' phase of the map generation. Ill attatch the debug

Thank you for the debug. Are you sure your computer froze ? I mean, are able to press Ctrl-Alt-Suppr and kill the process or are you forced to restart your machine ?

The placement of resources is the more consuming time for generation (looks like you have stopped during this process). This is normal to have the update screen stopped at 'initializing' (I don't know why the screen doesn't update for a big script). For me the generation of a map with lots of resources and lots of others options may take about 5min while a normal map take less than 1 min with full of resources. I've made some tests with XXL before 3.19 and that worked fien except I've got to wait about 15 min for the biggest size (... and not with lots of resources).

Would you like to try to generate one map and let it the time to be generated to check if the computer still froze. If yes, would you post your settings config .cfg file so i can check if this comes from a bug. However an endless loop shouldn't be possible.

Tcho !
 
Thanks for the quick reply!

I'm not really sure what you mean about the resources. What is the easiest way to increase the amount of resources on the map?

Hmmm. It could well be me just being impatient, as i could still move the mouse and all, i just wasnt able to go to desktop like i am normally able to. Maybe this was just because it was taking a lot of power to load. I will definitely try again.

EDIT: A little patience does pay off! Its working fine, just takes a while to load! Also, i just changed the multiples of health, happiness and strategic resources to increase the amount so that problems also solved.

All im getting now is that warning about player starting generation, but i dont know what that means, or even if its affecting my game at all.
 
I'm not really sure what you mean about the resources. What is the easiest way to increase the amount of resources on the map?

A little patience does pay off! Its working fine, just takes a while to load! Also, i just changed the multiples of health, happiness and strategic resources to increase the amount so that problems also solved.

The process that generate resources let the default implementation (or not) then add some resources according to the settings. You have 2 ways to increase(/decrease) the number of resources.

First, set a percentage value for water or land resources. This is good to use when you know what you want, especially by setting the resource proportions. For an example, if you use to play with lots of players compare to the size of the map, this is the best solution. Since with the default generation you will have a lot of strategic resources, but the others will be more rare. The percentage represent the percentage of land/water tiles with a resource. The default implementation place 7-9% of land resources without taking in count the normalized ones.

Then you can also choose to use the resource multiplier. This is useful when you like how the resources are distributed and want more (like you've done). Or If you simply want to increase a kind of resource. For a example, you like the resource distribution but want to play once with a map with a lots of food. Or if you find that there is a lack of a resource with a certain map script. You can set a mana war for FfH also ... and so on.

All im getting now is that warning about player starting generation, but i dont know what that means, or even if its affecting my game at all.

The starting placement function I've implemented with full of resources take care of a lots of things. Like player richness area, landmass player distribution, human placements with option and some details that make a wrong starting locations. However, I stop the process if the players have to be placed within 5 tiles of each others. That's usually happen when you have a lots of players compare to the map size, or with an "old world" start. For these kind of placements, I prefer let the default implementation run because it extend the placement compare to mine. But I warn the player because a lots of settings defined by the player in the screen may be skipped like the relocation of human players, old world start, water/inland start, ring/hub/wheel... (note that I have added old world, water/inland, hub start also with default generation but the default process don't achieve it every time). So If you get the warning, normally all is good except some relocation settings and the balance of area placement for players.

Hope, this is understandable ^^

Tcho !

Edit : About the time to generate. I've done my best to make it as quick as possible. I take care of a lots of things the default process won't. And I've done my best with the implementation to make it fast. ie: I don't do things like "loop over all plots", "call dynamical functions for every tile", "place one resource" -> restart the process. This is like the default generation do. But I precompute all values, update them at each pass. The number of calculation is exponentially negative except of being linear doing like that.
 
Top Dog... Your inability to get to the Desktop is because the Script is taking huge junks of Resources to load some things. If you hit Alt Ctrl and Delete during this loading process it may take several minutes before you get to Desktop. It basically has to finishing loading, Firaxis made it this way, then it will call the alt/ctrl/delete interrupt and then continue loading. I have tried this on my machine Intel Quad Core 2.xxghz 4gig ram with the Newest XXL mod map size of 60x40. I believe it took somewhere around 7 to 9 minutes to get to the desktop once it started loading the script and hit my alt/ctrl/delete keys to bring up the task manager.

So it may take 10 minutes or more to load straight through depending on your system specs, as long as the mouse is moving and the sound is going, the game is working on it.

:)

Sto your script is great by the way!
 
Top Dog... Your inability to get to the Desktop is because the Script is taking huge junks of Resources to load some things. If you hit Alt Ctrl and Delete during this loading process it may take several minutes before you get to Desktop. It basically has to finishing loading, Firaxis made it this way, then it will call the alt/ctrl/delete interrupt and then continue loading. I have tried this on my machine Intel Quad Core 2.xxghz 4gig ram with the Newest XXL mod map size of 60x40. I believe it took somewhere around 7 to 9 minutes to get to the desktop once it started loading the script and hit my alt/ctrl/delete keys to bring up the task manager.

So it may take 10 minutes or more to load straight through depending on your system specs, as long as the mouse is moving and the sound is going, the game is working on it.

:)

Sto your script is great by the way!

Ahh Spanky you are truly deserving of your title! This makes much sense. :)

BTW Sto, i think ive figured out all my problems and am so far having a great game with this script, so thank you very much!
 
Back
Top Bottom