Kexikus 995 Posted August 13, 2015 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 Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted August 13, 2015 (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... Quote Share this post Link to post Share on other sites
Kexikus 995 Posted August 13, 2015 Well, that's way easier than I thought... xD That should make future projects possible, thank you. Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted August 15, 2015 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. Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted August 15, 2015 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. Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted August 17, 2015 It's pretty insane just how much better KOTOR2 is behind the hood... and that in their little time. 1 Quote Share this post Link to post Share on other sites
Kexikus 995 Posted August 29, 2015 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 Quote Share this post Link to post Share on other sites
Jorak Uln 458 Posted August 29, 2015 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 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? Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted August 29, 2015 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. Quote Share this post Link to post Share on other sites
Jorak Uln 458 Posted August 29, 2015 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.. Quote Share this post Link to post Share on other sites
Kexikus 995 Posted August 30, 2015 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 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. Quote Share this post Link to post Share on other sites
DarthTyren 103 Posted August 30, 2015 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. Quote Share this post Link to post Share on other sites
LiliArch 115 Posted August 31, 2015 Also the dialogue at Lower City of Taris where the Beks and Vulkars fight when you enter there for the first time. Quote Share this post Link to post Share on other sites
Kexikus 995 Posted August 31, 2015 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 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 Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted September 4, 2015 Might just be KOTOR2 but there's a command to make hits to guarantee hits. Kavar uses it on Onderon. Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted September 4, 2015 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...). Quote Share this post Link to post Share on other sites
LiliArch 115 Posted September 4, 2015 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. Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted September 5, 2015 Either can be used... the animations.2da is easily recognisable by being 100[something] rather than the shorter number fron the nwnscript. Quote Share this post Link to post Share on other sites