Make non-static static?

Post » Tue Jun 19, 2012 11:20 am

Hi.

I have an object in my cell (Shipwreck board), which I am using to cover up some ugly looking walls.
The problem is that these boards don't act the way I want or expect them to.
I have tried double clicking on the boards and checking the box "Don't havoc settle", strangely enough this only seems to work on a few of the boards. Even though they all have the box checked.


1. Bottom line: I want to make Shipwreck boards static, so they don't move whatsoever. Is this possible and how?

2. Bonus question: I want to add some blood splatter to my cell, but I don't know what they are called in the Object Window, I tried filtering for blood but couldn't find anything that suits my need. I imagine the blood splatter would look and act a lot like "HayScatter01".


Thanks in advance.
User avatar
KIng James
 
Posts: 3499
Joined: Wed Sep 26, 2007 2:54 pm

Post » Tue Jun 19, 2012 10:28 am

1. There are three ways, which is easier depends on your computer knowledge.
  • Extract the model from the bsa into its proper folder and then make a static using that model
  • Like 1. but you can save yourself the hassle of searching the model in the BSA: just create the folders and make an empty text file with the model's name, select the pseudo-nif in the CK then delete the file.
  • My personal favorite because it's much faster once did it a couple of times: Create a copy of that movable static, save your mod in the CK, open it in http://skyrim.nexusmods.com/downloads/file.php?id=5064, jump to your copy (use Edit/Find) double click it and change the text "MSTT" under "name" to "STAT". Save in TESVSnip and reload in the CK, and your copy is now a static.

2. The blood splatters are generated ingame, you'll find them under Miscellaneous texure sets (filter for "blood") When you drag them in the render window they're just an arrow that points to the place that should be splattered with blood.
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Tue Jun 19, 2012 6:55 am

1. Is there no easier way? Like copying a static object, edit the copy, change it's model to the same model as "shipwreck board" then save it.

2. Thanks. Silly arrows.
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Tue Jun 19, 2012 12:53 pm

1. I just found this on the wiki:

http://www.creationkit.com/SetMotionType_-_ObjectReference

I quote:
"Sets the object's havok motion type. This function is widely used as part of the included defaultDisableHavokOnLoad script, which is intended to make physics-enabled objects behave as if they were static."
-This sounds a lot like what I'm trying to do.

I tried filtering: "deafault*Havok" in the Object Window, but found nothing. =(
-Does anyone know how to use "defaultDisableHavokOnLoad" exactly?

Thanks.
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am

Post » Tue Jun 19, 2012 4:16 am

You need to add the script to the object reference, rightmost tab. Sounds like will disable grabbing as well.
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Tue Jun 19, 2012 1:29 am

There is a book activator in the CK that has a noHavok script attached, you should be able to use that.

MGRDBook01Activator

The script attached to it is called defaultDisableHavokOnLoad you "should" be able to add this to your item and change the properties to suit your needs.

Have a mess around :smile:
User avatar
josie treuberg
 
Posts: 3572
Joined: Wed Feb 07, 2007 7:56 am

Post » Tue Jun 19, 2012 1:21 pm

You need to add the script to the object reference, rightmost tab.

I'm not sure what you mean.
If I understood you right I need to:
-Double-click on the object that I have placed in my cell.
-Go to the rightmost tab (Scripts).
-Add a script.

Is this correct?

What kind of event would a script like this use?
I'm thinking something like "On Cell Load" -is there an event that does that?


"This function is widely used as part of the included defaultDisableHavokOnLoad script" -by the sound of this there should already be a script available for this that I can use? Where can I find it?


EDIT: I just read magicpanda's post (we posted about the same time.)
With your help I found a script that looks like this:

scriptName defaultDisableHavokOnLoad extends ObjectReferencebool property havokOnHit = TRUE auto{Start Havok Sim when hit? DEFAULT: TRUE}bool property havokOnActivate auto{Start Havok Sim when activated? DEFAULT: FALSE}bool property havokOnZKey auto{Start Havok Sim when grabbed by player? DEFAULT: FALSE}keyword property linkHavokPartner auto{Link with this keyword and that ref will also sim with myself}bool property beenSimmed auto hidden{prevent an object that has been havok'd in-game from going static}EVENT onCellAttach()if (beenSimmed == FALSE && Self.Is3DLoaded())  setMotionType(Motion_Keyframed, TRUE);   ;debug.trace("havok disabled on: " + self)endifendEVENTEVENT onLoad()if (beenSimmed == FALSE && Self.Is3DLoaded())  setMotionType(Motion_Keyframed, TRUE);   ;debug.trace("havok disabled on: " + self)endifendEVENTEVENT onActivate(ObjectReference triggerRef)if havokonActivate == TRUE && beenSimmed == FALSE  ReleaseToHavok()endifendEVENTEVENT onHit(ObjectReference var1, Form var2, Projectile var3, bool var4, bool var5, bool var6, bool var7)if havokOnHit == TRUE && beenSimmed == FALSE  ReleaseToHavok()endifendEVENTEVENT onGrab()if havokOnZkey == TRUE && beenSimmed == FALSE  ReleaseToHavok()endifendEVENTFUNCTION ReleaseToHavok()  beenSimmed = TRUE  objectReference myLink = getLinkedRef(linkHavokPartner)  if myLink != NONE   defaultDisableHavokOnLoad linkScript = myLink as defaultDisableHavokOnLoad   if (linkScript)  && (linkScript.beenSimmed == FALSE)    linkScript.ReleaseToHavok()   endif  endif  setMotionType(Motion_Dynamic, TRUE)  Self.ApplyHavokImpulse(0, 0, 1, 5);   Debug.Trace("Released Havok.")endFUNCTION

How can I add it to a certain, placed object in my cell?
User avatar
Amanda Leis
 
Posts: 3518
Joined: Sun Dec 24, 2006 1:57 am

Post » Tue Jun 19, 2012 7:49 am

Just add that script to your item. It's already in the game so just open the item you want to add the script to. Skip to the script tab > Add > in the filter type in defaultDisableHavokOnLoad which should show the script. All you need to do then is set up the properties.

Have a look at the item MGRDBook01Activator and see how it has it's script properties set up and copy them is probably a good bet
User avatar
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Tue Jun 19, 2012 12:12 am

I played around a little and here's what I did.
I started by copying and modifying the defaultDisableHavokOnLoad script - because I felt I didn't need all the code.
So here's what my script looks like:

Scriptname BM_DisableHavokOnLoad extends ObjectReferenceEVENT onLoad()setMotionType(Motion_Keyframed, TRUE)endEVENTEVENT onCellAttach()setMotionType(Motion_Keyframed, TRUE)endEVENT

I removed the whole part where it returns to normal (ie if the object is hit it starts havok'ing again) because I figured I didn't want that to happen anyway. So all my script does is freeze the object.

I double-clicked and added my new script to the scripts-tab of the object.
It works fine except for one thing:
-It seems that it takes a little while for the script to run, because the object starts havoking and moves around as soon as the cell loads, then when the script finally is done the object stops moving and ends up slightly off from where I placed it. All my objects with my script acts this way.

Is it possible to run the scripts before the cell loads? (Pre-load.)
User avatar
Hope Greenhaw
 
Posts: 3368
Joined: Fri Aug 17, 2007 8:44 pm

Post » Tue Jun 19, 2012 11:35 am

I started by copying and modifying the defaultDisableHavokOnLoad script - because I felt I didn't need all the code.

So you want to save yourself the hassle of having to spend 1-5 minutes to change that movable static into a true static, and then proceed to make your own stripped down variant of an utility script that was made for this purpose?


-It seems that it takes a little while for the script to run, because the object starts havoking and moves around as soon as the cell loads, then when the script finally is done the object stops moving and ends up slightly off from where I placed it. All my objects with my script acts this way.

Try the original script first, if it also doesn't work as you intended, don't try to be smarter than the gamesas scripters.

Of course you could make a quest script that disables havok on those references before you enter the cell, but what's the point?
Just make a true static out of that movable static and be done with it.
User avatar
Antony Holdsworth
 
Posts: 3387
Joined: Tue May 29, 2007 4:50 am

Post » Tue Jun 19, 2012 8:12 am

By double clicking on the reference, going to the script tab, clicking on Script/Add and either filtering for that script-name or scrolling down to it.

So you want to save yourself the hassle of spending 1-5 minutes to change that movable static into a true static, and then proceed to make your own variant of an utility script that was made for this purpose?

Try the original script first, if it doesn't work as you intended, don't try to be smarter than the gamesas scripters.

Either the gamesas script works for your purpose or you need to make a true static out of that movable static.

Neither my or the original script works.
I still think there's hope for my script, though.
Instead of the script running when the cell is completely loaded I want to run the script before the cell loads (preload), I just can't seem to find any such event or similar type of code. =(
User avatar
herrade
 
Posts: 3469
Joined: Thu Apr 05, 2007 1:09 pm

Post » Tue Jun 19, 2012 3:34 am

Well, there's no point in discussing this any further.

Maybe in a few days you come up with an ingeniuous solution to insta-unhavok a movable static. It may be possible, but it's pretty pointless unless you're doing it just for the fun of it. If you actually make a mod where you need some boards to cover up some walls, you should simply make a new static using the board model and be done with it.
User avatar
Silvia Gil
 
Posts: 3433
Joined: Mon Nov 20, 2006 9:31 pm

Post » Tue Jun 19, 2012 1:03 pm

I gave up and decided to use your TESVSnip-solution, JOG. It works really well.
Thanks for your help.
User avatar
jessica robson
 
Posts: 3436
Joined: Mon Oct 09, 2006 11:54 am


Return to V - Skyrim