I mean more sophisticated conditions, such as HP value. Thanks for sharing that patch, I had no idea it existed. will the fixes be merged with the new release?
I mean more sophisticated conditions, such as HP value.
Again that is possible to do already . You can code that very easily - there is a way how to make special AI for single creature (as shown in the cleric AI example) and there is a way how to determine HP to trigger something. It will look like this:
if(GetCurrentHitoints() < 500) { Do Something }
Thanks for sharing that patch, I had no idea it existed. will the fixes be merged with the new release?
- 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
1. The barrier one with only one type of damage would be interesting to script a custom function on it. Would have call per round or health level etc.. or whatever parameter you want to fire the new barrier.(so have to look into this one more) Watching the video (omg been so long since I played it) So is he immune to all energy types except one and weapon damage or can the weapons still damage him? Just make sure I understand the mechanics. 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. The barrier one with only one type of damage would be interesting to script a custom function on it. Would have call per round or health level etc.. or whatever parameter you want to fire the new barrier.(so have to look into this one more) Watching the video (omg been so long since I played it) So is he immune to all energy types except one and weapon damage or can the weapons still damage him? Just make sure I understand the mechanics. 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.
Aw thank you so much for this! 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.
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?
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?
1) yes all of this is easily possible to do, the only specific of AI scripting is that it requires lots of time consuming play-testing
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.
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?
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?
1) yes all of this is easily possible to do, the only specific of AI scripting is that it requires lots of time consuming play-testing
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.
Dark_Ansem 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.
Dark_Ansem 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).
I'm not sure I understood this correctly, but thank you.
Short answer: yes, but it's complicated. Like Shadooow said, the biggest problem coding problem is forced/quick movement like dashing/knocking away. Took me hours to get something that approximated a dash which didn't bug out most of the time...but it's still hardly ideal.
Short answer: yes, but it's complicated. Like Shadooow said, the biggest problem coding problem is forced/quick movement like dashing/knocking away. Took me hours to get something that approximated a dash which didn't bug out most of the time...but it's still hardly ideal.
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!