I'm very impressed with the improvements so far. I've noticed that the AI won't use MP items as already mentioned, but it would be nice if the AI could use Yggdrasil Leaves and Yggdrasil Dew as well. Right now both items don't get used even if all other HP items are removed from the NPC. If those items could be enabled while also preventing the AI from using them without consuming them I think the mod would be perfect.
That would be the most ideal, if it worked. There's really no mechanism 'linking' these action ID's to consuming items from the inventory -- if there were, then I wouldn't hesistate to add them.
Since there isn't, it would effectively allow the AI to constantly revive party members without limit, which would be just a tad broken. Hence why those are not able to be used.
I don't know what's going on but for the first story Arc the AI was using MP replenishing items consistently (Erik). It wasn't until after I went through the teleporter to escape (Erik and Luminary scene), that the AI now doesn't use a single MP replenishing item at all.
I've even been at 0 mana and injured and still no vial, just healing items. I have a party of 4 now and they still don't use MP items.
I can't seem to extrapolate where you explain what MP items get used and what items don't.
Only things I read were: Not allowed to use Yggdrasil Leaves and Yggdrasil Dew and MP item usage linked to AIFlowJudge.
But I don't even own any Leaves or Dew, I just have access the the 10 MP vials and Erik was using them efficiently during the first act but stops once we leave the Emerald Coast (teleport while fleeing).
I see, so these are like the Single Phials. Erik would use the same item during one part of the game, but not elsewhere?
Gotta say idk in that case.
----------------------------
The long and short is that only certain items will be used as there's nothing that actually links item use to the item action for the AI.
i.e. The AI will see that it has certain items in the inventory and based on what items in the inventory it can use a certain action (say "Use Single Phial"), but once it casts that action (restores 10 MP to some ally)- there's nothing that removes that item from the inventory (unlike if, say, *you* use that item instead of having the AI do it).
Depending on the situation, the AI will also judge whether using that item is worth it, or whether it would rather attack/etc. So, it's entirely possible that the AI judgement is simply deciding not to use it.
While it's improved with this mod, and this mod allows the AI to do more things in general, it's not perfected by any means. And I can't really say exactly what it will do given any situation.
Spoiler:
Show
It's been long enough that I probably wouldn't know exactly what items are allowed offhand anymore, but i'll try to quickly dig up the relevant entries from the DT.
These are the only 2 MP restoration items I see (although I suspect there are others with some effect, these are the only 2 entries with EJackPlayerAIActionCategory__Item and EJackPlayerAIActionControl__HealMP).
MahouNoKobin = Single Phial, and MahouNoSeisui = Magic Water.
Any other items that have a use other than just restoring MP would likely have a different EJackPlayerAIActionControl value.
I might add some adjustments at some point (including this). I was wondering if the AI would only use MP-restoration items when MP was low, but instead it's using HP for this evaluation by the sounds of it?
The AIFlowJudge struct doesn't have an entry for "low MP" only "low HP" and it looked like some cases used "low HP" for MP restoration skills/spells, so I almost wondered if that AIFlowJudge value also doubled for MP evaluation. Guess this wasn't the case.
Oh, I've got another thing to ask. Is there any way or reason why the skills you get for the others they don't use them all or some or is that just how it was coded?
Sometimes that's how it is. It will do a number of different evaluations based on the current state, but the way some skills/etc are slotted makes them extremely unlikely to be used. (I tweaked some of these values, but didn't change the order of evaluation) -- I wouldn't be surprised if at least a few didn't have any sort of evaluation in the AI table.
Some skills are also relegated to the "Mix It Up' AI and not the "Fight Wisely" AI, so having the AI set to 'Fight Wisely' will prevent certain abilities from being used. Why they made it that way idk, but maybe it's just that certain abilities are just considered more optimal so the less optimal ones they disabled for 'Fight Wisely'.
(I changed at least a few of these so more would be enabled for any given AI setting, as I recall)
If you're curious about certain abilities in particular, I can check for them.
That would depend on their equipment (if they have wands or staves equipped). Offhand, I don't believe there's anything in the AI flow to evaluate what equipment the character has equipped. They will evaluate skills based on this but the standard "Kougeki" (attack), I don't believe so.
IIRC, they do have some evaluation on how much MP they have but it's typically "anything below 60%/50%/40%/30%/20%/10%", as opposed to "anything below 100%". Ofc the "don't use MP" tactic will rule out any MP-using abilities.
AFAIK this should be the case *most* of the time (they should only normal attack very rarely), but there is some evaluation done based on the perceived strength of the enemy. If the enemy is weak enough, they will still sometimes normal attack because a buff/debuff wouldn't be worth their time / MP use.
24 comments
That would be the most ideal, if it worked. There's really no mechanism 'linking' these action ID's to consuming items from the inventory -- if there were, then I wouldn't hesistate to add them.
Since there isn't, it would effectively allow the AI to constantly revive party members without limit, which would be just a tad broken. Hence why those are not able to be used.
I've even been at 0 mana and injured and still no vial, just healing items. I have a party of 4 now and they still don't use MP items.
Only things I read were: Not allowed to use Yggdrasil Leaves and Yggdrasil Dew and MP item usage linked to AIFlowJudge.
But I don't even own any Leaves or Dew, I just have access the the 10 MP vials and Erik was using them efficiently during the first act but stops once we leave the Emerald Coast (teleport while fleeing).
Gotta say idk in that case.
----------------------------
The long and short is that only certain items will be used as there's nothing that actually links item use to the item action for the AI.
i.e. The AI will see that it has certain items in the inventory and based on what items in the inventory it can use a certain action (say "Use Single Phial"), but once it casts that action (restores 10 MP to some ally)- there's nothing that removes that item from the inventory (unlike if, say, *you* use that item instead of having the AI do it).
Depending on the situation, the AI will also judge whether using that item is worth it, or whether it would rather attack/etc. So, it's entirely possible that the AI judgement is simply deciding not to use it.
While it's improved with this mod, and this mod allows the AI to do more things in general, it's not perfected by any means. And I can't really say exactly what it will do given any situation.
It's been long enough that I probably wouldn't know exactly what items are allowed offhand anymore, but i'll try to quickly dig up the relevant entries from the DT.
171,MahouNoKobin,None,EJackPlayerAIActionCategory__Item,EJackPlayerAIActionControl__HealMP,true,true,true,true,true,0
172,MahouNoSeisui,None,EJackPlayerAIActionCategory__Item,EJackPlayerAIActionControl__HealMP,true,true,true,true,true,0
These are the only 2 MP restoration items I see (although I suspect there are others with some effect, these are the only 2 entries with EJackPlayerAIActionCategory__Item and EJackPlayerAIActionControl__HealMP).
MahouNoKobin = Single Phial, and MahouNoSeisui = Magic Water.
Any other items that have a use other than just restoring MP would likely have a different EJackPlayerAIActionControl value.
Though I think someone had submitted something very similar at one point, it's still worthwhile to throw it out there.
The AIFlowJudge struct doesn't have an entry for "low MP" only "low HP" and it looked like some cases used "low HP" for MP restoration skills/spells, so I almost wondered if that AIFlowJudge value also doubled for MP evaluation. Guess this wasn't the case.
Some skills are also relegated to the "Mix It Up' AI and not the "Fight Wisely" AI, so having the AI set to 'Fight Wisely' will prevent certain abilities from being used. Why they made it that way idk, but maybe it's just that certain abilities are just considered more optimal so the less optimal ones they disabled for 'Fight Wisely'.
(I changed at least a few of these so more would be enabled for any given AI setting, as I recall)
If you're curious about certain abilities in particular, I can check for them.
Like the whole site was randomly down for like 3-4 hours just a couple days ago.
It looks like someone was reporting some download issues (with Vortex, to be fair) earlier today on the Nexus discord. Here's the copy-and-paste response: https://help.nexusmods.com/article/92-im-having-download-issues-what-can-i-do
The few times that I have seen this, it's usually a temporary issue with their CDN and cleared up within a few hours.
I'd give it a little while and if it's still giving ya trouble then maybe come back.
I had a feeling someone who know whats up and thanks for the info.
If they have full MP, they should always use a spell that costs MP, after all, using a normal attack recovers their MP.
That would depend on their equipment (if they have wands or staves equipped). Offhand, I don't believe there's anything in the AI flow to evaluate what equipment the character has equipped. They will evaluate skills based on this but the standard "Kougeki" (attack), I don't believe so.
IIRC, they do have some evaluation on how much MP they have but it's typically "anything below 60%/50%/40%/30%/20%/10%", as opposed to "anything below 100%". Ofc the "don't use MP" tactic will rule out any MP-using abilities.
AFAIK this should be the case *most* of the time (they should only normal attack very rarely), but there is some evaluation done based on the perceived strength of the enemy. If the enemy is weak enough, they will still sometimes normal attack because a buff/debuff wouldn't be worth their time / MP use.