Jump to content

SCREW UPDATE3D!!! DO THIS INSTEAD!!!!!!


Recommended Posts

Okay, some people in scripting know that the Update3D system works to update the physical model of a reference.... particularly that of an NPC.  And if done en-masse with the player nearby, it can cause SERIOUS problems... KE-RAAAASSH!!!  Some PCs may not be able to cope with the sheer number of Update3D commands in a single shot

 

So, for the mostpart, SCREW....

target.Update3D

 

One may need it for very specific projects that may affect actual blockhead overlays... but most of the time... naw.

 

Instead of that, I used a technique that was based on the old old DOUBLE-FACE fix where the NPC reference was disabled, teleported elsewhere, had Update3D performed away from the player, re-enabled, and then returned.

 

ALL OF THIS WAS NOT NEEDED!

 

Working on a new mod, I tried streamlining the method I used to use.

 

Essentially, the old Double-Face fix system relied upon a custom cell with two xMarkers (or the like).   A script would move one marker to where your target NPC stood. The script would then move the NPC to the marker in the cell and disable it. After executing Update3D, the script would then move the NPC to the location of the first marker and re-enable it.

 

Wow, was all THAT unnecessary.

 

First... I removed Update3D for a test.  To my surprise, it worked!  The NPC still updated its appearance just fine!

Then I wondered if I even needed to move the item into the cell!  That was a severely complete SUCCESS!

 

In essence, to update your NPC... just do this


target.Disable

target.Enable

 

And that works just as fine as Update3D but without as much of the headache!!!

 

The new mod I worked on, I was able to update 150 characters in a single room with the player when Update3D would have crashed with a mere 30.  I just haven't checked YET if I can go further!!!!

 

However, very graphic intensive programs such as HiyokoGeneratorGeneForge may still require Update3D.  In this case, I would recommend an Update3D sammich like so.

 

target.Disable

target.3DUpdate

target.Enable

 

The Disable/Enable commands act as a buffer to forstall and slowdown the process.  It may not be as effective, but I performed an edit to HGGF and was able to save/reload in a cell with over 90 Hiyoko children without a crash. This would not have been possible otherwise.

 

 

Edited by LongDukDong
Link to comment
  • 3 months later...

Thank you, I have a script in which I make heavy use of update3d for people changing their clothes after certain activities which are triggered by markers and I may switch for disable/enable as you suggested, it may run smoother. It could be a problem for me if they are going to disappear, even shortly, with .disable, but I guess I'll find out pretty soon. In any case thanks for this nice suggestion

 

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use