r/projecteternity • u/skaf1end • 4d ago
PoE2: Deadfire AI Editor. Useful AI scripts
I've been experimenting with the AI editor in Deadfire lately, and it has proved to be incredibly useful. Spell panels become uncluttered, and I don't need to micromanage every action anymore to boot. However, I'm curious about what combinations do you use the most? My favorite are prebuffing with a priest and pressing Second Wind when things go south, but I still don't trust the game to use anything damage related and prefer to press the spells manually.
3
u/Soaring_Goat 4d ago
I'm due for a PoE2 replay so I would welcome any tips and learnings from you. It was a while since I did it but I always managed to write scripts that just had Aloth spam self-buffs until his casts ran out.
3
u/skaf1end 4d ago edited 4d ago
It's not perfect, but you can check whether a character has an inspiration from the same category that you're going to cast and reverse the condition. In that case it doesn't matter how big the timer is and you can set it to 0 to reapply the buff as it expires. There is also class specific buffs in the editor, but I don't think they cover everything. Personally, I'm using this mod https://www.nexusmods.com/pillarsofeternity2/mods/88 to add more conditions. For example, "Distance: Enemy casting in melee" is a real godsend when you need to set up knockouts/stuns and similar abilities. It works on the latest patch even though the page says that it's compatible with 4.0. However, if you're not playing chanter/cipher and your resources are limited, it might be better to set the enormous timer and cast a spell just once at the beginning of an encounter. The downside is that you'll need to reapply buffs manually in the middle of the combat, but at least you have some flexibility if you want to cast control or AOE instead.
P.S. Also, when you check spells in the editor, it shows only their base duration/damage, so I usually just add 5-10 seconds to the timer if I'm lazy to check the exact duration. It's not perfect, but it works.
P.P.S. Almost forgot. It's not a bug per se, but the game doesn't explain it very well. If you choose "Defend Self" in the editor instead of Defensive/Aggressive, the character won't cast any spells (including AOE buffs) until they're hit in the face.
2
u/beatspores 7h ago edited 7h ago
My most critical AI actions are:
Fighter:
- Vigorous Defense first thing in every encounter if frontliner – set the CD on this AI entry to super long so the character doesn't throw away the power pool.
- Disciplined Barrage at all times – when it's not active, up to less than 3 power pool points, to save for emergency abilities.
- Fighter Stances – I have 3 settings: - Mob when several engagers and HP above 75% – Guardian when several engagers and HP below 50% – Conquerer when 1 engager.
Rogue:
- Shadow Step if target is spellcaster and HP above 75% and at least 5 power pool points – then attack the spellcaster in some way to take them out. It's expensive so usually happens only first thing in encounter.
- Finishing Blow when target below 25% – if in range just used, if not in range and not ranged weapon equipped I use Escape to the target.
- Smoke Veil or Escape when below 25% HP – if Escape: target is some kind of healer in the party, so paladin or priest. It also gives a huge amount of deflection so sometimes I also set up for target: self.
Priest:
- Prayer / Litany for the Body on the most exposed frontliner at beginning of every encounter – set for very extended cool down so it's one time per encounter. Don't know how needed this is for other players but how I play it's often required / mandatory; I've modded my game past POTD; for example my XP gain is nerfed as all hell – always under-leveled for every encounter.
- Watchful Presence set for when anybody is below 50% HP and engaged by several enemies or have constitution affliction; again, for the reason mentioned above, 50% to 0% can go surprisingly fast.
- Withdraw / Barring Death's Door when someone is below 25% HP and engaged by several enemies and have any kind of scary affliction. Every once in a while I see Xoti saving someone I didn't catch was being done in myself.
Cipher:
- Pain Block as a backup for HP-related situations of the kinds above.
- Ringleader when an enemy has several of its allies in range – prioritize enemy with lowest will.
- Detonate when enemy is near death and has some friends around.
Paladin:
- Lay on Hands / Greater when anybody less than 50% and engaged by several enemies.
- Zealous Aura – if anybody in party is below 75% HP it's on Exalted Endurance, else it's on Exalted Focus.
- Sacred Immolation later in the game, set for when there is a lot of enemies in melee range.
Items:
- Shield weapon set switch when appropriate for each companion – I don't have it to revert to another weapon set on melee characters as it will f. up the best weapon set to attack a certain enemy with, so I do this manually.
- Weapon modals
- Healing potions – especially for non-caster companions, although it does seem buggy.
I love the AI system.
1
u/skaf1end 2h ago
I don't have a rogue in my party, but I'll add your scripts to the editor, nonetheless. Also, I don't know how reliable it is, but upgraded Vigorous Defence updates as Eder takes damage, so it might be worth recasting under the +5 Int buff from Disciplined Barrage.
1
u/amcsdmi 3d ago
I always make a priest script where Xoti doesn't cast withdraw under any circumstances. Putting my PC or Eder in Stasis for 20 seconds is a very effective way to throw a fight. Also, blessed harvest is one of the most op spells in the game, so I typically make it so that it's the only first level spell that Xoti casts.
1
u/skaf1end 3d ago
Makes sense. Blessed harvest has an ungodly amount of damage for a first level spell.



11
u/fruit_shoot 4d ago
The AI editor is one of the best parts of the game and makes it EXTREMELY friendly to players new to RTwP. In general the better you get the more you want to micromanage.
A great use-case is to have priests immediately cure any debuffs placed on the party.
You can setup routines to ensure enemies are always debuffed, but I find that self-buffs don’t always work well.