Page 1 of 1

Teleporting Escorts

Posted: Mon Oct 25, 2010 3:09 pm
by yufra
I noticed escorts occasionally "teleporting" around and added two print statements to the AI code to make sure I wasn't imagining things:

Code: Select all

newAI("escort_quest", function(self)
	print("[ESCORT] starting location, ", self.x, " :: ", self.y)
	if self:runAI("target_simple") then
		-- One in "talent_in" chance of using a talent
		if rng.chance(self.ai_state.talent_in or 6) and self:reactionToward(self.ai_target.actor) < 0 then
			self:runAI("dumb_talented")
		end
		if not self.energy.used then
			if self:reactionToward(self.ai_target.actor) < 0 and not self:hasLOS(self.escort_target.x, self.escort_target.y, "block_move") then
				self:runAI("move_dmap")
			else
				self:runAI("move_escort")
			end
		end
		print("escort final location, ", self.x, " :: ", self.y)
		return true
	end
	print("[ESCORT] final location, ", self.x, " :: ", self.y)
end)
Then Isema the lost sun paladin obliged me with this log:
LOG] Isema, the lost sun paladin hits fox for #YELLOW#1.74 light damage#LAST#.
[ESCORT] starting location, 3 :: 10
[ATTACK] attacking with iron mace
[COMBAT DAMAGE] power(0.915542) totstat(24.000000) talent_mod(1.000000)
[ATTACK] to fox :: 14.648668044799 2 1 :: 1
checkHit 7 7.2
=> chance to hit 49.139982823808
[ATTACK] raw dam 14.648668044799 versus 1 with APR 2
[ATTACK] after range 18
[PHYS CRIT %] 0.5
[ATTACK] after crit 18
[ATTACK] after mult 18
[PROJECTOR] starting dam 18
[PROJECTOR] after difficulty dam 18
[PROJECTOR] res 0 1 on dam 9
[PROJECTOR] after resists dam 9
[PROJECTOR] final dam 9
[LOG] Isema, the lost sun paladin hits fox for #aaaaaa#9.00 physical damage#LAST#.
[ESCORT] final location, 3 :: 10
[ATTACK] attacking with iron dagger
[COMBAT DAMAGE] power(1.076356) totstat(24.300000) talent_mod(1.509902)
[ATTACK] to fox :: 26.328113051628 5 1 :: 1
checkHit 25 7.2
=> chance to hit 94.404479591808
[ATTACK] raw dam 26.328113051628 versus 1 with APR 5
[ATTACK] after range 31
[PHYS CRIT %] 11.49
[ATTACK] after crit 31
[ATTACK] after mult 31
[PROJECTOR] starting dam 31
[PROJECTOR] after difficulty dam 31
[PROJECTOR] res 0 1 on dam 31
[PROJECTOR] after resists dam 31
[PROJECTOR] final dam 31
[LOG] Gareth hits fox for #aaaaaa#31.00 physical damage#LAST#.
[PROJECTOR] starting dam 7
[PROJECTOR] after difficulty dam 7
[PROJECTOR] res 0 1 on dam 7
[PROJECTOR] after resists dam 7
[PROJECTOR] final dam 7
[LOG] Gareth hits fox for #LIGHT_RED#7.00 fire damage#LAST#.
[LOG] Gareth killed fox!
[ATTACK] attacking with flaming iron dagger of accuracy
[COMBAT DAMAGE] power(1.112140) totstat(24.300000) talent_mod(1.509902)
[ATTACK] to fox :: 27.203410488672 5 1 :: 0.5607476635514
checkHit 31 7.2
=> chance to hit 95
[LOG] Gareth misses fox.
[ESCORT] starting location, 3 :: 10
[ESCORT] final location, 3 :: 4
187 ticks in 11.239 seconds = 16.6385 TPS
321 frames in 10.029 seconds = 32.0072 FPS
[ESCORT] starting location, 3 :: 4
[ESCORT] final location, 4 :: 5
That second to last movement Isema jumps 6 spaces vertically right after the last enemy in sight disappeared. This is where the escort_quest AI switches over "move_dmap" to "move_escort". I haven't confirmed this, but I suspect that the 3, 4 spot was the next in the stored A* path which was deviated from with move_dmap when enemies were seen. The stored "escort_path" should probably be niled whenever there is a call to "move_dmap". Thoughts?

Re: Teleporting Escorts

Posted: Mon Oct 25, 2010 4:23 pm
by Zaive
I noticed that whenever you move the escorted yourself, they still move from the spot they last moved to themselves. So if you pass the NPC they'll still move from the spot you're standing on, causing them to go through you. You have to take another step ahead to keep them from bypassing you.

Phase door also doesn't work at all since they'll teleport back to where they were in 1 move.

Re: Teleporting Escorts

Posted: Mon Oct 25, 2010 5:53 pm
by greycat
Zaive wrote:Phase door also doesn't work at all since they'll teleport back to where they were in 1 move.
Oh, THAT explains it! :(

Re: Teleporting Escorts

Posted: Fri Oct 29, 2010 11:29 pm
by darkgod
fixed

Re: Teleporting Escorts

Posted: Sun Nov 28, 2010 4:32 am
by Gwai
Escorts still teleport. I teleported a fellow out of a snake pit and far away and then a little while later he was in the pit again. If he had been teleported further into the pit and out of sight he wouldn't have lasted that long, so he must have been successfully teleported further back only to pop himself back into the danger again. Serves him darn right.