[scripting] changing weapon animation

G

Guest

Guest
Archived from groups: alt.games.neverwinter-nights (More info?)

hello, i'm working on a custom mod based on an oriental background and i'm
not satisfied with the animations used for katanas during combat.
Do you know if there's any way of changing a weapon animation depending if
the character is carrying something in his off-hand or not.
The idea would be to make katana wielders use 2-handed sword animations when
using it alone and standard one when using an additional weapon or torch.
i'm not afraid of scripting (i already done a lot of scripting) but tbh i
dunno where to start to fix this animation issue.

thx in advance

--
Ezechiel
 
Archived from groups: alt.games.neverwinter-nights (More info?)

"Ezechiel" <ezechiel.at.googoth.dot.com@aol.com> a écrit dans le message de
news: 41ab5c71$0$31593$636a15ce@news.free.fr...
> hello, i'm working on a custom mod based on an oriental background and i'm
> not satisfied with the animations used for katanas during combat.
> Do you know if there's any way of changing a weapon animation depending if
> the character is carrying something in his off-hand or not.
> The idea would be to make katana wielders use 2-handed sword animations
when
> using it alone and standard one when using an additional weapon or torch.
> i'm not afraid of scripting (i already done a lot of scripting) but tbh i
> dunno where to start to fix this animation issue.
>
> thx in advance
>
PS: I already know how to detect if a weapon is carried one or two handed
using custom scripts, all i need is to know how to switch from an animation
to another.

> --
> Ezechiel
>
>
 
Archived from groups: alt.games.neverwinter-nights (More info?)

Ezechiel wrote:
> "Ezechiel" <ezechiel.at.googoth.dot.com@aol.com> a écrit dans le message de
> news: 41ab5c71$0$31593$636a15ce@news.free.fr...
>
>>hello, i'm working on a custom mod based on an oriental background and i'm
>>not satisfied with the animations used for katanas during combat.
>>Do you know if there's any way of changing a weapon animation depending if
>>the character is carrying something in his off-hand or not.
>>The idea would be to make katana wielders use 2-handed sword animations
>
> when
>
>>using it alone and standard one when using an additional weapon or torch.
>>i'm not afraid of scripting (i already done a lot of scripting) but tbh i
>>dunno where to start to fix this animation issue.
>>
>>thx in advance
>>
>
> PS: I already know how to detect if a weapon is carried one or two handed
> using custom scripts, all i need is to know how to switch from an animation
> to another.

Well, I don't really know, but I've got a different suggestion;

What if you build two seperate weapons "katana weilded one handed" and
"katana weilded two handed", and give each weapon an activatable power
which lets the weilder switch from one to the other?

After all, you aren't -forced- to use a katana two handed just because
you don't happen to have anything in your off hand.

I know there are weapons in the original campaigns which can switch from
dagger to longsword to bastard sword, so the idea can clearly be made to
work... this just represents different use styles instead of a weapon
that literally transforms from one form to the other.

Also, a katana -should- have different stats used one handed versus two
handed, as there's a lot more leverage at work with the second hand in
place, doing this would give you the opportunity to add that factor in,
while the solution you are looking at would just be different looks.

Lance
 
Archived from groups: alt.games.neverwinter-nights (More info?)

>>>hello, i'm working on a custom mod based on an oriental background and
>>>i'm
>>>not satisfied with the animations used for katanas during combat.
>>>Do you know if there's any way of changing a weapon animation

Scripting cannot alter animations. Scripting can initiate an existing
animation but
the combat animations are out of the grasp of us mere scripters.

Anything to do with the hard coded rules, tables, classes, prc's, animations
etc are
not available to scripters. Scripting is a tool to enhance a plot but is not
powerfull
enough to rewrite the actual game.
 
Archived from groups: alt.games.neverwinter-nights (More info?)

"Alistair Davis" <a_davis@ntlworld.com> a écrit dans le message de news:
gXLqd.1699$ti2.1629@newsfe5-gui.ntli.net...
> >>>hello, i'm working on a custom mod based on an oriental background and
> >>>i'm
> >>>not satisfied with the animations used for katanas during combat.
> >>>Do you know if there's any way of changing a weapon animation
>
> Scripting cannot alter animations. Scripting can initiate an existing
> animation but
> the combat animations are out of the grasp of us mere scripters.
>
> Anything to do with the hard coded rules, tables, classes, prc's,
animations
> etc are
> not available to scripters. Scripting is a tool to enhance a plot but is
not
> powerfull
> enough to rewrite the actual game.
>
I'm quite sure that this katana issue could be fixed by scripting or a bit
of config file modification. As you may have noticed, halflings wield
katanas two handed while the same weapon is wielded one handed by other
races, there must be a tip to use this to achieve what i want.
As some guy from bioware once said, 99% of the game features were built thru
scripting, only a unsignificant percentage of behaviour issues has be needed
to be hardcoded, so as i have successfully started to make my own custom
class i see no reason for this problem to be unsolvable. I'll tell you when
i'll have found how to manage to do it.

"Lance Berg" <emporer@dejazzd.com> a écrit dans le message de news:
hbGdnfFRArtG5DbcRVn-vA@dejazzd.com...
>
> After all, you aren't -forced- to use a katana two handed just because
> you don't happen to have anything in your off hand.
>
Well as I said i'm trying to make a medieval-japanese inspired module, and
katana are swords you are supposed to wield with both hands except during
rare occasions. So I really want to make two handed the basic stance.

> I know there are weapons in the original campaigns which can switch from
> dagger to longsword to bastard sword, so the idea can clearly be made to
> work... this just represents different use styles instead of a weapon
> that literally transforms from one form to the other.
>
aye, that's Enserric the sword from HotU. That's a good idea to start with
but i would like it to work for every katanas in the module, would they be
magical or not. And as it would be a samurai based module, there will be a
lot of different katanas.

> Also, a katana -should- have different stats used one handed versus two
> handed, as there's a lot more leverage at work with the second hand in
> place, doing this would give you the opportunity to add that factor in,
> while the solution you are looking at would just be different looks.
>
You're right but as i'm planning to make a "social/roleplay" module it is
not really important.

> Lance

--
Ezechiel
 
Archived from groups: alt.games.neverwinter-nights (More info?)

Ezechiel wrote:


> I'm quite sure that this katana issue could be fixed by scripting or a bit
> of config file modification. As you may have noticed, halflings wield
> katanas two handed while the same weapon is wielded one handed by other
> races, there must be a tip to use this to achieve what i want.
> As some guy from bioware once said, 99% of the game features were built thru
> scripting, only a unsignificant percentage of behaviour issues has be needed
> to be hardcoded, so as i have successfully started to make my own custom
> class i see no reason for this problem to be unsolvable. I'll tell you when
> i'll have found how to manage to do it.
>
> "Lance Berg" <emporer@dejazzd.com> a écrit dans le message de news:
> hbGdnfFRArtG5DbcRVn-vA@dejazzd.com...
>
>>After all, you aren't -forced- to use a katana two handed just because
>>you don't happen to have anything in your off hand.
>>
>
> Well as I said i'm trying to make a medieval-japanese inspired module, and
> katana are swords you are supposed to wield with both hands except during
> rare occasions. So I really want to make two handed the basic stance.
>
Katana in one hand and wakasashi in the other is a very popular
combination, I don't think you can make a very good case for "rare" in
that sentence. I'll grant you that if your off hand is empty you'd
almost certainly put it on the katana, but the weapon is balanced for
use either way.

>
>>I know there are weapons in the original campaigns which can switch from
>>dagger to longsword to bastard sword, so the idea can clearly be made to
>>work... this just represents different use styles instead of a weapon
>>that literally transforms from one form to the other.
>>
>
> aye, that's Enserric the sword from HotU. That's a good idea to start with
> but i would like it to work for every katanas in the module, would they be
> magical or not. And as it would be a samurai based module, there will be a
> lot of different katanas.
>
Sure, I'm just suggesting that you make up a script to let you do this,
and put it on every katana in your module.

"Katana A one handed" with a script to turn it into "katana A two
handed", which in turn has the script to turn into "katana A one handed"

This would make an ability button which the weilder could put on his
hotkey bar to switch in and out at will.

I guess it would be a bit of a pain to have to make two versions of
every katana, a single script which would control which graphic is used
would be easier if it can be done...

A script like this should also be on all Bastard Swords in more european
oriented campaigns.
>
>>Also, a katana -should- have different stats used one handed versus two
>>handed, as there's a lot more leverage at work with the second hand in
>>place, doing this would give you the opportunity to add that factor in,
>>while the solution you are looking at would just be different looks.
>>
>
> You're right but as i'm planning to make a "social/roleplay" module it is
> not really important.

Heh, I tend to get caught up in stuff like that, probably because I make
swords for a living.
 
Archived from groups: alt.games.neverwinter-nights (More info?)

"Lance Berg" <emporer@dejazzd.com> a écrit dans le message de news:
rvWdnfOJwYVlWjbcRVn-2A@dejazzd.com...
>
> Ezechiel wrote:
>
> > "Lance Berg" <emporer@dejazzd.com> a écrit dans le message de news:
> > hbGdnfFRArtG5DbcRVn-vA@dejazzd.com...
> >
> >>After all, you aren't -forced- to use a katana two handed just because
> >>you don't happen to have anything in your off hand.
> >>
> >
> > Well as I said i'm trying to make a medieval-japanese inspired module,
and
> > katana are swords you are supposed to wield with both hands except
during
> > rare occasions. So I really want to make two handed the basic stance.
> >
> Katana in one hand and wakasashi in the other is a very popular
> combination, I don't think you can make a very good case for "rare" in
> that sentence. I'll grant you that if your off hand is empty you'd
> almost certainly put it on the katana, but the weapon is balanced for
> use either way.
>
Well I was talking of the katana used alone. 95% of katana strikes (used
alone) are two handed.
The daisho (katana/wakizashi combo) was clearly what i had in mind when
considering having an additional weapon in off hand, but technically the
wakizashi available in CEP is a mere shortsword with a different model: it
ain't really powerfull, and I think that most players will prefer using the
katana alone for having no malus.

> >>I know there are weapons in the original campaigns which can switch from
> >>dagger to longsword to bastard sword, so the idea can clearly be made to
> >>work... this just represents different use styles instead of a weapon
> >>that literally transforms from one form to the other.
> >>
> >
> > aye, that's Enserric the sword from HotU. That's a good idea to start
with
> > but i would like it to work for every katanas in the module, would they
be
> > magical or not. And as it would be a samurai based module, there will be
a
> > lot of different katanas.
> >
> Sure, I'm just suggesting that you make up a script to let you do this,
> and put it on every katana in your module.
>
> "Katana A one handed" with a script to turn it into "katana A two
> handed", which in turn has the script to turn into "katana A one handed"
>
> This would make an ability button which the weilder could put on his
> hotkey bar to switch in and out at will.
>
Well that's the way i thought of, firstly i thought i could use the
equip/unequip event but if can of course script a "power: self" event on it
to be activated at will.

> I guess it would be a bit of a pain to have to make two versions of
> every katana, a single script which would control which graphic is used
> would be easier if it can be done...
>
The problem being that katanas could be of any shapes, colours and may have
magical effects. That's why i wanted to do it for animations, it sounded
more simple to switch from an animation to another.

> A script like this should also be on all Bastard Swords in more european
> oriented campaigns.

And on tetsubos too, it's almost ridiculous to see character wield such a
big and heavy weapon as it would have been a wood stick.

> >
> >>Also, a katana -should- have different stats used one handed versus two
> >>handed, as there's a lot more leverage at work with the second hand in
> >>place, doing this would give you the opportunity to add that factor in,
> >>while the solution you are looking at would just be different looks.
> >>
> >
> > You're right but as i'm planning to make a "social/roleplay" module it
is
> > not really important.
>
> Heh, I tend to get caught up in stuff like that, probably because I make
> swords for a living.

*g*

--
Ezechiel
 
Archived from groups: alt.games.neverwinter-nights (More info?)

Ezechiel wrote:
> hello, i'm working on a custom mod based on an oriental background and i'm
> not satisfied with the animations used for katanas during combat.
> Do you know if there's any way of changing a weapon animation depending if
> the character is carrying something in his off-hand or not.
> The idea would be to make katana wielders use 2-handed sword animations when
> using it alone and standard one when using an additional weapon or torch.
> i'm not afraid of scripting (i already done a lot of scripting) but tbh i
> dunno where to start to fix this animation issue.


I don't know if there's a way to do this via scripting. What you could
do is modify baseitems.2da and either make the katana a large (ergo,
two-handed) weapon, or make a new katana that is large, so you would
have both the one-handed and two-handed variety in your module. Again,
there's no real way to switch between them dynamically; however, players
could choose which type they wanted to wield--even have one of each in
inventory. As a bonus, when wielded two-handed, the PC would get the
1.5xSTR bonus to damage.

Also, look on NWVault for some new, Asian-influenced, fighting
animations that replace the default combat animations--especially for
swords and polearms.
--
Barry Scott Will
Pyric RPG Publications
http://www.pyric.com/
 
Archived from groups: alt.games.neverwinter-nights (More info?)

Barry Scott Will <nwn_usenet@cavecreations.net> wrote in message news:<VL3rd.180970$R05.109324@attbi_s53>...
> Ezechiel wrote:
> > The idea would be to make katana wielders use 2-handed sword animations when
> > using it alone and standard one when using an additional weapon or torch.
> > i'm not afraid of scripting (i already done a lot of scripting) but tbh i
> > dunno where to start to fix this animation issue.
>
> I don't know if there's a way to do this via scripting. What you could
> do is modify baseitems.2da and either make the katana a large (ergo,
> two-handed) weapon, or make a new katana that is large, so you would
> have both the one-handed and two-handed variety in your module. Again,
> there's no real way to switch between them dynamically; however, players
> could choose which type they wanted to wield--even have one of each in
> inventory. As a bonus, when wielded two-handed, the PC would get the
> 1.5xSTR bonus to damage.

Very interesting discussion, tho' I haven't done any scripting. I can
see this as being a "fix" (OK, more of a workaround or kludge) to
allowing use of the bastard sword two handed when the character has
Martial
weapon proficiency but doesn't have Exotic Weapon to use it
one-handed.
 
Archived from groups: alt.games.neverwinter-nights (More info?)

Anonymous Jack wrote:

> Barry Scott Will <nwn_usenet@cavecreations.net> wrote in message news:<VL3rd.180970$R05.109324@attbi_s53>...
>
>>Ezechiel wrote:
>>
>>>The idea would be to make katana wielders use 2-handed sword animations when
>>>using it alone and standard one when using an additional weapon or torch.
>>>i'm not afraid of scripting (i already done a lot of scripting) but tbh i
>>>dunno where to start to fix this animation issue.
>>
>>I don't know if there's a way to do this via scripting. What you could
>>do is modify baseitems.2da and either make the katana a large (ergo,
>>two-handed) weapon, or make a new katana that is large, so you would
>>have both the one-handed and two-handed variety in your module. Again,
>>there's no real way to switch between them dynamically; however, players
>>could choose which type they wanted to wield--even have one of each in
>>inventory. As a bonus, when wielded two-handed, the PC would get the
>>1.5xSTR bonus to damage.
>
>
> Very interesting discussion, tho' I haven't done any scripting. I can
> see this as being a "fix" (OK, more of a workaround or kludge) to
> allowing use of the bastard sword two handed when the character has
> Martial
> weapon proficiency but doesn't have Exotic Weapon to use it
> one-handed.

You could make two weapons:

Bastard Sword One Handed
with the normal bastard sword stats and graphics on an exotic weapon,
and a self power to convert to Bastard Sword Two Handed

and

Bastard Sword Two Handed
set as large, with the same bastard sword stats and graphics, but on a
Martial weapon, and a self power to convert to Bastard Sword One Handed.

Of course, when you want to make a Bastard Sword +1, or with other
powers, you'd also have to make two versions of each of those, linked to
each other in the same way.

And if someone imported a bastard sword from some other module, it
wouldn't work properly, because it wouldn't have the right scripts or
size setting and weapon types.
 
Archived from groups: alt.games.neverwinter-nights (More info?)

"Anonymous Jack" <alordofchaos@yahoo.com> a écrit dans le message de news:
cf889346.0412010538.1a1eb1bd@posting.google.com...
> Barry Scott Will <nwn_usenet@cavecreations.net> wrote in message
news:<VL3rd.180970$R05.109324@attbi_s53>...
> > Ezechiel wrote:
> > I don't know if there's a way to do this via scripting. What you could
> > do is modify baseitems.2da and either make the katana a large (ergo,
> > two-handed) weapon, or make a new katana that is large, so you would
> > have both the one-handed and two-handed variety in your module. Again,
> > there's no real way to switch between them dynamically; however, players
> > could choose which type they wanted to wield--even have one of each in
> > inventory. As a bonus, when wielded two-handed, the PC would get the
> > 1.5xSTR bonus to damage.
>
> Very interesting discussion, tho' I haven't done any scripting. I can
> see this as being a "fix" (OK, more of a workaround or kludge) to
> allowing use of the bastard sword two handed when the character has
> Martial
> weapon proficiency but doesn't have Exotic Weapon to use it
> one-handed.

Well, I managed to advance a bit on this issue, implementing some parts of
Lance's suggestions.
I modified the baseitems.2da file in order to create another weapon class
based on katana with a greater weaponsize. The basic katana size is 3, a
katana with a size of 4 make the PC to wield it 2-handed.
I modified the module's OnAquireItem script to permanently give any picked
up katana the "cast spell: unique power self only" ability so any katana
could be activated like a wand or a portal stone.
Now i'm scripting a function that will "clone" an exact replica of the
activated katana at the difference that it will use the alternative weapon
class definition from the 2da file.
I'd prefer to modify the "weapon size" value of the weapon "on the fly", but
i couldn't find a way to implement it.
So it looks like this feature is fortunately feasible and that it'll cause
no problem to adapt a the damage depending of how the katana is wielded..
More infos once i'll have achieved the implementation.

--
Ezechiel
 
Archived from groups: alt.games.neverwinter-nights (More info?)

Lance Berg wrote:
> Of course, when you want to make a Bastard Sword +1, or with other
> powers, you'd also have to make two versions of each of those, linked to
> each other in the same way.


Dynamic item properties might allow you to copy magic properties from
one sword to the other.
--
Barry Scott Will
Pyric RPG Publications
http://www.pyric.com/
 
Archived from groups: alt.games.neverwinter-nights (More info?)

"Barry Scott Will" <nwn_usenet@cavecreations.net> a écrit dans le message de
news: %osrd.130370$5K2.20600@attbi_s03...
> Dynamic item properties might allow you to copy magic properties from
> one sword to the other.

Cloning magical properties of an item to another is not a problem, I
successfully achieved this part with no issues. Oddly cloning the appearance
of the same item seems to cause a strange issues on some custom CEP
graphics, precisely the bourne function to get appearance of the parts of an
item returns me a -1 as an index for one of the katana pommel (it should
have returned a 7), i'm investigating what in CEP or my hakpack is causing
this glitch.

--
Ezechiel
 
Archived from groups: alt.games.neverwinter-nights (More info?)

On Mon, 29 Nov 2004 20:08:07 -0500, Lance Berg <emporer@dejazzd.com> wrote:

>
>
>Ezechiel wrote:
>>
>> Well as I said i'm trying to make a medieval-japanese inspired module, and
>> katana are swords you are supposed to wield with both hands except during
>> rare occasions. So I really want to make two handed the basic stance.
>>
>Katana in one hand and wakasashi in the other is a very popular
>combination,

Er, no. Certainly not historically. Even if you go to chambara movies,
katanae are almost always wielded singly.


--
Hong Ooi | "COUNTERSRTIKE IS AN REAL-TIME
hong@zipworld.com.au | STRATEGY GAME!!!"
http://www.zipworld.com.au/~hong/dnd/ | -- RR
Sydney, Australia |