[Beta 15b] Escort appeard after enterning level 2nd time
Moderator: Moderator
[Beta 15b] Escort appeard after enterning level 2nd time
Moved down stairs nothing happend I had to come back up and 2nd time i entered(climbed down) escort appeared. Nothing in logs.
You are likely to be eaten by a grue
Re: [Beta 15b] Escort appeard after enterning level 2nd time
I've had this happen a few times in the last few versions. Especially happens in crypt-style dungeons.
Re: [Beta 15b] Escort appeard after enterning level 2nd time
This happens if the escort could not pop last time youwere there for some reason
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: [Beta 15b] Escort appeard after enterning level 2nd time
well there was plenty of room for him to pop up.
room looked something like this:
both doors locked and no mobs in sight.
room looked something like this:
both doors locked and no mobs in sight.
Code: Select all
############
#..........#
#.........>#
+..........#
#..........#
#.<........#
#..........#
#####+######
You are likely to be eaten by a grue
Re: [Beta 15b] Escort appeard after enterning level 2nd time
Does not mean it could pop, there is a minimun distance
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: [Beta 15b] Escort appeard after enterning level 2nd time
then why did he poped on 2nd time? i didnt open any doors and he was next to me. I think I could miss some of escorts because of this.
You are likely to be eaten by a grue
Re: [Beta 15b] Escort appeard after enterning level 2nd time
Now that is odd... I thought the same thing as DG. Where did the the portal get dropped?Graziel wrote:then why did he poped on 2nd time? i didnt open any doors and he was next to me.
<DarkGod> lets say it's intended
Re: [Beta 15b] Escort appeard after enterning level 2nd time
it looked like this.
@ was the escort.
@ was the escort.
Code: Select all
############
#.........&#
#.........>#
+..........#
#..........#
#@<........#
#..........#
#####+######
You are likely to be eaten by a grue
Re: [Beta 15b] Escort appeard after enterning level 2nd time
DarkGod, maybe we could add a log message to let players know that the escort quest was not placed correctly so we can collect savefiles to test them. Graziel, if you still have the savefile let me know. Cheers!
<DarkGod> lets say it's intended
Re: [Beta 15b] Escort appeard after enterning level 2nd time
For whatever it's worth, I've run into this situation twice in Kor'Pul -- I'd get no escort quest while going down, but I got it while coming back up with the Shade's loot. The escortee appeared next to me by the down staircase. I haven't seen this in any other dungeon.
Re: [Beta 15b] Escort appeard after enterning level 2nd time
I've seen this in Kor'Pul as well. I guess it might be due to formerly closed doors, that are now open on the way back.
Ts and OF don't have doors, so there wouldn't be this problem.
Ts and OF don't have doors, so there wouldn't be this problem.
greycat wrote:An intervention was required (kill -9)
Re: [Beta 15b] Escort appeard after enterning level 2nd time
All of the Kor'Pul problems are rooted in the Astar code not recognizing doors as "open" terrain when computing the portal distance. I looked at the Astar code and this is the check made on each terrain tile:
So this takes us to mod/class/Grid.lua and the block_move function. Here "e" is "self.actor", "act" is "nil", and "couldpass" is "true".
The first option in the outer if statement checks if the terrain can be opened (self.door_opened), if the actor can open doors (e.open_door) and finally if we are actually acting or just checking (act). Inside of that case is a check used for vault doors and then the terrain tile gets switched with the open door terrain tile. This code won't affect the Astar check because act is nil in our case.
The second and third options in the outer if statement check... to be honest I am not 100% sure. I think this is where we need another option to fix the Astar check. The couldpass variable in my mind is asking "I know we aren't actually opening the door now, but if we wanted to could we?" Right now it looks like we are only handling the "no" side of that statement, and I suggest we add this code to the end:
I actually think a larger refactor like below might be clearer, and will test it out in-game. This code assumes that the door's "does_block_move" will handle the cases where the actor cannot open doors, and only opens doors or returns false if we are just checking.
EDIT: Well I got an escort and portal to drop when I started in a single closed door room, so that part looks good. The bad news? The escort moved right through the door without opening it. Some work obviously needs to be done...
After setting the escort's "open_door" variable to true it worked, but this worries me that maybe other monsters that cannot open doors will know just enter them.
EDIT2: Ok, just confirmed that monsters are entering doors instead and I found the reason... does_block_move isn't set for doors. Oh! Well if we aren't going to rely on does_block_move then I will edit the code above (done and tested).
Code: Select all
self.map:checkEntity(tx, ty, Map.TERRAIN, "block_move", self.actor, nil, true)
Code: Select all
-- Open doors
if self.door_opened and e.open_door and act then
if self.door_player_check then
if e.player then
Dialog:yesnoPopup(self.name, self.door_player_check, function(ret)
if ret then game.level.map(x, y, engine.Map.TERRAIN, game.zone.grid_list[self.door_opened]) end
end, "Open", "Leave")
end
else
game.level.map(x, y, engine.Map.TERRAIN, game.zone.grid_list[self.door_opened])
end
return true
elseif self.door_opened and not couldpass then
return true
elseif self.door_opened and couldpass and not e.open_door then
return true
end
The second and third options in the outer if statement check... to be honest I am not 100% sure. I think this is where we need another option to fix the Astar check. The couldpass variable in my mind is asking "I know we aren't actually opening the door now, but if we wanted to could we?" Right now it looks like we are only handling the "no" side of that statement, and I suggest we add this code to the end:
Code: Select all
elseif self.door_opened and couldpass and e.open_door then
return false
end
Code: Select all
-- Open doors
if self.door_opened then
-- Blocks move if actor cannot open it
if not e.open_door then
return true
end
-- If we are acting, actually open them
if act then
if self.door_player_check then
if e.player then
Dialog:yesnoPopup(self.name, self.door_player_check, function(ret)
if ret then game.level.map(x, y, engine.Map.TERRAIN, game.zone.grid_list[self.door_opened]) end
end, "Open", "Leave")
end
else
game.level.map(x, y, engine.Map.TERRAIN, game.zone.grid_list[self.door_opened])
end
return true
-- If we are just testing
elseif couldpass then
return false
else
return true
end
end

EDIT2: Ok, just confirmed that monsters are entering doors instead and I found the reason... does_block_move isn't set for doors. Oh! Well if we aren't going to rely on does_block_move then I will edit the code above (done and tested).
<DarkGod> lets say it's intended