• Announcements

    • Ashal

      SITE MOVED - IN READ ONLY MODE   12/08/2015

      Please use http://www.loverslab.com moving forward. Site has been restored to a previous version, and this one placed into a read-only mode. This is available for a limited time so users may reference/copy content that has been lost in the transition. This will no longer be accessible by December 22nd, 2015.

Archived

This topic is now archived and is closed to further replies.

swiss_master

Mod Developers - Validation Of Objects

Hi all,


 


this is somehow a call to all mod developers, trying to understand why many mods have the tendency to throw errors in some situations in the papyrus logs.


 


Things i encounter a lot in the log are e.g.:



[04/30/2014 - 08:45:48PM] Error: Unable to call RegisterForSingleUpdate - no native object bound to the script object, or object is of incorrect type
stack:
[Active effect 1 on (00019913)].zbfEffectBondage.RegisterForSingleUpdate() - "<native>" Line ?
[Active effect 1 on (00019913)].zbfEffectBondage.RegisterForAnotherUpdate() - "zbfEffectBondage.psc" Line 24
[Active effect 1 on (00019913)].zbfEffectBondage.OnUpdate() - "zbfEffectBondage.psc" Line 40


[04/30/2014 - 08:48:07PM] Error: Unable to call GetTargetActor - no native object bound to the script object, or object is of incorrect type
stack:
[None].FtMTokenEffect.GetTargetActor() - "<native>" Line ?
[None].FtMTokenEffect.OnEffectStart() - "ftmtokeneffect.psc" Line 10
[04/30/2014 - 08:48:07PM] Error: Cannot call RemoveItem() on a None object, aborting function call
stack:
[None].FtMTokenEffect.OnEffectStart() - "ftmtokeneffect.psc" Line 11


[04/30/2014 - 08:53:48PM] --- SexLab ThreadController[0] ------------------------------------------------------
[04/30/2014 - 08:53:48PM] ERROR: AddActor()
[04/30/2014 - 08:53:48PM] Cannot add an actor to a locked thread
[04/30/2014 - 08:53:48PM] --------------------------------------------------------------------------------------------
[04/30/2014 - 08:53:48PM] Error: Array index -1 is out of range (0-4)
stack:
[alias ThreadView014 on quest SexLabQuestThreadSlots (1403CE6E)].sslThreadController.ActorAlias() - "sslThreadModel.psc" Line 662
[alias ThreadView014 on quest SexLabQuestThreadSlots (1403CE6E)].sslThreadController.DisableUndressAnimation() - "sslThreadModel.psc" Line 635
[DefeatNPCsRefreshQst (6006E96C)].defeatnvnassaultscr.TheAction() - "DefeatNVNAssaultScr.psc" Line 43
[None].defeatnvnassaultspl.TheKnockDown() - "DefeatNVNAssaultSPL.psc" Line 46
[None].defeatnvnassaultspl.OnEffectStart() - "DefeatNVNAssaultSPL.psc" Line 24
[04/30/2014 - 08:53:48PM] Error: Cannot call DisableUndressAnim() on a None object, aborting function call
stack:
[alias ThreadView014 on quest SexLabQuestThreadSlots (1403CE6E)].sslThreadController.DisableUndressAnimation() - "sslThreadModel.psc" Line 635
[DefeatNPCsRefreshQst (6006E96C)].defeatnvnassaultscr.TheAction() - "DefeatNVNAssaultScr.psc" Line 43
[None].defeatnvnassaultspl.TheKnockDown() - "DefeatNVNAssaultSPL.psc" Line 46
[None].defeatnvnassaultspl.OnEffectStart() - "DefeatNVNAssaultSPL.psc" Line 24


[04/30/2014 - 09:47:13PM] Error: (98001309): Does not have face animation data, and therefore cannot have their expression f.
stack:
[ (98001309)].Actor.SetExpressionOverride() - "<native>" Line ?
[zbf (180137E6)].zbfbondageshell.ApplyExpressionModifier() - "zbfBondageShell.psc" Line 213
[zbf (180137E6)].zbfbondageshell.ApplyAllModifiers() - "zbfBondageShell.psc" Line 290
[None].zbfEffectBondage.ApplyEffects() - "zbfEffectBondage.psc" Line 29
[None].zbfEffectBondage.OnEffectFinish() - "zbfEffectBondage.psc" Line ?

These are different mods, different situations, some of them explainable (dead npc, critter, etc.).


 


What i dont understand is why objects, before they are being used / altered are not being fully validated in the code - i know that's more effort to assume that NO object state is ever given, but wouldn't that add a great amount of stability?


 


Just my 2 cents, correct me if you think i am wrong, comment if you already do the above mentioned. (e.g. SL seems to be very advanced in regards of object validation before use).


 


Thx & cheers


 


Sarge


 


Author of DAYZ-SargeAI, PoE - Itemalert


 


0

Share this post


Link to post

Two first seem to be from magic effect scripts. Those are really flaky on NPCs. The magic effect itself disappears from NPCs if they get too far from the player or even from followers during cell transitions (outdoor-indoor). Even though the effect disappears, if the script was in progress during that, it continues to run. The problem is, none of the functions for that magic effect are available anymore. Sure you could put a self != none check before every function call, but most of the time if the effect disappears, you don't need the script on that actor anymore anyway, and apart from that error in your log, everything is usually working as it should. Especially if that script only affects the actor it (and the magic effect) is on, not really a problem.


 


Similarly, for the last one, the NPC probably got unloaded while the script was running, so trying to modify expression for actor that doesn't have its model loaded isn't really working.


 


That said, I've had problems with actors getting unloaded while attached to couple of scripts. Generally you'd want to handle those with OnUnload events for example, but if anything I've learned is that script events are anything but reliable in Skyrim :P


0

Share this post


Link to post

The problem with objects is the behavior of Papyrus. You have to define the object two ways. First, you have to declare it in your script and second, you have to bind it within the Script fragment you are planning to use this object.


 


Sometimes developers just forget to do the second step. And sometimes, if a developer changes the code, the Creation Kit throws away the binding.


0

Share this post


Link to post