Jump to content

Overhauling the weapon rack scripts


Sclerocephalus

Recommended Posts

That alone is enough to foul things up on that save. Nothing you're doing to it at this point is going to correct it. You'll either have to live with what you have or start over with a new save. Papyrus does not forgive the removal and reapplication of a mod, no matter the conditions.

 

Sorry, let me re-phrase... I reinstalled. I did not play with the mod uninstalled. I just wanted to make sure it was actually overwriting the original script file. Like maybe Steam downloaded the original .pex files or something. I used Nexus Mod Manager to install the mod, so when I say "uninstalled" I just mean within the confines of NMM. I did not actually load up a game and play with Weapon Racks Extended removed (after playing with enabled).

 

I understand that it is completely unsafe to remove a mod, then load a save that included said removed mod. Trying to play a save like that would be pretty much like driving into flood waters. Turn around, don't drown.

 

What about updating mods? Is the only safe route to start a new game every time a mod is updated?

Link to comment
Share on other sites

Updating mods largely depends on the skill of the author and how aware of Papyrus baked data they are. Even then, the best of us still can't give you a 100% guaranteed update.

 

Not even the unofficial patches can make every change take on every update, even with our retro-script system to update the stubborn stuff. So you'll just have to trust that an author knows what they're doing.

 

Me? I go to incredibly great lengths to make sure any changes I make will update on existing saves - by testing them on existing saves.

Link to comment
Share on other sites

A bit off-topic...

 

I ran into several issues with a fantastic Wyrmstooth mod, like dozen other people. Apparently, if you updated the mod while you've already started the quest, the bugs'd go crazy.

 

So... generally, is it safe to delete the mod, load the save and then resave the game without that mod? Then, enable the mod and start the quest once again. Will that be enough to "reset" the mod quest within the save file?

Link to comment
Share on other sites

Nope. That would most assuredly break it beyond repair. I did this myself with disastrous results and had to roll back to the save I made before I did that.

Link to comment
Share on other sites

Huh... makes it even more difficult to clean then. The cleanest save that I have for Wyrmstooth is waaaaay too old. I don't mind restarting the entire Wyrm quest, but 20% of the game is too much for my character. I hoped there was a way to clean the savefiles from all mod leftovers.

Link to comment
Share on other sites

Adapting Douglas Adams: “There is a theory which states that if ever anyone discovers exactly how Papyrus works, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened in patch 1.9.â€

 

Well, version 3.1 is coming:

 

In v3.0, the trigger script was modfied so as to call the activator's initalization procedure from its OnLoad event. As a result, two instances of the InitActivator function would run on cell load: one called from the OnLoad event of the trigger and the other called from the OnCellAttach event of the activator. This was not expected to be an issue. In fact, it's still not an issue: the racks will work as expected. Though, when a rack has a preplaced item (whose initial placement is handled from within the InitActivator function), the second instance fails (and throws an error on the log) when it tries to call SetMotionType on the item, while the first instance continues and places it on the rack as expected.

By running USKP 2.0.0 with debugger notes on the weapon rack scripts turned on, I could recreate the chronology of events: The two instances of the function run basically at the same time (or with an imperceptible delay). They both pass the Is3DLoaded check for the item in question. Then, the first instance runs SetMotionType and succeeds, but when the second instance tries the same, it fails with a "has no 3D error" (obviously a result of the havok state the object was then in). The first instance proceeds and places the item, while the second instance just aborts the function.

 

To eliminate the papyrus error (actually too much work for an issue that does not even impede the racks' functionality), the scripts have been modified as follows:

  • The activator script starts in a "WaitingForInitialization" state, in which it will skip handling of all events except for OnUpdate.
  • The trigger script will register the activator for a single update from both its OnLoad and OnCellAttach events (instead of calling the function directly, this is now handled via an event: this prevents an instance of the trigger script from getting stuck temporarily while waiting for the function to return).
  • When an OnUpdate event fires while in the "WaitingForInitialization" state, the activator script changes into empty state, then runs its InitActivator function.
  • The empty state has an empty override for the OnUpdate event. Thus, InitActivator runs only once, even when registered by the trigger twice.
  • An OnCellDetach event on the trigger script resets the activator into "WaitingForInitialization" state (can't do this from the activator script, since this would keep the activator in a state of inactivity when it detaches while the trigger does not - even if that's extremely unlikely to occur)

A positive side effect of this fix is that out-of-place activator scripts (which have been found attached to some vanilla trigger objects) will stop to be an issue: because they have no linked triggers, they'll never receive an update and thus never leave the "WaitingForInitialization" state (meaning that they'll stay inactive forever; to make this totally safe, I also added an empty OnActivate event to the "WaitingForInitialization" state). If you find new ones, leave them as they are. You also can safely remove all earlier fixes for this issue (tested!). Note that this will also eliminate this issue for all mod authors, who may have re-introduced those scripts depending on from where they copied the racks into their house mods.

Link to comment
Share on other sites

Sounds great! Hopefully 3.1 will be available shortly because I'd like to get that thrown into the beta while we're still in it.

Link to comment
Share on other sites

The scripts worked fine on a new game, but when upgrading during a running game, the activator script refused to start in the 'WaitingForInitialization' state, even though this is the auto state.

 

Thinking about a workaround to make the fix retroactive, I realized that I don't need any states. The problem has already been solved by triggering the InitActivator function from an OnUpdate event instead of calling it directly from the trigger script: Since single updates won't stack, the activator only receives one update event, if the time until the event fires is sufficiently longer than the delay between the OnLoad and OnCellAttach events on the trigger script. The latter is usually within the range of 0.1 seconds. Registering the update with a delay of 1 second is both acceptable (it is not possible for a player to activate a rack in less than a second after entering an interior cell) and on the safe side.

 

I need to recompile the scripts now to run another test.

 

----------------------------------------------------------------------

 

There's some interesting stuff discovered while testing the scripts. The following is the log recorded after entering Lakeview Manor, where I hadn't been quite a while before. The triggers have been scripted to register the activator both in their OnLoad and OnCellAttach events. As you can see however, some of the triggers have not unloaded although I haven't been to that cell for quite some time:

[10/11/2013 - 10:44:48PM] [WeaponRackTriggerSCRIPT < (0500B5B9)>]OnCellAttach: [WeaponRackActivateScript < (0500B5B8)>] registered for single update.
[10/11/2013 - 10:44:48PM] [WeaponRackTriggerSCRIPT < (0500B5B7)>]OnCellAttach: [WeaponRackActivateScript < (0500B5B6)>] registered for single update.
[10/11/2013 - 10:44:48PM] [WeaponRackTriggerSCRIPT < (0500B5B5)>]OnCellAttach: [WeaponRackActivateScript < (0500B5B4)>] registered for single update.
[10/11/2013 - 10:44:48PM] [WeaponRackTriggerSCRIPT < (0500B5B3)>]OnCellAttach: [WeaponRackActivateScript < (0500B5B2)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5B7)>]OnCellAttach: [WeaponRackActivateScript < (0500C5B6)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5B5)>]OnCellAttach: [WeaponRackActivateScript < (0500C5B4)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5B3)>]OnCellAttach: [WeaponRackActivateScript < (0500C5B2)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5B1)>]OnCellAttach: [WeaponRackActivateScript < (0500C5B0)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5AC)>]OnCellAttach: [WeaponRackActivateScript < (0500C5AD)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5AB)>]OnCellAttach: [WeaponRackActivateScript < (0500C5AE)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500883B)>]OnCellAttach: [WeaponRackActivateScript < (0500883A)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5AA)>]OnCellAttach: [WeaponRackActivateScript < (0500C5AF)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5A6)>]OnCellAttach: [WeaponRackActivateScript < (0500C5A7)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5A5)>]OnCellAttach: [WeaponRackActivateScript < (0500C5A8)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5A4)>]OnCellAttach: [WeaponRackActivateScript < (0500C5A9)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009659)>]OnCellAttach: [WeaponRackActivateScript < (05009658)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C59E)>]OnCellAttach: [WeaponRackActivateScript < (0500C59D)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C59C)>]OnCellAttach: [WeaponRackActivateScript < (0500C59B)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C59A)>]OnCellAttach: [WeaponRackActivateScript < (0500C599)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C598)>]OnCellAttach: [WeaponRackActivateScript < (0500C597)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009665)>]OnLoad: [WeaponRackActivateScript < (05009664)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009661)>]OnLoad: [WeaponRackActivateScript < (05009660)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500965D)>]OnLoad: [WeaponRackActivateScript < (0500965C)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009123)>]OnCellAttach: [WeaponRackActivateScript < (05009126)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009122)>]OnCellAttach: [WeaponRackActivateScript < (05009127)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008279)>]OnCellAttach: [WeaponRackActivateScript < (05008274)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008278)>]OnCellAttach: [WeaponRackActivateScript < (05008275)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008277)>]OnCellAttach: [WeaponRackActivateScript < (05008276)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009124)>]OnCellAttach: [WeaponRackActivateScript < (05009125)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5B7)>]OnLoad: [WeaponRackActivateScript < (0500C5B6)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5B5)>]OnLoad: [WeaponRackActivateScript < (0500C5B4)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5B3)>]OnLoad: [WeaponRackActivateScript < (0500C5B2)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5B1)>]OnLoad: [WeaponRackActivateScript < (0500C5B0)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5AC)>]OnLoad: [WeaponRackActivateScript < (0500C5AD)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5AA)>]OnLoad: [WeaponRackActivateScript < (0500C5AF)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5A6)>]OnLoad: [WeaponRackActivateScript < (0500C5A7)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5A5)>]OnLoad: [WeaponRackActivateScript < (0500C5A8)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5A4)>]OnLoad: [WeaponRackActivateScript < (0500C5A9)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C5AB)>]OnLoad: [WeaponRackActivateScript < (0500C5AE)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C59E)>]OnLoad: [WeaponRackActivateScript < (0500C59D)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C59C)>]OnLoad: [WeaponRackActivateScript < (0500C59B)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C59A)>]OnLoad: [WeaponRackActivateScript < (0500C599)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500C598)>]OnLoad: [WeaponRackActivateScript < (0500C597)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009659)>]OnLoad: [WeaponRackActivateScript < (05009658)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500883B)>]OnLoad: [WeaponRackActivateScript < (0500883A)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009661)>]OnCellAttach: [WeaponRackActivateScript < (05009660)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (0500965D)>]OnCellAttach: [WeaponRackActivateScript < (0500965C)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009665)>]OnCellAttach: [WeaponRackActivateScript < (05009664)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009124)>]OnLoad: [WeaponRackActivateScript < (05009125)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009123)>]OnLoad: [WeaponRackActivateScript < (05009126)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05009122)>]OnLoad: [WeaponRackActivateScript < (05009127)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008278)>]OnLoad: [WeaponRackActivateScript < (05008275)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008277)>]OnLoad: [WeaponRackActivateScript < (05008276)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500B5B8)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500B5B6)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500B5B4)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500B5B2)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008279)>]OnLoad: [WeaponRackActivateScript < (05008274)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5B6)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5B4)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5B2)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5B0)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5AD)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5A9)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5AE)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5A8)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5AF)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C5A7)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C59D)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C59B)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C597)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05009658)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500C599)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500883A)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008279)>]OnLoad: [WeaponRackActivateScript < (05008274)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008278)>]OnLoad: [WeaponRackActivateScript < (05008275)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05009664)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05008275)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05008276)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05009660)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (0500965C)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05009125)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05009127)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05009126)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05008274)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008277)>]OnLoad: [WeaponRackActivateScript < (05008276)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008278)>]OnLoad: [WeaponRackActivateScript < (05008275)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008279)>]OnLoad: [WeaponRackActivateScript < (05008274)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008279)>]OnLoad: [WeaponRackActivateScript < (05008274)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05008276)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05008275)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05008274)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008278)>]OnLoad: [WeaponRackActivateScript < (05008275)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackActivateScript < (05008275)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008277)>]OnLoad: [WeaponRackActivateScript < (05008276)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008279)>]OnLoad: [WeaponRackActivateScript < (05008274)>] registered for single update.
[10/11/2013 - 10:44:49PM] [WeaponRackTriggerSCRIPT < (05008278)>]OnLoad: [WeaponRackActivateScript < (05008275)>] registered for single update.
[10/11/2013 - 10:44:50PM] [WeaponRackActivateScript < (05008276)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:50PM] [WeaponRackActivateScript < (05008274)>]: OnUpdate event received in empty state.
[10/11/2013 - 10:44:50PM] [WeaponRackActivateScript < (05008275)>]: OnUpdate event received in empty state.
Link to comment
Share on other sites

It works. On cell load, each trigger registers its linked activator twice, but the activators only receive one OnUpdate event. No states needed and no duplicated instances running on the activators. While testing in the Warmaiden's (plenty of pre-placed weapons there), my papyrus log was free of any weapon rack-related errors.

 

This is the log recorded after entering Breezehome:  Note the two lines on top which "sort out" the out-of-place activator scripts by setting them permanently in a state where they stop doing anything.

[10/12/2013 - 03:32:17AM] [WeaponRackActivateScript < (00102A3C)>]: No linked trigger found. State permanently changed to 'Inactive'.
[10/12/2013 - 03:32:17AM] [WeaponRackActivateScript < (00102A3D)>]: No linked trigger found. State permanently changed to 'Inactive'.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A35)>]OnCellAttach : [WeaponRackActivateScript < (00102A36)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A3C)>]OnCellAttach : [WeaponRackActivateScript < (00102A3B)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A3D)>]OnCellAttach : [WeaponRackActivateScript < (00102A3A)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A43)>]OnCellAttach : [WeaponRackActivateScript < (00102A42)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A44)>]OnCellAttach : [WeaponRackActivateScript < (00102A41)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A9D)>]OnCellAttach : [WeaponRackActivateScript < (00102A9E)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A9F)>]OnCellAttach : [WeaponRackActivateScript < (00102AA0)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (110168D4)>]OnCellAttach : [WeaponRackActivateScript < (110168D5)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A35)>]OnLoad : [WeaponRackActivateScript < (00102A36)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A3C)>]OnLoad : [WeaponRackActivateScript < (00102A3B)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A3D)>]OnLoad : [WeaponRackActivateScript < (00102A3A)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A43)>]OnLoad : [WeaponRackActivateScript < (00102A42)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A44)>]OnLoad : [WeaponRackActivateScript < (00102A41)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A9D)>]OnLoad : [WeaponRackActivateScript < (00102A9E)>] registered for single update.
[10/12/2013 - 03:32:17AM] [WeaponRackTriggerSCRIPT < (00102A9F)>]OnLoad : [WeaponRackActivateScript < (00102AA0)>] registered for single update.
[10/12/2013 - 03:32:18AM] [WeaponRackActivateScript < (110168D5)>]: OnUpdate event received. Starting InitActivator.
[10/12/2013 - 03:32:18AM] [WeaponRackActivateScript < (00102A9E)>]: OnUpdate event received. Starting InitActivator.
[10/12/2013 - 03:32:18AM] [WeaponRackActivateScript < (00102A36)>]: OnUpdate event received. Starting InitActivator.
[10/12/2013 - 03:32:18AM] [WeaponRackActivateScript < (00102A3A)>]: OnUpdate event received. Starting InitActivator.
[10/12/2013 - 03:32:18AM] [WeaponRackActivateScript < (00102AA0)>]: OnUpdate event received. Starting InitActivator.
[10/12/2013 - 03:32:18AM] [WeaponRackActivateScript < (00102A3B)>]: OnUpdate event received. Starting InitActivator.
[10/12/2013 - 03:32:18AM] [WeaponRackActivateScript < (00102A42)>]: OnUpdate event received. Starting InitActivator.
[10/12/2013 - 03:32:18AM] [WeaponRackActivateScript < (00102A41)>]: OnUpdate event received. Starting InitActivator.

All that's left to do now is preparing a final version from my debugging version scripts, but first I'll have a cup of coffee. I'll probably upload v3.1 within the next two hours.

Link to comment
Share on other sites

So for these:

[10/12/2013 - 03:32:17AM] [WeaponRackActivateScript < (00102A3C)>]: No linked trigger found. State permanently changed to 'Inactive'.
[10/12/2013 - 03:32:17AM] [WeaponRackActivateScript < (00102A3D)>]: No linked trigger found. State permanently changed to 'Inactive'.

What happens if someone later mods one of these racks and links it to something? Will it begin working again?

Link to comment
Share on other sites

So for these:

What happens if someone later mods one of these racks and links it to something? Will it begin working again?

 

Yes. They check for linked triggers in the OnLoad() event.

 

However, this doesn't apply to any racks. In the first place, this applies to the activator scripts which Beth mistakenly attached to triggers. It would also apply to activators that were mistakenly left somewhere without a rack (there aren't any vanilla ones) and to activators that were not properly linked by a forgetful modder (the latter is why I did put the safety check in at all).

 

EDIT:

Get v3.1. now while it's hot ...

Link to comment
Share on other sites

3.1 is in a USKP 2.0 beta update now. Ran it through for a bit, popping from house to house. Absolutely squeaky clean Papyrus log - first time EVER I've seen it pass through so many player homes without mentioning something about a weapon rack.

 

Sadly, not the case with critter spam, but hey.

Link to comment
Share on other sites

For the coming upgrade of the Extended Racks mod, I have been trying for days now to figure out why my shield-only plaques have problems with pre-placed weapons. And guess what ? I forgot to set a property on the script ....

 

 

EDIT:

And another mystery has been solved: somewhere in one of the critter scripts, I found a comment succeeding a MoveToNode command: "Moving might have disabled 3D temporarily". I should have had a look at the critter scripts earlier.

 

EDIT2:

This also explains why the trigger always receives an OnTriggerLeave and an OnTriggerEnter event in short succession immediately before the weapon is placed. Daryl should have had a look at the critter scripts either, because this was one of the main reasons why activators could stop working randomly with the vanilla scripts (the events can fire out of order; that's why I set the trigger in another state while the weapon is placed).

Link to comment
Share on other sites

Some WeaponRackActivateScript errors about enable parents from alt3rn1ty testing the beta here. Just want to make sure that they don't go unnoticed because of the spoiler.

Link to comment
Share on other sites

Some WeaponRackActivateScript errors about enable parents from alt3rn1ty testing the beta here. Just want to make sure that they don't go unnoticed because of the spoiler.

 

That's from the three activators of the racks in the player's room of Fort Dawnguard. See my last post here:

 

http://www.afkmods.com/index.php?/topic/2805-relzwipz-unofficial-dawnguard-patch/?p=147323

 

No answer yet, but it's obvious now that he forgot them again.

Link to comment
Share on other sites

Is this anything to worry about?

 

[10/13/2013 - 03:47:56PM] Error:  (00097CF6): does not have any 3d and so cannot be moved to.
stack:
    [ (00097CF8)].ObjectReference.MoveToNode() - "<native>" Line ?
    [ (00097CF7)].WeaponRackActivateScript.PlaceItem() - "WeaponRackActivateSCRIPT.psc" Line 399
    [ (00097CF7)].WeaponRackActivateScript.HandleStartingItem() - "WeaponRackActivateSCRIPT.psc" Line 352
    [ (00097CF7)].WeaponRackActivateScript.InitActivator() - "WeaponRackActivateSCRIPT.psc" Line 153
    [ (00097CF7)].WeaponRackActivateScript.OnUpdate() - "WeaponRackActivateSCRIPT.psc" Line ?

Link to comment
Share on other sites

Is this anything to worry about?

 

Won't happen again with v3.1, but is nothing to worry about.

 

Wait. Where is this from ?

 

00097CF6 is the rack itself (i.e. the trigger). Why does the message complain about the trigger (which is not moved to anywhere by the script) when the uppermost line in the stack refers to MoveToNode() running on 00097CF8 (which is an iron sword) ?

 

Somebody pulling your leg ?

Link to comment
Share on other sites

I'm running the latest beta and I noticed that in my log after I found the Bannermist Tower today. I didn't enter the tower, I stayed outside and out of sight of the bandits occupying it. I only went close enough of it to get the location found message. What happaned with the script, I have no idea.

Link to comment
Share on other sites

That's from the three activators of the racks in the player's room of Fort Dawnguard. See my last post here:

 

http://www.afkmods.com/index.php?/topic/2805-relzwipz-unofficial-dawnguard-patch/?p=147323

 

No answer yet, but it's obvious now that he forgot them again.

Well then let's just make sure they're done now... *click*

 

Could have sworn I got those before.

Link to comment
Share on other sites

I'm running the latest beta and I noticed that in my log after I found the Bannermist Tower today. I didn't enter the tower, I stayed outside and out of sight of the bandits occupying it. I only went close enough of it to get the location found message. What happaned with the script, I have no idea.

 

OK.

I have uploaded the debugger versions of the v3.1 scripts. They are available as separate download from the v3.1 overhaul page (where I assume you have access):

 

http://www.afkmods.com/index.php?/files/file/785-weapon-rack-overhaul/

 

Drop the contents of the archive in your Data\Scripts folder. The scripts will print all weapon rack relevant data in a separate log.

Return to that area, then show me the log.

Link to comment
Share on other sites

Yes. They check for linked triggers in the OnLoad() event.

Why OnLoad()?

 

I've been removing all my cart OnLoad() and OnCellLoad() events and replacing them with OnCellAttach() -- the load events don't seem very reliable. I've found through extensive debug.log'ing that OnCellAttach() always runs first, then OnLoad(), then OnCellLoad(). But the latter two don't always run (presumably the stuff is cached).

 

Because I'm outdoors, and my carts have multiple pieces and driver and horse, they may cross cell boundaries and not all be in the same cell.

 

So I can do everything that doesn't require any 3D first, then wait, then do anything that requires 3D.

 

That means I have to add a wait loop before doing anything that requires them to actually be loaded. But the wait loop usually never loops, or only loops once.

;/ Wait3D
;    returns true on failure
/;
bool function Wait3D()
    ; tests show that [Real] was incautious (loop forever, short wait),
    ; but [Scenic] was overcautious (no loop, wait too long).
    ; typically, this loop is done 0 or 1 times -- or fails....
    ;
    int looping = 15; 3.0 total [Scenic] / 0.2 [Real]
    While looping > 0 && (!is3DLoaded() || !tourHorse.Is3DLoaded() || !tourCart.is3DLoaded())
        Utility.Wait(0.2)
        looping -= 1
    endWhile

    if looping <= 0
        debug.trace(self + "Game engine has not rendered 3D data, horse and/or carriage may not display properly!")
        return true
    ;else
    ;    debug.trace(self + "Wait3D() looping=" + looping)
    endIf
    return false
endFunction

I based the wait loop on existing code that looped forever. Damn Bethesda, never make forever loops!!! And why did you have to wait for 3D anyway in an OnCellLoad() function? All the 3D is loaded -- or maybe you know something I don't?!?! ;)

Link to comment
Share on other sites

I've been to the area of Bannermist Tower twice now with your debugger versions of the scripts, but the orignal error hasn't repeated in my papyrus log.

 

Here's the WeaponRackLog when finding the Tower

<snip>

[10/13/2013 - 06:16:55PM] [WeaponRackActivateScript < (00105C0B)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00105C0A)>] in empty state.
[10/13/2013 - 06:16:55PM] [WeaponRackActivateScript < (00105C05)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:16:55PM] [WeaponRackActivateScript < (00105C0B)>]: Starting item [Form < (00013984)>] placed on trigger [WeaponRackTriggerSCRIPT < (00105C0A)>].
[10/13/2013 - 06:16:55PM] [WeaponRackActivateScript < (00105C0B)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:22:49PM] [WeaponRackTriggerSCRIPT < (00097CF2)>]OnCellAttach : [WeaponRackActivateScript < (00097CF3)>] registered for single update.
[10/13/2013 - 06:22:49PM] [WeaponRackTriggerSCRIPT < (00097CF4)>]OnCellAttach : [WeaponRackActivateScript < (00097CF5)>] registered for single update.
[10/13/2013 - 06:22:49PM] [WeaponRackTriggerSCRIPT < (00097CF6)>]OnCellAttach : [WeaponRackActivateScript < (00097CF7)>] registered for single update.
[10/13/2013 - 06:22:50PM] [WeaponRackActivateScript < (00097CF3)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:22:50PM] [WeaponRackActivateScript < (00097CF5)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:22:50PM] [WeaponRackActivateScript < (00097CF7)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF3)>]: Checking whether starting item is in same cell.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF7)>]: Checking whether starting item is in same cell.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF5)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:22:51PM] [WeaponRackTriggerSCRIPT < (00097CF4)>]OnLoad : [WeaponRackActivateScript < (00097CF5)>] registered for single update.
[10/13/2013 - 06:22:51PM] [WeaponRackTriggerSCRIPT < (00097CF6)>]OnLoad : [WeaponRackActivateScript < (00097CF7)>] registered for single update.
[10/13/2013 - 06:22:51PM] [WeaponRackTriggerSCRIPT < (00097CF2)>]OnLoad : [WeaponRackActivateScript < (00097CF3)>] registered for single update.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF7)>]: Starting item is in same cell.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF3)>]: Starting item is in same cell.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF7)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF6)>] in 'activator busy' state.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF7)>]: Beginning to handle starting item.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF3)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF2)>] in 'activator busy' state.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF3)>]: Beginning to handle starting item.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF7)>]: Placed Item = [WEAPON < (00012EB7)>]; Ref = [ObjectReference < (00097CF8)>]
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF7)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF6)>] in empty state.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF7)>]: Starting item [WEAPON < (00012EB7)>] placed on trigger [WeaponRackTriggerSCRIPT < (00097CF6)>].
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF7)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF3)>]: Placed Item = [WEAPON < (00013981)>]; Ref = [ObjectReference < (00097CF9)>]
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF3)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF2)>] in empty state.
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF3)>]: Starting item [WEAPON < (00013981)>] placed on trigger [WeaponRackTriggerSCRIPT < (00097CF2)>].
[10/13/2013 - 06:22:51PM] [WeaponRackActivateScript < (00097CF3)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF5)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF5)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>]: Checking whether starting item is in same cell.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>]: Checking whether starting item is in same cell.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>]: Starting item is in same cell.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>]: Starting item is in same cell.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF6)>] in 'activator busy' state.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>]: Beginning to handle starting item.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF2)>] in 'activator busy' state.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>]: Beginning to handle starting item.
[10/13/2013 - 06:22:52PM] OnTriggerLeave event skipped by trigger [WeaponRackTriggerSCRIPT < (00097CF6)>]; LeavingItem = [WEAPON < (00012EB7)>]; Ref = [ObjectReference < (00097CF8)>]
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>]: Placed Item = [WEAPON < (00012EB7)>]; Ref = [ObjectReference < (00097CF8)>]
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF6)>] in empty state.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>]: Starting item [WEAPON < (00012EB7)>] placed on trigger [WeaponRackTriggerSCRIPT < (00097CF6)>].
[10/13/2013 - 06:22:52PM] OnTriggerLeave event skipped by trigger [WeaponRackTriggerSCRIPT < (00097CF2)>]; LeavingItem = [WEAPON < (00013981)>]; Ref = [ObjectReference < (00097CF9)>]
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF7)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>]: Placed Item = [WEAPON < (00013981)>]; Ref = [ObjectReference < (00097CF9)>]
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF2)>] in empty state.
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>]: Starting item [WEAPON < (00013981)>] placed on trigger [WeaponRackTriggerSCRIPT < (00097CF2)>].
[10/13/2013 - 06:22:52PM] [WeaponRackActivateScript < (00097CF3)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:23:13PM] [WeaponRackTriggerSCRIPT < (00097C58)>]OnCellAttach : [WeaponRackActivateScript < (00097C59)>] registered for single update.
[10/13/2013 - 06:23:13PM] [WeaponRackTriggerSCRIPT < (00097C5A)>]OnCellAttach : [WeaponRackActivateScript < (00097C5B)>] registered for single update.
[10/13/2013 - 06:23:13PM] [WeaponRackTriggerSCRIPT < (00097C62)>]OnCellAttach : [WeaponRackActivateScript < (00097C63)>] registered for single update.
[10/13/2013 - 06:23:13PM] [WeaponRackTriggerSCRIPT < (00097C5C)>]OnCellAttach : [WeaponRackActivateScript < (00097C5D)>] registered for single update.
[10/13/2013 - 06:23:13PM] [WeaponRackTriggerSCRIPT < (00097C58)>]OnLoad : [WeaponRackActivateScript < (00097C59)>] registered for single update.
[10/13/2013 - 06:23:13PM] [WeaponRackTriggerSCRIPT < (00097C5A)>]OnLoad : [WeaponRackActivateScript < (00097C5B)>] registered for single update.
[10/13/2013 - 06:23:13PM] [WeaponRackTriggerSCRIPT < (00097C5C)>]OnLoad : [WeaponRackActivateScript < (00097C5D)>] registered for single update.
[10/13/2013 - 06:23:14PM] [WeaponRackActivateScript < (00097C63)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:23:14PM] [WeaponRackActivateScript < (00097C63)>]: Checking whether starting item is in same cell.
[10/13/2013 - 06:23:14PM] [WeaponRackActivateScript < (00097C59)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:23:14PM] [WeaponRackActivateScript < (00097C5B)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:23:14PM] [WeaponRackActivateScript < (00097C5D)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:23:14PM] [WeaponRackActivateScript < (00097C59)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:23:14PM] [WeaponRackActivateScript < (00097C5D)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:23:14PM] [WeaponRackActivateScript < (00097C5B)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:23:15PM] [WeaponRackActivateScript < (00097C63)>]: Starting item is not in same cell.
[10/13/2013 - 06:23:15PM] [WeaponRackActivateScript < (00097C63)>]: StartingItemHasBeenGrabbed = True.
[10/13/2013 - 06:23:15PM] [WeaponRackActivateScript < (00097C63)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:23:15PM] [WeaponRackTriggerSCRIPT < (00097C62)>]OnLoad : [WeaponRackActivateScript < (00097C63)>] registered for single update.
[10/13/2013 - 06:23:23PM] [WeaponRackActivateScript < (00097C63)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:23:23PM] [WeaponRackActivateScript < (00097C63)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:26:56PM] [WeaponRackTriggerSCRIPT < (00097C5A)>]OnCellAttach : [WeaponRackActivateScript < (00097C5B)>] registered for single update.
[10/13/2013 - 06:26:56PM] [WeaponRackTriggerSCRIPT < (00097C5C)>]OnCellAttach : [WeaponRackActivateScript < (00097C5D)>] registered for single update.
[10/13/2013 - 06:26:56PM] [WeaponRackTriggerSCRIPT < (00097C62)>]OnCellAttach : [WeaponRackActivateScript < (00097C63)>] registered for single update.
[10/13/2013 - 06:26:56PM] [WeaponRackTriggerSCRIPT < (00097C58)>]OnCellAttach : [WeaponRackActivateScript < (00097C59)>] registered for single update.
[10/13/2013 - 06:26:57PM] [WeaponRackActivateScript < (00097C5B)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:26:57PM] [WeaponRackActivateScript < (00097C5D)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:26:57PM] [WeaponRackActivateScript < (00097C63)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:26:57PM] [WeaponRackActivateScript < (00097C59)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:26:57PM] [WeaponRackActivateScript < (00097C5B)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:26:57PM] [WeaponRackActivateScript < (00097C5D)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:26:57PM] [WeaponRackActivateScript < (00097C63)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:26:57PM] [WeaponRackActivateScript < (00097C59)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:30:27PM] [WeaponRackTriggerSCRIPT < (00097CF6)>]OnCellAttach : [WeaponRackActivateScript < (00097CF7)>] registered for single update.
[10/13/2013 - 06:30:27PM] [WeaponRackTriggerSCRIPT < (00097CF4)>]OnCellAttach : [WeaponRackActivateScript < (00097CF5)>] registered for single update.
[10/13/2013 - 06:30:27PM] [WeaponRackTriggerSCRIPT < (00097CF2)>]OnCellAttach : [WeaponRackActivateScript < (00097CF3)>] registered for single update.
[10/13/2013 - 06:30:28PM] [WeaponRackTriggerSCRIPT < (00097CF4)>]OnLoad : [WeaponRackActivateScript < (00097CF5)>] registered for single update.
[10/13/2013 - 06:30:28PM] [WeaponRackTriggerSCRIPT < (00097CF6)>]OnLoad : [WeaponRackActivateScript < (00097CF7)>] registered for single update.
[10/13/2013 - 06:30:28PM] [WeaponRackTriggerSCRIPT < (00097CF2)>]OnLoad : [WeaponRackActivateScript < (00097CF3)>] registered for single update.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF5)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF5)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>]: Checking whether starting item is in same cell.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>]: Checking whether starting item is in same cell.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>]: Starting item is in same cell.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>]: Starting item is in same cell.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF6)>] in 'activator busy' state.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>]: Beginning to handle starting item.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF2)>] in 'activator busy' state.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>]: Beginning to handle starting item.
[10/13/2013 - 06:30:29PM] OnTriggerLeave event skipped by trigger [WeaponRackTriggerSCRIPT < (00097CF6)>]; LeavingItem = [WEAPON < (00012EB7)>]; Ref = [ObjectReference < (00097CF8)>]
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>]: Placed Item = [WEAPON < (00012EB7)>]; Ref = [ObjectReference < (00097CF8)>]
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF6)>] in empty state.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>]: Starting item [WEAPON < (00012EB7)>] placed on trigger [WeaponRackTriggerSCRIPT < (00097CF6)>].
[10/13/2013 - 06:30:29PM] OnTriggerLeave event skipped by trigger [WeaponRackTriggerSCRIPT < (00097CF2)>]; LeavingItem = [WEAPON < (00013981)>]; Ref = [ObjectReference < (00097CF9)>]
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF7)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>]: Placed Item = [WEAPON < (00013981)>]; Ref = [ObjectReference < (00097CF9)>]
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>]: Trigger Marker [WeaponRackTriggerSCRIPT < (00097CF2)>] in empty state.
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>]: Starting item [WEAPON < (00013981)>] placed on trigger [WeaponRackTriggerSCRIPT < (00097CF2)>].
[10/13/2013 - 06:30:29PM] [WeaponRackActivateScript < (00097CF3)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:30:40PM] [WeaponRackTriggerSCRIPT < (00097C58)>]OnCellAttach : [WeaponRackActivateScript < (00097C59)>] registered for single update.
[10/13/2013 - 06:30:40PM] [WeaponRackTriggerSCRIPT < (00097C5A)>]OnCellAttach : [WeaponRackActivateScript < (00097C5B)>] registered for single update.
[10/13/2013 - 06:30:40PM] [WeaponRackTriggerSCRIPT < (00097C5C)>]OnCellAttach : [WeaponRackActivateScript < (00097C5D)>] registered for single update.
[10/13/2013 - 06:30:40PM] [WeaponRackTriggerSCRIPT < (00097C62)>]OnCellAttach : [WeaponRackActivateScript < (00097C63)>] registered for single update.
[10/13/2013 - 06:30:40PM] [WeaponRackTriggerSCRIPT < (00097C58)>]OnLoad : [WeaponRackActivateScript < (00097C59)>] registered for single update.
[10/13/2013 - 06:30:40PM] [WeaponRackTriggerSCRIPT < (00097C5C)>]OnLoad : [WeaponRackActivateScript < (00097C5D)>] registered for single update.
[10/13/2013 - 06:30:40PM] [WeaponRackTriggerSCRIPT < (00097C5A)>]OnLoad : [WeaponRackActivateScript < (00097C5B)>] registered for single update.
[10/13/2013 - 06:30:41PM] [WeaponRackActivateScript < (00097C63)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:30:41PM] [WeaponRackActivateScript < (00097C5D)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:30:41PM] [WeaponRackActivateScript < (00097C5B)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:30:41PM] [WeaponRackActivateScript < (00097C59)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:30:41PM] [WeaponRackTriggerSCRIPT < (00097C62)>]OnLoad : [WeaponRackActivateScript < (00097C63)>] registered for single update.
[10/13/2013 - 06:30:41PM] [WeaponRackActivateScript < (00097C63)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:30:41PM] [WeaponRackActivateScript < (00097C5D)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:30:41PM] [WeaponRackActivateScript < (00097C5B)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:30:41PM] [WeaponRackActivateScript < (00097C59)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:30:42PM] [WeaponRackActivateScript < (00097C63)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:30:42PM] [WeaponRackActivateScript < (00097C63)>] enabled on cell attach; PlacedItemInit = True; TOC = 0

 

Here's a log from returning to the Tower after having already found it

[10/13/2013 - 06:38:20PM] WeaponRackLog log opened (PC)
[10/13/2013 - 06:38:20PM] [WeaponRackTriggerSCRIPT < (00097CF4)>]OnLoad : [WeaponRackActivateScript < (00097CF5)>] registered for single update.
[10/13/2013 - 06:38:20PM] [WeaponRackTriggerSCRIPT < (00097CF2)>]OnLoad : [WeaponRackActivateScript < (00097CF3)>] registered for single update.
[10/13/2013 - 06:38:20PM] [WeaponRackTriggerSCRIPT < (00097CF6)>]OnLoad : [WeaponRackActivateScript < (00097CF7)>] registered for single update.
[10/13/2013 - 06:38:21PM] [WeaponRackActivateScript < (00097CF5)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:38:21PM] [WeaponRackActivateScript < (00097CF3)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:38:21PM] [WeaponRackActivateScript < (00097CF7)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:38:21PM] [WeaponRackActivateScript < (00097CF5)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:38:21PM] [WeaponRackActivateScript < (00097CF3)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:38:21PM] [WeaponRackActivateScript < (00097CF7)>] disabled on cell attach; PlacedItemInit = True; TOC = 1
[10/13/2013 - 06:38:27PM] [WeaponRackTriggerSCRIPT < (00097C58)>]OnCellAttach : [WeaponRackActivateScript < (00097C59)>] registered for single update.
[10/13/2013 - 06:38:27PM] [WeaponRackTriggerSCRIPT < (00097C5A)>]OnCellAttach : [WeaponRackActivateScript < (00097C5B)>] registered for single update.
[10/13/2013 - 06:38:27PM] [WeaponRackTriggerSCRIPT < (00097C5C)>]OnCellAttach : [WeaponRackActivateScript < (00097C5D)>] registered for single update.
[10/13/2013 - 06:38:27PM] [WeaponRackTriggerSCRIPT < (00097C62)>]OnCellAttach : [WeaponRackActivateScript < (00097C63)>] registered for single update.
[10/13/2013 - 06:38:27PM] [WeaponRackTriggerSCRIPT < (00097C5A)>]OnLoad : [WeaponRackActivateScript < (00097C5B)>] registered for single update.
[10/13/2013 - 06:38:27PM] [WeaponRackTriggerSCRIPT < (00097C58)>]OnLoad : [WeaponRackActivateScript < (00097C59)>] registered for single update.
[10/13/2013 - 06:38:27PM] [WeaponRackTriggerSCRIPT < (00097C5C)>]OnLoad : [WeaponRackActivateScript < (00097C5D)>] registered for single update.
[10/13/2013 - 06:38:28PM] [WeaponRackTriggerSCRIPT < (00097C62)>]OnLoad : [WeaponRackActivateScript < (00097C63)>] registered for single update.
[10/13/2013 - 06:38:28PM] [WeaponRackActivateScript < (00097C5B)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:38:28PM] [WeaponRackActivateScript < (00097C59)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:38:28PM] [WeaponRackActivateScript < (00097C5D)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:38:28PM] [WeaponRackActivateScript < (00097C5B)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:38:28PM] [WeaponRackActivateScript < (00097C59)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:38:28PM] [WeaponRackActivateScript < (00097C5D)>] enabled on cell attach; PlacedItemInit = True; TOC = 0
[10/13/2013 - 06:38:29PM] [WeaponRackActivateScript < (00097C63)>]: OnUpdate event received. Starting InitActivator.
[10/13/2013 - 06:38:29PM] [WeaponRackActivateScript < (00097C63)>] enabled on cell attach; PlacedItemInit = True; TOC = 0

Link to comment
Share on other sites

Why OnLoad()?

 

I use the OnLoad event to "filter" any loose activator scripts (Bethesda did attach activator scripts to some triggers) and activators without a linked trigger. The event just checks whether it finds the link, and if not, sets the script in a state of inactivity where it won't react to any event. This is just to save performance and to make sure that those loose scripts and activators won't do anything unexpected after all.

 

Now, when a forgetful modder does not properly link a rack's constituents and runs his mod for testing purposes, the activator would be set in an inactive state forever and could only be activated again from script conceived only for that purpose. Thus, the OnLoad event in the inactive state does also check for a linked trigger, and if it is found, resets the script into empty state.

 

In other words, the OnLoad event does nothing that is relevant for the actual functionality of the rack. I just needed an event that fires after reloading and was not already used.

 

As for the Is3DLoaded checks, they run on the weapons that are handled by the rack. The player's item, for example, is dropped from the player's inventory at runtime, before being moved onto the rack. Preplaced items, on the other hand, may run into an issue with the GetParentCell function and need an Is3DLoaded check as well:

 

http://www.afkmods.com/index.php?/topic/3717-skyrim-the-papyrus-function-getparentcell-and-what-may-happen-when-it-runs-on-a-persistent-reference/

Link to comment
Share on other sites

I just needed an event that fires after reloading and was not already used.

Does OnLoad() fire after loading a save? OnCellLoad() does not!

Link to comment
Share on other sites

I've been to the area of Bannermist Tower twice now with your debugger versions of the scripts, but the orignal error hasn't repeated in my papyrus log.

 

There's always a negligible chance in outdoor areas that the rack unloads after the 3D check and before running subsequent commands while you are moving away from it. There's nothing we can do to prevent this, except for adding a 3D check after every command (but even then, an even samller chance persists that it still unloads inbetween). The logs show that the racks are working properly, and the glitch was obiously difficult to reproduce. If it occurs at all, it won't have any effect on player's items anyway, because you have to stand in front of it to activate it (and can't move away far enough while the scripts are working).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...