Suggestions for scripting battles?

Post » Thu Dec 03, 2015 7:38 am

So I'm working on a quest which adds an Ordinator raid on a House Dagoth stronghold which the player can be a part of. The idea is that the battle rages on until the player can find and kill the House Dagoth general. I have no trouble scripting specific Ordinators and House Dagoth minions to fight, but the problem with relying on that alone is that it makes for a very lame battle -- the player just runs around and kills the creatures, and then the Ordinators stand there goofishly. I wanted to give the feel of a battle which is ongoing and which can't be stopped until the player finds and kills the boss creature.

I was hoping to create the illusion of a larger, ongoing battle by adding activators which may randomly spawn new House Dagoth minions and Ordinators about the place, fairly close to each other, so that even when the initial House Dagoth/Ordinator people have fought and died, new spawns and mini-battles will emerge.

These newly spawned creatures/people don't have specific scripts to make them fight each other, because 'startcombat' requires specific IDs, but I was hoping that being guard class, the Ordinators would attack the House Dagoth creatures on sight. However, they don't -- not even when those House Dagoth creatures attack the player and hit them with area effect spells. They just wander around, and it looks bad.

Any ideas as to how I can make a more "limitless" battle sequence, rather than just five or six scripted fights which resolve quite easily? Any examples of mods which have done this well which I could steal from take inspiration from?

User avatar
Kortniie Dumont
 
Posts: 3428
Joined: Wed Jan 10, 2007 7:50 pm

Post » Thu Dec 03, 2015 11:31 am

Try making the members of the group 'follow' each other. That way, when one of the creature/NPC belonging to the group gets attacked, rest of the followers to attack back. If there are 5 creatures, say, A, B, C, D and E. Then make A follow B, B follow C and so on. This way, if A gets attacked, then along with A, B also joins the fight. By extension, C also joins the battle and the chain continues.

User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Thu Dec 03, 2015 4:11 am

That's a cool idea, and it might make the pre-scripted fights better so thanks for the tip, but it doesn't really get around the basic problem with adding new fights, right? I can't script the newly spawned creatures to follow each other because that requires specific IDs, which if I added would limit the amount of new spawns that could come up. Similarly, even if the new spawned creatures and Ordinators are following each other, if I can't make them fight, then none of them will get involved anyway?

Thanks for always replying to my threads so soon, by the way! Our timezones must really be in sync or something.

User avatar
Cheryl Rice
 
Posts: 3412
Joined: Sat Aug 11, 2007 7:44 am

Post » Thu Dec 03, 2015 6:20 am

Are you ok with using MWSE? xStartCombat would make this fairly easy.

Alternatively the AIFollow method that hollajith mentioned might be your best bet. It'd probably need a good number of unique IDs, but you could respawn them after a certain point so it might not be so bad.

User avatar
Josephine Gowing
 
Posts: 3545
Joined: Fri Jun 30, 2006 12:41 pm

Post » Thu Dec 03, 2015 10:43 am

I meant you can add follow under AI button in CS. You don't have to use scripts for that.

How many creatures with unique ID are there exactly?

User avatar
Stryke Force
 
Posts: 3393
Joined: Fri Oct 05, 2007 6:20 am

Post » Thu Dec 03, 2015 4:46 pm

I have no idea how to use MWSE, but I think I can teach myself. The thing is, I don't want to add in a dependency on MWSE just for this one thing (or just this and one other minor thing which I could've used it for). Perhaps after I'm done I'll make a MWSE version which gives adds the extra functionality, but right now, I'd rather try to stick to the basics unless I have no other choice.

I didn't know that you could set AiFollow with the CS, and that's cool, but I still don't see how I can use that to start new fights between freshly spawned Dagoths and Ordinators.

I have ~6 creatures placed in-cell, each scripted to fight specific Ordinators. Each of these are scripted so that when they die, they spawn an activator which in turn (after a cool-off period) spawns a new creature which is also has the same scripts as the original creatures: to attack the specific Ordinator if it's still alive, and to spawn more once it dies.

So there are potentially limitless House Dagoth minions spawning in time, scripted to attack these specific Ordinators. But I also have Ordinator-spawning activators, and I have no way of making these new Ordinators attack the new House Dagoth minions, or vice versa. Does that make any sense?

User avatar
Becky Palmer
 
Posts: 3387
Joined: Wed Oct 04, 2006 4:43 am

Post » Thu Dec 03, 2015 2:39 am

If those freshly spawned dagoth/ordinators have atleast one 'followee' then it will automatically join the fight, but not a specific enemy. What I mean to say is, say, C is freshly spawned and C is set to follow D. Then, as long as D is in battle, C will join the fight with D. But, the freshly spawned C will not not attack the specific enemy you want. So the trick is to have the new dagoth/ordinator to have someone to follow. You might try having them follow multiple targets. Don't know if it works, though. If it works, then you can always be sure that every actor will have someone to follow.

If you want specific dagoth minions to fight only specific ordinators, then my trick won't work.

User avatar
Jesus Lopez
 
Posts: 3508
Joined: Thu Aug 16, 2007 10:16 pm

Post » Thu Dec 03, 2015 3:33 am

simple way is to use AIescort for a few seconds if one of the parties has a high fight value. then the high fight value npc/creature will automatically attack the AI escort package. plus side is if aiescort is used, then those npcs will also attack whatever the player attacks (and if guard class, will attack hostiles automatically).

there's a couple bugs that could arise from that though if not careful.

User avatar
DAVId Bryant
 
Posts: 3366
Joined: Wed Nov 14, 2007 11:41 pm

Post » Thu Dec 03, 2015 8:10 am

If you don't wanna use MWSE you can reuse NPCs with unique IDs. When an NPC dies you place a dummy dead body at his posiotion, disable him and make him enter the battle again.
User avatar
Nicole Mark
 
Posts: 3384
Joined: Wed Apr 25, 2007 7:33 pm


Return to III - Morrowind