Elin
Not enough ratings
CustomAIRedux
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.186 MB
3 Sep @ 1:36am
6 Sep @ 9:53pm
4 Change Notes ( view )

Subscribe to download
CustomAIRedux

Description
Enhanced CustomAI Redux - Create custom combat AIs for party members with instruction lists. Middle-click party members to access the editor.

BASICS:
• Instructions execute top-to-bottom, first valid condition triggers
• Target dropdown determines spell/action recipient (Target/Player/Self)
• "And" chains multiple conditions for complex logic
• HP/MP/SP accepts numbers or percentages (e.g., 10 MP or 50%)
• Summons uses numbers or "100%" for summon cap


REDUX ENHANCEMENTS:
• Auto-populated spell/ability lists from character knowledge
• Status autopopulates now with aliases, names, plus "Spiky"/"SuicideBomb"/"Haste"/"Slow"
• Import/export system for AI sharing
• Multiple presets per character with easy switching
• Dead Ally/Ally entities for resurrection-capable allies
• Vanilla fallback system
• Enhanced targeting

Special thanks to thursday64 for open-sourcing the original CustomAI, enabling this overhaul:
- https://github.com/air1068/CustomAI
- https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3463656197

Requires YK Framework. Tested on Nightly builds only.

Companion mods:
- NPC Spell Manager: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3557997205
- Tome of Memory Loss: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3561086399
20 Comments
grueshanker  [author] 8 hours ago 
✅ Update fix: Fallback to Default AI toggle now properly updates when loading presets
grueshanker  [author] 10 hours ago 
COMPATIBILITY UPDATE: NPCs now automatically skip to next CustomAI instruction when targeted spells are unavailable, added to support NPCSpellFix Nightly's new spell charge system.
grueshanker  [author] 5 Sep @ 12:22am 
@python

https://imgur.com/a/jQRMRp0

There is an image that shows after I loaded in your rule, my Melilith successfully cast Miasma on the enemy, then death arrow. A video doesn't help me (and I would rather play Elin than troubleshoot tbh). It might be a mod load order issue, or something beyond my control (and without logs, it's really nothing I can do). Also your imported example caused no lag on my side with my PC, and I have >150 mods.
python 4 Sep @ 11:52pm 
@grueshanker

Thanks for response. Thats what I thought, top down, first rules valid will be executed.

I have added fallback to vanilla, and a very simple rules: https://pastebin.com/JiPyi9yZ

Still fail to execute. Let me figure out a way to screen recording. Also the lag only happen when first rule fail. I have tried to load area with very small number of enemy, no summoning.
grueshanker  [author] 4 Sep @ 11:41pm 
@Spiegel

AWESOME,
thanks for testing and confirming!! appreciate it
Spiegel Ei 4 Sep @ 11:35pm 
@grueshanker
I've confirmed the issue has been resolved!
All the MODs you create are so interesting! I'm rooting for you! Thank you!
grueshanker  [author] 4 Sep @ 11:27pm 
@python

I also think you misunderstand how the mod works. I didn't change the behavior from the original mod in the regard you are talking, this is what description says:
* Each instruction in the list is checked from top to bottom, and the first one with a valid condition is executed.

And that's what your rules are doing. The lag, may be many AI on screen but may want to test original too for that.

If you want something more dynamic, try this: https://pastebin.com/spr11zCd
That reads: If Enemy HP <= 100% AND Enemy Distance < 3, Attack (Melee) Target.
If NPC cannot do that, it then tries to cast hero on player. if it cannot do that, it moves to the player. If you do not enable vanilla fallback, sometimes they will just stand. That is base mod behavior.
grueshanker  [author] 4 Sep @ 11:24pm 
@python:
>> What is the difference between target vs enemy when npc cast attack spell?

Can I see specific rule? Question is not specific enough. I have export feature, please use it and use pastebin
grueshanker  [author] 4 Sep @ 11:23pm 
@python I don't intend to debug performance issue, but fyi I can run twice the rules with no lag on my PC. Just remember using any mod comes with risk of performance, especially with many AI on screen.

The original code is open source, you're free to take a look and I can decompile mine to check or fix anything :)
grueshanker  [author] 4 Sep @ 11:06pm 
Update @Spiegel, I fixed a InvalidCastException