Disabling Havoc through script

Post » Wed Dec 01, 2010 2:01 am

Can i disable havoc behaviour in scripts? Without affecting other things?

Cause there seems to be a bug with Broc Flower and White horsenesttle, which i want to circumvent.

To see what i mean go in game and use your "grab" key on 1 of these plants.

So basicly, for activators i need to disable their havoc behaviour, without affecting the ability to use them.
User avatar
Brian Newman
 
Posts: 3466
Joined: Tue Oct 16, 2007 3:36 pm

Post » Tue Nov 30, 2010 9:13 pm

I waited to see if anyone of the real NIF exports would answer this first.

My understanding is that Havok is not "controllable" via the GECK or a script command, but rather it is controlled by the NIF file itself. Either the NIF has Havok'ed flagging and thus has physics, or it doesn't. I don't think it would be possible to change this NIF flagging "on the fly" to so speak, when in-game.

I think your best option here is to swap-out a Havok'ed NIF with a non-Havok'ed NIF in game to simulate the same effect.

Luck,

Miax
User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm

Post » Wed Dec 01, 2010 8:56 am

Hmm, alright. i was afaid of that.

In that case, i downloaded NifScope already, cause i figured i may have needed to change the model. Problem is .. i have no idea how. I see a lot of entries when i open a model, but i have no idea what i need to change/delete to make sure it doesn't have any havoc behaviour.

The problem is that none of the plants have havoc physics, except for the broc flower and white horsenettle. They are bugged. You can grab one in game and it will go all quircky on you because of the physics. So i need to disable physics.

But anyway, any idea which setting i need to delete/disable/turn off, whatever in nifscope to disable physics?
User avatar
Cat
 
Posts: 3451
Joined: Mon Dec 18, 2006 5:10 am

Post » Wed Dec 01, 2010 9:33 am

Hmm, alright. i was afaid of that.

In that case, i downloaded NifScope already, cause i figured i may have needed to change the model. Problem is .. i have no idea how. I see a lot of entries when i open a model, but i have no idea what i need to change/delete to make sure it doesn't have any havoc behaviour.

The problem is that none of the plants have havoc physics, except for the broc flower and white horsenettle. They are bugged. You can grab one in game and it will go all quircky on you because of the physics. So i need to disable physics.

But anyway, any idea which setting i need to delete/disable/turn off, whatever in nifscope to disable physics?


You can sometimes get away with cheating a havok item into acting static by, duplicating something you know is static "the postal bin for example" and, directing it to use the nif you want. One advantage of doing this is that you can havok items into a cell while working in GECK but, in game they act as true statics. Note, using havok items for container will result in a movable container.

Give it a shot and, see if it works for your needs.

On the nifscope front take a look at an item that you know is a static, you need to study it's collisions Look for the contextual menus that reference if the object is static or, clutter. Personally, I've found it much easier to use blender to swop out collisions because I find much of nifscope to be over complicated and, confusing.

If you need I can give you a mini tutorial on how I use blender to turn statics into havok items, it should easily work in reverse.

cev
User avatar
adam holden
 
Posts: 3339
Joined: Tue Jun 19, 2007 9:34 pm

Post » Wed Dec 01, 2010 1:08 pm

The problem is that none of the plants have havoc physics, except for the broc flower and white horsenettle. They are bugged. You can grab one in game and it will go all quircky on you because of the physics. So i need to disable physics.

But anyway, any idea which setting i need to delete/disable/turn off, whatever in nifscope to disable physics?

I think the better solution might be to have one of us fix those two NIFs by increasing the size of the collision mesh and/or making it a box (which isn't realistic, but should also prevent it from freaking out and bouncing around so much).

Below is material from a post by SkyKappa back in the early Fallout 3 days that I can no longer find. He gave a GREAT write-up on how the Havok flagging works:

Solver Deactivation Settings:A list of possible solver deactivation settings. This value defines how the solver deactivates objects. The solver works on a per object basis.Note: Solver deactivation does not save CPU, but reduces creeping of movable objects in a pile quite dramatically.SOLVER_DEACTIVATION_INVALID,No solver deactivationSOLVER_DEACTIVATION_OFF,Very conservative deactivation, typically no visible artifacts.SOLVER_DEACTIVATION_LOW,Normal deactivation, no serious visible artifacts in most casesSOLVER_DEACTIVATION_MEDIUM,Fast deactivation, visible artifactsSOLVER_DEACTIVATION_HIGH,Very fast deactivation, visible artifactsOther Settings:Position;The initial position of the body.This defaults to 0,0,0.Rotation;The initial rotation of the body.This defaults to the Identity quaternion.Linear Velocity;The initial linear velocity of the body.This defaults to 0,0,0.Angular Velocity;The initial angular velocity of the body.This defaults to 0,0,0.Inertia Tensor;The inertia tensor of the rigid body. This defaults to the identity matrix.CenterThe center of mass in the local space of the rigid body.This defaults to 0,0,0.Mass;The mass of the body.This defaults to 1.Linear Damping;The initial linear damping of the body.This defaults to 0.Angular Damping;The initial angular damping of the body.This defaults to 0.05.Friction;The initial friction of the body.This defaults to 0.5.Restitution;The initial restitution of the body.This defaults to 0.4.If the restitution is not 0.0 the object will need extra CPUfor all new collisions. Try to set restitution to 0 for maximumperformance (e.g. collapsing buildings! banghead.gif )Max Linear Velocity;The maximum linear velocity of the body (in m/s).This defaults to 200.Max Angular Velocity;The maximum angular velocity of the body (in rad/s).This defaults to 200.Penetration Depth:The maximum allowed penetration for this object. The default is -1.This is a hint to the engine to see how much CPU the engine shouldinvest to keep this object from penetrating. A good choice is 5% - 20% of thesmallest diameter of the object. Setting the initial value less than zeroallows the penetration depth to be estimated by the RigidBody upon creation.This estimated value is 1/5th of the smallest dimension of the objects radius.Motion TypeThe initial motion type of the body.This defaults to hkpMotion::MOTION_DYNAMICDeactivator TypeThe initial deactivator type of the body.This defaults to hkpRigidBodyDeactivator::DEACTIVATOR_SPATIAL.Solver DeactivationAllows you to enable an extra single object deactivation schema.That means the engine will try to "deactivate" single objects (not just entire islands)if those objects get very slow.This does not save CPU, however it can reduce small movements in big stacks of objects dramatically.This defaults to SOLVER_DEACTIVATION_LOW.Collidable Quality TypeThe quality type, used to specify when to use continuous physicsThis defaults to HK_COLLIDABLE_QUALITY_INVALIDIf you add a hkpRigidBody to the hkpWorld, this type automatically gets converted to eitherHK_COLLIDABLE_QUALITY_FIXED, HK_COLLIDABLE_QUALITY_KEYFRAMED or HK_COLLIDABLE_QUALITY_DEBRISIf anyone finds anything to be inaccurate in this, please let me know so I can correct it.Take CareSkykappaEdit: Some more info here from SaidenStorm, thanks Saiden!:Those are the settings that NifSkope defaults to when you create a RigidBody -> and the descriptions within NifSkope are not correct so you can not trust them -> also penetration Depth is not rigid body to rigid body in a direct manner it relates to how far into that body a penetrating body (IE Arrows for Oblivion and Projectiles set to pin limbs for FO3) will penetrate into that rigidbody before it momentum is arrested and its rigid body is deactivated so it does not bounce around or fall.also Restitution is Elasticity(every 3D App with Havok integrated will call this Elasticity, the Havok Exporter will call it restitution but they are the same value) -> IE the amount a rigid body will flex before tring to resolve its own boundries -> this can be used to create bouncing balls or similar objects -> and almost every object has this set to non-zero for a reason as RigidBodies do not always calculate instantly and some small amout of elasticity is required to get smooth collisions between moving objects.

If your not blind by now and are still really stuck, let me know which two models your most interested in and I'll touch them up. Is it just "broc flower and white horsenettle" ?

Cheers,

Miax
User avatar
Neko Jenny
 
Posts: 3409
Joined: Thu Jun 22, 2006 4:29 am

Post » Wed Dec 01, 2010 8:44 am

Yeah, only the broc flower and horsenettle flowers are "bugged". Rhose 2 have havoc info, all of the other flowers do not.

I tried to look at them with nifscope, but nifscope is a bunch of mumbo jumbo to me. From most entries i have no clue what it is.

I also downloaded blender and found out i couldn't open or import .nif files, so i found a plugin for blender to import nif files. But i cant seem to install it it. It tells me it cant find blender.exe.

And CevSteel, swapping wouln't be practical in my case i think. Since then i would be needing o replace every flower in the world, while all that's wrong is the nif fiile.
User avatar
Alada Vaginah
 
Posts: 3368
Joined: Sun Jun 25, 2006 8:31 pm

Post » Wed Dec 01, 2010 10:25 am

MrSlackPants,

I modified both the Broc and Horsenettle flowers, creating two new versions (a Havok and a Static version). The Havok version now has a rectangular collision mesh that doesn't go insane when dropped, and the Static versions have no physics. http://rapidshare.com/files/435440429/MiaxBrocNHorseFlowers.zip
Let me know if you run into any problems, and consider this a very small Thank You for all the great explosions you added to my Fallout 3 experience. :)

Miax
User avatar
Quick Draw
 
Posts: 3423
Joined: Sun Sep 30, 2007 4:56 am

Post » Wed Dec 01, 2010 7:16 am

MrSlackPants,

I modified both the Broc and Horsenettle flowers, creating two new versions (a Havok and a Static version). The Havok version now has a rectangular collision mesh that doesn't go insane when dropped, and the Static versions have no physics. http://rapidshare.com/files/435440429/MiaxBrocNHorseFlowers.zip
Let me know if you run into any problems, and consider this a very small Thank You for all the great explosions you added to my Fallout 3 experience. :)

Miax

Oh wow. Thank you. It would have taken a lot of time for me to find out how it all worked. Thanks a bunch. I'll download and check it out.

And you're welcome as well. Nice to know that the people that downloaded the mods actualy find them enjoyable. :) Good stuff.

BTW. the flowers are for the dynamic herbalism mod. I wanted to use the grab button on them to trigger some script (so i didn't need yet another button or another options in the OnActivate block (more menu's is meh)) I expanded it quite a bit now actualy, though there are still features i'd like to implement.

So far i added
  • Chemical Set, to create recipes which dont make sense with a campfire or workbench, like poisons and chems
  • Made an option to move some of the existing recipes from the campfire to that chemical set
  • Loads and loads of new aid items. Made a few dozen more of them, with recipes to match
  • More poisons with an overhauled poison system.
  • And im implementing now that you can sometimes harvest seeds from plants and that you can than plant and grow them. (farming basicly)
  • Customization, almost every part of the mod will be able to be configured to your personal taste


Anyway, Thanks again. I'll check out the files. :)

[edit] I just checked it out and those are not the nif files i meant im afraid. I was talking about the activators themselves.
so:
  • ..\fallout new vegas\Data\Meshes\clutter\junk\nv\brocflower.nif
  • ..\fallout new vegas\Data\Meshes\clutter\junk\nv\whitehorsenettle.nif

Those are the 2 problematic ones.
User avatar
Sabrina Steige
 
Posts: 3396
Joined: Mon Aug 20, 2007 9:51 pm

Post » Wed Dec 01, 2010 1:18 pm

Could you explain in greater detail what the Exact problem with the meshes is?

I have both plants loaded into Blender, but I still don't understand the exact problem that the mesh is giving you. The collision mesh on the plant is much more complex than the flower itself.

Damn - someday I hope to learn how to read. No promises!

Thanks,

Miax
User avatar
koumba
 
Posts: 3394
Joined: Thu Mar 22, 2007 8:39 pm

Post » Wed Dec 01, 2010 12:58 am

The problem is havoc physic.

None of the plants (the activators) have any havoc data except Broc Flower and Horsenettle.

And to see what the problem is do the following:

Load a save game of yours, find either a brock flower or horsenettle. Then instead of activating it, use your grab key on it.

None of the plants will do anything when you grab them, but those 2 plants will go nuts because they have havoc data.
User avatar
Rachael Williams
 
Posts: 3373
Joined: Tue Aug 01, 2006 6:43 pm

Post » Wed Dec 01, 2010 12:58 am

The problem is havoc physic.

None of the plants (the activators) have any havoc data except Broc Flower and Horsenettle.

And to see what the problem is do the following:

Load a save game of yours, find either a brock flower or horsenettle. Then instead of activating it, use your grab key on it.

None of the plants will do anything when you grab them, but those 2 plants will go nuts because they have havoc data.

Okay I think I got it this time. :)

http://rapidshare.com/files/435551279/MiaxFlowers2.zip and let me know if they freak out.

Cheers!

Miax
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Wed Dec 01, 2010 2:21 am

You my friend ...


Are a saint. :)



This is exacly what i needed. I replaced the broc flower and horsenettle nif files with the ones from the ones above and now they are how they should have been in vanilla. :)

Fantastic.

At least now i have the option to do things to plants when you use the grab button on them. Awesome.

Again... Thanks a load.
User avatar
Rhysa Hughes
 
Posts: 3438
Joined: Thu Nov 23, 2006 3:00 pm

Post » Wed Dec 01, 2010 2:33 am

Sure thing! Glad I got it right this time (hehe). :goodjob:

Sorry for the confusion, I look forward to making new things when your done! :)

Cheers,

Miax
User avatar
Reven Lord
 
Posts: 3452
Joined: Mon May 21, 2007 9:56 pm


Return to Fallout: New Vegas