My alchemist had just bought some runes for their golem while in Angolwen. As I switched from the alchemist to the golem to use the runes, the alchemist's AI decided to use Vargh Redemption, hitting a nearby friendly pyromancer and causing it to go hostile. As far as I know there were no enemies nearby, with it being a friendly town. Why did the ring get triggered? It seems like a bug.
Will I be able to revisit the town later, or will the pyromancer remain permanently hostile?
			
							[1.6.6] Alchemist AI used Vargh Redemption in Angolwen
Moderator: Moderator
- 
				WonderingMonster
 - Yeek
 - Posts: 12
 - Joined: Wed Jan 29, 2020 1:46 pm
 
[1.6.6] Alchemist AI used Vargh Redemption in Angolwen
- Attachments
 - 
			
		
				
- Event log
 - 20200129144234_1b.jpg (232.5 KiB) Viewed 2441 times
 
 
- 
				WonderingMonster
 - Yeek
 - Posts: 12
 - Joined: Wed Jan 29, 2020 1:46 pm
 
Re: [1.6.6] Alchemist AI used Vargh Redemption in Angolwen
I was able to reproduce this even if there were no other characters around. Whenever I switch to the golem, Vargh Redemption's Tidal Wave ability gets cast. Here's a save where this can be done: https://www.dropbox.com/s/rk9qnf8j5973z ... i.zip?dl=0
			
			
									
									
						Re: [1.6.6] Alchemist AI used Vargh Redemption in Angolwen
I saw this happen once with my Writhing One as well when I switched to allocate talents to my Worm but I didn't think much about it back then. Definitely seems like a bug.
			
			
									
									
						- 
				WonderingMonster
 - Yeek
 - Posts: 12
 - Joined: Wed Jan 29, 2020 1:46 pm
 
Re: [1.6.6] Alchemist AI used Vargh Redemption in Angolwen
I've dug into this and turned on cheat mode and set log_detail_ai to 4. Sure enough, the tactics AI assigned a high score to activating the ring:
Something that caught my attention earlier on in the log is that the AI concluded the ability would only affect the user ("may affect (SELF ONLY)"). That seemed wrong.
When I compared the ring's use_power definition with Tidal Wave, I noticed that for the ring the radius was hardcoded to 1 instead of the full range the wave would grow to and also that required_target / target were missing. I added those based on Tidal Wave's values and this appears to have fixed the issue. Vargh Redemption no longer gets used when no enemies are around. I also checked that it does get used when enemies are near by luring some enemies to the alchemist with the golem.
I put my patch on https://github.com/rgeens/t-engine4/pull/1/files and I'll see if I can get it merged on the Netcore Gitlab next.
			
			
									
									
						Code: Select all
[use_tactical AI] ===Want Buff parameters:
 ___ buff_best_attack_value =	2	best attack[nil]: 1, lvl:nil, ai_tactic: nil	
	___ best attackarea[T_ACTIVATE_OBJECT_2]: 2.7028125, lvl:2, ai_tactic: nil
 ___ buff_range_factor: 0, target dist: nil, desired range: 1	buff_duration_factor:	0.1
[use_tactical AI] ### foes_near_strength	0	### allies_near_strength	0	### want.life	0	want.escape	0
[use_tactical AI] ### ai_tactic:
		{}
[use_tactical AI] ### Final Wants (ai_tactic applied):
		{air=0, attack=2, attackall=2, attackarea=2, buff=0.1, defend=0.1, escape=0, heal=0, life=0, mana=0, special=1}
[use_tactical AI] === Tactical Action Summary === attempt:	1	2955	Daddar
  #:type:tid/ai name                          score  [xmLVL xmSPD  xmRNG] (tact=want*value, ...)
  1:  tid:T_ACTIVATE_OBJECT_2                 = +7.96[x1.40 x 1.00 x1.05] (escape=+0.00*+1.50,attackarea=+2.00*+2.70,)
  2:  tid:T_RUNE:_MANASURGE_3                 = +0.00[x1.20 x 1.00 x1.37] (mana=+0.00*+1.00,)
[use_tactical AI] === Tactical Action Summary (SORTED) === attempt:	1	2955	Daddar
  #:type:tid/ai name                          score  [xmLVL xmSPD  xmRNG] (tact=want*value, ...)
  1:  tid:T_ACTIVATE_OBJECT_2                 = +7.96[x1.40 x 1.00 x1.05] (escape=+0.00*+1.50,attackarea=+2.00*+2.70,)
  2:  tid:T_RUNE:_MANASURGE_3                 = +0.00[x1.20 x 1.00 x1.37] (mana=+0.00*+1.00,)
[LOG]	#GREY#  1:  tid:T_ACTIVATE_OBJECT_2                 score=+7.96[Lx1.40  Sx 1.00 Mx1.05] (escape=+0.00*+1.50,attackarea=+2.00*+2.70,)
[LOG]	#GREY#  2:  tid:T_RUNE:_MANASURGE_3                 score=+0.00[Lx1.20  Sx 1.00 Mx1.37] (mana=+0.00*+1.00,)
[use_tactical AI]### Daddar[2955] tactical AI picked action (attackarea)tid:T_ACTIVATE_OBJECT_2 [att:1, turn 5423: {score:+7.96 [escape=+0.00*+1.50,attackarea=+2.00*+2.70,]}
[LOG]	#ORCHID#__Daddar[2955] tactical AI picked action[att:1, turn 5423]: (attackarea)tid:T_ACTIVATE_OBJECT_2 {+7.96 [escape=+0.00*+1.50,attackarea=+2.00*+2.70,]}
[use_tactical AI] === Action Selected:	2955	Daddar	attackarea	 talent:T_ACTIVATE_OBJECT_2
[LOG]	Daddar brandishes #FFD700##UID:2866:0#Vargh Redemption#LAST#, calling forth the might of the oceans!
[use_tactical AI] turn	5423	2955	Daddar	### SUCCESSFUL ACTION returned:	T_ACTIVATE_OBJECT_2	true
Code: Select all
[aiTalentTactics] COMPUTING TACTICs [2955]Daddar(OHash:nil) (all, wt_mod:nil, wt cache_turns:100) for talent: T_ACTIVATE_OBJECT_2 targeted on nil[nil], tg=nil
[aiTalentTactics]__ using talent tactical table for	T_ACTIVATE_OBJECT_2
	___[escape] = 1.5
	___[attackarea] = {
	___  [COLD] = 1.5
	___  [PHYSICAL] = 1.5
	___}
[aiTalentTactics] *** creating new turn_procs CACHE for talent	T_ACTIVATE_OBJECT_2
[aiTalentTactics] *** creating new target WEIGHT CACHE for talent	T_ACTIVATE_OBJECT_2	cache validity(turns):	100	aiOHash:	nil	vs (cache):	nil
[aiTalentTactics] extracting targets, selffire, friendlyfire from tg:	(from talent)
[aiTalentTargets] 	T_ACTIVATE_OBJECT_2	may affect (SELF ONLY)	Daddar	2955	at	20	12
[aiTalentTactics] *** updating turn_procs CACHE for talent	T_ACTIVATE_OBJECT_2
[aiTalentTactics]	targets for T_ACTIVATE_OBJECT_2: RT:nil(hostile:nil) TG:nil SF(x5)=1, FF(x1)=1
	____	T_ACTIVATE_OBJECT_2	may hit	2955	Daddar	at	20	12
I put my patch on https://github.com/rgeens/t-engine4/pull/1/files and I'll see if I can get it merged on the Netcore Gitlab next.
- 
				WonderingMonster
 - Yeek
 - Posts: 12
 - Joined: Wed Jan 29, 2020 1:46 pm
 
Re: [1.6.6] Alchemist AI used Vargh Redemption in Angolwen
Patch was accepted, will be fixed in the next release.