AI Does the Darndest Things

The tale of the siblings Althea and Shea https://www.winterwolves.com/seasonsofthewolf.htm
Post Reply
User avatar
jack1974
Pack leader
Posts: 15479
Joined: Thu Jun 16, 2005 4:43 pm

Re: AI Does the Darndest Things

Post by jack1974 »

Troyen wrote:This is technically Act 2 combat, but I used manticore poison + Jariel's slowing song, and half the mirror Yeldins just used defend (mostly the ones in the back row). Guess I should've stocked up on that some more.

Finally in Act 3, the back row Kraken tentacles like pulling mages to the front. So I have Rowinda in front of Shea, and sometimes they pull one then the other. :) Then again, sometimes they're smart enough to Maul, Tentacle Sweep, or do something else. And then sometimes they just spam Submerge. (7 turns not enough? Let's submerge again!)
Yeldin and Kraken still use the old AI, from now on things should get more interesting :) I guess will change the Kraken to the new AI though since they do weird things :lol: Yeldin probably should be fine.
Troyen wrote: I think the empire is addicted to drugs. I'm attacking their camp on the two volcano island, and once they get low, they just chain-chug 50HP healing potions. Specifically the Empire Captain and Rangers (Recruits died too fast to check).
Yes since they're not spellscasters they use potions!
Troyen wrote: I find it amusing when I bring an Empire Ranger to the front row and he decides to swap places with the remaining Ranger in the back row (instead of, you know, the empty slot). It's like he's intentionally leaving his pal to die.
Problem is that I can't target an "empty slot", so the AI swaps with the ally in backrow with most HP, which could even be 5. I don't think I can find a solution to this... :oops:
yayswords wrote:The slimes just sit in the back row spamming Bubble Coat and Regenerate on themselves. Quite frankly not even participating in the battle until the front line falls. I was going to ask, shouldn't they regen the front row, but instead I'll ask, shouldn't they be the front row?
Hmm is a while since I last checked that, will look at it.
Troyen
Elder Druid
Posts: 957
Joined: Fri May 06, 2011 2:23 am

Re: AI Does the Darndest Things

Post by Troyen »

jack1974 wrote:
Troyen wrote:This is technically Act 2 combat, but I used manticore poison + Jariel's slowing song, and half the mirror Yeldins just used defend (mostly the ones in the back row). Guess I should've stocked up on that some more.

Finally in Act 3, the back row Kraken tentacles like pulling mages to the front. So I have Rowinda in front of Shea, and sometimes they pull one then the other. :) Then again, sometimes they're smart enough to Maul, Tentacle Sweep, or do something else. And then sometimes they just spam Submerge. (7 turns not enough? Let's submerge again!)
Yeldin and Kraken still use the old AI, from now on things should get more interesting :) I guess will change the Kraken to the new AI though since they do weird things :lol: Yeldin probably should be fine.
I won't complain too hard about Yeldin. Without that poison, it's a pretty brutal fight on Nightmare, and you have to beat the boss to proceed through the story.
jack1974 wrote:
Troyen wrote: I find it amusing when I bring an Empire Ranger to the front row and he decides to swap places with the remaining Ranger in the back row (instead of, you know, the empty slot). It's like he's intentionally leaving his pal to die.
Problem is that I can't target an "empty slot", so the AI swaps with the ally in backrow with most HP, which could even be 5. I don't think I can find a solution to this... :oops:
Well, I use the Ranger skill to push a staggered warrior into the back row, bringing the enemy Ranger to the front. Instead of swapping with the wounded Warrior, he swaps with his Ranger friend. I'd suggest having him swap with any Warriors on the back row anyway, but I don't know how that'll affect other fights in the game. Maybe for these specific mobs if you can.
User avatar
jack1974
Pack leader
Posts: 15479
Joined: Thu Jun 16, 2005 4:43 pm

Re: AI Does the Darndest Things

Post by jack1974 »

Yes I can define who to swap with based on attributes, maybe will swap with highest Defense. Right now is targeting highest HP :)
Troyen
Elder Druid
Posts: 957
Joined: Fri May 06, 2011 2:23 am

Re: AI Does the Darndest Things

Post by Troyen »

Can you do a combination? Check for some minimum level of HP (50?) and pick highest defense out of those? Wouldn't gain much to swap with the bleeding, frozen, 10 hp warrior.

Then again, the Rangers that Hide in Shadows and some of your Empire Rangers are probably the beefiest on defense, so don't quite know if that'll work as intended.
User avatar
jack1974
Pack leader
Posts: 15479
Joined: Thu Jun 16, 2005 4:43 pm

Re: AI Does the Darndest Things

Post by jack1974 »

Well is never easy, since it should define a lot of parameters to look for. For example if there's nobody in back row with at least 50, then the swap wouldn't even happen :) That's why before I picked highest HP, seemed the safer bet. But probably should also make sure that highest HP is also higher than XX, otherwise by the time they do the swap, the new character showing in front row can be killed instantly :lol:
Anyway, is already much better than the old AI which compared to now looked really basic :mrgreen:
Troyen
Elder Druid
Posts: 957
Joined: Fri May 06, 2011 2:23 am

Re: AI Does the Darndest Things

Post by Troyen »

I think the defense would make more sense than simply highest HP. I just had a 33 HP Swordsman swap places with the 49 HP Bowman behind him (trying to break out the parents) even though he had 136 defense to the bowman's 74. It's doubly cute because the turn prior that same Swordsman placed Guard on the other Swordsman I had pushed to the back row.
User avatar
jack1974
Pack leader
Posts: 15479
Joined: Thu Jun 16, 2005 4:43 pm

Re: AI Does the Darndest Things

Post by jack1974 »

Now I changed it so that:

Code: Select all

[09:54:22] Considering Switch Position 
[09:54:22] User Empire Ranger B Health is at 7.86 % >= 70.00 % (False) (Reverse: True) 
[09:54:22] Random: 16 <= 75 
[09:54:22] User is at Position Front: True (Reverse: False) 
[09:54:22] Targets: ['Empire Recruit A', 'Empire Recruit B', 'Empire Recruit C', 'Empire Ranger A', 'Empire Ranger B'] 
[09:54:22] Decorator Back 
[09:54:22] Targets: ['Empire Recruit B', 'Empire Ranger A'] 
[09:54:22] Decorator Maximum Defense
[09:54:22] Targets: ['Empire Recruit B'] 
[09:54:22] Decorator Healthiest 
[09:54:22] Targets: ['Empire Recruit B'] 
[09:54:22] Decorator HP higher than 0.6
[09:54:22] Targets: [] 
in practice targets the one with maximum defense and then maximum RELATIVE HP, and the final check is that the current HP must be higher than 60% of maximum. So even if someone has 100 HP but currently 30, it won't be swapped because it wouldn't make much sense to bring a heavily injured character back in the front row. The current enemy will perform another action instead (probably attack or attempt to heal depending on the other AI definitions).
Right now the maximum Defense already narrow the results to just one, so need to run more tests, but I think is the right direction.
User avatar
jack1974
Pack leader
Posts: 15479
Joined: Thu Jun 16, 2005 4:43 pm

Re: AI Does the Darndest Things

Post by jack1974 »

Okay the problem is that with current AI I can't target an Empty/Dead character. I'll ask Anima how to fix this, because for example before a weak character in front row would go in a place in the back row, even an empty one. Now I can't do this with the new AI :(
For now I can only switch two alive characters.
User avatar
fabulaparva
Elder Druid
Posts: 761
Joined: Sun May 04, 2014 9:58 pm

Re: AI Does the Darndest Things

Post by fabulaparva »

Crusaders in Nindjuna spammed Guard multiple times. 2 crusaders, 3 archers. "I'll guard Archer A." "No, I think I'll guard Archer B." "No, I wanted to guard Archer B but now that you guard Archer B, I'll guard Archer A." "Wait, I changed my mind, no one is guarding archer C, I'll guard him!" "But now Archer A doesn't have a guard!" Repeat ad nauseam. :P

The guard action take very little time, so they can spam multiple of those without anyone moving. Gets kind of boring to stand there and watch that for a while. I mean, can't you guys decide already who you'll guard?? Then luckily, it was Chas' turn and she stopped the ridiculousness by whacking them with that manticore poison. :P
User avatar
jack1974
Pack leader
Posts: 15479
Joined: Thu Jun 16, 2005 4:43 pm

Re: AI Does the Darndest Things

Post by jack1974 »

Haha OK, I'll simply add a turn delay in the AI so they can't do the guard on the next turn. That should solve it :)
Post Reply