Aller au contenu

Photo

Special FX files, weapon animations and wtf to do with them...


  • Veuillez vous connecter pour répondre
26 réponses à ce sujet

#1
DukeVega

DukeVega
  • Members
  • 205 messages

Okkkay so! 

 

 

I have a pretty cool start for Working guns in NWN2 courtesy of my good friend Psionic-Entity.

 

 

What I have started on now is working out animations and sound files etc...

 

 

What i want to do.. or should I say what i did ages ago (but never finalized)

was to build some animations using the toolset anim editor for weapon fire.

 

So for example one of the effects is the flame of a flamethrower that bursts for 3 seconds and then leaves the target smoldered in flames.

 

 

How do I link this to a weapon though, so when the weapon fires this animation happens????????

 

 

Answers on a postcard <3

 

 

Duke



#2
Dann-J

Dann-J
  • Members
  • 3 161 messages

I doubt you'll be creating any new animations other than with some 3D modelling software.

 

Attack animations are determined by the weapon type, whereas projectile effects are determined by the ammunition type being fired. Since you can't add new ranged weapons to the game, a flamethrower would have to override one of the existing ranged weapon types (crossbow, bow, or sling). You might be able to define new ammunition projectile effects though, via whatever 2DA controls item property VFX.



#3
DukeVega

DukeVega
  • Members
  • 205 messages

yeh so far

 

Pistols - overide sling with new Animations

 

Rifle = Shortbow with new Anims

 

 

and err Crossbow is still Crossbow

 

 

i take it longbow and shortbow use the same resources? ie? anims etc

 

 

 

**** so you CANT add any new ranged weapons???// hmmmmmmmmmmmm bollox! No way around this at all?

 

 

What about a Crossbow that when fired shoots a spell effect (And the spell effect is a flame) + scripted damage? seems legit



#4
Dann-J

Dann-J
  • Members
  • 3 161 messages

Yes - longbow and shortbow use the same attack animations.

 

The trail effect for ammunition is determined by the damage property the ammunition has. So fire arrows/bolts/bullets will leave fire trails, for instance. It might be possible to replace those trail effects with something flashier, to create a column of flame that shoots out of the weapon instead of just a narrow trail behind the projectile.



#5
DukeVega

DukeVega
  • Members
  • 205 messages

yeh aummunitiontypes.2da has a ref for ProjSEF / fx_arrowtrail i tried playing around with it and had some success but its not quite exactly how i want it to work



#6
DukeVega

DukeVega
  • Members
  • 205 messages

I dont really get any of this http://nwn2.wikia.co...ecialEffectFile

 

But i am sure its relevant, right?



#7
DukeVega

DukeVega
  • Members
  • 205 messages

Here is the Anim i made a while back for Flamer

 

http://www.filedropper.com/flamer



#8
DukeVega

DukeVega
  • Members
  • 205 messages

I doubt you'll be creating any new animations other than with some 3D modelling software.

 

Attack animations are determined by the weapon type, whereas projectile effects are determined by the ammunition type being fired. Since you can't add new ranged weapons to the game, a flamethrower would have to override one of the existing ranged weapon types (crossbow, bow, or sling). You might be able to define new ammunition projectile effects though, via whatever 2DA controls item property VFX.

 

 

4760 reckons its possible to create new ranged weapons!  hes working on it now, should know by the end of the day. he seems quite positive though =)



#9
Dann-J

Dann-J
  • Members
  • 3 161 messages

That would be quite the breakthrough. I tried to create throwing hammers once, and although I could equip them and see them in the player's hand, I couldn't throw them due to the 'out of ammo' message (even though it was a full stack). I've always assumed the 'out of ammo' message is hardcoded, but I (and many others) would be more than happy to be proven wrong.



#10
rjshae

rjshae
  • Members
  • 4 491 messages

Yes, I could picture having throwing knives and javelins. Plus there are some guns on the Vault.



#11
Dann-J

Dann-J
  • Members
  • 3 161 messages

Darts are really just throwing daggers (they both do 1d4 piercing damage).

 

I'd like to see bullet crossbows ("stone bows"). There are a host of other ranged weapons in D&D like the bolas, hand crossbow, and net that would also be interesting. Plain old throwing rocks would be ideal for halflings.



#12
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

Making additional ranged weapon types work would be awesome. I tried a while back but I found that no matter what I did the new 2DA rows would play the out of ammo messages even if they were set up properly.



#13
rjshae

rjshae
  • Members
  • 4 491 messages

I know there are endless ammo special abilities for the bows. Perhaps something can be done with that, in combination with tag-based scripting, to eliminate the out of ammo messages?



#14
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

I've played around with the unlimited ammo property before, I'm not sure it does more than fill up empty ammo slots. I think the bigger problem is figuring out what happens during the ammo checking procedure, since it looks an awful lot like someone hard coded it for certain 2DA rows and just left a "return false" on the end if nothing matched up.



#15
Dann-J

Dann-J
  • Members
  • 3 161 messages

I've played around with the unlimited ammo property before, I'm not sure it does more than fill up empty ammo slots. I think the bigger problem is figuring out what happens during the ammo checking procedure, since it looks an awful lot like someone hard coded it for certain 2DA rows and just left a "return false" on the end if nothing matched up.

 

That's my impression as well. It somewhat defeats the purpose of using a 2DA system in a game if you then hardcode some references to them. It dangles the customisable carrot in front of you, allowing you to take several bites (bytes?) out of it, but you never quite get to eat the whole thing. The result is that you sometimes end up chasing your own tail in frustration - and then someone comes along and makes a tortured donkey-based metaphor out of the whole situation.



#16
DukeVega

DukeVega
  • Members
  • 205 messages

why cant a weapon just be a script that plays a spell animation from Hook to Target and deletes an item from the inventory?



#17
rjshae

rjshae
  • Members
  • 4 491 messages

why cant a weapon just be a script that plays a spell animation from Hook to Target and deletes an item from the inventory?

 

It can--for example, a wand with a single charge. It just wouldn't be very convenient to use, unless you put it in the hot bar.



#18
Dann-J

Dann-J
  • Members
  • 3 161 messages

Also, you wouldn't normally see anything equipped in the hand. Although you could create a model VFX and apply it to the hand just before executing the attack animation (like my Handy VFX). You'd only ever get one attack per round out of it though, and you'd need to use Lance Botelle's workaround to stop the 'use item' animation from playing.



#19
4760

4760
  • Members
  • 1 207 messages

Time for a report...

 

1) Rifles and crossbows can coexist, the trick is to follow the same naming conventions for rifles as for crossbows (in the example below, I had the rifle named w_crsbH100):

 

901-4-1421910048.png

 

901-1-1421910048.jpg

 

The bad news is that both types will obviously use the same ammo. It's not really visible during the combat animations, but even if you create a specific item for bullets, the slot will in fact take precedence (so the crossbow could use bullets and the rifle fire bolts...)

 

901-3-1421910048.jpg

 

2) The "out of ammo" message is definitely a hard-coded issue: in the baseitems.2da file, at the line defining the sling, I just changed the number 27 (referring to the sling ammo) to 206 (the new ammo type I created). Everything else remained unchanged, but I got the "out of ammo" message as soon as I tried to attack with the sling (although all ammo slots were filled).

 

901-1-1421913564.jpg

 

3) The workaround I used is to use charges (one charge = one bullet), automatically reload when putting the ammo in the ammo slot (i.e. add the same number of charges as there are bullets in the ammo box if the quantity is less than the maximum capacity of the clip, or deduct from the ammo box the number of bullets used to refill the clip to the maximum number of charges of the rifle).

 

Thanks to Lance Botelle's trick, I was able to use animations specially done for the new weapons, without the "use item / cast spray" part!

 

901-5-1421910048.png

 

The annoying part is that you can't attack by clicking on the target: you'll have to right-click on the rifle, activate the item (long range), and select the target:

901-2-1421913564.jpg

 

Additionally, you won't see the damage done (the red number floating above the target), but this can be fixed in the console window:

901-3-1421913565.jpg

(the pic above was taken BEFORE I made the changes to nwn2_animstan.2da).

 

 

4) So I finally decided to create a ranged weapon without ammo as far as NWN2 engine is concerned (thus getting rid of the missing damage information, of the right-click / activate / select target sequence, of the risk of breaking spell casting due to animstan modifications). More importantly, it would also give the NPC / creatures the ability to use the rifle too!

 

901-1-1421927135.jpg

 

Through scripting, I was able to add the ammo requirement and the projectile path effect:

- easy for the NPC and monsters, through the end of combat turn script.

- easy too for the PC, but not as synchronized, as I tried with the module hearbeat.

 

901-2-1421927135.jpg  901-3-1421927135.jpg

(see the quantity indicated in the first item in the inventory? Decreased from 15 to 14 after a shot was fired).


  • rjshae et Psionic-Entity aiment ceci

#20
rjshae

rjshae
  • Members
  • 4 491 messages

I suppose one could comment out the "Out of ammo" message from the dialog.tlk file, then use tag-based scripting on every form of ammo to produce the same message under the appropriate circumstances. Not sure if you'd still get a blank message in the console though...



#21
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

That looks really cool. Do you mind clarifying a couple things?

 

1. In this do you mean that you were able to create new baseitems.2da rows that worked as ranged weapons? Even with the same ammunition couldn't this allow for things like one-handed crossbows, crossbows with different damage types, etc. despite all being tied to the same general item appearance?

 

4. So this means you managed to get projectile weapons working without ammunition? That's definitely not something I would have expected to work, props for figuring it out.


  • DukeVega aime ceci

#22
4760

4760
  • Members
  • 1 207 messages

1. Yes, with this method you can create crossbows dealing different amounts of base damage if you wish,

You could as well create one-handed crossbows, but the standard two-handed wielding animations will be used since the _cbow_ stance will be the reference.

 

4. Yes, the rifle and pistol are new projectile using weapons which are not defined as such in baseitems.2da: they're just ranged weapons (like the whip) with a min range and max range much greater than the usual polearms. But using scripts, they cannot be used if the wielder doesn't carry the ammo corresponding to the weapon, and during combat the animation and visual effect for projectile launch are performed.

 

I'm preparing a package so anybody interested could have a look. I'll hopefully upload it tomorrow or the day after.


  • rjshae, kamal_ et Psionic-Entity aiment ceci

#23
kamal_

kamal_
  • Members
  • 5 250 messages
Whoah! New missile weapons is a big breakthrough. The drow will love their hand crossbows.

#24
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

Fantastic. I'm not sure I follow you on the fourth point but I'm going to start experimenting with the first right away.



#25
Dann-J

Dann-J
  • Members
  • 3 161 messages

The approach of creating a ranged weapon that doesn't require equipped ammo has given me an idea. I could create my throwing hammer after all - provided it's a magical returning throwing hammer. It would never actually leave the hand, but it should simulate a returning weapon well enough. It would be more like the 'spiritual hammer' spell in the Icewind Dale games, which put a hammer in your hand but ignored distance when attacking (effectively making it a ranged weapon).