安装 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(越南语)
Українська(乌克兰语)
报告翻译问题
Oddly, it works for some ThingDefs that it finds, but eventually errors, you can see this in the log files.
Here is the full log, the relevant part (I think) starts at the line 341:
https://gist.github.com/HugsLibRecordKeeper/434e6f7cbecf24706c37387f20ca3ebd
Here is the full operation that I am using.
https://pastebin.com/yhCeXzbV
The game will load to a black screen and be unplayable. It started when XmlExtensions was updated this morning.
Taranchuk said it may be Argon's mod. It did start with today's XmlExtensions updated.
Issue happens for me only when XmlExtensions, Expanded Materials - Plastics and Expanded Materials - Metals (either normal or lite) are loaded together. both Expanded Materials mods are by Argon. Removing any one of the 3 resolves the issue. Issue shows when they + Harmony are the only 4 mods loaded.
I have the GOG version of Rimworld so can't post in the Workshop comments.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
Verse.XmlInheritance:CheckForDuplicateNodes (System.Xml.XmlNode,System.Xml.XmlNode)
Verse.XmlInheritance:ResolveXmlNodeFor (Verse.XmlInheritance/XmlInheritanceNode)
Verse.XmlInheritance:ResolveXmlNodesRecursively (Verse.XmlInheritance/XmlInheritanceNode)
Verse.XmlInheritance:ResolveXmlNodesRecursively (Verse.XmlInheritance/XmlInheritanceNode)
Verse.XmlInheritance:ResolveXmlNodes ()
Verse.XmlInheritance:Resolve ()
(wrapper dynamic-method) Verse.LoadedModManager:Verse.LoadedModManager.ParseAndProcessXML_Patch3 (System.Xml.XmlDocument,System.Collections.Generic.Dictionary`2<System.Xml.XmlNode, Verse.LoadableXmlAsset>)
Verse.LoadedModManager:LoadAllActiveMods ()
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:<Start>b__6_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()
I am the developer of the "kemomimilike" mod and with the help of your mod I was trying to make an autopatcher that will whitelist all the clothes that have no texture (no rendering while wearing) on my humanoid race, but I ran into a problem. The fact is that the autopatcher reaches the (conditionally) sixth item of clothing and gives an error.
What the patcher XML code looks like (almost completely as in the example of the autopatcher)
<Operation Class="XmlExtensions.ForEach">
<xpath>Defs/ThingDef/apparel/wornGraphicPath</xpath>
<storeIn>ApparelDef</storeIn>
<apply>
<Operation Class="XmlExtensions.CreateVariable">
<value>{ApparelDef}/defName</value>
<storeIn>defName</storeIn>
<apply>
<Operation Class="PatchOperationAdd">
<xpath>/Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Valkyrie_WVC"]/alienRace/raceRestriction/blackApparelList</xpath>
<value>
<li>{defName}</li>
</value>
</Operation>
</apply>
</Operation>
</apply>
</Operation>
(This is an attempt with a blacklist, with a whitelist the same)
The error that is issued (there are about 60 of them differ only in numbers in brackets)
Could not resolve cross-reference to Verse.ThingDef named Defs/ThingDef[417]/defName (wanter=blackApparelList)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.DirectXmlCrossRefLoader:TryResolveDef<Verse.ThingDef> (string,Verse.FailMode,object)
Verse.DirectXmlCrossRefLoader/WantedRefForList`1<Verse.ThingDef>:TryResolve (Verse.FailMode)
Verse.DirectXmlCrossRefLoader/<>c__DisplayClass15_1:<ResolveAllWantedCrossReferences>b__0 (Verse.DirectXmlCrossRefLoader/WantedRef)
Verse.GenThreading/<>c__DisplayClass7_1`1<Verse.DirectXmlCrossRefLoader/WantedRef>:<ParallelForEach>b__0 (object)
System.Threading.QueueUserWorkItemCallback:WaitCallback_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.QueueUserWorkItemCallback:System.Threading.IThreadPoolWorkItem.ExecuteWorkItem ()
System.Threading.ThreadPoolWorkQueue:Dispatch ()
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
Then I decided to check and tried this.
<Operation Class="XmlExtensions.ForEach">
<xpath>Defs/ThingDef/apparel/wornGraphicPath</xpath>
<storeIn>path</storeIn>
<apply>
<Operation Class="XmlExtensions.CreateVariable">
<value>{path}/defName</value>
<storeIn>defName</storeIn>
<apply>
<Operation Class="XmlExtensions.Log">
<xpath>{defName}</xpath>
</Operation>
</apply>
</Operation>
</apply>
</Operation>
And I got this
<defName>Apparel_CowboyHat</defName>
<defName>Apparel_BowlerHat</defName>
<defName>Apparel_TribalHeaddress</defName>
<defName>Apparel_Tuque</defName>
<defName>Apparel_WarMask</defName>
<defName>Apparel_WarVeil</defName>
<defName>Apparel_SimpleHelmet</defName>
<defName>Apparel_AdvancedHelmet</defName>
[kemomimilike - Start of stack trace]
XmlExtensions.Log(xpath='Defs/ThingDef[425]/defName'): Failed to find a node referenced by <xpath>
XmlExtensions.CreateVariable(storeIn='defName', value='Defs/ThingDef[425]/defName', value2=''): Error in <apply> in the operation at position=1
XmlExtensions.ForEach(path='Defs/ThingDef[425]', xpath='Defs/ThingDef/apparel/wornGraphicPath'): Error in <apply> in the operation at position=1
XmlExtensions.OptionalPatch(key='Valkyries_ApparelsExperimental_Checker_WVC', defaultValue='false'): Error in <caseTrue> in the operation at position=1
XmlExtensions.OptionalPatch(key='DisableGirls_Humanoids_WVC', defaultValue='true'): Error in <caseFalse> in the operation at position=7
Verse.PatchOperationSequence: Error in the operation at position=1
[End of stack trace]
If I understood correctly, then this will not work for what I wanted to do. Or is it a bug?
For "PatchOperationAdd"
[kemomimilike - Start of stack trace]
XmlExtensions.CreateVariable(storeIn='defName', value='Defs/ThingDef[425]/defName', value2=''): Failed to find a node referenced by <value>
XmlExtensions.ForEach(ApparelDef='Defs/ThingDef[425]', xpath='Defs/ThingDef/apparel/wornGraphicPath'): Error in <apply> in the operation at position=1
XmlExtensions.OptionalPatch(key='Valkyries_ApparelsExperimental_Checker_WVC', defaultValue='false'): Error in <caseTrue> in the operation at position=2
XmlExtensions.OptionalPatch(key='DisableGirls_Humanoids_WVC', defaultValue='true'): Error in <caseFalse> in the operation at position=7
Verse.PatchOperationSequence: Error in the operation at position=1
[End of stack trace]
For "XmlExtensions.Log"
[kemomimilike - Start of stack trace]
XmlExtensions.Log(xpath='Apparel_CowboyHat'): Failed to find a node referenced by <xpath>
XmlExtensions.CreateVariable(storeIn='defName', value='Defs/ThingDef[417]/defName', value2=''): Error in <apply> in the operation at position=1
XmlExtensions.ForEach(path='Defs/ThingDef[417]', xpath='Defs/ThingDef/apparel/wornGraphicPath'): Error in <apply> in the operation at position=1
XmlExtensions.OptionalPatch(key='Valkyries_ApparelsExperimental_Checker_WVC', defaultValue='false'): Error in <caseTrue> in the operation at position=2
XmlExtensions.OptionalPatch(key='DisableGirls_Humanoids_WVC', defaultValue='true'): Error in <caseFalse> in the operation at position=7
Verse.PatchOperationSequence: Error in the operation at position=1
[End of stack trace]
I think I should clarify that this problem occurs only in my case, since the example worked for me. (old version without fromXml)
Since I'm here, I think it's worth mentioning a non-critical bug. Now I will try to explain:
If you try to add to "XmlExtensions.Setting.EmbedMenu" a list of settings with "XmlExtensions.Setting.SplitColumn" or anything similar, you get this error
[Start of stack trace]
XmlExtensions.Setting.SplitColumn: Failed to initialize:
An item with the same key has already been added. Key: System.Collections.Generic.List`1[XmlExtensions.Setting.SettingContainer]
XmlExtensions.SettingsMenuDef(TEST_Settings_GeneralWVC): Error in initializing a setting at position=25
[End of stack trace]
Example:
<li Class="XmlExtensions.Setting.EmbedMenu">
<menu>TEST_Settings_GeneralWVC</menu>
</li>
Contains this:
<li Class="XmlExtensions.Setting.SplitColumn">
<leftCol>
<li Class="XmlExtensions.Setting.Text">
<text>All girls</text>
</li>
<!-- And more settings -->
</leftCol>
<rightCol>
<li Class="XmlExtensions.Setting.Textbox">
<key>girls_tough_wvc</key>
<label> </label>
<defaultValue>0.5</defaultValue>
</li>
<!-- And more settings -->
</rightCol>
</li>
The settings work, it just gives an error.
I solved this problem like this:
<li Class="XmlExtensions.Setting.SplitColumn">
<leftCol>
<li Class="XmlExtensions.Setting.EmbedMenu">
<menu>Settings_General_Damage__TextWVC</menu>
</li>
</leftCol>
<rightCol>
<li Class="XmlExtensions.Setting.EmbedMenu">
<menu>Settings_General_Damage_WVC</menu>
</li>
</rightCol>
</li>