瀏覽代碼

Move all OH3 objects and obstacle sets to a mod

Tomasz Zieliński 1 年之前
父節點
當前提交
3e3959d360

+ 1 - 0
client/CGameInfo.cpp

@@ -37,6 +37,7 @@ void CGameInfo::setFromLib()
 	terrainTypeHandler = VLC->terrainTypeHandler;
 	battleFieldHandler = VLC->battlefieldsHandler;
 	obstacleHandler = VLC->obstacleHandler;
+	//TODO: biomeHandler?
 }
 
 const ArtifactService * CGameInfo::artifacts() const

+ 1320 - 0
config/biomes.json

@@ -0,0 +1,1320 @@
+// TODO: Find duplicated defs, merge them into one template set
+
+{
+	"templateSet0":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcrsd0"]
+	},
+	"templateSet1":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXplns0"]
+	},
+	"templateSet2":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLct1d0", "AVLct2d0", "AVLct3d0", "AVLct4d0", "AVLct5d0", "AVLctrd0"]
+	},
+	"templateSet3":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLfl1d0", "AVLfl2d0", "AVLfl3d0", "AVLfl4d0", "AVLfl5d0", "AVLfl6d0", "AVLfl7d0", "AVLfl8d0", "AVLfl9d0"]
+	},
+	"templateSet4":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLhold0"]
+	},
+	"templateSet5":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLlk1d0", "AVLlk2d0", "AVLlk3d0"]
+	},
+	"templateSet6":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "plant"
+		},
+		"templates" : ["AvLdlog"]
+	},
+	"templateSet7":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLmd1d0", "AVLmd2d0"]
+	},
+	"templateSet8":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "mountain"
+		},
+		"templates" : ["avlmtdr1", "avlmtdr2", "avlmtdr3", "avlmtdr4", "avlmtdr5", "avlmtdr6", "avlmtdr7", "avlmtdr8"]
+	},
+	"templateSet9":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "tree"
+		},
+		"templates" : ["avlautr0", "avlautr1", "AVLAUTR2", "AVLAUTR3", "AVLAUTR4", "AVLAUTR5", "AVLautr6", "AVLautr7"]
+	},
+	"templateSet10":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLoc1d0", "AVLoc2d0", "AVLoc3d0"]
+	},
+	"templateSet11":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLPNTR0", "AVLPNTR1", "AVLPNTR2", "AVLPNTR3", "AVLPNTR4", "AVLPNTR5", "AVLpntr6", "AVLpntr7"]
+	},
+	"templateSet13":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "rock"
+		},
+		"templates" : ["AvLRD01", "AvLRD02", "AvLRD04", "AVLrk3d0", "AVLrk5d0"]
+	},
+	"templateSet14":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLsh1d0", "AVLsh2d0", "AVLsh3d0", "AVLsh4d0", "AVLsh5d0", "AVLsh6d0", "AVLsh7d0", "AVLsh8d0"]
+	},
+	"templateSet15":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "plant"
+		},
+		"templates" : ["AvLStm1", "AvLStm2", "AvLStm3"]
+	},
+	"templateSet16":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLtr1d0", "AVLtr2d0", "AVLtr3d0"]
+	},
+	"templateSet17":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["avlxdt00", "avlxdt01", "avlxdt02", "avlxdt03", "avlxdt04", "avlxdt05", "avlxdt06", "avlxdt07", "avlxdt08", "avlxdt09", "avlxdt10", "avlxdt11"]
+	},
+	"templateSet18":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcf0", "AVXcf1", "AVXcf2", "AVXcf3", "AVXcf4", "AVXcf5", "AVXcf6", "AVXcf7"]
+	},
+	"templateSet19":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcg1", "AVXcg2", "AVXcg3", "AVXcg4", "AVXcg5", "AVXcg6", "AVXcg7"]
+	},
+	"templateSet20":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXef0", "AVXef1", "AVXef2", "AVXef3", "AVXef4", "AVXef5", "AVXef6", "AVXef7"]
+	},
+	"templateSet21":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXff0", "AVXff1", "AVXff2", "AVXff3", "AVXff4", "AVXff5", "AVXff6", "AVXff7"]
+	},
+	"templateSet22":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXhg0", "AVXhg1", "AVXhg2", "AVXhg3", "AVXhg4", "AVXhg5", "AVXhg6", "AVXhg7"]
+	},
+	"templateSet23":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXlp0", "AVXlp1", "AVXlp2", "AVXlp3", "AVXlp4", "AVXlp5", "AVXlp6", "AVXlp7"]
+	},
+	"templateSet24":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmc0", "AVXmc1", "AVXmc2", "AVXmc3", "AVXmc4", "AVXmc5", "AVXmc6", "AVXmc7"]
+	},
+	"templateSet25":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmp1", "AVXmp2", "AVXmp3", "AVXmp4", "AVXmp5", "AVXmp6", "AVXmp7"]
+	},
+	"templateSet26":{
+		"biome":{
+			"terrain" : "dirt",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXrk0", "AVXrk1", "AVXrk2", "AVXrk3", "AVXrk4", "AVXrk5", "AVXrk6", "AVXrk7"]
+	},
+	"templateSet27":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcrsd0"]
+	},
+	"templateSet28":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXplns0"]
+	},
+	"templateSet29":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLca010", "AVLca020", "AVLca030", "AVLca040", "AVLca050", "AVLca060", "AVLca070", "AVLca080", "AVLca090", "AVLca100", "AVLca110", "AVLca120", "AVLca130"]
+	},
+	"templateSet30":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLctds0"]
+	},
+	"templateSet31":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLhlds0"]
+	},
+	"templateSet32":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "mountain"
+		},
+		"templates" : ["AVLmtds1", "AVLmtds2", "AVLmtds3", "AVLmtds4", "AVLmtds5", "AVLmtds6"]
+	},
+	"templateSet34":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLdun10", "AVLdun20", "AVLdun30"]
+	},
+	"templateSet35":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLspit0"]
+	},
+	"templateSet36":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "animal"
+		},
+		"templates" : ["AVLskul0"]
+	},
+	"templateSet37":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLplm10", "AVLplm20", "AVLplm30", "AVLplm40", "AVLplm50", "AVLyuc10", "AVLyuc20", "AVLyuc30"]
+	},
+	"templateSet38":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["avlxds01", "avlxds02", "avlxds03", "avlxds04", "avlxds05", "avlxds06", "avlxds07", "avlxds08", "avlxds09", "avlxds10", "avlxds11", "avlxds12"]
+	},
+	"templateSet39":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcf0", "AVXcf1", "AVXcf2", "AVXcf3", "AVXcf4", "AVXcf5", "AVXcf6", "AVXcf7"]
+	},
+	"templateSet40":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcg1", "AVXcg2", "AVXcg3", "AVXcg4", "AVXcg5", "AVXcg6", "AVXcg7"]
+	},
+	"templateSet41":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXef0", "AVXef1", "AVXef2", "AVXef3", "AVXef4", "AVXef5", "AVXef6", "AVXef7"]
+	},
+	"templateSet42":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXff0", "AVXff1", "AVXff2", "AVXff3", "AVXff4", "AVXff5", "AVXff6", "AVXff7"]
+	},
+	"templateSet43":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXhg0", "AVXhg1", "AVXhg2", "AVXhg3", "AVXhg4", "AVXhg5", "AVXhg6", "AVXhg7"]
+	},
+	"templateSet44":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXlp0", "AVXlp1", "AVXlp2", "AVXlp3", "AVXlp4", "AVXlp5", "AVXlp6", "AVXlp7"]
+	},
+	"templateSet45":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmc0", "AVXmc1", "AVXmc2", "AVXmc3", "AVXmc4", "AVXmc5", "AVXmc6", "AVXmc7"]
+	},
+	"templateSet46":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmp1", "AVXmp2", "AVXmp3", "AVXmp4", "AVXmp5", "AVXmp6", "AVXmp7"]
+	},
+	"templateSet47":{
+		"biome":{
+			"terrain" : "sand",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXrk0", "AVXrk1", "AVXrk2", "AVXrk3", "AVXrk4", "AVXrk5", "AVXrk6", "AVXrk7"]
+	},
+	"templateSet48":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcrsd0"]
+	},
+	"templateSet49":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXplns0"]
+	},
+	"templateSet50":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLct1g0", "AVLct2g0", "AVLct3g0", "AVLct4g0", "AVLct5g0", "AVLct6g0", "AVLctrg0"]
+	},
+	"templateSet51":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLf01g0", "AVLf02g0", "AVLf03g0", "AVLf04g0", "AVLf05g0", "AVLf06g0", "AVLf07g0", "AVLf08g0", "AVLf09g0", "AVLf10g0", "AVLf11g0", "AVLf12g0"]
+	},
+	"templateSet52":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLholg0"]
+	},
+	"templateSet53":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLlk1g0", "AVLlk2g0", "AVLlk3g0"]
+	},
+	"templateSet54":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "plant"
+		},
+		"templates" : ["AvLdlog"]
+	},
+	"templateSet55":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLmd1g0", "AVLmd2g0"]
+	},
+	"templateSet56":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "mountain"
+		},
+		"templates" : ["AVLmtgn0", "AVLmtgn1", "AVLmtgn2", "AVLmtgn3", "AVLmtgn4", "AVLmtgn5", "AVLmtgr1", "AVLmtgr2", "AVLmtgr3", "AVLmtgr4", "AVLmtgr5", "AVLmtgr6"]
+	},
+	"templateSet57":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "tree"
+		},
+		"templates" : ["avlautr0", "avlautr1", "AVLAUTR2", "AVLAUTR3", "AVLAUTR4", "AVLAUTR5", "AVLautr6", "AVLautr7", "AVLSPTR0", "AVLSPTR1", "AVLSPTR2", "AVLSPTR3", "AVLSPTR4", "AVLSPTR5", "AVLSPTR6", "AVLsptr7", "AVLsptr8"]
+	},
+	"templateSet58":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLoc1g0", "AVLoc2g0", "AVLoc3g0"]
+	},
+	"templateSet59":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLPNTR0", "AVLPNTR1", "AVLPNTR2", "AVLPNTR3", "AVLPNTR4", "AVLPNTR5", "AVLpntr6", "AVLpntr7"]
+	},
+	"templateSet61":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "rock"
+		},
+		"templates" : ["AvLRG01", "AvLRG02", "AvLRG03", "AvLRG04", "AvLRG05", "AvLRG06", "AvLRG07", "AvLRG08", "AvLRG09", "AvLRG10", "AvLRG11"]
+	},
+	"templateSet62":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLsh1g0", "AVLsh2g0", "AVLsh3g0", "AVLsh4g0", "AVLsh5g0", "AVLsh6g0"]
+	},
+	"templateSet63":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "plant"
+		},
+		"templates" : ["AvLStm1", "AvLStm2", "AvLStm3"]
+	},
+	"templateSet64":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLswmp0", "AVLswmp1", "AVLswmp2", "AVLswmp3", "AVLswmp4", "AVLswmp5", "AVLswmp6", "AVLswmp7", "AVLtr1d0", "AVLtr2d0", "AVLtr3d0", "AVLwlw10", "AVLwlw20", "AVLwlw30"]
+	},
+	"templateSet65":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["avlxgr01", "avlxgr02", "avlxgr03", "avlxgr04", "avlxgr05", "avlxgr06", "avlxgr07", "avlxgr08", "avlxgr09", "avlxgr10", "avlxgr11", "avlxgr12"]
+	},
+	"templateSet66":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcf0", "AVXcf1", "AVXcf2", "AVXcf3", "AVXcf4", "AVXcf5", "AVXcf6", "AVXcf7"]
+	},
+	"templateSet67":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcg1", "AVXcg2", "AVXcg3", "AVXcg4", "AVXcg5", "AVXcg6", "AVXcg7"]
+	},
+	"templateSet68":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXef0", "AVXef1", "AVXef2", "AVXef3", "AVXef4", "AVXef5", "AVXef6", "AVXef7"]
+	},
+	"templateSet69":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXff0", "AVXff1", "AVXff2", "AVXff3", "AVXff4", "AVXff5", "AVXff6", "AVXff7"]
+	},
+	"templateSet70":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXhg0", "AVXhg1", "AVXhg2", "AVXhg3", "AVXhg4", "AVXhg5", "AVXhg6", "AVXhg7"]
+	},
+	"templateSet71":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXlp0", "AVXlp1", "AVXlp2", "AVXlp3", "AVXlp4", "AVXlp5", "AVXlp6", "AVXlp7"]
+	},
+	"templateSet72":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmc0", "AVXmc1", "AVXmc2", "AVXmc3", "AVXmc4", "AVXmc5", "AVXmc6", "AVXmc7"]
+	},
+	"templateSet73":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmp1", "AVXmp2", "AVXmp3", "AVXmp4", "AVXmp5", "AVXmp6", "AVXmp7"]
+	},
+	"templateSet74":{
+		"biome":{
+			"terrain" : "grass",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXrk0", "AVXrk1", "AVXrk2", "AVXrk3", "AVXrk4", "AVXrk5", "AVXrk6", "AVXrk7"]
+	},
+	"templateSet75":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcrsd0"]
+	},
+	"templateSet76":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXplns0"]
+	},
+	"templateSet77":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLctsn0"]
+	},
+	"templateSet78":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLd1sn0", "AVLd2sn0", "AVLd3sn0", "AVLd4sn0", "AVLd5sn0", "AVLd6sn0", "AVLd7sn0", "AVLd8sn0", "AVLd9sn0", "AVLddsn0", "AVLddsn1", "AVLddsn2", "AVLddsn3", "AVLddsn4", "AVLddsn5", "AVLddsn6", "AVLddsn7"]
+	},
+	"templateSet79":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLflk10", "AVLflk20", "AVLflk30"]
+	},
+	"templateSet80":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLhlsn0"]
+	},
+	"templateSet81":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "mountain"
+		},
+		"templates" : ["AVLmtsn1", "AVLmtsn2", "AVLmtsn3", "AVLmtsn4", "AVLmtsn5", "AVLmtsn6"]
+	},
+	"templateSet82":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLo1sn0", "AVLo2sn0", "AVLo3sn0"]
+	},
+	"templateSet83":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLSNTR0", "AVLSNTR1", "AVLSNTR2", "AVLSNTR3", "AVLSNTR4", "AVLSNTR5", "AVLsntr6", "AVLsntr7"]
+	},
+	"templateSet85":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLr1sn0", "AVLr2sn0", "AVLr3sn0", "AVLr4sn0", "AVLr5sn0", "AVLr6sn0", "AVLr7sn0", "AVLr8sn0"]
+	},
+	"templateSet86":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLs1sn0", "AVLs2sn0", "AVLs3sn0"]
+	},
+	"templateSet87":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLp1sn0", "AVLp2sn0"]
+	},
+	"templateSet88":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcf0", "AVXcf1", "AVXcf2", "AVXcf3", "AVXcf4", "AVXcf5", "AVXcf6", "AVXcf7"]
+	},
+	"templateSet89":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcg1", "AVXcg2", "AVXcg3", "AVXcg4", "AVXcg5", "AVXcg6", "AVXcg7"]
+	},
+	"templateSet90":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXef0", "AVXef1", "AVXef2", "AVXef3", "AVXef4", "AVXef5", "AVXef6", "AVXef7"]
+	},
+	"templateSet91":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXff0", "AVXff1", "AVXff2", "AVXff3", "AVXff4", "AVXff5", "AVXff6", "AVXff7"]
+	},
+	"templateSet92":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXhg0", "AVXhg1", "AVXhg2", "AVXhg3", "AVXhg4", "AVXhg5", "AVXhg6", "AVXhg7"]
+	},
+	"templateSet93":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXlp0", "AVXlp1", "AVXlp2", "AVXlp3", "AVXlp4", "AVXlp5", "AVXlp6", "AVXlp7"]
+	},
+	"templateSet94":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmc0", "AVXmc1", "AVXmc2", "AVXmc3", "AVXmc4", "AVXmc5", "AVXmc6", "AVXmc7"]
+	},
+	"templateSet95":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmp1", "AVXmp2", "AVXmp3", "AVXmp4", "AVXmp5", "AVXmp6", "AVXmp7"]
+	},
+	"templateSet96":{
+		"biome":{
+			"terrain" : "snow",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXrk0", "AVXrk1", "AVXrk2", "AVXrk3", "AVXrk4", "AVXrk5", "AVXrk6", "AVXrk7"]
+	},
+	"templateSet97":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcrsd0"]
+	},
+	"templateSet98":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXplns0"]
+	},
+	"templateSet99":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLctrs0"]
+	},
+	"templateSet100":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLdead0", "AVLdead1", "AVLdead2", "AVLdead3", "AVLdead4", "AVLdead5", "AVLdead6", "AVLdead7", "AVLdt1s0", "AVLdt2s0", "AVLdt3s0", "AVLswp60", "AVLswp70"]
+	},
+	"templateSet101":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLhols0"]
+	},
+	"templateSet102":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLlk1s0", "AVLlk2s0", "AVLlk3s0", "AVLswp50"]
+	},
+	"templateSet103":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLman10", "AVLman20", "AVLman30", "AVLman40", "AVLman50"]
+	},
+	"templateSet104":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLmoss0"]
+	},
+	"templateSet105":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "mountain"
+		},
+		"templates" : ["AVLmtsw1", "AVLmtsw2", "AVLmtsw3", "AVLmtsw4", "AVLmtsw5", "AVLmtsw6"]
+	},
+	"templateSet106":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLSPTR0", "AVLSPTR1", "AVLSPTR2", "AVLSPTR3", "AVLSPTR4", "AVLSPTR5", "AVLSPTR6", "AVLsptr7", "AVLsptr8"]
+	},
+	"templateSet108":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLrk1s0", "AVLrk2s0", "AVLrk3s0", "AVLrk4s0"]
+	},
+	"templateSet109":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLs01s0", "AVLs02s0", "AVLs03s0", "AVLs04s0", "AVLs05s0", "AVLs06s0", "AVLs07s0", "AVLs08s0", "AVLs09s0", "AVLs10s0", "AVLs11s0", "AVLswp10", "AVLswp20", "AVLswp30", "AVLswp40"]
+	},
+	"templateSet110":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLswmp0", "AVLswmp1", "AVLswmp2", "AVLswmp3", "AVLswmp4", "AVLswmp5", "AVLswmp6", "AVLswmp7", "AVLtr1d0", "AVLtr2d0", "AVLtr3d0", "AVLwlw10", "AVLwlw20", "AVLwlw30"]
+	},
+	"templateSet111":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["avlswtr0", "avlswtr1", "avlswtr2", "avlswtr3", "avlswtr4", "avlswtr5", "avlswtr6", "avlswtr7", "avlswtr8", "avlswtr9", "avlswt00", "avlswt01", "avlswt02", "avlswt03", "avlswt04", "avlswt05", "avlswt06", "avlswt07", "avlswt08", "avlswt09", "avlswt10", "avlswt11", "avlswt12", "avlswt13", "avlswt14", "avlswt15", "avlswt16", "avlswt17", "avlswt18", "avlswt19"]
+	},
+	"templateSet112":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["avlxsw01", "avlxsw02", "avlxsw03", "avlxsw04", "avlxsw05", "avlxsw06", "avlxsw07", "avlxsw08", "avlxsw09", "avlxsw10", "avlxsw11"]
+	},
+	"templateSet113":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcf0", "AVXcf1", "AVXcf2", "AVXcf3", "AVXcf4", "AVXcf5", "AVXcf6", "AVXcf7"]
+	},
+	"templateSet114":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcg1", "AVXcg2", "AVXcg3", "AVXcg4", "AVXcg5", "AVXcg6", "AVXcg7"]
+	},
+	"templateSet115":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXef0", "AVXef1", "AVXef2", "AVXef3", "AVXef4", "AVXef5", "AVXef6", "AVXef7"]
+	},
+	"templateSet116":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXff0", "AVXff1", "AVXff2", "AVXff3", "AVXff4", "AVXff5", "AVXff6", "AVXff7"]
+	},
+	"templateSet117":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXhg0", "AVXhg1", "AVXhg2", "AVXhg3", "AVXhg4", "AVXhg5", "AVXhg6", "AVXhg7"]
+	},
+	"templateSet118":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXlp0", "AVXlp1", "AVXlp2", "AVXlp3", "AVXlp4", "AVXlp5", "AVXlp6", "AVXlp7"]
+	},
+	"templateSet119":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmc0", "AVXmc1", "AVXmc2", "AVXmc3", "AVXmc4", "AVXmc5", "AVXmc6", "AVXmc7"]
+	},
+	"templateSet120":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmp1", "AVXmp2", "AVXmp3", "AVXmp4", "AVXmp5", "AVXmp6", "AVXmp7"]
+	},
+	"templateSet121":{
+		"biome":{
+			"terrain" : "swamp",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXrk0", "AVXrk1", "AVXrk2", "AVXrk3", "AVXrk4", "AVXrk5", "AVXrk6", "AVXrk7"]
+	},
+	"templateSet122":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcrsd0"]
+	},
+	"templateSet123":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXplns0"]
+	},
+	"templateSet124":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLca1r0", "AVLca2r0"]
+	},
+	"templateSet125":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLglly0"]
+	},
+	"templateSet126":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLct1r0", "AVLct2r0", "AVLct3r0", "AVLct4r0", "AVLct5r0", "AVLct6r0", "AVLct7r0", "AVLct8r0", "AVLct9r0", "AVLctrr0"]
+	},
+	"templateSet127":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLholr0"]
+	},
+	"templateSet128":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "plant"
+		},
+		"templates" : ["AvLdlog"]
+	},
+	"templateSet129":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLmd1r0", "AVLmd2r0", "AVLmd3r0"]
+	},
+	"templateSet130":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "mountain"
+		},
+		"templates" : ["avlmtrf1", "avlmtrf2", "avlmtrf3", "avlmtrf4", "avlmtrf5", "avlmtrf6"]
+	},
+	"templateSet131":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLoc1r0", "AVLoc2r0", "AVLoc3r0", "AVLoc4r0"]
+	},
+	"templateSet133":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "rock"
+		},
+		"templates" : ["avlbuzr0", "AVLr02r0", "AVLr03r0", "AVLr04r0", "AVLr06r0", "AVLr07r0", "AVLr08r0", "AVLr09r0", "AVLr10r0", "AVLr11r0", "AVLr12r0", "AVLr13r0", "AVLr14r0", "AVLr15r0", "AvLRR01", "AvLRR05"]
+	},
+	"templateSet134":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLsh1r0", "AVLsh2r0", "AVLsh3r0", "avlsh4r0", "avlsh5r0", "avlsh6r0", "avlsh7r0", "avlsh8r0", "avlsh9r0"]
+	},
+	"templateSet135":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "animal"
+		},
+		"templates" : ["AVLskul0"]
+	},
+	"templateSet136":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "plant"
+		},
+		"templates" : ["AvLStm1", "AvLStm2", "AvLStm3"]
+	},
+	"templateSet137":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLroug0", "AVLroug1", "AVLroug2", "AVLyuc10", "AVLyuc20", "AVLyuc30"]
+	},
+	"templateSet138":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLlk1r"]
+	},
+	"templateSet139":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLtRo00", "AVLtRo01", "AVLtRo02", "AVLtRo03", "AVLtRo04", "AVLtRo05", "AVLtRo06", "AVLtRo07", "AVLtRo08", "AVLtRo09", "AVLtRo10", "AVLtRo11", "AVLtRo12", "AVLtrRo0", "AVLtrRo1", "AVLtrRo2", "AVLtrRo3", "AVLtrRo4", "AVLtrRo5", "AVLtrRo6", "AVLtrRo7"]
+	},
+	"templateSet140":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["avlxro01", "avlxro02", "avlxro03", "avlxro04", "avlxro05", "avlxro06", "avlxro07", "avlxro08", "avlxro09", "avlxro10", "avlxro11", "avlxro12"]
+	},
+	"templateSet141":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcf0", "AVXcf1", "AVXcf2", "AVXcf3", "AVXcf4", "AVXcf5", "AVXcf6", "AVXcf7"]
+	},
+	"templateSet142":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcg1", "AVXcg2", "AVXcg3", "AVXcg4", "AVXcg5", "AVXcg6", "AVXcg7"]
+	},
+	"templateSet143":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXef0", "AVXef1", "AVXef2", "AVXef3", "AVXef4", "AVXef5", "AVXef6", "AVXef7"]
+	},
+	"templateSet144":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXff0", "AVXff1", "AVXff2", "AVXff3", "AVXff4", "AVXff5", "AVXff6", "AVXff7"]
+	},
+	"templateSet145":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXhg0", "AVXhg1", "AVXhg2", "AVXhg3", "AVXhg4", "AVXhg5", "AVXhg6", "AVXhg7"]
+	},
+	"templateSet146":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXlp0", "AVXlp1", "AVXlp2", "AVXlp3", "AVXlp4", "AVXlp5", "AVXlp6", "AVXlp7"]
+	},
+	"templateSet147":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmc0", "AVXmc1", "AVXmc2", "AVXmc3", "AVXmc4", "AVXmc5", "AVXmc6", "AVXmc7"]
+	},
+	"templateSet148":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmp1", "AVXmp2", "AVXmp3", "AVXmp4", "AVXmp5", "AVXmp6", "AVXmp7"]
+	},
+	"templateSet149":{
+		"biome":{
+			"terrain" : "rough",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXrk0", "AVXrk1", "AVXrk2", "AVXrk3", "AVXrk4", "AVXrk5", "AVXrk6", "AVXrk7"]
+	},
+	"templateSet150":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcrsd0"]
+	},
+	"templateSet151":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXplns0"]
+	},
+	"templateSet152":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLct1u0", "AVLct2u0", "AVLct3u0", "AVLct4u0", "AVLct5u0"]
+	},
+	"templateSet153":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLdead0", "AVLdead1", "AVLdead2", "AVLdead3", "AVLdead4", "AVLdead5", "AVLdead6", "AVLdead7"]
+	},
+	"templateSet154":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLholx0"]
+	},
+	"templateSet155":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLlk1u0", "AVLlk2u0", "AVLlk3u0"]
+	},
+	"templateSet156":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLlv1u0", "AVLlv2u0", "AVLlv3u0"]
+	},
+	"templateSet157":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLllk10", "AVLllk20"]
+	},
+	"templateSet158":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "plant"
+		},
+		"templates" : ["AVLms010", "AVLms020", "AVLms030", "AVLms040", "AVLms050", "AVLms060", "AVLms070", "AVLms080", "AVLms090", "AVLms100", "AVLms110", "AVLms120"]
+	},
+	"templateSet159":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "mountain"
+		},
+		"templates" : ["AVLmtsb0", "AVLmtsb1", "AVLmtsb2", "AVLmtsb3", "AVLmtsb4", "AVLmtsb5"]
+	},
+	"templateSet160":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLoc1u0", "AVLoc2u0", "AVLoc3u0", "AVLoc4u0"]
+	},
+	"templateSet162":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLr01u0", "AVLr02u0", "AVLr03u0", "AVLr04u0", "AVLr05u0", "AVLr06u0", "AVLr07u0", "AVLr08u0", "AVLr09u0", "AVLr10u0", "AVLr11u0", "AVLr12u0", "AVLr13u0", "AVLr14u0", "AVLr15u0", "AVLr16u0", "AVLstg10", "AVLstg20", "AVLstg30", "AVLstg40", "AVLstg50", "AVLstg60"]
+	},
+	"templateSet163":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["avlxsu01", "avlxsu02", "avlxsu03", "avlxsu04", "avlxsu05", "avlxsu06", "avlxsu07", "avlxsu08", "avlxsu09", "avlxsu10", "avlxsu11", "avlxsu12"]
+	},
+	"templateSet164":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcf0", "AVXcf1", "AVXcf2", "AVXcf3", "AVXcf4", "AVXcf5", "AVXcf6", "AVXcf7"]
+	},
+	"templateSet165":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcg1", "AVXcg2", "AVXcg3", "AVXcg4", "AVXcg5", "AVXcg6", "AVXcg7"]
+	},
+	"templateSet166":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXef0", "AVXef1", "AVXef2", "AVXef3", "AVXef4", "AVXef5", "AVXef6", "AVXef7"]
+	},
+	"templateSet167":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXff0", "AVXff1", "AVXff2", "AVXff3", "AVXff4", "AVXff5", "AVXff6", "AVXff7"]
+	},
+	"templateSet168":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXhg0", "AVXhg1", "AVXhg2", "AVXhg3", "AVXhg4", "AVXhg5", "AVXhg6", "AVXhg7"]
+	},
+	"templateSet169":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXlp0", "AVXlp1", "AVXlp2", "AVXlp3", "AVXlp4", "AVXlp5", "AVXlp6", "AVXlp7"]
+	},
+	"templateSet170":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmc0", "AVXmc1", "AVXmc2", "AVXmc3", "AVXmc4", "AVXmc5", "AVXmc6", "AVXmc7"]
+	},
+	"templateSet171":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmp1", "AVXmp2", "AVXmp3", "AVXmp4", "AVXmp5", "AVXmp6", "AVXmp7"]
+	},
+	"templateSet172":{
+		"biome":{
+			"terrain" : "subterra",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXrk0", "AVXrk1", "AVXrk2", "AVXrk3", "AVXrk4", "AVXrk5", "AVXrk6", "AVXrk7"]
+	},
+	"templateSet173":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcrsd0"]
+	},
+	"templateSet174":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXplns0"]
+	},
+	"templateSet175":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "crater"
+		},
+		"templates" : ["AVLc10l0", "AVLc11l0", "AVLc12l0", "AVLc13l0", "AVLc14l0", "AVLct1l0", "AVLct2l0", "AVLct3l0", "AVLct4l0", "AVLct5l0", "AVLct6l0", "AVLct7l0", "AVLct8l0", "AVLct9l0", "AVLctrl0"]
+	},
+	"templateSet176":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLdead0", "AVLdead1", "AVLdead2", "AVLdead3", "AVLdead4", "AVLdead5", "AVLdead6", "AVLdead7"]
+	},
+	"templateSet177":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVLholl0"]
+	},
+	"templateSet178":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLlav20", "AVLlav30", "AVLlav40", "AVLlav50", "AVLlav60", "AVLlav70", "AVLlav80", "AVLlav90", "AVLlv100", "AVLlv110", "AVLlv120", "AVLlv130", "AVLlv140", "AVLlv150", "AVLlv160", "AVLlv170", "AVLlv180", "AVLlv190", "AVLlv200", "AVLlv210", "AVLlv220", "AVLlv230", "AVLlv240", "AVLlv250", "AVLlv260"]
+	},
+	"templateSet179":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "lake"
+		},
+		"templates" : ["AVLlav10"]
+	},
+	"templateSet180":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "mountain"
+		},
+		"templates" : ["AVLmtvo1", "AVLmtvo2", "AVLmtvo3", "AVLmtvo4", "AVLmtvo5", "AVLmtvo6"]
+	},
+	"templateSet182":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "mountain"
+		},
+		"templates" : ["AVLvol10", "AVLvol20", "AVLvol30", "AVLvol40", "AVLvol50"]
+	},
+	"templateSet183":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcf0", "AVXcf1", "AVXcf2", "AVXcf3", "AVXcf4", "AVXcf5", "AVXcf6", "AVXcf7"]
+	},
+	"templateSet184":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXcg1", "AVXcg2", "AVXcg3", "AVXcg4", "AVXcg5", "AVXcg6", "AVXcg7"]
+	},
+	"templateSet185":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXef0", "AVXef1", "AVXef2", "AVXef3", "AVXef4", "AVXef5", "AVXef6", "AVXef7"]
+	},
+	"templateSet186":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXff0", "AVXff1", "AVXff2", "AVXff3", "AVXff4", "AVXff5", "AVXff6", "AVXff7"]
+	},
+	"templateSet187":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXhg0", "AVXhg1", "AVXhg2", "AVXhg3", "AVXhg4", "AVXhg5", "AVXhg6", "AVXhg7"]
+	},
+	"templateSet188":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXlp0", "AVXlp1", "AVXlp2", "AVXlp3", "AVXlp4", "AVXlp5", "AVXlp6", "AVXlp7"]
+	},
+	"templateSet189":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmc0", "AVXmc1", "AVXmc2", "AVXmc3", "AVXmc4", "AVXmc5", "AVXmc6", "AVXmc7"]
+	},
+	"templateSet190":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXmp1", "AVXmp2", "AVXmp3", "AVXmp4", "AVXmp5", "AVXmp6", "AVXmp7"]
+	},
+	"templateSet191":{
+		"biome":{
+			"terrain" : "lava",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXrk0", "AVXrk1", "AVXrk2", "AVXrk3", "AVXrk4", "AVXrk5", "AVXrk6", "AVXrk7"]
+	},
+	"templateSet192":{
+		"biome":{
+			"terrain" : "water",
+			"objectType" : "tree"
+		},
+		"templates" : ["AVLklp10", "AVLklp20"]
+	},
+	"templateSet193":{
+		"biome":{
+			"terrain" : "water",
+			"objectType" : "rock"
+		},
+		"templates" : ["AVLrk1w0", "AVLrk2w0", "AVLrk3w0", "AVLrk4w0"]
+	},
+	"templateSet194":{
+		"biome":{
+			"terrain" : "water",
+			"objectType" : "mountain"
+		},
+		"templates" : ["AVLref10", "AVLref20", "AVLref30", "AVLref40", "AVLref50", "AVLref60"]
+	},
+	"templateSet195":{
+		"biome":{
+			"terrain" : "water",
+			"objectType" : "other"
+		},
+		"templates" : ["AVXfw0", "AVXfw1", "AVXfw2", "AVXfw3", "AVXfw4", "AVXfw5", "AVXfw6", "AVXfw7"]
+	}
+}

+ 5 - 0
config/gameConfig.json

@@ -67,6 +67,11 @@
 		"config/objects/witchHut.json"
 	],
 
+	"biomes" :
+	[
+		"config/biomes.json"
+	],
+
 	"artifacts" :
 	[
 		"config/artifacts.json"

+ 31 - 0
config/schemas/biome.json

@@ -0,0 +1,31 @@
+{
+	"type" : "object",
+	"$schema" : "http://json-schema.org/draft-04/schema",
+	"title" : "VCMI map obstacle set format",
+	"description" : "Description of map object set, used only as sub-schema of object",
+	"required" : ["biome", "templates"],
+	"additionalProperties" : true, // may have type-dependant properties
+	"properties" : {
+		"biome" : {
+			"type" : "object",
+			"properties": {
+				"objectType" : {
+					"type" : "string",
+					"enmum": ["mountain", "tree", "lake", "crater", "rock", "plant", "structure", "animal", "other"],
+					"description" : "Type of the obstacle set"
+				},
+				"terrain" : {
+					// TODO: Allow multiple terrains
+					"type" : "string",
+					"description" : "Terrain of the obstacle set"
+				}
+			}
+		},
+		"templates" : {
+			"type" : "array",
+			"items" : { "type" : "string" },
+			"description" : "Object templates of the obstacle set"
+		}
+	}
+}
+

+ 1 - 0
lib/constants/EntityIdentifiers.h

@@ -482,6 +482,7 @@ public:
 		OUTCROPPING = 136,
 		PINE_TREES = 137,
 		PLANT = 138,
+		RIVER_DELTA = 143,
 		ROCK = 147,
 		SAND_DUNE = 148,
 		SAND_PIT = 149,

+ 5 - 32
lib/mapObjectConstructors/CObjectClassesHandler.cpp

@@ -108,7 +108,9 @@ std::vector<JsonNode> CObjectClassesHandler::loadLegacyData()
 	auto totalNumber = static_cast<size_t>(parser.readNumber()); // first line contains number of objects to read and nothing else
 	parser.endLine();
 
-	std::map<TerrainId, std::map<MapObjectID, std::map<MapObjectSubID, ObstacleSet>>> obstacleSets;
+	//std::map<TerrainId, std::map<MapObjectID, std::map<MapObjectSubID, ObstacleSet>>> obstacleSets;
+
+	// TODO: Create map defName -> tmpl
 
 	for (size_t i = 0; i < totalNumber; i++)
 	{
@@ -120,43 +122,14 @@ std::vector<JsonNode> CObjectClassesHandler::loadLegacyData()
 		std::pair key(tmpl->id, tmpl->subid);
 		legacyTemplates.insert(std::make_pair(key, tmpl));
 
-		// Populate ObstacleSetHandler on our way
 		if (!tmpl->isVisitable())
 		{
-			// Create obstacle sets. Group by terrain for now
-
-			for (auto terrain : tmpl->getAllowedTerrains())
-			{
-				auto &obstacleMap = obstacleSets[terrain][tmpl->id];
-				auto it = obstacleMap.find(tmpl->subid);
-				if (it == obstacleMap.end())
-				{
-					// FIXME: This means this set will be available only on one terrain
-					auto type = VLC->biomeHandler->convertObstacleClass(tmpl->id);
-					auto newIt = obstacleMap.insert(std::make_pair(tmpl->subid, ObstacleSet(type, terrain)));
-					newIt.first->second.addObstacle(tmpl);
-				}
-				else
-				{
-					it->second.addObstacle(tmpl);
-				}
-			}
-		}
-	}
-
-	size_t count = 0;
-	for (auto terrain : obstacleSets)
-	{
-		for (auto obstacleType : terrain.second)
-		{
-			for (auto obstacleSet : obstacleType.second)
+			if (tmpl->id != Obj::RIVER_DELTA)
 			{
-				VLC->biomeHandler->addObstacleSet(obstacleSet.second);
-				count++;
+				VLC->biomeHandler->addTemplate("core", tmpl->stringID, tmpl);
 			}
 		}
 	}
-	logGlobal->info("Obstacle sets loaded: %d", count);
 
 	objects.resize(256);
 

+ 2 - 2
lib/mapObjectConstructors/CommonConstructors.cpp

@@ -64,10 +64,10 @@ void CObstacleConstructor::afterLoadFinalization()
 		// For now assume that all templates are from the same biome
 		for (auto terrain : terrains)
 		{
-			ObstacleSet os(obstacleType, terrain);
+			std::shared_ptr<ObstacleSet> os = std::make_shared<ObstacleSet>(obstacleType, terrain);
 			for (auto tmpl : templates)
 			{
-				os.addObstacle(tmpl);
+				os->addObstacle(tmpl);
 			}
 			VLC->biomeHandler->addObstacleSet(os);
 			logGlobal->info("Loaded obstacle set from mod %s, terrain: %s", getJsonKey(), terrain.encode(terrain.getNum()));

+ 135 - 3
lib/mapObjects/ObstacleSetHandler.cpp

@@ -11,8 +11,16 @@
 #include "StdInc.h"
 #include "ObstacleSetHandler.h"
 
+#include "../modding/IdentifierStorage.h"
+
 VCMI_LIB_NAMESPACE_BEGIN
 
+ObstacleSet::ObstacleSet():
+	type(INVALID),
+	terrain(TerrainId::NONE)
+{
+}
+
 ObstacleSet::ObstacleSet(EObstacleType type, TerrainId terrain):
 	type(type),
 	terrain(terrain)
@@ -51,11 +59,21 @@ TerrainId ObstacleSet::getTerrain() const
 	return terrain;
 }
 
+void ObstacleSet::setTerrain(TerrainId terrain)
+{
+	this->terrain = terrain;
+}
+
 ObstacleSet::EObstacleType ObstacleSet::getType() const
 {
 	return type;
 }
 
+void ObstacleSet::setType(EObstacleType type)
+{
+	this->type = type;
+}
+
 std::vector<std::shared_ptr<const ObjectTemplate>> ObstacleSet::getObstacles() const
 {
 	return obstacles;
@@ -139,14 +157,128 @@ ObstacleSet::EObstacleType ObstacleSet::typeFromString(const std::string &str)
 	throw std::runtime_error("Invalid obstacle type: " + str);
 }
 
+std::string ObstacleSet::toString() const
+{
+	static const std::map<EObstacleType, std::string> OBSTACLE_TYPE_STRINGS =
+	{
+		{MOUNTAINS, "mountain"},
+		{TREES, "tree"},
+		{LAKES, "lake"},
+		{CRATERS, "crater"},
+		{ROCKS, "rock"},
+		{PLANTS, "plant"},
+		{STRUCTURES, "structure"},
+		{ANIMALS, "animal"},
+		{OTHER, "other"}
+	};
+
+	return OBSTACLE_TYPE_STRINGS.at(type);
+}
+
 std::vector<ObstacleSet::EObstacleType> ObstacleSetFilter::getAllowedTypes() const
 {
 	return allowedTypes;
 }
 
-void ObstacleSetHandler::addObstacleSet(const ObstacleSet &os)
+std::vector<JsonNode> ObstacleSetHandler::loadLegacyData()
+{
+	// TODO: Where to load objects.json?
+	return {};
+}
+
+void ObstacleSetHandler::loadObject(std::string scope, std::string name, const JsonNode & data)
+{
+	auto os = loadFromJson(scope, data, name, biomes.size());
+	if(os)
+	{
+		addObstacleSet(os);
+	}
+	else
+	{
+		logMod->error("Failed to load obstacle set: %s", name);
+	}
+	// TODO: Define some const array of object types ("biome" etc.)
+	VLC->identifiersHandler->registerObject(scope, "biome", name, biomes.back()->id);
+}
+
+void ObstacleSetHandler::loadObject(std::string scope, std::string name, const JsonNode & data, size_t index)
+{
+	assert(objects.at(index) == nullptr); // ensure that this id was not loaded before
+
+	auto os = loadFromJson(scope, data, name, index);
+	if(os)
+	{
+		addObstacleSet(os);
+	}
+	else
+	{
+		logMod->error("Failed to load obstacle set: %s", name);
+	}
+	// TODO: 
+	VLC->identifiersHandler->registerObject(scope, "biome", name, biomes.at(index)->id);
+}
+
+std::shared_ptr<ObstacleSet> ObstacleSetHandler::loadFromJson(const std::string & scope, const JsonNode & json, const std::string & name, size_t index)
+{
+	auto os = std::make_shared<ObstacleSet>();
+
+	// TODO: Register ObstacleSet by its name
+
+	auto biome = json["biome"].Struct();
+	os->setType(ObstacleSet::typeFromString(biome["objectType"].String()));
+
+	auto terrainName = biome["terrain"].String();
+
+	VLC->identifiers()->requestIdentifier(scope, "terrain", terrainName, [this, os](si32 id)
+	{
+		os->setTerrain(TerrainId(id));
+	});
+
+	auto templates = json["templates"].Vector();
+	for (const auto & node : templates)
+	{
+		// TODO: We need to store all the templates by their name
+		// TODO: We need to store all the templates by their id
+
+		logGlobal->info("Registering obstacle template: %s", node.String());
+		/*
+		FIXME:
+		Warning: identifier AVXplns0 is not in camelCase!
+		registered biome.templateSet1 as core:1701602145
+		*/
+
+		VLC->identifiers()->requestIdentifier(scope, "obstacleTemplate", node.String(), [this, os](si32 id)
+		{
+			logGlobal->info("Resolved obstacle id: %d", id);
+			os->addObstacle(obstacleTemplates[id]);
+		});
+	}
+
+	return os;
+}
+
+void ObstacleSetHandler::addTemplate(const std::string & scope, const std::string &name, std::shared_ptr<const ObjectTemplate> tmpl)
+{
+	auto id = obstacleTemplates.size();
+
+	auto strippedName = name;
+	auto pos = strippedName.find(".def");
+	if(pos != std::string::npos)
+		strippedName.erase(pos, 4);
+
+	// TODO: Consider converting to lowercase?
+	// Save by name
+	VLC->identifiersHandler->registerObject(scope, "obstacleTemplate", strippedName, id);
+
+	// Index by id
+	obstacleTemplates[id] = tmpl;
+}
+
+void ObstacleSetHandler::addObstacleSet(std::shared_ptr<ObstacleSet> os)
 {
-	obstacleSets[os.getType()].push_back(os);
+	// TODO: Allow to refer to existing obstacle set by its id (name)
+	obstacleSets[os->getType()].push_back(os);
+	biomes.push_back(os);
 }
 
 TObstacleTypes ObstacleSetHandler::getObstacles( const ObstacleSetFilter &filter) const
@@ -160,7 +292,7 @@ TObstacleTypes ObstacleSetHandler::getObstacles( const ObstacleSetFilter &filter
 		{
 			for (const auto &os : it->second)
 			{
-				if (filter.filter(os))
+				if (filter.filter(*os))
 				{
 					result.push_back(os);
 				}

+ 21 - 7
lib/mapObjects/ObstacleSetHandler.h

@@ -37,15 +37,22 @@ public:
 		ANIMALS, // Living, or bones
 		OTHER // Crystals, shipwrecks, barrels, etc.
 	};
+	ObstacleSet();
 	explicit ObstacleSet(EObstacleType type, TerrainId terrain);
 
 	void addObstacle(std::shared_ptr<const ObjectTemplate> obstacle);
 	std::vector<std::shared_ptr<const ObjectTemplate>> getObstacles() const;
 
 	EObstacleType getType() const;
+	void setType(EObstacleType type);
+
 	TerrainId getTerrain() const;
+	void setTerrain(TerrainId terrain);
 
 	static EObstacleType typeFromString(const std::string &str);
+	std::string toString() const;
+
+	si32 id;
 
 private:
 	EObstacleType type;
@@ -53,7 +60,7 @@ private:
 	std::vector<std::shared_ptr<const ObjectTemplate>> obstacles;
 };
 
-typedef std::vector<ObstacleSet> TObstacleTypes;
+typedef std::vector<std::shared_ptr<ObstacleSet>> TObstacleTypes;
 
 class DLL_LINKAGE ObstacleSetFilter
 {
@@ -80,22 +87,29 @@ public:
 	ObstacleSetHandler() = default;
 	~ObstacleSetHandler() = default;
 
-	// FIXME: Not needed at all
-	std::vector<JsonNode> loadLegacyData() override {return {};};
-	virtual void loadObject(std::string scope, std::string name, const JsonNode & data) override {};
-	virtual void loadObject(std::string scope, std::string name, const JsonNode & data, size_t index) override {};
+	std::vector<JsonNode> loadLegacyData() override;
+	virtual void loadObject(std::string scope, std::string name, const JsonNode & data) override;
+	virtual void loadObject(std::string scope, std::string name, const JsonNode & data, size_t index) override;
+	std::shared_ptr<ObstacleSet> loadFromJson(const std::string & scope, const JsonNode & json, const std::string & name, size_t index);
 
 	ObstacleSet::EObstacleType convertObstacleClass(MapObjectID id);
 
 	// TODO: Populate obstacleSets with all the obstacle sets from the game data
+	void addTemplate(const std::string & scope, const std::string &name, std::shared_ptr<const ObjectTemplate> tmpl);
 
-	void addObstacleSet(const ObstacleSet &set);
+	void addObstacleSet(std::shared_ptr<ObstacleSet> set);
 	
 	TObstacleTypes getObstacles(const ObstacleSetFilter &filter) const;
 
 private:
 
-	std::map<ObstacleSet::EObstacleType, std::vector<ObstacleSet>> obstacleSets;
+	std::vector< std::shared_ptr<ObstacleSet> > biomes;
+
+	// TODO: Serialize?
+	std::map<si32, std::shared_ptr<const ObjectTemplate>> obstacleTemplates;
+
+		// FIXME: Store pointers?
+		std::map<ObstacleSet::EObstacleType, std::vector<std::shared_ptr<ObstacleSet>>> obstacleSets;
 };
 
 VCMI_LIB_NAMESPACE_END

+ 6 - 4
lib/mapping/ObstacleProxy.cpp

@@ -58,7 +58,9 @@ bool ObstacleProxy::prepareBiome(TerrainId terrain, CRandomGenerator & rand)
 
 	possibleObstacles.clear();
 
-	std::vector<ObstacleSet> obstacleSets;
+	// TODO: Move this logic to ObstacleSetHandler
+
+	std::vector<std::shared_ptr<ObstacleSet>> obstacleSets;
 
 	size_t selectedSets = 0;
 	const size_t MINIMUM_SETS = 6;
@@ -103,7 +105,7 @@ bool ObstacleProxy::prepareBiome(TerrainId terrain, CRandomGenerator & rand)
 		selectedSets++;
 
 		// TODO: Convert to string
-		logGlobal->info("Added large set of type %s", obstacleSets.back().getType());
+		logGlobal->info("Added large set of type %s", obstacleSets.back()->getType());
 	}
 
 	TObstacleTypes rockSets = VLC->biomeHandler->getObstacles(ObstacleSetFilter(ObstacleSet::EObstacleType::ROCKS, terrain));
@@ -152,7 +154,7 @@ bool ObstacleProxy::prepareBiome(TerrainId terrain, CRandomGenerator & rand)
 			smallObstacleSets.pop_back();
 			selectedSets++;
 			smallSets--;
-			logGlobal->info("Added small set of type %s", obstacleSets.back().getType());
+			logGlobal->info("Added small set of type %s", obstacleSets.back()->getType());
 		}
 		else if(otherSets.empty())
 		{
@@ -183,7 +185,7 @@ bool ObstacleProxy::prepareBiome(TerrainId terrain, CRandomGenerator & rand)
 		obstaclesBySize.clear();
 		for (const auto & os : obstacleSets)
 		{
-			for (const auto & temp : os.getObstacles())
+			for (const auto & temp : os->getObstacles())
 			{
 				if(temp->getBlockMapOffset().valid())
 				{

+ 2 - 1
lib/modding/ContentTypeHandler.cpp

@@ -26,6 +26,7 @@
 #include "../IHandlerBase.h"
 #include "../Languages.h"
 #include "../ObstacleHandler.h"
+#include "../mapObjects/ObstacleSetHandler.h"
 #include "../RiverHandler.h"
 #include "../RoadHandler.h"
 #include "../ScriptHandler.h"
@@ -207,7 +208,7 @@ void CContentHandler::init()
 	handlers.insert(std::make_pair("rivers", ContentTypeHandler(VLC->riverTypeHandler.get(), "river")));
 	handlers.insert(std::make_pair("roads", ContentTypeHandler(VLC->roadTypeHandler.get(), "road")));
 	handlers.insert(std::make_pair("obstacles", ContentTypeHandler(VLC->obstacleHandler.get(), "obstacle")));
-	//TODO: any other types of moddables?
+	handlers.insert(std::make_pair("biomes", ContentTypeHandler(VLC->biomeHandler.get(), "biome")));
 }
 
 bool CContentHandler::preloadModData(const std::string & modName, JsonNode modConfig, bool validate)