Aller au contenu

Photo

Instant Spell With No Animations - Possible? (Working Solution Found)


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

#1
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Hi All,

I have a magic item (flute), which runs a script when used.

I have the "play flute" animation in the script and DO NOT WANT the default "cast animation" that takes place before the flute play animation.

Any idea how to prevent that animation ... or immediately stop it ... to make my item script run instantly?

Thanks in advance.
Lance.



#2
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
This was just talked about today over on the NWN1 forums. Not sure if it pertains to NWN2. Maybe it'll move you in the right direction?
 
click

#3
Tchos

Tchos
  • Members
  • 5 054 messages

When I tried making a new unique long range power with the targeting circle some months ago, I also tried changing the casting animation reference in the 2DA.  Several I tried had no effect at all, making no animation take place.  That wasn't what I wanted to do, but it is what you want to do.  It seems like that's also what they're talking about in the other thread linked.



#4
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

This was just talked about today over on the NWN1 forums. Not sure if it pertains to NWN2. Maybe it'll move you in the right direction?click


Hi,

Thanks for commenting. This is what I had tried doing myself today actually, but it did not work. Even leaving all the sef references blank, the animation still played. 
 

When I tried making a new unique long range power with the targeting circle some months ago, I also tried changing the casting animation reference in the 2DA.  Several I tried had no effect at all, making no animation take place.  That wasn't what I wanted to do, but it is what you want to do.  It seems like that's also what they're talking about in the other thread linked.


Hi Tchos,

This rings a bell with me actually. I think I commented on that thread didn't I? Anyway, I had not thought about changing the animation in any other 2da (than spells.2da), so maybe that is going to be the answer. I can't recall the 2da you are referring to, but I may be able to find it. However, if you read this in passing, can you just point me in the right direction in case I need it.

I found that thread:- http://forum.bioware...rgeting-circle/

As yet, I have not yet found another 2da from where the animation may be being called.


Cheers,
Lance.

#5
Tchos

Tchos
  • Members
  • 5 054 messages

Several 2DAs were involved in that past experiment, but the animation was all in the spells.2da file.  I notice that there's a text file in there too that explains what the fields do.  There are two casting animation references -- one to begin (ConjAnim) and another to finish (CastAnim) -- plus a duration (CastTime), which says that it supposedly is how long in milliseconds the caster stays in the CastAnim pose, with 1000 being most spells.  Perhaps changing it to 0 will help, in addition to specifying an invalid animation for ConjAnim.



#6
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Several 2DAs were involved in that past experiment, but the animation was all in the spells.2da file.  I notice that there's a text file in there too that explains what the fields do.  There are two casting animation references -- one to begin (ConjAnim) and another to finish (CastAnim) -- plus a duration (CastTime), which says that it supposedly is how long in milliseconds the caster stays in the CastAnim pose, with 1000 being most spells.  Perhaps changing it to 0 will help, in addition to specifying an invalid animation for ConjAnim.


Hi Tchos,

I have placed "****" in all sef references in the spells.2da and used the value "0" in all casting time type columns ... or any columns that may be time or animation related.

I even tried changing the UserType to "3" (it was on "4") to help remove the animation, but all to no avail.

Now, I have never played a Bard, so I don't know what happens when they play an instrument. Does anybody recall what happens there?

Not sure otherwise how I am going to get around the annoying "use item" animation. :(

Any more suggestions?

Cheers,
Lance.

#7
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi All,

Unless somebody knows how to "turn off" the "USE ITEM" animation, then I am beginning to think this is hard-coded and impossible to stop.

Just out of interest, does anybody know what the "use item" animation file (sef?) that is used? Maybe I can remove/edit that animation file so that the engine calls a blank file or one that does next to nothing?

Thanks in advance,
Lance.

#8
4760

4760
  • Members
  • 1 207 messages

what the "use item" animation file (sef?) that is used?

I'd bet it's rather a gr2 file, according to the list of NWN2 animations (http://nwn2.wikia.co...t_of_animations).

#9
Tchos

Tchos
  • Members
  • 5 054 messages

Using **** in the field, as I understand, tells it "use the default".  Tell it instead to use something that doesn't exist.



#10
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

I'd bet it's rather a gr2 file, according to the list of NWN2 animations (http://nwn2.wikia.co...t_of_animations).


Hi 4760,

I think you are correct here, but I don't know about gr2 files. Or how to "edit" them.
 

Using **** in the field, as I understand, tells it "use the default".  Tell it instead to use something that doesn't exist.

Hi Tchos,

That may be worth a try ... I'll post back after testing. UPDATE: Sadly, it still does the "useitem" anim. :(

Cheers,
Lance.



#11
Tchos

Tchos
  • Members
  • 5 054 messages

Okay, try telling it to use the Idle animation as its conjuring animation.



#12
4760

4760
  • Members
  • 1 207 messages

 gr2 files. Or how to "edit" them.

Hi Lance.

gr2 files are the animation files created with 3ds max (6, 7 or 8) and exported with Expotron (both unavailable since a long time!)

But even with these tools, "editing" them is impossible, as gr2 files can't be imported back to 3ds max.

 

Tchos' solution should work, but if it actually delays the flute playing animation because of the duration of the idle animation, maybe create a fake DoNothing.gr2 file: make a copy of the p_hhm_skel.gr2 file, and rename it P_HHM_DoNothing.gr2 (don't forget you'll have to do it for all races and genders that are supposed to not play the cast animation before playing the flute).



#13
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Okay, try telling it to use the Idle animation as its conjuring animation.


Hi Lance.
gr2 files are the animation files created with 3ds max (6, 7 or 8) and exported with Expotron (both unavailable since a long time!)
But even with these tools, "editing" them is impossible, as gr2 files can't be imported back to 3ds max.

Tchos' solution should work, but if it actually delays the flute playing animation because of the duration of the idle animation, maybe create a fake DoNothing.gr2 file: make a copy of the p_hhm_skel.gr2 file, and rename it P_HHM_DoNothing.gr2 (don't forget you'll have to do it for all races and genders that are supposed to not play the cast animation before playing the flute).


Hi Tchos and 4760,

I did try Tchos idea, but it still did not work this way. I did not understand how to do the gr2 stuff, but I *DID* eventually find a solution that appears to work pretty much as I want it. I just hope it does not have too much of an impact anywhere else.

HERE IS WHAT I DID
==================

1) Using the Toolset Animation Viewer, I discovered the animation being used for item activation is the CAST_SPRAY animation. (Not sure why.)
2) I discovered a 2da called nwn2animstan.2da where the actual animation used ("sp_spray") for this animation call (CAST_SPRAY) was called (Row 156).
3) I changed the animation called "sp_spray" in the ANIMATION column to "emo_thoughtful", which I knew to be a very brief and negligible animation.
4) Placed the nwn2animstan.2da in the override to test, and it all worked!

UPDATE: I thought that I would be able to place the nwn2animstan.2da in a hak before release, but that does not work. However, it *does* work in the ui/custom folder where I have other alterations anyway, so that makes it a little easier to include.

So, the real question remains, what other code may I have upset along the way. I do not know what other OC code may call this CAST_SPRAY animation. I tested the Burning Hands spell, but that worked OK .. or at least as I expected. I may test a couple more spells that may use this CAST_SPRAY animation, but if they don't look too bad, then I think the alteration to prevent that annoying animation prior to my own (when using tag-based script calling items) is worth the trade-off. Especially, as I could always edit the animation back into the spell code where it may be required.

UPDATE: I added the following line to Prismatic Spray and Color Spray spell scripts to re-enable the cast animation:

PlayCustomAnimation(OBJECT_SELF, "sp_spray", 0, 2.0);

Doea anybody know of any others that may have been affected?

Any more thoughts anybody?

Thanks to all in helping me get to the bottom of this issue!

Lance.

 

P.S. This alteration is quite useful, as it has enabled me to add my own animations when activating an item without having the default one interfere beforehand. I have been able to change a couple of useable items with this alteration now. :)


  • 4760 aime ceci

#14
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Hi All,

 

One quick add on question ....

 

Now that my animation appears to work pretty much as I was hoping, I have one "problem" ....

 

The round counter (GUI at the top centre on the screen)  still has some time "left" before the item can be used again. This is not a problem if the player does not use the flute for a round after the first click, but kind of is if they click again within six seconds of the first click because the remaining time from the first click (1 round = six seconds) is added to the time prior to the next activation of the flute.

 

Bottom line, is there a way to clear the players actions queue, even if the round has a few seconds remaining?

 

Thanks in advance,

Lance.



#15
Tchos

Tchos
  • Members
  • 5 054 messages

Lance,

Sorry my suggestions didn't bear fruit.  I wish I had taken notes about what I was doing that had that effect, but I'm glad you found a reliable solution, and thank you for sharing it here.  I don't have an answer to your new question.