Aller au contenu

Photo

Bug in core scripts concerning party members AI


  • Veuillez vous connecter pour répondre
Aucune réponse à ce sujet

#1
anakin5

anakin5
  • Members
  • 258 messages
As said in an other post, I am trying to fix some things in party members AI. The three important things I was trying to fix are :
  • Make Ally : Dead -> Revival or Ally : Any ->Revival working
  • Finding out why party members get stuck on some spells
  • Why party members don't stat activated abilities out of combat
So I think some of my results have to be viewable here for informations of Bioware team (maybe).


First, concerning Ally : Any -> Revival. You have to know that if you choose Ally in the condition combobox, it does not include dead allies. It is explicitily written in _AI_GetAllies function of ai_condition_h.nss file.
But there is more to know. In targettype.xls file, we can see that a type is named Dead Body. Some spells works on dead bodies : Revival for sure, but also fireball, glyphs etc... As I said before, the Ally condition does not include dead party members, so it is impossible that AI cast something on a dead body, even if the spell accept such thing.

I don't really found why _AI_GetAllies doesn't have an optionnal parameter to include dead people, and I can't find what the major problem of including dead allies in the list returned by _AI_GetAllies.



Second point, sometimes, party members get stuck doing nothing. Yes, in fact I saw that it's occur in 2 occassions :
  • If one of your allies is dead and one of the tactics condition is explicitly directed to him like :

Alistair life Heal Alistair
Bug if Alistair is dead.
  • Or, if you try to cast a spell on a wrong target. In fact, tactics system doesn't understand what you want to do. (more test need to be done)
The first case stuck npc because there is no check to see if your target is dead or not (check should be done in function _AI_ExecuteTactic, file ai_main_h_2.nss).
In ability_h.nss file, there is a function called Ability_IsAbilityTargetValid which do the work (bugged as well but this function seems to be here to prevent casting on dead target). This function is never called !
So, what do AI is :
Alistair is an Ally ? : OK
Heal can be cast on Ally ? : OK
Alistait has life < 50% ? : OK
Go cast the spell -> stuck


missing Alistair is dead ? test. I change it in my own script and it works fine now.


Third and final point, why some activated abilities are not cast out of combat if I put a Self : Any condition in tactics UI ?
In AI_abilities_cond.xls file, you can see a boolean that said if the alility can be cast out of combat. And an other boolean if the ability can be cast by a follower out of combat. So it is not a bug here, it is intended to do so. Berserk and some others like tank maintained abilities does not proc out of combat. Overriding this file should solve the problem but I don't see why Threath (e.g) cannot be activated before combat while it make you tank loose 10 seconds at the start of each fight to start to process his tactics.

Modifié par anakin5, 24 novembre 2009 - 07:21 .