Arop Retim Posted December 3, 2018 Share Posted December 3, 2018 I am working to make the clothes tiered and the properties depending to the tier. But I got a problem. AviatorGoggles and NerdGlasses have a line called "display_value". <!-- unmodded items.xml --> <passive_effect name="CraftingTime" operation="perc_add" value="-.1"/> <display_value name="dCraftingTime" value="-.1"/> I want to change the two lines like this: <passive_effect name="CraftingTime" operation="perc_add" value="-.05,-.2" tier='1,6'/> <display_value name="dCraftingTime" value="-.05,-.2" tier='1,6'/> But this caused an console error because of the comma in the second line when starting the game. I also tried multiple display_value lines. But these caused an error too (key already exists). Is there any way to change the display_value depending on the item tier? Or does someone have a workaround? Link to comment Share on other sites More sharing options...
Deceptive Pastry Posted December 3, 2018 Share Posted December 3, 2018 Loots like you have single quotes (') instead of doubles (") around your added parameters. I don't know if that is causing an issue, but if not...I'm not sure if display_value can take requirements, but you could try something like this: <display_value name="dCraftingTime" value="-.05"> <requirement name="RequirementItemTier" operation="Equals" value="1"/> </display_value> <display_value name="dCraftingTime" value="-.1"> <requirement name="RequirementItemTier" operation="Equals" value="2"/> </display_value> etc. Link to comment Share on other sites More sharing options...
Arop Retim Posted December 3, 2018 Author Share Posted December 3, 2018 Thank you, but both didn't help. output_log snippet from double quotes try: 2018-12-03T22:27:06 107.603 ERR XML loader: Loading and parsing 'items.xml' failed 2018-12-03T22:27:06 107.604 EXC Unknown char: , FormatException: Unknown char: , at StringParsers.ParseDouble (System.String _input, Int32 _startIndex, Int32 _endIndex, NumberStyles _style) [0x00000] in <filename unknown>:0 at StringParsers.ParseFloat (System.String _input, Int32 _startIndex, Int32 _endIndex, NumberStyles _style) [0x00000] in <filename unknown>:0 at EffectDisplayValue.ParseDisplayValue (System.Xml.XmlElement _element) [0x00000] in <filename unknown>:0 at MinEffectGroup.ParseXml (System.Xml.XmlElement _element) [0x00000] in <filename unknown>:0 at MinEffectController.ParseXml (System.Xml.XmlElement _element, .MinEffectController effectControllerToExtend, SourceParentType _type, Int32 _parentPointer) [0x00000] in <filename unknown>:0 at ItemClassesFromXml.parseItem (System.Xml.XmlElement _node) [0x00000] in <filename unknown>:0 at ItemClassesFromXml.CreateItems (.XmlFile _xmlFile) [0x00000] in <filename unknown>:0 at WorldStaticData.LoadItems (.XmlFile _xmlFile) [0x00000] in <filename unknown>:0 at WorldStaticData+<loadSingleXml>c__Iterator1.MoveNext () [0x00000] in <filename unknown>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) Logger:masterLogException(Exception) Logger:Exception(Exception) Log:Exception(Exception) <loadSingleXml>c__Iterator1:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (Filename: Line: -1) output_log snippet from requirements try: 2018-12-03T22:46:44 72.639 ERR XML loader: Loading and parsing 'items.xml' failed 2018-12-03T22:46:44 72.640 EXC An element with the same key already exists in the dictionary. ArgumentException: An element with the same key already exists in the dictionary. at System.Collections.Generic.Dictionary`2[system.String,EffectDisplayValue].Add (System.String key, .EffectDisplayValue value) [0x00000] in <filename unknown>:0 at MinEffectGroup.ParseXml (System.Xml.XmlElement _element) [0x00000] in <filename unknown>:0 at MinEffectController.ParseXml (System.Xml.XmlElement _element, .MinEffectController effectControllerToExtend, SourceParentType _type, Int32 _parentPointer) [0x00000] in <filename unknown>:0 at ItemClassesFromXml.parseItem (System.Xml.XmlElement _node) [0x00000] in <filename unknown>:0 at ItemClassesFromXml.CreateItems (.XmlFile _xmlFile) [0x00000] in <filename unknown>:0 at WorldStaticData.LoadItems (.XmlFile _xmlFile) [0x00000] in <filename unknown>:0 at WorldStaticData+<loadSingleXml>c__Iterator1.MoveNext () [0x00000] in <filename unknown>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) Logger:masterLogException(Exception) Logger:Exception(Exception) Log:Exception(Exception) <loadSingleXml>c__Iterator1:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (Filename: Line: -1) For now I've added a list what tier grands what bonus to the item description. But it's more a makeshift than a solution. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.