I'm going through the main tutorial and I've gotten through part 18. I'm able to start the battle fine, but when I select an action and then the target, I get a NullReferenceException that I have included below. Any help identifying the issue would be appreciated. I'm guessing I probably just missed a step or something. I'm running Unity 2019.3.1f1 and ORK 2.28.0 if that is important.

NullReferenceException: Object reference not set to an instance of an object
ORKFramework.StatusChangeInformation..ctor (ORKFramework.IShortcut shortcut, ORKFramework.Combatant user, ORKFramework.Combatant target) (at :0)
ORKFramework.AbilityAction.CreateStatusChangeInfos () (at :0)
ORKFramework.AbilityAction.ActionAdded () (at :0)
ORKFramework.BattleActionHandler.Add (ORKFramework.BaseAction action) (at :0)
ORKFramework.Combatants.CombatantActions.Add (ORKFramework.BaseAction action, System.Boolean newTurn) (at :0)
ORKFramework.ActionAccessHandler.AddActionToCombatant (ORKFramework.Combatant user, ORKFramework.BaseAction action, System.Boolean newTurn) (at :0)
ORKFramework.Combatants.CombatantActions.AddAccess (ORKFramework.BaseAction action, System.Boolean newTurn) (at :0)
ORKFramework.UI.ActiveBattleMenu.DoAddAction (ORKFramework.BaseAction action) (at :0)
ORKFramework.UI.ActiveBattleMenu.AddAction (ORKFramework.BaseAction action) (at :0)
ORKFramework.UI.TargetBMItem.Accepted (ORKFramework.Combatant owner) (at :0)
ORKFramework.UI.ActiveBattleMenu.Closed (ORKFramework.GUIBox origin) (at :0)
ORKFramework.GUIBoxContent.Closed () (at :0)
ORKFramework.DialogueContent.Closed () (at :0)
ORKFramework.GUIBox.Tick (System.Single t) (at :0)
ORKFramework.GUIHandler.Tick (System.Single t) (at :0)
ORKFramework.GUIHandler.Tick () (at :0)
ORKFramework.ORKCore.FireTick () (at <4ec49b40a0df4bba93a8a5d4b8145634>:0)
ORKFramework.ORKHandler.Update () (at <4ec49b40a0df4bba93a8a5d4b8145634>:0)
  • Hm, go back to your ability settings and make sure they're set up correctly (and maybe save the settings again).

    I'll check what could cause this error in the code :)
    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 tried testing things a bit more, and I discovered that the same issue occurred even if I selected "Do Nothing", which lead me to suspect it was something the enemy was doing. Based on how the AI is set up, the enemy should be trying to cast Boost on itself, so I thought that could possibly be the issue. In order to test that, I changed the enemy AI so that it no longer used Boost, but the same issue occurred, so that likely isn't the issue. I've double-checked various settings related to the abilities and the combatants, but I haven't found anything wrong yet. At this point, I don't really no what else to try besides just retracing all of the steps. I don't know if it will help, but below is the console log for the error that occurs when I select "Do Nothing", which has some slightly different calls than the previous one.

    NullReferenceException: Object reference not set to an instance of an object
    ORKFramework.StatusChangeInformation..ctor (ORKFramework.IShortcut shortcut, ORKFramework.Combatant user, ORKFramework.Combatant target) (at :0)
    ORKFramework.AbilityAction.CreateStatusChangeInfos () (at :0)
    ORKFramework.AbilityAction.ActionAdded () (at :0)
    ORKFramework.BattleActionHandler.Add (ORKFramework.BaseAction action) (at :0)
    ORKFramework.Combatants.CombatantActions.Add (ORKFramework.BaseAction action, System.Boolean newTurn) (at :0)
    ORKFramework.ActionAccessHandler.AddActionToCombatant (ORKFramework.Combatant user, ORKFramework.BaseAction action, System.Boolean newTurn) (at :0)
    ORKFramework.Combatants.CombatantActions.AddAccess (ORKFramework.BaseAction action, System.Boolean newTurn) (at :0)
    ORKFramework.Combatants.CombatantActions.Choose (System.Boolean newTurn, System.Boolean autoCallMenu) (at :0)
    ORKFramework.Combatants.CombatantActions+<>c__DisplayClass59_0.b__0 () (at :0)
    ORKFramework.Combatants.CombatantBattle.StartTurn2 (System.Boolean canPerform, ORKFramework.Notify callback) (at :0)
    ORKFramework.Combatants.CombatantBattle.StartTurn (System.Boolean canPerform, ORKFramework.Notify callback) (at :0)
    ORKFramework.Combatants.CombatantActions.Choose (System.Boolean newTurn, System.Boolean autoCallMenu) (at :0)
    ORKFramework.TurnBasedBattle+d__76.MoveNext () (at :0)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <94c5f4c38cdc42d2b006f8badef04394>:0)
  • I'm having the exact same issue. I have retraced all of the steps, not sure what is going on. I followed everything exactly as the tutorial stated, went through everything again and ended up with the same result.
  • NullReferenceException: Object reference not set to an instance of an object
    ORKFramework.StatusChangeInformation..ctor (IShortcut shortcut, ORKFramework.Combatant user, ORKFramework.Combatant target)
    ORKFramework.AbilityAction.CreateStatusChangeInfos ()
    ORKFramework.AbilityAction.ActionAdded ()
    ORKFramework.BattleActionHandler.Add (ORKFramework.BaseAction action)
    ORKFramework.Combatants.CombatantActions.Add (ORKFramework.BaseAction action, Boolean newTurn)
    ORKFramework.ActionAccessHandler.AddActionToCombatant (ORKFramework.Combatant user, ORKFramework.BaseAction action, Boolean newTurn)
    ORKFramework.Combatants.CombatantActions.AddAccess (ORKFramework.BaseAction action, Boolean newTurn)
    ORKFramework.UI.ActiveBattleMenu.DoAddAction (ORKFramework.BaseAction action)
    ORKFramework.UI.ActiveBattleMenu.AddAction (ORKFramework.BaseAction action)
    ORKFramework.UI.TargetBMItem.Accepted (ORKFramework.Combatant owner)
    ORKFramework.UI.ActiveBattleMenu.Closed (ORKFramework.GUIBox origin)
    ORKFramework.GUIBoxContent.Closed ()
    ORKFramework.DialogueContent.Closed ()
    ORKFramework.GUIBox.Tick (Single t)
    ORKFramework.GUIHandler.Tick (Single t)
    ORKFramework.GUIHandler.Tick ()
    ORKFramework.ORKCore.FireTick ()
    ORKFramework.ORKHandler.Update ()
  • Decided to continue on to see if moving along would help out the project, ended up with 999+ errors when I added Battle Start Events lol.

    I honestly think this is an issue with the Unity Version, as I've selected 2018 and downloaded the 2018 resources but when I load the project, it's opened in 2017. I've seen enough nonetheless, just going to pickup the kit and get to work.

    Love your work, great job with the kit. I will be hitting you up soon for some custom work if you have the time.
  • Make sure you have the correct ORK versions for the Unity version - you can check it in Editor > About in the ORK editor.
    E.g. for anything 2018+ (i.e. also all 2019 versions) it should read like Version: 2.28.0 for Unity 2018/2019.
    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 double-checked my ORK framework version, and it shows 2.28.0 for Unity 2018/2019, so I don't believe it is a version mismatch issue. If someone else is having the same issue, could it possibly be a bug that was introduced in a recent version of ORK or Unity? I could try running an older version to see if that does anything.
  • Hm, could you send me your ORKProject.asset (found at Assets/ORK Framework/ in your Unity project) to contact@orkframework.com?
    I'd be able to check it out and see where this is 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!
  • I sent an email with the file. Let me know if you need anything else.
  • Oh, I see what I did now.  I accidentally set the user critical change instead of the target critical change.  I fixed my mistake and it seems to be working now.  Thanks for the help.
  • Thanks!
    I had this error too. For me the attack settings were incorrect in the status. I also wrote in user Critical Changes, rather than Target critical changes.

    I went back to Tutorial "12. Abilities" and noticed it's very confusing, it seems like the UI has been updated since it was written, and it's hard to keep tracking of what you add. Might be in need of an update. :)
  • @Thunderstump
    The issue of this thread should be fixed in ORK 2.28.1 - did you use that version or where you still on an earlier version?

    Yeah, I'll probably need to update the ability tutorial part :)
    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!
Sign In or Register to comment.