I was trying the examples in Chrystal Code Palace and examples 6 and 7 don't seem to work. In unity I get:
Assertion failed. Values are not equal. Expected: 2 == 1 UnityEngine.Assertions.Assert:AreEqual(Int32, Int32) Tracery.Parser:ParseAction() (at Assets/Scripts/Tracery/Parser.cs:96) Tracery.Parser:ParseTag() (at Assets/Scripts/Tracery/Parser.cs:163) Tracery.Parser:Parse() (at Assets/Scripts/Tracery/Parser.cs:35) Tracery.Tracery:ParseRule(String) (at Assets/Scripts/Tracery/Tracery.cs:9) Tracery.Grammar:<PushRules>m__1(String) (at Assets/Scripts/Tracery/Grammar.cs:83) System.Linq.Enumerable:ToArray(IEnumerable1)
Tracery.Grammar:PushRules(String, IEnumerable1) (at Assets/Scripts/Tracery/Grammar.cs:83) TraceryGrammar:get_Grammar() (at Assets/Scripts/Tracery/Unity/TraceryGrammar.cs:16) GrammarEditor:OnInspectorGUI() (at Assets/Scripts/Tracery/Unity/GrammarEditor.cs:65) UnityEditor.DockArea:OnGUI()
also:
IndexOutOfRangeException: Array index is out of range. Tracery.Parser.ParseAction () (at Assets/Scripts/Tracery/Parser.cs:99) Tracery.Parser.ParseTag () (at Assets/Scripts/Tracery/Parser.cs:163) Tracery.Parser.Parse () (at Assets/Scripts/Tracery/Parser.cs:35) Tracery.Tracery.ParseRule (System.String rawRule) (at Assets/Scripts/Tracery/Tracery.cs:9) Tracery.Grammar.<PushRules>m__1 (System.String raw) (at Assets/Scripts/Tracery/Grammar.cs:83) System.Linq.Enumerable+<CreateSelectIterator>c__Iterator102[System.String,Tracery.TraceryNode].MoveNext ()
System.Collections.Generic.List1[Tracery.TraceryNode].AddEnumerable (IEnumerable1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128)
System.Collections.Generic.List1[Tracery.TraceryNode]..ctor (IEnumerable1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65)
System.Linq.Enumerable.ToArray[TraceryNode] (IEnumerable1 source) Tracery.Grammar.PushRules (System.String key, IEnumerable1 rawRules) (at Assets/Scripts/Tracery/Grammar.cs:83)
TraceryGrammar.get_Grammar () (at Assets/Scripts/Tracery/Unity/TraceryGrammar.cs:16)
GrammarEditor.OnInspectorGUI () (at Assets/Scripts/Tracery/Unity/GrammarEditor.cs:65)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1229)
UnityEditor.DockArea:OnGUI()
`
This is when attempting to set multiple variables in one Node Item like in:
"setOccupation": ["[occupation:baker][didStuff:baked bread,decorated cupcakes,folded dough,made croissants,iced a cake]","[occupation:warrior][didStuff:fought #monster.a#,saved a village from #monster.a#,battled #monster.a#,defeated #monster.a#]"]
Where you want to set the Occupation but also associate it with their actions. So a baker will bake and a warrior will fight. The same problem exists with the pronouns on the same two examples.
I was trying the examples in Chrystal Code Palace and examples 6 and 7 don't seem to work. In unity I get:
Assertion failed. Values are not equal. Expected: 2 == 1 UnityEngine.Assertions.Assert:AreEqual(Int32, Int32) Tracery.Parser:ParseAction() (at Assets/Scripts/Tracery/Parser.cs:96) Tracery.Parser:ParseTag() (at Assets/Scripts/Tracery/Parser.cs:163) Tracery.Parser:Parse() (at Assets/Scripts/Tracery/Parser.cs:35) Tracery.Tracery:ParseRule(String) (at Assets/Scripts/Tracery/Tracery.cs:9) Tracery.Grammar:<PushRules>m__1(String) (at Assets/Scripts/Tracery/Grammar.cs:83) System.Linq.Enumerable:ToArray(IEnumerable1)Tracery.Grammar:PushRules(String, IEnumerable
1) (at Assets/Scripts/Tracery/Grammar.cs:83) TraceryGrammar:get_Grammar() (at Assets/Scripts/Tracery/Unity/TraceryGrammar.cs:16) GrammarEditor:OnInspectorGUI() (at Assets/Scripts/Tracery/Unity/GrammarEditor.cs:65) UnityEditor.DockArea:OnGUI()also:
IndexOutOfRangeException: Array index is out of range. Tracery.Parser.ParseAction () (at Assets/Scripts/Tracery/Parser.cs:99) Tracery.Parser.ParseTag () (at Assets/Scripts/Tracery/Parser.cs:163) Tracery.Parser.Parse () (at Assets/Scripts/Tracery/Parser.cs:35) Tracery.Tracery.ParseRule (System.String rawRule) (at Assets/Scripts/Tracery/Tracery.cs:9) Tracery.Grammar.<PushRules>m__1 (System.String raw) (at Assets/Scripts/Tracery/Grammar.cs:83) System.Linq.Enumerable+<CreateSelectIterator>c__Iterator102[System.String,Tracery.TraceryNode].MoveNext ()System.Collections.Generic.List
1[Tracery.TraceryNode].AddEnumerable (IEnumerable1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128)System.Collections.Generic.List
1[Tracery.TraceryNode]..ctor (IEnumerable1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65)System.Linq.Enumerable.ToArray[TraceryNode] (IEnumerable
1 source) Tracery.Grammar.PushRules (System.String key, IEnumerable1 rawRules) (at Assets/Scripts/Tracery/Grammar.cs:83)TraceryGrammar.get_Grammar () (at Assets/Scripts/Tracery/Unity/TraceryGrammar.cs:16)
GrammarEditor.OnInspectorGUI () (at Assets/Scripts/Tracery/Unity/GrammarEditor.cs:65)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1229)
UnityEditor.DockArea:OnGUI()
`
This is when attempting to set multiple variables in one Node Item like in:
"setOccupation": ["[occupation:baker][didStuff:baked bread,decorated cupcakes,folded dough,made croissants,iced a cake]","[occupation:warrior][didStuff:fought #monster.a#,saved a village from #monster.a#,battled #monster.a#,defeated #monster.a#]"]
Where you want to set the Occupation but also associate it with their actions. So a baker will bake and a warrior will fight. The same problem exists with the pronouns on the same two examples.