edited August 2022 in ORK Support
'Replace variable text codes in this custom content with these variables.'

Doesn't work as described for Custom Content unfortunately.

Created item with float item variable with selected data 'action', variable key 'ItemValue', LOCAL and then random number between 0,2 to 0,5.
Then custom content of the item with key ItemValue with Default content 'var.cfloat=ItemValue#0.00'.
After that, set up in Menu Screen Additional Content Layout with ID Item Value and Default content is 'customcontent=ItemValue'.
It only generates one random variable at the first addition to the inventory and that never changes.

Since there is the same option for Description, took my time to test it. I've copied the same default content from ItemValue into Description and set another content layout underneath it. And that works fine.
Use In Description works fine as I'm using both things at the same time and can see which one works.

https://ibb.co/7JswFs7
See link, below price is description field and the upper is custom content ItemValue. Both have enabled use of item variables and use same default content 'var.cfloat=ItemValue#0.00'.
Post edited by Machal on
  • Will be fixed in the next update.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks a lot!
  • What I noticed also is, that item variables set to value->Formula (Player-Player) will show me a debug of a value, but that value is ignored and not added as well.

    Also, first time in the game session I'm opening Menu Screen - Inventory, I'll get that log from item variable as well. It appears to be re-initiating the item. But only once per game session.
  • Could you give me more details on the setup?

    Generally, those variables are only set one time per individual item instance - when the instance of the item is created.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited August 2022
    An item has Item Variable, e.g. 'ItemValue' set to Local. This variable is Float -> Set -> Formula. The Formula is just Add Value = 1 (User -Player / Target - Player). You can make debug log in the formula to be sure the number is generated.

    And then this ItemValue variable is set in Custom Content and enabled 'Use In Custom Content' ofc. But it always displays 0.

    When I remove the formula value and just adds any number, it will display it though.

    Yeah, the item instance should be, however, when I make Menu Screen - Inventory with defined item types and then during runtime add this item and open the menu first time, it will pop me the debug from the Item variable formula, which means it re-initializes the item.
    Post edited by Machal on
  • The custom content thing should be fixed in the next update (at least not happening on my end now).
    Machal said: Yeah, the item instance should be, however, when I make Menu Screen - Inventory with defined item types and then during runtime add this item and open the menu first time, it will pop me the debug from the Item variable formula, which means it re-initializes the item.
    Tested it - yeah, this is most likely coming from the dummy combatant being created for showing target changes (in case you use that - see UI > Text Display Settings > Status Change Display).
    Otherwise, if you post your (complete) Unity console output you get I can check where it's coming from.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • 0,00 done
    UnityEngine.Debug:Log (object)
    GamingIsLove.Makinom.Formulas.Nodes.UnityConsoleNode:Calculate (GamingIsLove.Makinom.FormulaCall)
    GamingIsLove.Makinom.Formula:Calculate (GamingIsLove.Makinom.FormulaCall)
    GamingIsLove.Makinom.FloatValue_FormulaType`1:GetValue (GamingIsLove.Makinom.IDataCall)
    GamingIsLove.Makinom.FloatValue`1:GetValue (GamingIsLove.Makinom.IDataCall)
    GamingIsLove.Makinom.ChangeVariableBase`1:Change (GamingIsLove.Makinom.VariableHandler,GamingIsLove.Makinom.IDataCall)
    GamingIsLove.Makinom.ChangeVariableBase`1:Change (GamingIsLove.Makinom.IDataCall,System.Collections.Generic.List`1&)
    GamingIsLove.Makinom.ChangeVariable`1:Change (GamingIsLove.Makinom.IDataCall,System.Collections.Generic.List`1&)
    GamingIsLove.Makinom.VariableSetter`1:SetVariables (GamingIsLove.Makinom.IDataCall)
    GamingIsLove.ORKFramework.ItemShortcut:InitVariables ()
    GamingIsLove.ORKFramework.ItemShortcut:.ctor (GamingIsLove.ORKFramework.Item,int)
    GamingIsLove.ORKFramework.Item:GetCustomContent (string)
    GamingIsLove.ORKFramework.ItemShortcut:GetCustomContent (string)
    GamingIsLove.Makinom.TextHelper:ReplaceContentInformation (string&,GamingIsLove.Makinom.IContent,string,string,string,string,string)
    GamingIsLove.Makinom.UIText:ReplaceContent (GamingIsLove.Makinom.IContent,GamingIsLove.Makinom.IContent)
    GamingIsLove.ORKFramework.UI.ORKContentLayout:GetText (GamingIsLove.Makinom.UIText,GamingIsLove.ORKFramework.Combatant,object,GamingIsLove.Makinom.IContent,GamingIsLove.Makinom.IContent,string,string,string,string,string,string,string,string,string,string,string,string,string,string,string)
    GamingIsLove.ORKFramework.UI.ORKContentLayout:GetCustomText (GamingIsLove.ORKFramework.Combatant,object,GamingIsLove.Makinom.IContent,GamingIsLove.Makinom.IContent,string,string,string,string,string,string,string,string,string,string,string,string,string,string,string)
    GamingIsLove.ORKFramework.UI.ORKContentLayout:GetContent (GamingIsLove.ORKFramework.IShortcut,GamingIsLove.Makinom.IContent,GamingIsLove.ORKFramework.Combatant,GamingIsLove.ORKFramework.DragShortcutWrapper,string)
    GamingIsLove.ORKFramework.ORKButtonContentLayout:GetContent (GamingIsLove.ORKFramework.IShortcut,GamingIsLove.ORKFramework.Combatant,GamingIsLove.ORKFramework.DragShortcutWrapper,string)
    GamingIsLove.ORKFramework.ORKButtonContentLayout:GetContent (GamingIsLove.ORKFramework.IShortcut,GamingIsLove.ORKFramework.Combatant,GamingIsLove.ORKFramework.DragShortcutWrapper)
    GamingIsLove.ORKFramework.UI.Parts.InventoryMenuPart:CreateItemChoices ()
    GamingIsLove.ORKFramework.UI.Parts.InventoryMenuPart:ShowItems (bool)
    GamingIsLove.ORKFramework.UI.Parts.InventoryMenuPart:Show ()
    GamingIsLove.ORKFramework.UI.Parts.InventoryMenuPart:Show (GamingIsLove.ORKFramework.UI.MenuScreen)
    GamingIsLove.ORKFramework.UI.MenuScreen:FinishOpening ()
    GamingIsLove.ORKFramework.UI.MenuScreen:Show (bool)
    GamingIsLove.ORKFramework.Schematics.Nodes.CallMenuScreenNode:CallMenuScreen (GamingIsLove.Makinom.Schematics.Schematic,GamingIsLove.ORKFramework.UI.MenuScreen)
    GamingIsLove.ORKFramework.Schematics.Nodes.CallMenuScreenNode:Execute (GamingIsLove.Makinom.Schematics.Schematic)
    GamingIsLove.Makinom.Schematics.Schematic:ExecuteNextNode ()
    GamingIsLove.Makinom.Schematics.Schematic:NodeFinished (int)
    GamingIsLove.Makinom.Schematics.Nodes.PlaySoundChannelNode:Execute (GamingIsLove.Makinom.Schematics.Schematic)
    GamingIsLove.Makinom.Schematics.Schematic:ExecuteNextNode ()
    GamingIsLove.Makinom.Schematics.Schematic:NodeFinished (int)
    GamingIsLove.ORKFramework.Schematics.Nodes.IsMenuOpenNode:Execute (GamingIsLove.Makinom.Schematics.Schematic)
    GamingIsLove.Makinom.Schematics.Schematic:ExecuteNextNode ()
    GamingIsLove.Makinom.Schematics.Schematic:NodeFinished (int)
    GamingIsLove.Makinom.Schematics.Nodes.CheckVariablesNode:Execute (GamingIsLove.Makinom.Schematics.Schematic)
    GamingIsLove.Makinom.Schematics.Schematic:ExecuteNextNode ()
    GamingIsLove.Makinom.Schematics.Schematic:Start ()
    GamingIsLove.Makinom.Schematics.Schematic:PlaySchematic (object,GamingIsLove.Makinom.Schematics.ISchematicStarter,object,object,bool,GamingIsLove.Makinom.MachineUpdateType,int)
    GamingIsLove.Makinom.GlobalMachine:Call (object,object,GamingIsLove.Makinom.Schematics.ISchematicStarter,int)
    GamingIsLove.Makinom.GlobalMachine:Call (object,object,GamingIsLove.Makinom.Schematics.ISchematicStarter)
    GamingIsLove.ORKFramework.UI.GlobalMachineGameButtonListItem:Selected (GamingIsLove.ORKFramework.UI.MenuScreen)
    GamingIsLove.ORKFramework.UI.Parts.ButtonListMenuPart:InputAccepted (GamingIsLove.Makinom.UI.IUIBox,int)
    GamingIsLove.Makinom.Components.UIBoxComponent:InputAccepted (int)
    GamingIsLove.Makinom.Components.UIButtonInput:OnPointerClick (UnityEngine.EventSystems.PointerEventData)
    UnityEngine.EventSystems.ExecuteEvents:Execute (UnityEngine.GameObject,UnityEngine.EventSystems.BaseEventData,UnityEngine.EventSystems.ExecuteEvents/EventFunction`1)
    GamingIsLove.Makinom.Components.MakinomInputModule:ProcessMousePress (UnityEngine.EventSystems.PointerInputModule/MouseButtonEventData)
    GamingIsLove.Makinom.Components.MakinomInputModule:ProcessMouseEvent (int)
    GamingIsLove.Makinom.Components.MakinomInputModule:ProcessMouseEvent ()
    GamingIsLove.Makinom.Components.MakinomInputModule:Process ()
    UnityEngine.EventSystems.EventSystem:Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:385)
  • edited August 2022
    Yes, regarding custom content, that part finally works, so thanks for the great job!
    This formula is just Value - Set Int Global Variable and unity console output.

    User and Target of the Formula is Player.

    So I guess it didn't find him when opening the Inventory menu, because this was the proper calculation when the item was added to the inventory, so firstly initialized. (Unity console is set to '#value# done')

    1,00 done
    UnityEngine.Debug:Log (object)
    GamingIsLove.Makinom.Formulas.Nodes.UnityConsoleNode:Calculate (GamingIsLove.Makinom.FormulaCall)
    GamingIsLove.Makinom.Formula:Calculate (GamingIsLove.Makinom.FormulaCall)
    GamingIsLove.Makinom.FloatValue_FormulaType`1:GetValue (GamingIsLove.Makinom.IDataCall)
    GamingIsLove.Makinom.FloatValue`1:GetValue (GamingIsLove.Makinom.IDataCall)
    GamingIsLove.Makinom.ChangeVariableBase`1:Change (GamingIsLove.Makinom.VariableHandler,GamingIsLove.Makinom.IDataCall)
    GamingIsLove.Makinom.ChangeVariableBase`1:Change (GamingIsLove.Makinom.IDataCall,System.Collections.Generic.List`1&)
    GamingIsLove.Makinom.ChangeVariable`1:Change (GamingIsLove.Makinom.IDataCall,System.Collections.Generic.List`1&)
    GamingIsLove.Makinom.VariableSetter`1:SetVariables (GamingIsLove.Makinom.IDataCall)
    GamingIsLove.ORKFramework.ItemShortcut:InitVariables ()
    GamingIsLove.ORKFramework.ItemShortcut:.ctor (GamingIsLove.ORKFramework.Item,int)
    GamingIsLove.ORKFramework.ItemItemSelection:CreateShortcut (int)
    GamingIsLove.ORKFramework.ItemSelection:CreateShortcut (int)
    GamingIsLove.ORKFramework.ItemGain`1:CreateShortcut (GamingIsLove.Makinom.IDataCall)
    GamingIsLove.ORKFramework.ItemGain`1:AddToInventory (GamingIsLove.Makinom.IDataCall,GamingIsLove.ORKFramework.Inventory,bool,bool,bool)
    GamingIsLove.ORKFramework.Schematics.Nodes.AddToInventoryNode:Execute (GamingIsLove.Makinom.Schematics.Schematic)
    GamingIsLove.Makinom.Schematics.Schematic:ExecuteNextNode ()
    GamingIsLove.Makinom.Schematics.Schematic:NodeFinished (int)
    GamingIsLove.Makinom.Schematics.Nodes.CheckVariablesNode:Execute (GamingIsLove.Makinom.Schematics.Schematic)
    GamingIsLove.Makinom.Schematics.Schematic:ExecuteNextNode ()
    GamingIsLove.Makinom.Schematics.Schematic:NodeFinished (int)
    GamingIsLove.Makinom.Schematics.Nodes.ChangeVariablesNode:Execute (GamingIsLove.Makinom.Schematics.Schematic)
    GamingIsLove.Makinom.Schematics.Schematic:ExecuteNextNode ()
    GamingIsLove.Makinom.Schematics.Schematic:NodeFinished (int)
    GamingIsLove.Makinom.Schematics.Schematic:Tick ()
    GamingIsLove.Makinom.MachineHandler/MachineUpdate:Tick ()
    GamingIsLove.Makinom.Maki:FireTick ()
    GamingIsLove.Makinom.MakinomHandler:Update ()
    Post edited by Machal on
  • The first debug output (with 0 value) also came from the issue with custom content and shouldn't happen with yesterday's ORK 3.6 release.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I think it is, because I don't see it anymore after the update. Well done.
Sign In or Register to comment.