Jump to content

Arrows Placing Objects on Impact


Nzdjh

Recommended Posts

Hey all. I'm currently working on a mod that adds several different types of arrows to the game. One such arrow I'm trying to add is an one that creates a pool of oil when it hits. I've experimented and been able to have the arrows spawn the oil puddle objects in the game relatively well, however there are still some issues with them floating in midair or not conforming to the surface they're placed on due to them being actual meshes.

 

I'm trying to find if there's some way that I can use decals instead. What would be ideal is to somehow replicate the runes that are already in the game, however I haven't found any way to have an arrow spawn a rune upon impact. I'm not sure if such a thing is even possible. If I can somehow figure out a way to do that, it's then possible for me to change the decal to that of an oil puddle and attach my specific effects to the rune. I'm planning on having it function like the oil pools already in the game (igniting upon contact with a flame) as well as the added effect of having enemies slip when they walk over it, both of which I'm pretty sure can be attached to a rune through some scripting.

 

Some advice on how to do that would be nice, but more importantly I'm just curious if anyone knows of some way to have an arrow spawn a rune on a surface upon impact since that's the deal breaker for whether or not this will be possible. If not I'll have to settle for the method I'm currently using for the oil arrows.

Link to comment
Share on other sites

Not sure about spawning oil patches with arrows but it is fairly straightforward to add the rune explosion effect to arrows.I first learned how to do this by looking at how William Sea has set up the craftable explosive arrows in his incredible Levelers Tower mod.

 

Using copies of the fire,frost and shock rune explosions it is possible to create fire,frost and shock arrows that explode on impact - lots of fun,if not a little overpowered!

 

For explosive arrows you will need to set up new projectile objects and explosion objects for each arrow type and make sure they are correctly linked to the new arrows.The arrows explode when they come into contact with seemingly any collision surface be it NPC,creature,dragon,landscape,rocks,buildings,trees,etc(but only once shot from a bow).

 

When editing the projectile objects you will see an option to enable explosion ,once enabled choose an explosion from the list.

 

When editing the explosion objects it is possible to change the .nif file used so it may be possible to try adding an oil puddle nif and seeing what happens in game.

 

Projectiles and Explosions are listed under Special Effects.

 

 

A few things I learned while testing the arrows that I made for my own amusement;

 

When editing the projectile form it is possible to allow the new arrows to be collected from the ground after being shot - while this sounds quite handy it also means that NPC archers will also use them if they have been struck with them,and when the arrows are grossly overpowered then this can be very bad news indeed - or a greater challenge!

 

There are a few fun choices to make with the explosion form too.I am mainly talking about the explosive knockdown options here;

 

Always - knockdowns for every one - including PC if too close to point of impact.

 

NPCs Only - self explanatory.

 

By Formula - not sure but PC seems safe from knockdown,NPCs not so safe.

 

Never - no knockdowns for any one.

 

I found that a straight copy of the standard fire rune explosion to have rather too large a radius which if left unaltered can lead to some extreme ragdoll physics behavior - slain NPCs flying around and around high in the air and such.

 

None of the above has required any additional scripting.All testing carried out with copies of Daedric arrows.I did try using a copy of the bound arrow projectile but couldn't get them to explode .

 

Anyway not sure if any of the above will help.Good luck.

Link to comment
Share on other sites

Thanks for the reply. I understand what you mean with applying the explosive effects to the arrows upon impact and have even experimented with it myself to make my own explosive arrows. And in fact, the method I'm currently using for the oil arrows actually spawns an oil puddle nif on impact by using the "placed object" property of the explosion. I think I probably didn't really phrase my question correctly. Let me clarify a bit.

 

The oil puddles that are already in the game are basically nif models with a script attached to them. In my initial attempt at making the oil arrows, I simply created a dummy explosion that placed one of these oil pools where the arrow hit. It worked relatively well so long as the arrow was shot onto a flat, horizontal surface, but it had issues with uneven surfaces or if the arrow hit a wall in which case the oil puddle would spawn in mid-air, hovering several feet above the ground. Here's a screenshot to show what I mean:

 

http://cloud.steampowered.com/ugc/558692204718033126/926D403E2FC74CA280F50C0E031C8C0566A87B5C/

 

Note the floating oil puddles which were placed by arrows that were shot into the wall, and the oil puddles clipping through the uneven floor. So the solution was not ideal. To try and circumvent this problem, I created a bit of a tricky workaround. Instead of the dummy explosion spawning the oil puddle directly, it would instead spawn an invisible havok object which would drop to the ground. This havok object had a script attached to it which would then spawn the oil puddle in its place after it fell down onto the ground. This solved the issue of the floating oil puddles, because now they would only spawn on the floor after the havok object fell, but it still has the problem with uneven surfaces, since the model is simply a flat puddle and does not conform to the surface its sitting on. So again, fine on flat surfaces, but the second you shoot it onto an uneven surface, you get strange clipping issues and general ugliness:

 

http://cloud-2.steampowered.com/ugc/558692204718029849/C4B3389D3E297A374AB670204044B10654C666F1/

 

Basically, I took a look at the runes that are already in the game. Since they use decals instead of models, they conform to whatever surface they're placed on, like so:

 

http://cloud-2.steampowered.com/ugc/558692204718026360/A1FB2E5E8BEC0EE8DB349F07034E7C78D5211592/

 

Creating an oil puddle decal would be easy enough, the real issue I'm having is trying to figure out if there's some way to have an arrow place a rune on whatever surface it hits. If I can figure that out, it's a matter of then creating an oil puddle decal to replace the rune decal and modifying the rune's scripting/behavior to function as an oil puddle normally would. The difference being that the oil puddle would now conform to the surface that it was placed on instead of being a static model. It would also make it easier to apply the slipping effect on whichever NPC steps on it, since I believe it would be a matter of editing the rune's explosion to remove the damage and effects while adding a simple knockback to it to give the illusion of the NPC slipping when they step on it.

 

Hopefully that's a little more clear as to what I'm trying to do. I appreciate your help regardless. Thanks.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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