安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题
I think it has to do with `<affordances><li>Marsh</li></affordances><affordances><li>VFEM_Moatable</li></affordances>`
The "VFEM_Moatable" must come from this mod, but I don't know what is putting "Marsh"
---
I receive the same errors, and do not have ReGrowth anything installed.
If I remove VFEM (Medieval), it goes away and no errors at all in the debug.
I was fairly certain it's caused by AddTerrainAffordance.xml (in 1.3/patches/) and MoatableTerrain.xml (in 1.3/defs/TerrainListDef/) both referencing "WaterShallow" and "Marsh".
To test this, I removed the references to both of them in MoatableTerrain.xml - but that did not fix it.
I then looked into AddTerrainAffordance, and noticed these two lines:
<Operation Class="PatchOperationAdd">
<xpath>/Defs/TerrainDef[defName="SoftSand" or defName="Sand" or defName="Soil" or defName="Gravel" or defName="MossyTerrain" or defName="MarshyTerrain"]/affordances</xpath>
Then, I noticed:
<Operation Class="PatchOperationAdd">
<xpath>/Defs/TerrainDef[defName="Marsh" or defName="WaterShallow"]</xpath>
In the first, containing defs that do NOT pop this error, I notice the bracket with the conditionals in it is followed by /affordances - but in the two defs that DO pop this error, no /affordances.
I tested my theory by removing the PatchOperationAdd operation and its children, saving a copy, and launching.
It launched with no errors.
I then tested by re-adding the code, but making the behavior match the first patchoperationadd almost exactly...
And it launches with no errors.
Finally, I tested by making the top line:
<xpath>/Defs/TerrainDef[defName="SoftSand" or defName="Sand" or defName="Soil" or defName="Gravel" or defName="MossyTerrain" or defName="MarshyTerrain" or defName="Marsh" or defName="WaterShallow"]/affordances</xpath>
So it takes those two entries in the same patch operation add.
Once again, tested - no errors.
----
Conclusion:
The issue is caused by 1.3\Patches\AddTerrainAffordance.xml having malformed code that patches two terrain defs, Marsh, and WaterShallow, to add the Affordance "VFEM_Moatable".
When this file is processed, it properly patches the other terrain defs referenced in the file, but these two are handled and worded differently in code. As a result, when the system tries to add a SECOND <affordances> XML node, that's when the XML parser throws an error that there is a duplicate <affordances> XML node.
The way the first operation works, it finds the existing <affordances> node, and adds the contents to it properly.
=======
Oskar, please modify 1.3\Patches\AddTerrainAffordance.xml to the following:
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationAdd">
<xpath>/Defs/TerrainDef[defName="SoftSand" or defName="Sand" or defName="Soil" or defName="Gravel" or defName="MossyTerrain" or defName="MarshyTerrain" or defName="Marsh" or defName="WaterShallow"]/affordances</xpath>
<value>
<li>VFEM_Moatable</li>
</value>
</Operation>
</Patch>
This should make VFEM properly 1.3 compliant without giving XML errors.