[TSL] Yet (not) Another Earth Maps Pack

Finally got round to trying this again, and it just keeps on improving!

However, I'm afraid to say that island starts still aren't much better. Part of the problem is always going to be how random resource allocation, but there are three things of importance:

Allocating Requested Resources
This is still much too random. Ideally it should be almost entirely consistent in how it operates, as there are too many occasions when I have to create a new game because for whatever reason the requested resources are of no use to my starting location (London) at all.

Ideally the behaviour should be:
  • Place all resources randomly as normal for region (including geographic restrictions and resource abundance settings).
  • For each start location:
    • Run through each requested resource in order, and for each:
      • Locate all suitable tiles for the selected resource within a reasonable (6 tiles?) distance of the start location. For land-based tiles, restrict this to the same land-mass.
      • If one or more of the tiles already contain the selected resource, then mark it as requested and move onto the next request resource. Otherwise do one of the following:
        • Place the resource in the closest unoccupied tile that is not within 1 tile of an existing resource.
        • Replace the closest existing resource, provided that it was not itself a requested resource.
  • Place region-specific strategic resources, if unoccupied tiles if possible, or replace existing, non-requested tiles if necessary.

Essentially; for a given start location, the requested resources should be closer to it as determined by the order in which they are declared, and the available tiles that they can be placed upon. So <Req1> should be closer than <Req2> unless <Req1> requires a less common tile for that area.

Secondly, some resources could do with being more lenient in where they are placed. For example, Marble seems to require an non-forested, grassland hill, which means it won't be placed anywhere near London if requested. Ideally it should simply be placed on a forest hill instead, replacing the forest if necessary.

Guaranteed Ancient Ruins
It might be a good idea to have some regions marked with a required number of ancient ruins. One of the recent updates seems to have caused ancient ruin placement to become more random, which frequently results in Britain having no ruins at all. This is a bit annoying as it's one of the best ways to get a boost for the early game, particularly for a small, concentrated civilisation that an island start is ideal for. Even better would be if the type of ruin can be adjusted, to give a greater chance of it being a particular reward such as culture.

Save all custom game settings
I noticed that the basic custom game settings are now remembered. However, given the randomness of resource allocation, starting new games until a decently balanced start is achieved is a huge pain, so it'd be good if all options on the custom game screen could be remembered, to make it easier to set-up the same game in order to try for a better start.
 
Greetings Gedemon.

Excellent work on your maps. The GEM is my favourite map to play by far, but I'm having some small problems regarding Minor Civs.

I've played the GEM numerous times with almost every playable civ, yet in all my games, the Oslo, Copenhagen (when Denmark DLC off) and Inca city states never, ever spawn. This occurs on both the default and extended CS selection mods.

I've tried some troubleshooting myself, deleting cache, uninstalling and reinstalling the mods, using different CS separation options, but nothing seems to work. Best guess I can think of is that while there are 39 minor civs in the xml file (for default CS selection mod), I can only select a maximum of 35 in the menu, the slider will not go any higher.

Any ideas? I've attached the Lua.log file as well. Thanks.
 

Attachments

  • Lua.7z
    3.2 KB · Views: 68
1) no plot available to place RESOURCE_SPICES for CIVILIZATION_CARTHAGO (see shot 1)
I set the following rule change:
Code:
	<Resource_FeatureBooleans>
		<!--------------------->
		<!-- AMC changes -->
		<!--------------------->
		<!-- Spices allowed on forest -->
		<Row>
			<ResourceType>RESOURCE_SPICES</ResourceType>
			<FeatureType>FEATURE_FOREST</FeatureType>
		</Row>
	</Resource_FeatureBooleans>
thus I would expect to see spices on forest near chartago. What I did wrong? :confused:

2) RESOURCE_FISH for CIVILIZATION_CARTHAGO (see shot 1)
As you can see in the shot1, fish is 4 hexes away from the city

3) RESOURCE_IRON for CIVILIZATION_GERMANIC (see shot 2)
As you can see in the shot2, iron is 4 hexes away from the city

4) no plot available to place RESOURCE_STONE for CIVILIZATION_GERMANIC (see shot 2)
This is a real funny thing. There is no region exclusion for stone, and following the worldbuilder rules, I would expect stone in one of the several grassland-hill-forest tiles around the city (shot 2). The fun is that if you look at the previous shot1 around carthago, you will see stone placed on grassland-hill-forest tiles!!!

5) DEER overflow (see shot 1)
As we discussed in the previous post, having a customized limit for each resource would be a needed addition. On this map (I think for the high quantity of forest and grass tiles) cow and deer are excessive:

[992.906] WorldBuilderMapLoader: try to place 47 RESOURCE_COW (3 already placed)
[992.968] WorldBuilderMapLoader: try to place 76 RESOURCE_DEER (4 already placed)

Furthermore, due the northern europe setup for this resource, deers are abnormally condensed as you can see in the shot 2

I hope this can help you some way.
I also attached the modified XML used to generate the map.

Thanx for the report, sorry for the delay, I was a bit busy releasing the beta version of another mod ;)

1/ you code is correct, but the XML rule change is loaded first, then the SQL rule change erase and rewrite the placement rules for resource... that's why your change have no effect. Temporary solution until I had the custom rule per map option working : change the rule in the SQL file.

For your change, it'll be :
Code:
INSERT INTO "Resource_FeatureBooleans" VALUES('RESOURCE_SPICES','FEATURE_FOREST');
somewhere after the DELETE FROM "Resource_FeatureBooleans"; line.

2/ and 3/ Ok, looks like sometimes the code return a plot 4 tiles away as valid for the 3 tiles ring, I'm going to fix that.

4/ strange... have you tried to place stone in the <req1> position just to test ? If not I'll do some test. Dacian stone is ok ?

5/ yep, we'll take care of that, I'm pretty sure that I can make a per map rule now. Just need to code it.

Finally got round to trying this again, and it just keeps on improving!

However, I'm afraid to say that island starts still aren't much better. Part of the problem is always going to be how random resource allocation, but there are three things of importance:

Allocating Requested Resources
This is still much too random. Ideally it should be almost entirely consistent in how it operates, as there are too many occasions when I have to create a new game because for whatever reason the requested resources are of no use to my starting location (London) at all.

Ideally the behaviour should be:
  • Place all resources randomly as normal for region (including geographic restrictions and resource abundance settings).
  • For each start location:
    • Run through each requested resource in order, and for each:
      • Locate all suitable tiles for the selected resource within a reasonable (6 tiles?) distance of the start location. For land-based tiles, restrict this to the same land-mass.
      • If one or more of the tiles already contain the selected resource, then mark it as requested and move onto the next request resource. Otherwise do one of the following:
        • Place the resource in the closest unoccupied tile that is not within 1 tile of an existing resource.
        • Replace the closest existing resource, provided that it was not itself a requested resource.
  • Place region-specific strategic resources, if unoccupied tiles if possible, or replace existing, non-requested tiles if necessary.

Essentially; for a given start location, the requested resources should be closer to it as determined by the order in which they are declared, and the available tiles that they can be placed upon. So <Req1> should be closer than <Req2> unless <Req1> requires a less common tile for that area.

Well, it work almost exactly like that already, I could put it in first page as a description of the logic of the existing code ! :D

except that it start with the requested resource first so the others don't mess with the placement, then the strategic, then fill the rest with the random one following the region rules.

could you provide a log (with screenshot if possible) of a game without the requested resource in England. Each game I start with them, they are here.


Secondly, some resources could do with being more lenient in where they are placed. For example, Marble seems to require an non-forested, grassland hill, which means it won't be placed anywhere near London if requested. Ideally it should simply be placed on a forest hill instead, replacing the forest if necessary.
yep, that's linked with my discussion about custom rules per map with ambrox62

Guaranteed Ancient Ruins
It might be a good idea to have some regions marked with a required number of ancient ruins. One of the recent updates seems to have caused ancient ruin placement to become more random, which frequently results in Britain having no ruins at all. This is a bit annoying as it's one of the best ways to get a boost for the early game, particularly for a small, concentrated civilisation that an island start is ideal for. Even better would be if the type of ruin can be adjusted, to give a greater chance of it being a particular reward such as culture.
In the todo list, but the type of ruin can't be adjusted afaik.


Save all custom game settings
I noticed that the basic custom game settings are now remembered. However, given the randomness of resource allocation, starting new games until a decently balanced start is achieved is a huge pain, so it'd be good if all options on the custom game screen could be remembered, to make it easier to set-up the same game in order to try for a better start.
yep, I want to extend that, but it's a bit complex with each option map dependent...

Greetings Gedemon.

Excellent work on your maps. The GEM is my favourite map to play by far, but I'm having some small problems regarding Minor Civs.

I've played the GEM numerous times with almost every playable civ, yet in all my games, the Oslo, Copenhagen (when Denmark DLC off) and Inca city states never, ever spawn. This occurs on both the default and extended CS selection mods.

I've tried some troubleshooting myself, deleting cache, uninstalling and reinstalling the mods, using different CS separation options, but nothing seems to work. Best guess I can think of is that while there are 39 minor civs in the xml file (for default CS selection mod), I can only select a maximum of 35 in the menu, the slider will not go any higher.

Any ideas? I've attached the Lua.log file as well. Thanks.
Go to the "..\My Documents\My Games\Sid Meier's Civilization 5\MODS\Ynaemp City States (v 5)" folder and just rename the CleanDefault.sql file to something like CleanDefault_.sql.

That's the file used to clean the database of some CS when you have the DLC, renaming it will prevent it from being loaded...
 
Just downloaded this mod and game crashes all the time at leader introduction.

My settings were:

isabella
allow saving policies
allow saving promotions
fixed resources
historical resources (or soemthing like that)
disable time victory


Everything else Default. Keeps crashing all the time
 
even with small maps ?
 
Just try the standard maps of the mod.

As a test, I didn't mean "do a complete game on a map size you don't want to play on" :D.

If it crash with giant and not small then it's a hardware problem. or try the giant map alone. (See troubleshooting section of first post)

can you play the vanilla game huge maps ?
 
Just try the standard maps of the mod.

As a test, I didn't mean "do a complete game on a map size you don't want to play on" :D.

If it crash with giant and not small then it's a hardware problem. or try the giant map alone. (See troubleshooting section of first post)

can you play the vanilla game huge maps ?

Going to try what you say now. Don't think its hardware issue, since my machine is pretty nice. I also can play huge vanilla.
I'll tell you in a few mins what happens with standard
 
Tried standard and worked. Then tried huge again and this time it worked. This morning I tried 3 times and it crashed at the same point, but whatever, it worked now :)
Thanks for your help
 
Are the civs random? I took france and there was no spain, then i took spain and there was no france :p
 
yep, max civs in game is 22, if you have all DLC then the game can't load all of them and a few are randomly left out at start.
 
Dacian stone is ok ?

Log says:
[991.906] WorldBuilderMapLoader: placed RESOURCE_STONE for CIVILIZATION_DACIAN, there was 1 plot(s) available
and stone is on the only available hill-plains-no feature hex

I noticed that stone is always on no featured hill hexes (like marble). Is it the clue?
There is no rules or xml setup about forest yes or no for stone/marble and SRs, while strategic resources (like iron/coal/aluminium/uranium) ARE placed on hill-forest hexes instead... :confused:

EDIT
----
Confirmed :)
Stone works on no feature-hill hexes, not adjacent to river
 
Just some thinking while setting maps for ynaemp mod...

I wonder if resource placement for civs overrides the region exclusion logic. Probably the answer is NO, and it might be right.

But...

...in order to set a challenging map, I've felt the need to assign specific strategic/luxury resources to cities, expecially CSs and expecially when they are at map border. CSs having resources which are different from other common resources in the region play a strategic role in the game, both as trade partner or as target for conquest. The region exclusion logic and the random resource placement often make CSs near civs quite unuseful.
Having a chance to populate CSs resources in the same way as civs that also ignore region exclusion (at least for 2 or max 3 hex radius) might be something to think on, imo.
 
ho, I've thinking of it, it's somewhere in the to do :)

in 3 radius only, good idea, noted.

and yes, the placement for civs override the exclusion logic.

about your previous post, there are some placement related value in the resource table itself, like the "near river" one.
 
Hi Gedemon,

I've trouble to run my new large AMCs map. I've attached files and LUA log. Probably I missed something in the LUA code, which is really unfamiliar for me :(

In the meantime I'm working on a new AMC civ (Sarmatians) in order to replace Mongols that I used as placeholder in the new map :)
 
check the random placement option for goody huts in World Builder, this is needed for the code to be called when loading the game.
 
Wow!!! Finally it works!!!
Thanks :goodjob:
I can't believe that I wasted lots of time for this stupid flag !!!:mad:
 

Attachments

  • Ynaemp13_v4.7z
    23.9 KB · Views: 56
yeah, sorry, that's not something you can find out easily, but all the mod is based on the fact that the only place I found too hook my initialization code was in the goody hut placement function. The rest of the map generation (for WB map) is handled by the core engine and we have no access to it yet...

So, for my code to be able to populate a WB map, the map must have the goody hut option selected.
 
In your RuleChange xml, what is "Standard Handicap" and why is it set at 3?
Thanks!
 
Top Bottom