You are here

A better companion ai?

5 posts / 0 new
Last post
mix4mix
A better companion ai?

Been using tony_k ai since the day it was born, and since its 2017 I imagined if theres a way to succeed his project, and as much as replayable campaign that I've tried theres still so many spells unused by npcs. Here's a tiny list of them NOT casting spell/ feat such as:
ex.1) cleric - battletide/ divine shield/ earthquake, etc.
ex.2) lich - animate dead/ chain lightning/ create undead/ delayed fireball, etc.
ex.3) blackguard - bull's strengh/ create undead/ divine might/ summon fiend, etc.

Any thoughts on making a full feat and spellcasting ai script? I also found this jasperre's ai for nwn2 (maybe helpful) but was only able to partially placed an override in oc. The result was 50/50. Npcs used almost all of their spell/ feat but at the expense of weird behaviors, most of them leaving their triggered waypoints and failed to open a main conversation at times during the campaign. Either way I put hopes for a start from scratch project or improve an existing one.

Tested with my neverwinter nights 2 complete in oc and motb campaign. I've yet to test with soz (not my fav module).

 

  • up
    50%
  • down
    50%
kevL's

I'm not acquainted with jasperre's AI, what follows is about the stock/tony_k AI

  • Any thoughts on making a full feat and spellcasting ai script?

The way it's currently done is with 'henchspells.2da' + Talents (in the AI scripts). The 2da holds general characteristics of each spell & feat, as bit-mapped data. There are many entries that are blank at present (and some that should probly be corrected); because as new spells/feats have been added to the game, special tools and knowledge would be required to fill those entries in ...

That's how the general AI works. A/the alternative is to hook the AI by using the X2_SPECIAL_COMBAT_AI_SCRIPT, which while simpler to do is also merely a hook to the AI and not integral or applicable generally. And scripts that try to choose among spells/feats (without using the bit-mapped data in 'henchspells') tend to become very long, very fast; ie, it's not efficient but can be effective in case by case situations.

The issue you've raised is gigantic, not least because there are thousands of spells/feats. This is compounded by the fact that scripted Talents are kinda vague - the underlying mechanic is hardcoded. (Note that one of the talent functions will even crash/freeze the game.) This is compounded by the fact that the AI has to choose among many other actions in addition to casting a spell/feat. And it shouldn't break the GUI on the Behaviors sheet.


it's a worthy challenge and would make a great git project ...

  • up
    50%
  • down
    50%
demoix

Unfortunately, Tony_K Ai is best what we can have but he is gone. I found in archives that he worked for 2.3 version but it was never released :( I still hope that one day we could have Neverwinter Nights 2 Enhanced Edition with updated Tony_K AI or something similar heart

  • up
    50%
  • down
    50%
andysks

Every time I see such a post I wish we had the source code for the game sad

  • up
    100%
  • down
    0%
demoix

There is a still hope, small, but still hope - Beamdog. They did Enhanced versions to Baldur Gate 1/2 Icewind Dale, Planescape. I hope it's time to come for NeverwinNightsghts 1/2 one day too!

  • up
    50%
  • down
    50%