How to quickly create a Mod from a Civilization 6 Map using Zobtzler's YnABMC and YnAMP

I can't seem to load my Worldbuilder maps when having Ynaemap activate (I want to convert it to a lua script), it seems to get buggy when assigning starting locations. This occurs even if the Worldbuilder map is created via a standard lua script (such as continents).

This is the error:

Runtime Error: C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\871861883\Override\AssignStartingPlots.lua:4444: function expected instead of nil
stack traceback:

C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\871861883\Override\AssignStartingPlots.lua:4444: in function 'YnAMP_ApplySharedMapOptions'

C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\871861883\Override\AssignStartingPlots.lua:251: in function 'AssignStartingPlots.Create'
 
I can't seem to load my Worldbuilder maps when having Ynaemap activate (I want to convert it to a lua script), it seems to get buggy when assigning starting locations. This occurs even if the Worldbuilder map is created via a standard lua script (such as continents).

This is the error:

Runtime Error: C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\871861883\Override\AssignStartingPlots.lua:4444: function expected instead of nil
stack traceback:

C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\871861883\Override\AssignStartingPlots.lua:4444: in function 'YnAMP_ApplySharedMapOptions'

C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\871861883\Override\AssignStartingPlots.lua:251: in function 'AssignStartingPlots.Create'
Thanks, didn't know we couldn't load WB map with costal lowland set to "map generator", I'll fix that in next version.

You may try the gitHub version of YnAMP and use the "import" option for coastal lowlands to keep the WB map's lowlands (but they won't export with the current version of the tool, an update is coming), or use the "empty" option with your current version of YnAMP.
 
There was an issue with the Jun 30, 2019 update of YnAMP that was preventing YnABMC to create the map's Lua file.

Today's update of YnAMP should have fixed that (did a quick test myself), if it's not the case I'd like to see the FULL lua.log you're using to import/export the map, TIA
 
The September 2019 patch has changed the way context are named in the Lua.log when calling a function in a context from another after changing the parent of a button (which I do to add the Export button to the option menu)

This seems to cause an issue with the current version of YnABMC, so I've updated YnAMP today and until it can be fixed, instead of the button, use the keyboard shortcut CTRL+ALT+E to export the map to Lua, from in game or from the WB, you'll hear a small sound to confirm the export.
 
The September 2019 patch has changed the way context are named in the Lua.log when calling a function in a context from another after changing the parent of a button (which I do to add the Export button to the option menu)

This seems to cause an issue with the current version of YnABMC, so I've updated YnAMP today and until it can be fixed, instead of the button, use the keyboard shortcut CTRL+ALT+E to export the map to Lua, from in game or from the WB, you'll hear a small sound to confirm the export.
I've removed the keyboard shortcut because it seems it was causing some crashes on exit/reload/restart.

But you can now use YnABMC v0.3.4.2 to import a map from the Lua.log: https://github.com/Zobtzler/YnABMC/releases, thanks @Zobtzler
 
Can I create cities with walls (without a settler) for city-states using a map.xml file? If I can, what will an example of such a script look like? Thanks in advance.
 
The map I created with the mod, based off YnAMP PlayEuropeAgain, doest keep the goody huts. Is there a fix for this?
 
The map I created with the mod, based off YnAMP PlayEuropeAgain, doest keep the goody huts. Is there a fix for this?
IIRC YnAMP export the map's improvements to the Lua.log but the tool doesn't import it yet.

@Zobtzler do you think it's possible to implement ?

You can manually copy the code (removing the timestamp at the beginning of each line) in the Lua.log to your map.xml, Goody Huts are in the <ScenarioInfrastructure></ScenarioInfrastructure> section
 
IIRC YnAMP export the map's improvements to the Lua.log but the tool doesn't import it yet.

@Zobtzler do you think it's possible to implement ?

You can manually copy the code (removing the timestamp at the beginning of each line) in the Lua.log to your map.xml, Goody Huts are in the <ScenarioInfrastructure></ScenarioInfrastructure> section
Thank you!
 
Hi @Gedemon, I did the steps in the first page. All is fine, but when i want to choose the map to start the game. I end up having 2 of the same name in the map list, i.e two greatest earth maps.

I checked my mods folder. Only one folder of the map was in it, the duplicate only pops up on the map list. How can I remove the duplicate on the map list?
 
Hi @Gedemon, I did the steps in the first page. All is fine, but when i want to choose the map to start the game. I end up having 2 of the same name in the map list, i.e two greatest earth maps.

I checked my mods folder. Only one folder of the map was in it, the duplicate only pops up on the map list. How can I remove the duplicate on the map list?
Can you copy the content of the config.xml file here please?
 
Here you go.



Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
    <Maps>
        <Row File="Dhyll_DhyllHugeEarth_Map.lua" Name="LOC_Dhyll_DhyllHugeEarth_Map_NAME" Description="LOC_Dhyll_DhyllHugeEarth_Map_DESC" SortIndex="50"/>
        <Row Domain="Maps:Expansion1Maps" File="Dhyll_DhyllHugeEarth_Map.lua" Name="LOC_Dhyll_DhyllHugeEarth_Map_NAME" Description="LOC_Dhyll_DhyllHugeEarth_Map_DESC" SortIndex="50"/>
        <Row Domain="Maps:Expansion2Maps" File="Dhyll_DhyllHugeEarth_Map.lua" Name="LOC_Dhyll_DhyllHugeEarth_Map_NAME" Description="LOC_Dhyll_DhyllHugeEarth_Map_DESC" SortIndex="50"/>
    </Maps>
    <Parameters>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="RiversPlacement" Name="LOC_MAP_RIVERS_PLACEMENT_NAME" Description="LOC_MAP_RIVERS_PLACEMENT_DESCRIPTION" Domain="RiversPlacement" DefaultValue="PLACEMENT_IMPORT" ConfigurationGroup="Map"    ConfigurationId="RiversPlacement"    GroupId="MapOptions" SortIndex="231"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="ContinentsPlacement" Name="LOC_MAP_CONTINENT_PLACEMENT_NAME" Description="LOC_MAP_CONTINENT_PLACEMENT_DESCRIPTION" Domain="ContinentsPlacement" DefaultValue="PLACEMENT_IMPORT" ConfigurationGroup="Map"    ConfigurationId="ContinentsPlacement"    GroupId="MapOptions" SortIndex="232"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="NaturalWondersPlacement" Name="LOC_MAP_NATURAL_WONDERS_PLACEMENT_NAME" Description="LOC_MAP_NATURAL_WONDERS_PLACEMENT_DESCRIPTION" Domain="NaturalWondersPlacement" DefaultValue="PLACEMENT_IMPORT" ConfigurationGroup="Map"    ConfigurationId="NaturalWondersPlacement"    GroupId="MapOptions" Hash="0" SortIndex="244"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="FeaturesPlacement" Name="LOC_MAP_FEATURES_PLACEMENT_NAME" Description="LOC_MAP_FEATURES_PLACEMENT_DESCRIPTION" Domain="FeaturesPlacement" DefaultValue="PLACEMENT_IMPORT" ConfigurationGroup="Map"    ConfigurationId="FeaturesPlacement"    GroupId="MapOptions" Hash="0" SortIndex="245"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="Rainfall" Name="LOC_MAP_RAINFALL_NAME" Description="LOC_MAP_RAINFALL_DESCRIPTION" Domain="Rainfall" DefaultValue="2" ConfigurationGroup="Map"    ConfigurationId="rainfall"    GroupId="MapOptions" Hash="0" SortIndex="250"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="ResourcesPlacement" Name="LOC_MAP_RESOURCES_PLACEMENT_NAME" Description="LOC_MAP_RESOURCES_PLACEMENT_DESCRIPTION" Domain="ResourcesPlacement" DefaultValue="PLACEMENT_DEFAULT" ConfigurationGroup="Map"    ConfigurationId="ResourcesPlacement"    GroupId="MapOptions" Hash="0" SortIndex="269"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="Resources" Name="LOC_MAP_RESOURCES_NAME" Description="LOC_MAP_RESOURCES_DESCRIPTION" Domain="Resources" DefaultValue="2" ConfigurationGroup="Map"    ConfigurationId="resources"    GroupId="MapOptions" Hash="0" SortIndex="270"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="LowLandPlacement" Name="LOC_MAP_LOWLAND_PLACEMENT_NAME" Description="LOC_MAP_LOWLAND_PLACEMENT_DESCRIPTION" Domain="LowLandPlacement" DefaultValue="PLACEMENT_DEFAULT" ConfigurationGroup="Map"    ConfigurationId="LowLandPlacement"    GroupId="MapOptions" Hash="0" SortIndex="269"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="LowLand" Name="LOC_MAP_LOWLAND_NAME" Description="LOC_MAP_LOWLAND_DESCRIPTION" Domain="LowLand" DefaultValue="2" ConfigurationGroup="Map"    ConfigurationId="LowLand"    GroupId="MapOptions" Hash="0" SortIndex="270"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="StartPosition" Name="LOC_MAP_START_POSITION_NAME" Description="LOC_MAP_START_POSITION_DESCRIPTION" Domain="StartPosition" DefaultValue="2" ConfigurationGroup="Map"    ConfigurationId="start"    GroupId="MapOptions" Hash="0" SortIndex="280"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="CivilizationPlacement" Name="LOC_MAP_CIVILIZATION_PLACEMENT_NAME" Description="LOC_MAP_CIVILIZATION_PLACEMENT_DESCRIPTION" Domain="CivilizationPlacement" DefaultValue="PLACEMENT_TSL" ConfigurationGroup="Map"    ConfigurationId="CivilizationPlacement"    GroupId="MapOptions" Hash="0" SortIndex="280"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="ForceTSL" Name="LOC_MAP_FORCE_TSL_NAME" Description="LOC_MAP_FORCE_TSL_DESCRIPTION" Domain="ForceTSL" DefaultValue="FORCE_TSL_OFF" ConfigurationGroup="Map"    ConfigurationId="ForceTSL"    GroupId="MapOptions" Hash="0" SortIndex="281"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="StartPosition" Name="LOC_MAP_START_POSITION_NAME" Description="LOC_MAP_START_POSITION_DESCRIPTION" Domain="StartPosition" DefaultValue="2" ConfigurationGroup="Map"    ConfigurationId="start"    GroupId="MapOptions" Hash="0" SortIndex="285"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="Dhyll_DhyllHugeEarth_MapSize" Name="LOC_MAP_SIZE" Description="" Domain="StandardMapSizes" DefaultValue="MAPSIZE_HUGE" ConfigurationGroup="Map" ConfigurationId="MAP_SIZE" GroupId="MapOptions" Hash="1" Visible="0" SortIndex="225"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="HideSize" Name="HideSize" Description="" Domain="bool" DefaultValue="1" ConfigurationGroup="Map" ConfigurationId="HideSize" GroupId="MapOptions" Visible="0" SortIndex="2010"/>
        <Row Key1="Map" Key2="Dhyll_DhyllHugeEarth_Map.lua" ParameterId="Dhyll_DhyllHugeEarth_MapName" Name="MapName" Description="" Domain="text" DefaultValue="Dhyll_DhyllHugeEarth_Map" ConfigurationGroup="Map" ConfigurationId="MapName" GroupId="MapOptions" Visible="0" SortIndex="2010"/>
    </Parameters>
    <MapSupportedValues>
        <Row Map = "Dhyll_DhyllHugeEarth_Map.lua" Domain = "ResourcesPlacement" Value = "PLACEMENT_DEFAULT" />
        <Row Map = "Dhyll_DhyllHugeEarth_Map.lua" Domain = "ResourcesPlacement" Value = "PLACEMENT_EMPTY" />
        <Row Map = "Dhyll_DhyllHugeEarth_Map.lua" Domain = "LowLandPlacement" Value = "PLACEMENT_DEFAULT" />
        <Row Map = "Dhyll_DhyllHugeEarth_Map.lua" Domain = "LowLandPlacement" Value = "PLACEMENT_EMPTY" />
    </MapSupportedValues>
</GameInfo>
 
Thanks, I've edited your post for clarity by adding the "code" tag.

Try to remove the 2 lines below:
Code:
        <Row Domain="Maps:Expansion1Maps" File="Dhyll_DhyllHugeEarth_Map.lua" Name="LOC_Dhyll_DhyllHugeEarth_Map_NAME" Description="LOC_Dhyll_DhyllHugeEarth_Map_DESC" SortIndex="50"/>
        <Row Domain="Maps:Expansion2Maps" File="Dhyll_DhyllHugeEarth_Map.lua" Name="LOC_Dhyll_DhyllHugeEarth_Map_NAME" Description="LOC_Dhyll_DhyllHugeEarth_Map_DESC" SortIndex="50"/>

IIRC they were needed at some point by the game to display the maps for the Expansion, but they patched that at some point and only the first line is needed for all ruleset.

Let me know if it fixes the issue.
 
@Zobtzler do you think it's possible to implement ?

You can manually copy the code (removing the timestamp at the beginning of each line) in the Lua.log to your map.xml, Goody Huts are in the <ScenarioInfrastructure></ScenarioInfrastructure> section

Hmmm, I'll see what I can do...

Thanks, I've edited your post for clarity by adding the "code" tag.

Try to remove the 2 lines below:
Code:
        <Row Domain="Maps:Expansion1Maps" File="Dhyll_DhyllHugeEarth_Map.lua" Name="LOC_Dhyll_DhyllHugeEarth_Map_NAME" Description="LOC_Dhyll_DhyllHugeEarth_Map_DESC" SortIndex="50"/>
        <Row Domain="Maps:Expansion2Maps" File="Dhyll_DhyllHugeEarth_Map.lua" Name="LOC_Dhyll_DhyllHugeEarth_Map_NAME" Description="LOC_Dhyll_DhyllHugeEarth_Map_DESC" SortIndex="50"/>

IIRC they were needed at some point by the game to display the maps for the Expansion, but they patched that at some point and only the first line is needed for all ruleset.

Let me know if it fixes the issue.

Seems like something I need to fix in my tool. I'll work on it
 
So I'm trying to edit this map: https://forums.civfanatics.com/threads/middle-east-sword-of-islam.619998/ so it's a bit more up to date and also add some personal touches for myself (I'm only going to make this for personal use) and also incorporates TSL. I used this tool to "save" the map since saving an edited custom map with worldbuilder gives me too much trouble

Unfortunately I ran into two issues:
1. Some rivers do not appear in 3D view. They appear on the minimap and strategic map, but not in the actual 3D view. Names even appear as well but no visible river.
2. I cannot get TSL to work. The game just ignores it completely.
 
1/ could mean that some rivers sections doesn't flow in the same direction as the others, not easy to determine/fix except by completely redrawing the invisible rivers.

for 2/, can you post your Map.xml and your Lua.log here ?
 
1/ could mean that some rivers sections doesn't flow in the same direction as the others, not easy to determine/fix except by completely redrawing the invisible rivers.

for 2/, can you post your Map.xml and your Lua.log here ?

Here
 

Attachments

  • Mark_ModifiedMiddleEastSword_Lua.txt
    1.8 MB · Views: 85
  • Map.xml
    1 KB · Views: 97
Top Bottom