Scripted AI for boss battles?
Dark_Ansem
Member Posts: 992
Will it be possible in the re-release to create more scripted boss battles, to go in tandem with the D&D mechanics?
0
Comments
Thanks for sharing that patch, I had no idea it existed. will the fixes be merged with the new release?
if(GetCurrentHitoints() < 500)
{
Do Something
}
It is already available for NWN:EE here https://forums.beamdog.com/discussion/68131/community-patch-1-72-for-nwn-enhanced-edition/p1?new=1
The final boss in this module is also heavily scripted, with some minor scripting on some earlier battles: https://neverwintervault.org/project/nwn1/module/peremptory-summons
- barrier change boss (Magus from Chrono Trigger would be a perfect example)
- when reduced to 0hp, transform into something else with full HP
- lose X% of your health: teleport away/become invincible, summon enemies then return to field once summoned monsters are destroyed
2. I have a sub-routine call on death that can fire all sorts of things just have to call for a spawn monster/form after the first form dies(hiding the body so it does not look like it died) and give some xp for completing the first stage of the boss or use SetImmortal and fire the change when they down to 1.
3. I been meaning to put in a sub-routine in the on-damage/heartbeat for percentage HP or exact Hp fire event. I see if I can get it into the next base update.
1) Magus is healed by all elemental damages except the barrier one (so, fire barrier: fire damages). Weapon hits still work BUT every time he is hit by a weapon he changes barrier type via counter. Does scripting allow for immediate counters / free actions?
2) that sounds pretty much it. Would it work with a sort-of polymorph effect?
3) thanks a lot!
4) can scripting allow for "routinary" AI behaviour? Something ala: cast spell, wait one round, teleport, rinse and repeat til defeat without moving? Would that require waypoints?
PS: was it rounds or turns? I'm a bit mixed up about how Combat works.
2) could, but it is better to just spawn new creature - you can immediately destroy original creature so the body disappears fast and if you also spawn some visual effect such as VFX_POLYMORPH you can hide that scripting substition completely.
4) Yes. Yes you would most likely want to prepare waypoints, it would be possible to do that without them, but it can lead to stuck/bumping issues. If you want to make the teleport very randomized, just prepare many waypoints and choose random one.
tl'dr AI scripting is already very powerfull in nwn. I can't think of anything we would need from BeamDog maybe just some solution to dashing/kicking/knocking away. Currently, such movement actions requires quite ugly workaround. You can see this in community patch, special ability Dragon Wing Buffet which knocks away in BG2 dragon style.
4) can scripting allow for "routinary" AI behaviour? Something ala: cast spell, wait one round, teleport, rinse and repeat til defeat without moving? Would that require waypoints?
PS: was it rounds or turns? I'm a bit mixed up about how Combat works.
Yes, bioware does custom AI by calling a script. I jump in and grabbed it by string and runs each by the string lookup and runs a function(s) in one file. I only done a few samples and if they not in the sample script it goes to the other script. Look in sp_combat_ai script and function WizSample that show how to control every action each round of the NPC/caster. The sample has the wizard cast/act each round for the first 7 rounds(whatever spell or action) then it kick back to the standard AI. So you could use this or make couple different ones for custom wizards/creatures and script there action/spells each round (you could use multiple string calls inside the function for different caster. You can do calls of move away from enemy or if you want more specific locations the waypoints works great.
It the orc wizard in Area 001 for testing.
It round(s).
LINK
Here are two videos from that Siege of the Heavens module with more advanced boss scripting:
Charion the Untamed.
Selenoth the Hungerer.
Although, this one is in a way a lot more advanced than what I had in mind!