Aller au contenu

Photo

Making Fights more dynamic


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

#1
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

I made some custom spell feats that are cast very quick and blend very well into the combat animations...

 

Then I realized how useless this effort was since after every spell / feat / action the character has to "wait for the end of the turn". Not only does it look ridiculous but also kinda defeats the purpose of fast spells / feat -> which is to use them multiple times in one round or at least get back to melee attacks.

 

This is basically what fighting in NWN2 looks lie:

 

https://www.youtube....h?v=XbQVaupPS80

 

It's been bugging me for years and I really wanna do something about it... Is there a way to "fix" this?



#2
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Did you set the "Instant" on the feat.2da to 1? That should make it instant without waiting for the end of the turn.

Another idea to make fights less slow and more dynamic could be to give everyone (allies and foes) permanent haste. That should speed things up, especially at low levels.



#3
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

I already modified the BAB for player classes so that they get 4-6 attacks per round quick. But then it really looks dumb when they're really going at it and then suddenly pause for 6 sec for no reason.

 

I'll try the instant thing and see how it works out...



#4
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

Although I can't see that column... where is it?



#5
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

Nvm - I have to update to 1.23...



#6
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Did you set the "Instant" on the feat.2da to 1? That should make it instant without waiting for the end of the turn.

 

It may not. Combat in NWN2 works off "rounds". It is a turn-based game, after all, even if the turns run continuously. "Instant" on a spell only means it will cast at the start of the round. But each spell/attack still has to be queued up and executes one "attack" per round. 

 

Now, characters can get multiple standard melee attacks per round. A level 20 fighter type is going to have four attacks per round. But that's still one attack "action" in the queue. And doesn't sound like what the OP wants.

 

When it comes to spells, they're still only going to execute one spell per round. 

 

There are ways to circumvent a part of this restriction: with buffs, you can use a sequencer rod or rod of preparation or some other player-created item that allows multiple buffs to be instantly cast on the character at the start of a round. That's the only way I know to get multiple spells off in a single round, but they are defense only. 

 

For creatures, you can hard-code their AI so they cast multiple buffs instantaneously at the start of combat. But again, doesn't sound like what the OP is after.

 

It may be possible to re-code and override some of the default spellcasting scripts so that certain spells could be cast as a unit, but that would probably be a considerable undertaking. You're effectively trying to bypass a core game mechanic. You're going to fight the game engine every step of the way. 



#7
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

I might have the dumbest idea that just might work for me... What if the spell script made the caller play attack animations and deal damage to spell target? Since in my setting everybody keeps hitting anyone anyway it should matter that there would be no hit roll...



#8
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

Although... the instant thing did kinda what I wanted - the character doesn't stand in one place actionless for 6 seconds. He also doesn't do the animations and ignore the distance but I'm sure I can handle that with scripting. Thanks!



#9
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

Yup - that worked even better than expected XD XD XD Just put 1 into "instant", script all the animations / effects, put ClearAllActions right at the beginning of the script and it looks AWESOME! Thank you once again guys!



#10
Tchos

Tchos
  • Members
  • 5 030 messages

I'd like to see a video of it, if you have the time.



#11
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

I'd like to see a video of it, if you have the time.

Yeah... I kinda need to drop it for the moment. I have a test on Monday - so check back on like Tuesday...? I'll put the link here.



#12
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

Sorry for the delay:

 

https://youtu.be/iR69ULJacHY

 

Notice how I keep changing the target and it doesn't cause my character to "wait for his turn". The only moments he's standing still it's him waiting for his next basic attack, which depends on attacks per round stat - in the video it's 4, you can pump it up to 6.


  • Tchos et andysks aiment ceci

#13
Tchos

Tchos
  • Members
  • 5 030 messages

Well done!  It looks like it fits right in.



#14
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

There's one downside, though - instant feats completely ignore spell range. I'm working on a way around it. I scripted a distance check - if it fails a floating text appears saying "Target out of range" and the spell does nothing... which is fine, but it uses up the feat and activates the feat cooldown. I tried using the ResetFeatUses() function, but it just doesn't work... any ideas?



#15
Tchos

Tchos
  • Members
  • 5 030 messages

How did you use ResetFeatUses()?



#16
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

I got it to work!

 

It just has to be called by the script other than the spell impact script.

 

This is how I handled it - I made a creature with custom heartbeat = 1 second. In the heartbeat script it resets the cooldown for a feat that is set in a local int. The spell impact script sets the local int to the feat that has just been used. This way the last "misused" feat gets reset. Just make sure to have the heartbeat script to set the int back to some random nr other than the used feat after the cooldown reset.



#17
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Well done, but is there no other way to make it work without heartbeat? Because heartbeat can put a bit of strain on the module/server and eventually slow things down.

Personally, I tend to avoid heartbeat scripts like the plague, but maybe I'm just paranoid lol. :P



#18
jestemwlodek

jestemwlodek
  • Members
  • 94 messages

I'm a hearbeat junkie - then again, I've never played NWN2 online. That being said I had problems previously with some functions having the urge to be called by some other caller. I tried the "ExecuteScript" but it has never worked for me - HB seemed to be the only way out in those cases.



#19
kevL

kevL
  • Members
  • 4 052 messages
cudo's

re. heartbeat : don't worry about it unless/until it's noticeable. ( Best practices still apply ofc. )

#20
Tchos

Tchos
  • Members
  • 5 030 messages

You should be able to do it instantly by signaling a custom user-defined event, rather than using a heartbeat.