zaira Posted July 16, 2016 Posted July 16, 2016 I am wondering about package fragments and package callbacks - CK documentation is quite empty regarding this Regarding fragments: "Start" and "End" are obvious but what is the intention of "Change" - is "Change" called when my package was interrupted before its procedure tree has finished? If my procedure tree doesn't contain a finished condition and my package is replaced by another package - is the "End" fragment called? Regarding callbacks: And I am wondering about the Actor callbacks OnPackageStart, OnPackageEnd and OnPackageChange. If I attach a script direct to the package fragments - what is called first: the package fragments or the callbacks? Regarding life-cycle of a package: When is a package considered as finished - when its fragment scripts has finished or before? When is a package considered as started - when the start fragment has finished? Is it possible to modify elements that are referenced by package data in the start fragment : eg. moving a reference that is used by a travel procedure? Regarding package conditions: When is a condition evaluated - permanently or at the beginning only? Regarding package idles: When will a package idle be started? Regarding fragment idles: When will a fragment idle be started? The documentation only talks about the "Must Complete" for the On End idle - but what about On Start idle - is the tree running in parallel to the animation?
Guest Posted July 16, 2016 Posted July 16, 2016 I am wondering about package fragments and package callbacks - CK documentation is quite empty regarding this Regarding fragments: "Start" and "End" are obvious but what is the intention of "Change" - is "Change" called when my package was interrupted before its procedure tree has finished? If my procedure tree doesn't contain a finished condition and my package is replaced by another package - is the "End" fragment called? Regarding callbacks: And I am wondering about the Actor callbacks OnPackageStart, OnPackageEnd and OnPackageChange. If I attach a script direct to the package fragments - what is called first: the package fragments or the callbacks? Regarding life-cycle of a package: When is a package considered as finished - when its fragment scripts has finished or before? When is a package considered as started - when the start fragment has finished? Is it possible to modify elements that are referenced by package data in the start fragment : eg. moving a reference that is used by a travel procedure? Regarding package conditions: When is a condition evaluated - permanently or at the beginning only? Regarding package idles: When will a package idle be started? Regarding fragment idles: When will a fragment idle be started? The documentation only talks about the "Must Complete" for the On End idle - but what about On Start idle - is the tree running in parallel to the animation? End is called as soon the package completes the procedure marked as "complete package". The package ends and AFTER the script is called if any. Change is called in case the package is no more executed also if it is not finished. (For example because the AI replaced the package with another.) Callbacks are called in parallel. Sometimes you get one that start before, sometimes the other. A package is considered completed when any of the procedures inside, that is marked as "complete package" is completed. If any script is attached to the end fragment, then it is fired AFTER the package is marked as completed. The same for "start fragments", the actual procedure starts and the fragment starts in parallel. Conditions of a package are not evaluated "inside" the package. They are evaluated on the NPC AI. And this is periodically refreshed, but not extremely often. One exception are packages inside scenes, for these the conditions are evaluated way more often, because it is not the AI of the Actor, but the Scene evaluation that will re-evaluate it. Try to condition a Move To package with a condition: distance<50. The package will run way more long that the package not conditioned, but with the procedure marked as "complete package". Idles are executed by selecting one and sending it to the actor animation graph. That means that a previous idles may have to complete or exit from the animation graph before the new idle will be run. The start fragment is called always as soon as the package starts. In parallel with the procedure execution (but nothing to do with animations.)
Guest Posted July 16, 2016 Posted July 16, 2016 Extra information (because I saw your posts also in PapyrusUtil): what I said works for normal packages and scene packages. When you use ActorUtil.AddPackageOverride() or RemovePackageOverride() things are messy, and not always follow the same rules.
zaira Posted July 16, 2016 Author Posted July 16, 2016 Regarding package idles: When will a package idle be started? Idles are executed by selecting one and sending it to the actor animation graph. That means that a previous idles may have to complete or exit from the animation graph before the new idle will be run. I mean the idles on the Package Form idle tab - in which state are those idles called? Eg. when the final procedure has finished but the procedure was not marked to end the package?
Guest Posted July 16, 2016 Posted July 16, 2016 I mean the idles on the Package Form idle tab - in which state are those idles called? Eg. when the final procedure has finished but the procedure was not marked to end the package? Take my next answer as is, because on this subject I stopped using them a long ago. My answer: The idles are find as soon as the package starts. But they are not directly moved to the actor animation graph. They are queued. So any previous idle should reach the end state before it is used. When I was trying to use them, if the previous action was a wait, or a walk, then the idle was started immediately because no other idles were played. In some other cases (for example the actor was using a furniture) then the previous idle had to stop (and the package was already running, checked with a debug.trace in the package start fragment.) in case the actor is not playing an idle but it is a quick animation send with a SendAnimationEvent, then the exit cycle does not apply, and the idle was playing almost immediately. But, again, I had very little success on using the idles in complex packages/scenes. So at the end I replaced them with direct code calls to send animation events, that are way more controllable.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.