Kexikus

Making ingame cutscenes

Recommended Posts

There's something I've been wondering about a long time now and that's the way ingame cutscenes are created.

 

I'm not talking about dialogues, as I know how to make these, but something like the training scene in K1 for example. Or simply when one character is force-stunned by another one.

 

I assume that scripts are used to do that, but I'd like to be sure. And if they are, how are they triggered etc. So, if someone could explain that, maybe with a simple example, it'd be great.

Or if there are any tutorials, please let me know where they are as I've never been able to find them :)

 

Thanks for any help :)

Share this post


Link to post
Share on other sites

(I can understand the confusion, as it took me a good year to piece this together without asking someone and sounding like an idiot)

 

A cutscene is a normal dialog file, but for the lines where no one is speaking, you leave the text blank. And to activate scripts, you'd enter them in the normal dialog fields.

Also, in the script, you can use things like ActionPauseConversation() and ActionResumeConversation() to make sure it can't be skipped by clicking the mouse. This is particularly important with something like watching an NPC walk 30 feet...

Share this post


Link to post
Share on other sites

Or (my prefered way) simply set a duration other than -1 or 0 and make the line unskippable. Not much a fan of pausing conversations and stuff, too much risk of things going horribly wrong.

Share this post


Link to post
Share on other sites

Or (my prefered way) simply set a duration other than -1 or 0 and make the line unskippable. Not much a fan of pausing conversations and stuff, too much risk of things going horribly wrong.

Sadly, this isn't entirely possible in KotOR 1, since Obsidian added the Node Unskippable part for each dlg node into KotOR 2. The closest you can come is the Delay field mixed with the NoClicksFor scripting function.

Share this post


Link to post
Share on other sites

I've been able to do some things with those tips already, but I have another question.

 

What I want to do is make 2 NPCs fight each other in a cutscene, basically in the following way: You talk to them, they start fighting for a short while, NPC1 kills NPC2 and you continue to talk to NPC1. I assume that I'd simply make the dialogue including an empty entry where I want them to fight and then use a script to make them fight, but I couldn't figure out how to make that script. My guess was the CutsceneAttack but I couldn't make that work.

 

If anyone has any tips, I'd be grateful :)

Share this post


Link to post
Share on other sites

I've been able to do some things with those tips already, but I have another question.

 

What I want to do is make 2 NPCs fight each other in a cutscene, basically in the following way: You talk to them, they start fighting for a short while, NPC1 kills NPC2 and you continue to talk to NPC1. I assume that I'd simply make the dialogue including an empty entry where I want them to fight and then use a script to make them fight, but I couldn't figure out how to make that script. My guess was the CutsceneAttack but I couldn't make that work.

 

If anyone has any tips, I'd be grateful :D

i dont know if its possible, but what would be cool is to see the fight i a different perspective, e.g. with a camera rotating around the scene and then seeing NPC1 charging NPC 2 in Slow-Mo...

 

Xuul has lots of experiences with the the camera now, so you could ask him as well as Fair Strides scripting wise if sth. like this could be realised?

Share this post


Link to post
Share on other sites

Well, for the cutscene attacking, it seems that you can just change their factions so that they're enemies to each other (for example, the Predator and Prey factions) to make them actually fight, but you could use the SetMinOneHP on both to make them immortal until you want one of them to die. Then you'd just use the ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(FALSE, FALSE), ); to kill them.

 

As to the Turning Camera idea of Jorak's, you could you AniCam (I have it) to make an animated camera that would do that.

 

For the Slow-Mo, I'd recommend applying the Force Speed's blur effect (check k_inc_force for the visual effect) on the person attacking (this is just to make the screen have the blur motion) and ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectMovementSpeedDecrease(), , ); to everybody but the attacker. This should slow their animations so that they move slower.

Share this post


Link to post
Share on other sites

 

 

For the Slow-Mo, I'd recommend applying the Force Speed's blur effect (check k_inc_force for the visual effect) on the person attacking (this is just to make the screen have the blur motion) and ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectMovementSpeedDecrease(<percent to slow down; 10 here means they're at 90% normal speed>), <your object>, <duration of slow, for example, 5.0>); to everybody but the attacker. This should slow their animations so that they move slower.

Hey reading that i have an idea:

 

What if you slow down the camera only shortly before the opponent gets hit with an lighsaber to super-slow mo, and immediately after back to normal, and give him only a few hitpoints - that way the fight appears action oriented, almost matrix style like and short. 

Additionally you could add e.g. a lightsaber parry and force abilities like Force Push in slow-mo etc..

Share this post


Link to post
Share on other sites

i dont know if its possible, but what would be cool is to see the fight i a different perspective, e.g. with a camera rotating around the scene and then seeing NPC1 charging NPC 2 in Slow-Mo...

 

Xuul has lots of experiences with the the camera now, so you could ask him as well as Fair Strides scripting wise if sth. like this could be realised?

 

There will be a different perspective for the fight and I already know how to set up cameras for that. But there won't be any animated cameras of slow-mos. I don't like the latter and both wouldn't be worth the trouble for a really short scene I think.

 

Well, for the cutscene attacking, it seems that you can just change their factions so that they're enemies to each other (for example, the Predator and Prey factions) to make them actually fight, but you could use the SetMinOneHP on both to make them immortal until you want one of them to die. Then you'd just use the ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(FALSE, FALSE), <your object>); to kill them.

 

As to the Turning Camera idea of Jorak's, you could you AniCam (I have it) to make an animated camera that would do that.

 

For the Slow-Mo, I'd recommend applying the Force Speed's blur effect (check k_inc_force for the visual effect) on the person attacking (this is just to make the screen have the blur motion) and ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectMovementSpeedDecrease(<percent to slow down; 10 here means they're at 90% normal speed>), <your object>, <duration of slow, for example, 5.0>); to everybody but the attacker. This should slow their animations so that they move slower.

 

I'll try that, thank you :D

One question however, instead of using EffectDeath to kill the NPC, is there a way to force the other one to do a certain attack with predetermined outcome? That way the NPC wouldn't just die out of nowhere^^

Also, is there a way to set the current HP of a character?

 

Edit: I tried what you suggested but the problem is that they'll only start fighting once the conversation is over, but I want them to fight in the cutscene. Am I missing something or would this require another script?

 

Edit 2: Nevermind, found what I needed to make them fight during the conversation^^

This link proved useful after all: http://www.lucasforums.com/showthread.php?t=185102

My other questions remain however.

Share this post


Link to post
Share on other sites

Not sure here, but I would check the lightsaber combat script on the Endar Spire. The one where the Jedi killed the Sith, before she dies as well.

Share this post


Link to post
Share on other sites

Not sure here, but I would check the lightsaber combat script on the Endar Spire. The one where the Jedi killed the Sith, before she dies as well.

 

I looked into it but sadly there's nothing that's really of use there. The only thing that happens there is that the MinOneHP is set to false so that the Sith is killed by the next Jedi attack. The Jedi is then killed by the Death Effect as described by FS.

I still took inspiration from it though by setting MinOneHP to false aswell and additionally setting the maximum hit points to 1 as a failsafe. Setting only the current hit points would be better but I still have no idea how to do that.

 

Also the dialogue at Lower City of Taris where the Beks and Vulkars fight when you enter there for the first time.

 

I'll look into that. Maybe there's something to be found.

 

Thanks, both of you :D

 

Edit: These scripts were really quite useful. I found a way to set the current HP to 1. They also used the CutsceneAttack command, but I don't think I need this any longer and it wasn't really helpful anyway, as the animation was only described by a number and I don't feel like guessing until I find the animation I want xD

Share this post


Link to post
Share on other sites

Edit: These scripts were really quite useful. I found a way to set the current HP to 1. They also used the CutsceneAttack command, but I don't think I need this any longer and it wasn't really helpful anyway, as the animation was only described by a number and I don't feel like guessing until I find the animation I want xD

 

The animation should be marked with that number in nwscript.nss, so you could search for the word Animation and then go from there.

 

Might just be KOTOR2 but there's a command to make hits to guarantee hits. Kavar uses it on Onderon.

 

Yes, there is the CutsceneAttack function, which allows you to specify an animation, the result, and possibly damage.

 

There is also an EffectAssuredHit, but I haven't experimented with that (could throw that on the insta-kill pistol...).

Share this post


Link to post
Share on other sites

And just to clarify, as nobody seems to have said that - the animation number in the script is the number of the row in animations.2da. You don't just need to test what looks like the one you're seeking - you can check the 2da.

 

Even if it is listed in nwscript.nss.

Share this post


Link to post
Share on other sites

Either can be used... the animations.2da is easily recognisable by being 100[something] rather than the shorter number fron the nwnscript.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.