Question about winged character

There are a few winged characters in NWN2 like demons, imps and whatnot. Sometimes they hover, like imps, and sometimes the walk on the ground like other creatures. Would it be possible, are there any, that both they run on the ground and occasionally hovers up in the air. I have a winged creature in the module I’m working on at the moment, and it would be so cool if that creature could sometimes jump up into the air, maybe randomly, when walking around or fighting. Maybe there are some custom animations for this, or maybe they do not exist, won’t ever exist? Any thoughts on the matter? Animations in NWN2 often seems rather tricky.

Unless there is an existing creature that uses both modes, you would likely need to generate a set of mixed animations. I’m not aware of anything like that, other than the flight animation that Hellfire was testing.

Imps hover always above ground, demons always walk and never fly. The reason is that their skeletons are different and use different sets of animations: for imps, the idle animation is hovering above ground whereas for demons it’s just having them flap their wings from time to time, but never fly.
For your creature, since walking or fighting animations last only 1 s, you can’t have a random jump (the only exception being the idle animation : since there’s nothing to do, I suppose the engine adds the scratch head or yawn animations from time to time randomly).
What you could do is to create this jump animation, and use the “scripting waypoints system” to fire it at certain waypoints (or randomly at each waypoint). That is, if the creature follows a given path.
Otherwise, the other option I see is to include in the heartbeat script a call to the jump animation (but that may lead to strange walking or fighting moves).
A better option would be to have two creatures (i.e. one mdb compatible with two skel.gr2 - same bones and everything, just a different root name): that’s what I did to have an idle animation of the rider on foot near his mount, and the idle animation of the rider on horseback. The issue with this approach is that sometimes there’s a noticeable freeze (when the change of skeleton takes place).
What skel.gr2 file are you using?

1 Like

I have no idea what skel.gr2 I’m using, sorry. It’s a Water Genasi in appearance, with subrace Fey, if that tells you anything. It’s supposed to be a totally new and different kind of humanoid creature only native to one of my custom worlds, but at the moment she looks like a crossover of water genasi and fairy, so she has wings but with the size as a human. I’m using Trin’s butterfly wings.

Then it’s the human skeleton which needs a jumping animation.

I think I would be ok with occational freezing, if it’s not too obvious. I have no idea how to do what you suggest here though. How could I have two creatures looking the same, at the same time ingame? That would be weird…Would you mean that you somehow switch the two characters every now and then looking the same? That sounds complicated and wouldn’t that cause bugs, and how about inventory items? This is a companion so…

In my third module I have done, with travus’ help, a copy of a character and that worked for the most part, even though it sometimes created a strange bug (no big bug though, it could be ignored, but still).

Trying to figure this out, I looked at some armor in MDBConfig and MDBCloner, but in both those programs you can only choose one skeleton it seems, so again, I don’t know how this could be done…Maybe you need some 3D program or be a familiar how to make models and animation to do this?

Yes, that’s right. Coming back to the riding or swimming animations, you’ll notice in appearance.2da that there are specific lines like

Human_Swim **** 1 0 1 1 1 .6 P_HH? P_HH? P_HH?_Head P_HH?_Hair P_SWM_HH?_Skel P_SWM_HH?_Skel

or

Cavalier(humain) 16802730 1 0 1 1 1 1 P_HH? P_HH? P_HH?_Head P_HH?_Hair P_HR?_Skel P_HR?_Skel

The first P_HH? stuff means the body, head, hair etc… are based on the human skeleton, but the animations are different since they use the P_SWM_HH? skel (for swimming) or P_HR? skel (for riding).

Before I play with this, does this jump animation look good for what you need? (at this time, cloak and wings are not animated, and I only made it for creatures based on the human male skeleton).

1 Like

How do I watch this file? I don’t have any 3D program. I know there’s an animation viewer in the toolset but…

I wonder if it’s overkill to have a character that both flies a bit and then runs around, but it would be interesting to see how it would look.

Maybe I should just put it in the override and then have a random human running around?

Just use a human male character, place a trigger in an area that runs (PlayCustomAnimation(GetFirstPC(), "p_hhm_jump", FALSE); and enjoy the jump each time your PC enters the trigger.
But I’ll make a demo module, to show what I meant earlier with the scripted waypoints and the two skels using the same body.

1 Like

Alright. I’ll try that then sometime tomorrow afternoon.

Got up a little earlier today so I had a chance to try this. However, nothing happens when the PC runs through the trigger, I’m afraid. The script I used look like this:

void PlayCustomAnimationVoid(object oObject, string sAnimation, int iLoop = 0, float fSpeed = 1.f)
{
	PlayCustomAnimation(oObject, sAnimation, iLoop, fSpeed);
}



void main()
{
	
PlayCustomAnimation(GetFirstPC(), "P_HHM_jump", FALSE);

}

and I put your file in the override folder.

Oops, my bad. “P_HHM” is not requested. Try this:

    void PlayCustomAnimationVoid(object oObject, string sAnimation, int iLoop = 0, float fSpeed = 1.f)
    {
    	PlayCustomAnimation(oObject, sAnimation, iLoop, fSpeed);
    }


    void main()
    {
    	object oPC = GetEnteringObject();
    	AssignCommand(oPC, ClearAllActions());
    	DelayCommand(0.1f, AssignCommand(oPC, PlayCustomAnimationVoid(oPC, "jump", FALSE)));
    }
1 Like

Ok. Will try it now.

Now it worked. It looks quite ok. Two things I’m not that fond of is that (I don’t know how to say this in english exactly) the “takeoff” is a bit too much. Don’t know if that makes sense. It’s like he waits and crouches and then jumps. The other thing is that he ends up back at where he started after the jump, and that looks a bit weird, instead of ending up where he more logically would have landed. Don’t know if these things are hard to change or edit.

Both are easy to change.

2 Likes

Ah, great!

Otherwise I think it looks good, but maybe I ought to wait for your demo module and see how it looks when both running and then occationally jumping/flying. Maybe it will just look silly, I don’t know. I just wanted to let the player know that: “This companion can actually also fly, but for the most time just runs” or something like that.

By the way, I know you said you were busy this and next week (I believe) so there’s no rush with this. Do it when you have the time, I can wait, no problem.

Just wanted to check if there’s been any progress with this.

Sorry, not enough yet to be worth sharing. But it’s still a work in progress.

1 Like