Vanilla-Expanded / VanillaExpandedFramework

Vanilla Expanded Framework for RimWorld
Other
74 stars 37 forks source link

All Item Processor Wiki Sections Lacks XML Tutorial #68

Open TurtleShroom opened 1 year ago

TurtleShroom commented 1 year ago

Good Afternoon

I wanted to add a new Combination Def, but the Wiki only demonstrated the C-Sharp and pointed me to existing Combinations. I CAN'T READ C-SHARP! The problem is that none of the examples gave me what I needed to know; I wanted an item to require TWO inputs, but nothing shows me how to do that.

Please consider eludicating, like you did with the Animal Behaviors section, the full list of potential XML statements.

Thank you. -TURTLESHROOM

legodude17 commented 1 year ago

The C# shows all the fields and what they do, no?

TurtleShroom commented 1 year ago

The C# shows all the fields and what they do, no?

I can't read C-Sharp. I tried doing it, but I can't figure how what's going on.

Here's an example:

image

(Please ignore the Blue Light Filter.)

The pink "X" shows what happen when I click the "IP_NONE" entry.

I tried to change the Soda Fountain to accept four different inputs, with an option to haev only one filled, two filled, and so on.

HJowever, the Wiki did not explain to me how to do that.

`

  • Things/Buildings/VBE_SodaDispenser 4 true true true false false false true false false true 20 UI/VBE_SyrupReset UI/VBE_EmptySyrupIcon VBE_StartInsertion VBE_StartInsertionDesc UI/VBE_InsertSyrup VBE_CancelBringingSyrup VBE_CancelBringingSyrupDesc UI/VBE_CancelSyrup VBE_InsertSyrupDesc VBE_InsertSyrupDesc VBE_InsertSyrupDesc VBE_InsertSyrupDesc
  • `

    There is no documentation on this.

    Also, when I made multiple Item Accepted Defs, if they shared the same ingredient in the same slot, I got this error:

    Exception filling window for Verse.FloatMenu: System.NullReferenceException: Object reference not set to an instance of an object at ItemProcessor.Building_ItemProcessor.<IngredientsChosenBringThemIn>b__83_3 (ItemProcessor.CombinationDef element) [0x0002b] in <b3d96b3c2a5f43a5a7194d98b33781f3>:0 at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Boolean& found) [0x00045] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at ItemProcessor.Building_ItemProcessor.IngredientsChosenBringThemIn () [0x00889] in <b3d96b3c2a5f43a5a7194d98b33781f3>:0 at ItemProcessor.Command_SetSecondItemList.TryInsertSecondThing (System.Boolean category, System.String item) [0x00149] in <b3d96b3c2a5f43a5a7194d98b33781f3>:0 at ItemProcessor.Command_SetSecondItemList+<>c__DisplayClass4_0.<ProcessInput>b__4 () [0x0001c] in <b3d96b3c2a5f43a5a7194d98b33781f3>:0 at Verse.FloatMenuOption.Chosen (System.Boolean colonistOrdering, Verse.FloatMenu floatMenu) [0x00030] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.FloatMenuOption.DoGUI (UnityEngine.Rect rect, System.Boolean colonistOrdering, Verse.FloatMenu floatMenu) [0x00535] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.FloatMenu.DoWindowContents (UnityEngine.Rect rect) [0x000fb] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001d3] in <95de19971c5d40878d8742747904cdcd>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch1 (string) Verse.Window:InnerWindowOnGUI (int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

    TurtleShroom commented 1 year ago

    This is the Patch I tried to write, but it doesn't work and I can't troubleshoot it because the Wiki lacks documentation for ALL of the XML lines.

    TSP_VFEB_SodaIncorporation.zip

    TurtleShroom commented 1 year ago

    What frustrates my efforts the most is that NOTHING explains how the "true" Boolean qualifier works, and the Wiki is silent on it.

    TurtleShroom commented 1 year ago

    image

    databobek commented 1 year ago

    you have to search for acceptNoneAsInput, instead of a XML node. It says that the given ingredient is allowed to be empty.

    TurtleShroom commented 1 year ago

    I tried that, but Sarg said it did not work.

    Sent from Mail.ru app for Android Sunday, 15 October 2023, 08:07AM -04:00 from databobek @.*** :

    you have to search for acceptNoneAsInput, instead of a XML node. It says that the given ingredient is allowed to be empty. — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: @ github . com>

    TurtleShroom commented 1 year ago

    you have to search for acceptNoneAsInput, instead of a XML node. It says that the given ingredient is allowed to be empty.

    Adding "<acceptNoneAsInput>true</acceptNoneAsInput>" did not work.

    I don't understand. Sarg said that the C-Sharp Boolean statement didn't work when I asked him about this. Is there some other way to do this?

    TurtleShroom commented 1 year ago

    you have to search for acceptNoneAsInput, instead of a XML node. It says that the given ingredient is allowed to be empty.

    How do I do this? What does that mean?

    databobek commented 1 year ago

    you have to search for acceptNoneAsInput, instead of a XML node. It says that the given ingredient is allowed to be empty.

    How do I do this? What does that mean?

    I am not saying it works, it's described in the code as "allowing an input to be empty"

    When looking for a node from xml you don't look in the code for but only NODENAME.

    TurtleShroom commented 1 year ago

    Right, but when I try that, it does not work. That is a serious flaw in the VFE system thar really needs fixing.

    Sent from Mail.ru app for Android Wednesday, 25 October 2023, 03:30AM -04:00 from databobek @.*** :

    you have to search for acceptNoneAsInput, instead of a XML node. It says that the given ingredient is allowed to be empty. How do I do this? What does that mean? I am not saying it works, it's described in the code as "allowing an input to be empty" When looking for a node from xml you don't look in the code for but only NODENAME. — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: @ github . com>

    legodude17 commented 1 year ago

    The whole Item Processor system needs a rewrite, but no one's had the time or will to do that yet. Given VEF is developed for VE mods, it's a bit weird to call this a "serious flaw" that "really needs fixing" when no VE mod uses the feature.

    TurtleShroom commented 1 year ago

    I strongly disagree. Countless non-VFE Mods use this Mod's system, and you would think not forcing people to make separate buildings to process one ingredient versus a whole other, separate instance for two inputs, would be common sense.

    Sent from Mail.ru app for Android Wednesday, 25 October 2023, 05:33PM -04:00 from Joshua @.*** :

    The whole Item Processor system needs a rewrite, but no one's had the time or will to do that yet. Given VEF is developed for VE mods, it's a bit weird to call this a "serious flaw" that "really needs fixing" when no VE mod uses the feature. — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: @ github . com>

    legodude17 commented 1 year ago

    I'm not saying it's not an issue, I'm just saying you're being rather hyperbolic. It's one small feature of an outdated system, not a massive flaw in the entire framework.