Aller au contenu

Photo

Cutscene: Choreograph a battle


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

#1
Pompeii69

Pompeii69
  • Members
  • 153 messages
I realize this is overly ambitious given my newbie-ness with the toolset, but eventually I hope to do a cutscene (for machinima) and was hoping to find some tips or techniques for choreographing a battle scene?

#2
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Probably the easiest way to do it is to use factions and the plot flag.

Set up two custom factions that are hostile to each other and neutral to every other faction. Set the plot flag to true on all of these NPCs. This way, they will automatically hack away at each other without you having to script anything and they won't kill each other right away.

If you do want to have some of them die, then keep the plot flag false and just give them alot of HP so it takes longer for them to kill each other.

This will generate a fairly random scene as each NPC's AI will take over just kind of go with it. If you want certain things to happen, you will probably have to dig into scripting.

there is also something on the Vault caleld Nytir's battle system. I haven't used it, but it looks like it may be helpful for you.


May I also recommend that you familiarize yourself with the use of static cameras and use camera angles to give the appearance that there are more combatants than there actually are. This will save some computer processing power.


I don't know if this has actually ever been done before. I'm interested to see how it comes out.

#3
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
I have a cut-scene that includes a few different battles in it. Give a bit more info on exactly what you are looking to do and maybe I can offer up some tips. How specific are you looking to be when it comes to the battle playing out?

#4
Pompeii69

Pompeii69
  • Members
  • 153 messages
Thank you very much, I found the Nytir's Battle System script, and it looks very usable.

#5
Pompeii69

Pompeii69
  • Members
  • 153 messages

_Knightmare_ wrote...

I have a cut-scene that includes a few different battles in it. Give a bit more info on exactly what you are looking to do and maybe I can offer up some tips. How specific are you looking to be when it comes to the battle playing out?


So my family has this urban legend that we tell, The Curse of the Egg Fairy, which is a monster that creeps around at night, and steals babies.  I know, it's kind of a ridiculous story, but I was hoping to make a little movie about it where a group of family members, brave warriors, seek out to find and kill the Egg Fairy.  But since it's more for a machinima movie as opposed to a playable mod, I need to have the group of 4 adventurers move across the landscapr, meeting up with various groups of monsters guarding the Egg Fairy.  eventually they come upon the Egg Fairy itself, which commences into an epic battle.

#6
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
This is doable. You will need to use scripting. If you are not familiar with scripting for NWN2 but want to learn, look at Knightmare's signature and follow the link. You can also go to the webside NWN2Scripting.com.

IF you don't want to learn scripting, look on the vault for Lilac Soul's scripting tool. This is an application that lets you select events that you want to have happen and then it translates it into NWN2 code that you can paste into scripts. It is very useful.

#7
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
Yup this is indeed doable. What you will need to do first is to create the scene backdrops. In order for it to have fluid scene changes, there's a couple things you can do. One is to have area trasitions for the different scenes (which would require seperate conversation/cut-scene sequences) and then stitch them together in a video editing program, or (what I do since it is in a playable module) have one huge area divided up bewteen the different scenes and then jump the characters about as needed.

Nytir's Battle System is good, but only really useful if you are looking to simulate large scale battles. From your description of just a small group of adventurers going about, then it won't be very useful to you. You'd be better off doing smaller individual custom scripts.

For something larger like this, I do a story board first (like they do for real movies) and plan things like the general scene set up, character actions and dialogue, camera angles, etc. The trick when building the scenes is to only build what is viewable from the camera angle and not waste time on the surrounding area.

#8
Pompeii69

Pompeii69
  • Members
  • 153 messages
Thanx all for the feedback, responses, and advice... It's something I plan on working on on weekends and the wee late hours, but if I come up with anything viewable, I'll be sure to post it here.

#9
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Great. I'd love to see it. Best of luck.

#10
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
Here's an example video of one of my cut-scenes. This is a "rough draft" and still a work in progress. Still need to work out a few timing issues, spelling mistakes, etc. Don't mind some of the animations that seem out of place, they are just filler to remind myself that I need to get more appropriate ones in there later. Anyway, it should give you a basic idea of some of the things that are possible to be done:

Modifié par _Knightmare_, 22 juin 2011 - 11:23 .


#11
Pompeii69

Pompeii69
  • Members
  • 153 messages
Thank you for sharing that. It reminds me a bit of Obould Many-Arrows, and his rise from a mere Orc to leading the Orc Nation into creating a permanent kingdom for themselves north of the Silver Marshes, forever sealing off the western tunnel entrances to Mithral Hall, leaving only the east doors open...

May I ask, how long has this taken you to put together?

#12
MasterChanger

MasterChanger
  • Members
  • 686 messages
Awesome job putting that together, _Knightmare_, and nice writing as well. :)

#13
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Yeah, good work Knightmare, glad to see one of my prefabs actually getting used.

#14
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
Thanks guys.

The module itself has been in the works for a loooong time. With my son recently being born it is on the back burner for the moment. That specific cut-scene took me about 20 - 30 hours to get to the point it is at. Lots of scripting going on there to make it all happen. Plus I needed to find a good way to make the camera slide to the side like it does (its actually tracking an invisible NPC). That whole thing is done within a single toolset area, I just keep jumping things around when needed.

@ LotRS - yes and thank you for those areas. I suck at making them myself, 95% of my module is edited prefabs.

#15
Pompeii69

Pompeii69
  • Members
  • 153 messages
Knightmare, in reading your post, I am assuming there is no way to animate cameras? Not a cut from one camera to another, but panning? zooming? etc?

#16
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
I don't think you can get it to zoom in on something - if somebody out there knows a way please let us know, I could have used that in a few places. You can get it to stay at a fixed point and spin in place to follow something, or get it to stay at a specific angle and slide along at that angle (whatever those appropriate camera terms are called - spin and pan?). The thing is that you need to declare a specific creature for the camera to follow. For a few of my scenes I wanted to show an "overview" type shot and not really track a person, so I used the invisible NPC (one with the Null Human appearance) for it to track.

Again, I highly suggest doing the "story board" thing before you even open the toolset. It will help a lot when you go to set things up. One trick that I learned when building the areas (providing you have multiple scenes all built within the same toolset area) is to place wall placeables between the different "sound stage" sections. That will prevent NPC1 in scene 1 from running over to attack NPC2 in scene 2 (blocks line of sight).

I'm still learning some things myself, so if you (or anybody else) has some cut-scene tips, I'd love to hear them. If you need any help or scripts that I may be able to provide, just let me know. :)

#17
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
There are scripting functions and XML functions that have names which suggest they may affect the camera, but I don't recall ever doing much with them, except that if you set the camera height really high, you get this cool zoom in effect from way off. Its a fast zoom, though, and not controlled, so I doubt it would be helpful.

#18
Guest_Chaos Wielder_*

Guest_Chaos Wielder_*
  • Guests
You could probably get it to "quasi-zoom" by using the tracking function intelligently. Perhaps resize the creature while the tracking effect is going on? I don't use cameras often, so I'm just throwing ideas out there.

#19
Pompeii69

Pompeii69
  • Members
  • 153 messages
I've started putting together my scene, and I'm kinda amazed at the level of animations possible in a cutscene/conversation. However, the one thing that seems to be missing is a way to play normal attack animations. The list of animations is fairly long, including spell casting, bardsong, worship, duck, look right, etc...

However, there doesn;t appear to be basic attack animation available, so staging or choreographing an entire fight sequence doesn;t seem likely. Unless there's something I'm missing (more than possible)

Here are the constants defining the available animations avalable via ga_play_animation

// Looping animation constants.
int ANIMATION_LOOPING_PAUSE = 0;
int ANIMATION_LOOPING_PAUSE2 = 1;
int ANIMATION_LOOPING_LISTEN = 2;
int ANIMATION_LOOPING_MEDITATE = 3;
int ANIMATION_LOOPING_WORSHIP = 4;
int ANIMATION_LOOPING_LOOK_FAR = 5;
int ANIMATION_LOOPING_SIT_CHAIR = 6;
int ANIMATION_LOOPING_SIT_CROSS = 7;
int ANIMATION_LOOPING_TALK_NORMAL = 8;
int ANIMATION_LOOPING_TALK_PLEADING = 9;
int ANIMATION_LOOPING_TALK_FORCEFUL = 10;
int ANIMATION_LOOPING_TALK_LAUGHING = 11;
int ANIMATION_LOOPING_GET_LOW = 12;
int ANIMATION_LOOPING_GET_MID = 13;
int ANIMATION_LOOPING_PAUSE_TIRED = 14;
int ANIMATION_LOOPING_PAUSE_DRUNK = 15;
int ANIMATION_LOOPING_DEAD_FRONT = 16;
int ANIMATION_LOOPING_DEAD_BACK = 17;
int ANIMATION_LOOPING_CONJURE1 = 18;
int ANIMATION_LOOPING_CONJURE2 = 19;
int ANIMATION_LOOPING_SPASM = 20;
int ANIMATION_LOOPING_CUSTOM1 = 21;
int ANIMATION_LOOPING_CUSTOM2 = 22;
int ANIMATION_LOOPING_CAST1 = 23;
// FAK - OEI added for NWN2
int ANIMATION_LOOPING_PRONE = 24;
int ANIMATION_LOOPING_KNEELIDLE = 25;
int ANIMATION_LOOPING_DANCE01 = 26;
int ANIMATION_LOOPING_DANCE02 = 27;
int ANIMATION_LOOPING_DANCE03 = 28;
int ANIMATION_LOOPING_GUITARPLAY = 29;
int ANIMATION_LOOPING_GUITARIDLE = 30;
int ANIMATION_LOOPING_FLUTEPLAY = 31;
int ANIMATION_LOOPING_FLUTEIDLE = 32;
int ANIMATION_LOOPING_DRUMPLAY = 33;
int ANIMATION_LOOPING_DRUMIDLE = 34;
int ANIMATION_LOOPING_COOK01 = 35;
int ANIMATION_LOOPING_COOK02 = 36;
int ANIMATION_LOOPING_CRAFT01 = 37;
int ANIMATION_LOOPING_FORGE01 = 38;
int ANIMATION_LOOPING_BOXCARRY = 39;
int ANIMATION_LOOPING_BOXIDLE = 40;
int ANIMATION_LOOPING_BOXHURRIED = 41;
int ANIMATION_LOOPING_LOOKDOWN = 42;
int ANIMATION_LOOPING_LOOKUP = 43;
int ANIMATION_LOOPING_LOOKLEFT = 44;
int ANIMATION_LOOPING_LOOKRIGHT = 45;
int ANIMATION_LOOPING_SHOVELING = 46;
int ANIMATION_LOOPING_INJURED = 47;


// Fire and forget animation constants.
int ANIMATION_FIREFORGET_HEAD_TURN_LEFT = 100;
int ANIMATION_FIREFORGET_HEAD_TURN_RIGHT = 101;
int ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD = 102;
int ANIMATION_FIREFORGET_PAUSE_BORED = 103;
int ANIMATION_FIREFORGET_SALUTE = 104;
int ANIMATION_FIREFORGET_BOW = 105;
int ANIMATION_FIREFORGET_STEAL = 106;
int ANIMATION_FIREFORGET_GREETING = 107;
int ANIMATION_FIREFORGET_TAUNT = 108;
int ANIMATION_FIREFORGET_VICTORY1 = 109;
int ANIMATION_FIREFORGET_VICTORY2 = 110;
int ANIMATION_FIREFORGET_VICTORY3 = 111;
int ANIMATION_FIREFORGET_READ = 112;
int ANIMATION_FIREFORGET_DRINK = 113;
int ANIMATION_FIREFORGET_DODGE_SIDE = 114;
int ANIMATION_FIREFORGET_DODGE_DUCK = 115;
int ANIMATION_FIREFORGET_SPASM = 116;
// FAK - OEI NWN2 Specific Animations
int ANIMATION_FIREFORGET_COLLAPSE = 117;
int ANIMATION_FIREFORGET_LAYDOWN = 118;
int ANIMATION_FIREFORGET_STANDUP = 119;
int ANIMATION_FIREFORGET_ACTIVATE = 120;
int ANIMATION_FIREFORGET_USEITEM = 121;
int ANIMATION_FIREFORGET_KNEELFIDGET = 122;
int ANIMATION_FIREFORGET_KNEELTALK = 123;
int ANIMATION_FIREFORGET_KNEELDAMAGE = 124;
int ANIMATION_FIREFORGET_KNEELDEATH = 125;
int ANIMATION_FIREFORGET_BARDSONG = 126;
int ANIMATION_FIREFORGET_GUITARIDLEFIDGET = 127;
int ANIMATION_FIREFORGET_FLUTEIDLEFIDGET = 128;
int ANIMATION_FIREFORGET_DRUMIDLEFIDGET = 129;
int ANIMATION_FIREFORGET_WILDSHAPE = 130;
int ANIMATION_FIREFORGET_SEARCH = 131;
int ANIMATION_FIREFORGET_INTIMIDATE = 132;
int ANIMATION_FIREFORGET_CHUCKLE = 133;

#20
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
For the most part you can't script things "blow by blow." What you can do of course is have one actually attack the other and have the engine take over from there.

I did recently read a possible work-around though. You might be able to make a custom spell in the spells.2da and have it call no script (so it is a "fake" spell). As the Casting animation, you have it use the attack animation. This following link is from the NWN1 forums, but the scripting is so similar that you may be able to get it to work (check the latest few replies mostly): http://social.biowar...30570/1#7738233

Modifié par _Knightmare_, 27 juin 2011 - 11:27 .


#21
The Fred

The Fred
  • Members
  • 2 516 messages
You can also use the SetCombatOverrides() function to do stuff. It's probably easier, though I haven't really used it much myself.

#22
Pompeii69

Pompeii69
  • Members
  • 153 messages

_Knightmare_ wrote...

For the most part you can't script things "blow by blow." What you can do of course is have one actually attack the other and have the engine take over from there.

I did recently read a possible work-around though. You might be able to make a custom spell in the spells.2da and have it call no script (so it is a "fake" spell). As the Casting animation, you have it use the attack animation. This following link is from the NWN1 forums, but the scripting is so similar that you may be able to get it to work (check the latest few replies mostly): http://social.biowar...30570/1#7738233


In my tests, I had the speaker attack the listener, but as far as I know, there doesn't seem to be a way to interrupt it to continue with the scripting out of the scene.  Dialog will continue, but they're still duking it out.  I'll look into this custom spell solution and see what it offers.

Since my group will be trading jibes with the enemy during the course of the battle, I want to maintain as much control over the battle as I can.  (Remember, this isn't a playable mod, but a machinima attempt) Also stopping it at variousd points, having the enemy flee with the group chasing, resuming, with the resulting culmination in the battle itself.  You know, like a Spider-Man and Doc Ock battle....  LOL

#23
Pompeii69

Pompeii69
  • Members
  • 153 messages

The Fred wrote...

You can also use the SetCombatOverrides() function to do stuff. It's probably easier, though I haven't really used it much myself.


I've never heard of this, but I'll investigate it.  Thanx.

#24
The Fred

The Fred
  • Members
  • 2 516 messages
You can use it to make people, say, automatically hit or deal a set amount of damage. That way, you can ensure that a given NPC wins a combat or one-hit-kills an enemy, etc.

#25
Pompeii69

Pompeii69
  • Members
  • 153 messages

The Fred wrote...

You can use it to make people, say, automatically hit or deal a set amount of damage. That way, you can ensure that a given NPC wins a combat or one-hit-kills an enemy, etc.


As far as I can tell, this function was created specifically for cutscenes, but in what I've read, it doesn't really seem it's for use of animations.  Here is the link where I looked it up:  http://nwn2.wikia.co...CombatOverrides

It seems related more to the damage an attacker gives during a round of combat.