1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[TSL] Yet (not) Another Earth Maps Pack

Discussion in 'Civ5 - Custom maps' started by Gedemon, Nov 8, 2010.

  1. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,271
    Location:
    France
    replace one of the existing CS change the type to something like "MINOR_CIV_ROME", then see the first post for how to change the TSL.

    quick version for the TSL once you've replaced one of the existing CS :

    add this
    Code:
    		<Row>
    			<Type>MINOR_CIV_ROME</Type>
    			<X>21</X>
    			<Y>58</Y>
    		</Row>
    to the MinorCiv_YagemStartPosition section of MinorCivStartPos.xml
     
  2. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    @Everyone
    This is the first shot of the new AMC map that I'm testing for the next YNAEMP version. I simply need a place to quickly show to Gedemon my issues about the new map, to better understand how to set it in the right way.

    @Gedemon
    I would have expected that Greece had all the resources that appear in the list:
    1) iron -> ok, it might be still hidden -> EDIT -> NO iron when I've discovered the tech :(
    2) marble -> NO
    3) pearls -> NO
    4) fish ->Yes
    5) sheep -> Yes
    6) horse -> NO
    Also there is no region exclusions for the above resources

    What I have missed? Or what I should do in order to HAVE at 100% in the Athens 3-hexes-radius ALL the strategic and luxury resources mentioned above?

    Thanks
     
  3. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    @Gedemon
    Ok, I definitively missed something !!! :)
    I wouldn't expect cotton that I've excluded from the whole map area :D
    (but I haven't excluded it from the sub-areas...)
    Note: I'm still using your table definitions... ;)

    EDIT
    The whole resources setup seems ignored...
    Civs amd CSs start locations are right, but resources appear absolutely random...

    EDIT 2
    I've attached XMLs and CSs in order to test yourself ;)
     
  4. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,271
    Location:
    France
    good idea, I was thinking reading your MP that I should keep them for when I'll (finally) update the first page with more 'how to" or a F.A.Q. ;)

    about your question it should have worked, here's a quick test (warning, large screenshot):
    Spoiler :


    to track the bug, you should launch the tuner, or enable Lua logging (see "troubleshooting" in first post)

    on the left of the screenshot, you can see the resource placement log created by the mod, if you don't see those lines, then something has been broken elsewhere (or the option wasn't selected, the default is "unchecked"), maybe a XML syntax issue, that could prevent the whole file to be loaded.

    edit : I'm looking at your files
     
  5. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,271
    Location:
    France
    tested and worked with your files on my version, so the problem is elsewhere.

    did you made change to the map itself ?

    btw, the placement log show a few requested resources that can't be placed, that will need a change of placement rules (ie bananas) or of the map tiles around starting positions...
     
  6. jkapp4heels

    jkapp4heels Chieftain

    Joined:
    Jul 11, 2011
    Messages:
    7
    Just an fyi, it's not this mod, but the mods that replicate real world civ placements. When I choose scenario, such as TSL large map and click load scenario, the default civ that comes up is America. The issue is that if I change to another civ like Japan it will default back to America as soon as I press start. The same process of events appears on multiple mods that are very similar to this one. Anyone know what the deal is? I really want to play as Japan. Thanks in advance.
     
  7. The Loot

    The Loot Chieftain

    Joined:
    Jan 6, 2011
    Messages:
    59
    Use the "Custom Game" option to load it, otherwise it won't work.
     
  8. jkapp4heels

    jkapp4heels Chieftain

    Joined:
    Jul 11, 2011
    Messages:
    7
    I know what you're talking about, it's below the set up game and above browse mods. Thing is, its not there for me to click on.
     
  9. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,271
    Location:
    France
    there is a fix for the other mods : http://forums.civfanatics.com/showthread.php?t=429473

    to avoid confusion : YnAEMP don't need it thanks to it's custom menu (but installing it to fix the other scenario won't break anything).

    The custom setup menu is not used in many mods, AFAIK, apart YnAEMP, only Seraphim (RealNameEarth mod) and Dale (in unreleased mods or in tutorial) has made some, and it's also used in the DLC scenario.

    If you don't see the custom setup while using YnaEMP, that's another problem, but I don't see how this could happen (if you have activated this mod)
     
  10. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    Well, I'll try to test using live tuner.
    At least, I'm sure that my XML code is good. Thanks :goodjob:

    I didn't change the map, and yes, I'm aware about rule change requirement for some resources. As we discussed in the PMs, adding rule changes mean that these changes will affect all others maps atm, right?

    I also must complete gisement arrays and, most important, to introduce FEATURE_MARSH on the map.
    Do anyone know a link to a detailed world/europe chart of wetland/marsh/swamp areas? :confused:
     
  11. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    Nope :(
    It seems completely ignore resource placement

    I attached logs and XML used.
    May be you forgot to include some files in the pack you sent to me? :confused:
     
  12. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,271
    Location:
    France
    from the log the option for the resource placements seems to be not selected, verify if all 3 resources option in the advanced game option tab of the custom setup are checked, they're not checked by default (and should be rechecked before each launch)

    I may set the default to "checked" for future version...

    Spoiler :
     
  13. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    Ooopsss... :mischief:
    because I'm lazy, I let all the advanced game options unchecked.... :)

    Which are the 3 resource options that I must check?

    I guess:
    Use true geographic resource placement
    Add specific resources at starting positions
    and perhaps
    Add major deposits of strategic resources?
     
  14. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,271
    Location:
    France
    yep those 3. (note that one is described a bit differently on your version but I can't remember the exact text, not at home atm... but something about "resource", sure :D )
     
  15. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    Well, finally I was able to properly start the AMC map with ynaemp :)

    For a previous issue resolved, lots of new issues arise about resources placement....
    I've generated (and saved) some AMC maps (with ynaemp) and a vanilla one (for comparision). I can't say if the issues depend by ynaemp or by vanilla, but I list them all:

    1) I noticed some Civilizations Requested Resources placed 4 hexes away from SL instead of 3 (i.e placed out of city range)
    2) I noticed some resources placed on the same tile of Civs and/or CSs SL
    3) Although not stated into CIV5Resources.xml, I noticed several resources placed on forest (expecially oil in ynaemp); curiously ynaemp refuses to place spices on forest (ignoring rulechange.xml) and stone on flatland (as you would expect), while vanilla does it instead (i.e. without rulechange and the opposite of what you would expect).
    All in all it seems that CIV5Resources.xml isn't the absolute rule, and ynaemp and vanilla have different behaviour
    4) Who decides how many resource of a specific kind should be placed?
    Look at this ynaemp log:

    [11315.734] WorldBuilderMapLoader: -------------------------------
    [11315.734] WorldBuilderMapLoader: Using True Geographic Resource placement...
    [11315.734] WorldBuilderMapLoader: Map Generation - Adding Resources
    [11315.734] WorldBuilderMapLoader: -------------------------------
    [11315.750] WorldBuilderMapLoader: try to place 17 RESOURCE_IRON (6 already placed)
    [11315.765] WorldBuilderMapLoader: try to place 15 RESOURCE_HORSE (4 already placed)
    [11315.781] WorldBuilderMapLoader: try to place 24 RESOURCE_OIL (0 already placed)
    [11315.812] WorldBuilderMapLoader: try to place 18 RESOURCE_URANIUM (0 already placed)
    [11315.843] WorldBuilderMapLoader: try to place 19 RESOURCE_ALUMINUM (0 already placed)
    [11315.875] WorldBuilderMapLoader: try to place 18 RESOURCE_COAL (0 already placed)
    [11315.921] WorldBuilderMapLoader: try to place 9 RESOURCE_DYE (0 already placed)
    [11316.046] WorldBuilderMapLoader: try to place 7 RESOURCE_FUR (4 already placed)
    [11316.062] WorldBuilderMapLoader: try to place 12 RESOURCE_SPICES (0 already placed)
    [11316.125] WorldBuilderMapLoader: try to place 13 RESOURCE_COTTON (0 already placed)
    [11316.296] WorldBuilderMapLoader: try to place 14 RESOURCE_SUGAR (0 already placed)
    [11316.343] WorldBuilderMapLoader: try to place 10 RESOURCE_SILK (0 already placed)
    [11316.453] WorldBuilderMapLoader: try to place 9 RESOURCE_IVORY (1 already placed)
    [11316.484] WorldBuilderMapLoader: try to place 6 RESOURCE_MARBLE (2 already placed)
    [11316.515] WorldBuilderMapLoader: try to place 9 RESOURCE_INCENSE (0 already placed)
    [11316.531] WorldBuilderMapLoader: try to place 8 RESOURCE_WINE (3 already placed)
    [11316.562] WorldBuilderMapLoader: try to place 7 RESOURCE_STONE (1 already placed)
    [11316.562] WorldBuilderMapLoader: try to place 14 RESOURCE_SHEEP (3 already placed)
    [11316.593] WorldBuilderMapLoader: try to place 11 RESOURCE_GOLD (0 already placed)
    [11316.625] WorldBuilderMapLoader: try to place 25 RESOURCE_WHEAT (1 already placed)
    [11316.671] WorldBuilderMapLoader: try to place 54 RESOURCE_COW (4 already placed)
    [11316.734] WorldBuilderMapLoader: try to place 73 RESOURCE_DEER (3 already placed)
    [11316.906] WorldBuilderMapLoader: try to place 1 RESOURCE_BANANA (0 already placed)
    [11316.953] WorldBuilderMapLoader: try to place 24 RESOURCE_FISH (3 already placed)
    [11316.968] WorldBuilderMapLoader: try to place 7 RESOURCE_PEARLS (1 already placed)
    [11316.984] WorldBuilderMapLoader: try to place 9 RESOURCE_SILVER (1 already placed)
    [11317.000] WorldBuilderMapLoader: try to place 11 RESOURCE_GEMS (0 already placed)
    [11317.093] WorldBuilderMapLoader: try to place 12 RESOURCE_WHALE (0 already placed)
    [11317.171] WorldBuilderMapLoader: -------------------------------
    [11317.171] WorldBuilderMapLoader: Ynaem pre-load setup finished
    [11317.171] WorldBuilderMapLoader: -------------------------------

    The bold values are exaggerately hight
    Would be great if they could be optionally set via XML using a customized table resource/quantity
    For debug purpose, would be great also having a report of effectively placed resources (i.e something like - try to place 9 RESOURCE_IVORY (1 already placed) -> XX placed)

    Excuse me if I give you more trouble than help, but I really like your mod and the chance to play it in a customized environment. :goodjob:
     
  16. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,271
    Location:
    France
    I'll go for the short and simple answer first : AssignStartingPlots.lua

    ...

    Well isn't that enough ? :D

    ..

    Ok, so here's the long one :

    There are tables that can customize for the resource quantity/placement. In the Resource table first, there are a lot of value linked to the resource placement, then there are the 3 tables defining the placement rules. first one is Resource_TerrainBooleans, it's the simple one : can the resource be placed on this terrain ? true or false. Then there are Resource_FeatureTerrainBooleans and Resource_FeatureBooleans, those two are linked, the terrains defined in the first one will need one of the feature defined in the other one to be able to host the resource.

    Still here ? good, here's the funny part.

    The randomized resource placement used on map created with the WB is defined in the file WorldBuilderRandomItems.lua, and the resource placement used on map created from script is defined in the file AssignStartingPlots.lua.

    WorldBuilderRandomItems.lua use the value defined in the Resource, Resource_TerrainBooleans, Resource_FeatureTerrainBooleans and Resource_FeatureBooleans tables

    AssignStartingPlots.lua doesn't use the table. Period. The resource placement is directly hardcoded in the file. And not in a simple way.

    There's a long explanation of the system in the file itself (I don't like the choice they've made for resource placement, but at least the file is fully documented...)

    So, if you're starting a map script or a map made in world builder with the random resource option checked, the placement rule is different and the number of resource placed is different.

    But luckily for us, the placement for our WB maps is the one based on the XML, we can modify the rules from here, and that's what is done when the YnAEMP mod is activated.

    As I said to you in MP, I think that I can change that to make the rule map dependent, and in the process allow a better control on the number of resources to place for each map. But that'll need some test first...

    Ok, general answer made, now for your point:

    1/ check the log for the requested resources, if you see a line saying " trying a larger search", it means that there wasn't any plot available for that resource in the 3 tiles radius, so the mod try up to 6 tiles away. If it totally fails to place the resource, it say it on the following line. Fixing that need either a change of the terrain around the starting position, a change of the placement rules, or a change of resource for that civ.


    2/ yep, forgot to correct this one, I'll finally fix that in next version


    3/ Spice is an example of the difference between WB and script map resource placement :

    - WB map use the XML rule, which is the same in vanilla and YnAEMP, Spice can be placed on Grass or Plain as set in Resource_FeatureTerrainBooleans, meaning there's also a feature needed, and the feature is only Jungle as set in Resource_FeatureBooleans

    - Script map use this code :
    Spoiler :
    Code:
    					elseif plotType == PlotTypes.PLOT_HILLS and terrainType ~= TerrainTypes.TERRAIN_SNOW then
    						allowed_luxuries[self.gold_ID] = true;
    						allowed_luxuries[self.silver_ID] = true;
    						allowed_luxuries[self.gems_ID] = true;
    						if featureType == FeatureTypes.NO_FEATURE then
    							allowed_luxuries[self.marble_ID] = true;
    						end
    					elseif plotType == PlotTypes.PLOT_LAND then
    						if featureType == FeatureTypes.NO_FEATURE then
    							if terrainType == TerrainTypes.TERRAIN_TUNDRA then
    								allowed_luxuries[self.fur_ID] = true;
    								allowed_luxuries[self.silver_ID] = true;
    								allowed_luxuries[self.marble_ID] = true;
    							elseif terrainType == TerrainTypes.TERRAIN_DESERT then
    								allowed_luxuries[self.gold_ID] = true;
    								allowed_luxuries[self.marble_ID] = true;
    								allowed_luxuries[self.incense_ID] = true;
    							elseif terrainType == TerrainTypes.TERRAIN_PLAINS then
    								allowed_luxuries[self.marble_ID] = true;
    								allowed_luxuries[self.ivory_ID] = true;
    								allowed_luxuries[self.wine_ID] = true;
    								allowed_luxuries[self.incense_ID] = true;
    							elseif terrainType == TerrainTypes.TERRAIN_GRASS then
    								if plot:IsFreshWater() then
    									allowed_luxuries[self.sugar_ID] = true;
    									allowed_luxuries[self.cotton_ID] = true;
    									allowed_luxuries[self.wine_ID] = true;
    								else
    									allowed_luxuries[self.marble_ID] = true;
    									allowed_luxuries[self.ivory_ID] = true;
    									allowed_luxuries[self.cotton_ID] = true;
    									allowed_luxuries[self.wine_ID] = true;
    								end
    							end
    						elseif featureType == FeatureTypes.FEATURE_MARSH then		
    							allowed_luxuries[self.dye_ID] = true;
    							allowed_luxuries[self.sugar_ID] = true;
    						elseif featureType == FeatureTypes.FEATURE_FLOOD_PLAINS then		
    							allowed_luxuries[self.cotton_ID] = true;
    							allowed_luxuries[self.incense_ID] = true;
    						elseif featureType == FeatureTypes.FEATURE_JUNGLE then		
    							allowed_luxuries[self.gems_ID] = true;
    							allowed_luxuries[self.dye_ID] = true;
    							[B]allowed_luxuries[self.spices_ID] = true;[/B]
    							allowed_luxuries[self.silk_ID] = true;
    							allowed_luxuries[self.sugar_ID] = true;
    						elseif featureType == FeatureTypes.FEATURE_FOREST then		
    							allowed_luxuries[self.fur_ID] = true;
    							allowed_luxuries[self.dye_ID] = true;
    							if terrainType == TerrainTypes.TERRAIN_TUNDRA then
    								allowed_luxuries[self.silver_ID] = true;
    							else
    								[B]allowed_luxuries[self.spices_ID] = true;[/B]
    								allowed_luxuries[self.silk_ID] = true;
    							end
    						end
    meaning it could place spice on all jungle plot and in forest on tundra...

    Oil is changed by YnAEMP, as coal, else those resource couldn't be placed in enough quantity in some region, so they're allowed under forest, and you can found coal in plains.

    4/ Again, the number depend of the type of code used : WB or mapscript. I won't describe the mapscript function(s) here, it can change a lot depending of the map, and the "balance" coding to make fair starting position is pretty complex.

    For the WB, it's a bit of randomness and value picked from the Resources table.

    Simply it add 4 random value and a constant one, multiply it by the quantity option selected in the menu (YnAEMP addition here), calculate a value based on the number of tile available for this resource on the map, use a percent ratio on that value if defined in Resources, mix it with another ratio based on the number of player (or a fixed value if you selected the "no scale" option, another YnAEMP addition)), and remove the number of resource already placed by the request or regional placement of YnAEMP. And that's a lot easier that the script placement, believe me :D

    Once I've implemented the custom rule per map, "who" will be "us".

    It could already be "us", via a change to the existing table, but it will be a change for all YnAEMP map before the new option is implemented then.

    And finally, I'll see if I can post a recap of all resource placed after map generation, the way the code is made, I couldn't simply add it at the end of the line (but If I'm not too lazy, I'll add it in a less simple way)

    And don't worry, YnAEMP was made 'cause I wanted it to be customizable ;)
     
  17. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    Thanks Gedemon for the explanation. Now it's all more clear :goodjob:

    However some issues still remain. Look at the log and the related attached shots.

    [991.890] WorldBuilderMapLoader: -------------------------------
    [991.890] WorldBuilderMapLoader: Adding requested resources for civs...
    [991.890] WorldBuilderMapLoader: -------------------------------
    [991.890] WorldBuilderMapLoader: placed RESOURCE_IRON for CIVILIZATION_CARTHAGO, there was 10 plot(s) available
    [991.890] WorldBuilderMapLoader: placed RESOURCE_IVORY for CIVILIZATION_CARTHAGO, there was 8 plot(s) available
    [991.890] WorldBuilderMapLoader: no result, try a larger search...
    [991.890] WorldBuilderMapLoader: no plot available to place RESOURCE_SPICES for CIVILIZATION_CARTHAGO
    [991.890] WorldBuilderMapLoader: placed RESOURCE_FISH for CIVILIZATION_CARTHAGO, there was 13 plot(s) available
    [991.906] WorldBuilderMapLoader: placed RESOURCE_WHEAT for CIVILIZATION_CARTHAGO, there was 4 plot(s) available
    [991.906] WorldBuilderMapLoader: placed RESOURCE_IRON for CIVILIZATION_GERMANIC, there was 30 plot(s) available
    [991.906] WorldBuilderMapLoader: placed RESOURCE_FUR for CIVILIZATION_GERMANIC, there was 20 plot(s) available
    [991.906] WorldBuilderMapLoader: no result, try a larger search...
    [991.906] WorldBuilderMapLoader: no plot available to place RESOURCE_STONE for CIVILIZATION_GERMANIC
    [991.906] WorldBuilderMapLoader: placed RESOURCE_COW for CIVILIZATION_GERMANIC, there was 4 plot(s) available
    [991.906] WorldBuilderMapLoader: placed RESOURCE_DEER for CIVILIZATION_GERMANIC, there was 28 plot(s) available
    [991.906] WorldBuilderMapLoader: placed RESOURCE_IRON for CIVILIZATION_DACIAN, there was 13 plot(s) available

    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.
     

    Attached Files:

  18. Fan67

    Fan67 Chieftain

    Joined:
    Jun 24, 2011
    Messages:
    21
    Having played 5 games on Giant map I have question to other users of this wonderful map.

    1. Have you ever had AI Aztecs overcome AI Iroquois? I do not play these civs, and keep watching how Iroquois destroy Aztecs every time and completely dominating them point-wise.

    2. Have you ever managed to get Domination victory on Giant map with other victory conditions turned on? The only way I could conquer the planet was when the domination was the only possible victory. And it took almost 500 turn (and only with thanks to nuclear weapon).

    And as Japan or Inca it is fairly easy to get cultural or science victory, because of the placement. Last time I flyed away before meeting sixth civilization. :)
     
  19. GiantChicken

    GiantChicken Chieftain

    Joined:
    Jul 16, 2011
    Messages:
    2
    I can't play this because I have trouble updating the game :( Would someone be so nice as to load the game up and save the game as a map file on the first turn so I can play this as a scenario? I want a giant map with the 18 original civs and maximum number of city-states, with everything except domination disabled. Thanks a lot in advance :D
     
  20. Nefliqus

    Nefliqus Prince

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland
    Which function in Vanila ver is responsible for randomized Civ and CS placement on starting plots on maps created with the WB?
     

Share This Page