Escort quest bug

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Repton
Archmage
Posts: 371
Joined: Wed Aug 05, 2009 2:17 am

Escort quest bug

#1 Post by Repton »

Equipment resolver for Betubreda, the lost sun paladin
Equipment resolver Betubreda, the lost sun paladin weapon mace
Zone made us an equipment according to filter! iron mace
Autorequire stats
str 11
wear slot 2
[MOVE] actor moved without a starting position Betubreda, the lost sun paladin14
[QUEST] given to table: 0x1988dad0 escort-duty-tower-amon-sul-4
[LOG] #LIGHT_GREEN#Accepted quest ''! #WHITE#(Press CTRL+Q to see the quest log)
[MUSIC] playing Swashing the buck.ogg userdata: 0x198f28e4 :: current ? true
966 ticks in 10.733 seconds = 90.0028 TPS
I didn't get prompted for this quest. You'll not the log message "Accepted quest ''!".

The quest log is behaving weirdly. I can see "Of trolls and damp caves." If I push down-arrow or up-arrow, the quest log goes away. If I push down/up again, it comes back. I guess it's trying to display the empty quest, failing, and just hiding the screen.

Ah, yes, there's another bug in the log:
Lua Error: /data/quests/escort-duty.lua:244: attempt to concatenate field 'level_name' (a nil value)
At [C]:-1
At /data/quests/escort-duty.lua:244 desc
At /engine/dialogs/ShowQuests.lua:87 drawDialog
At /engine/Dialog.lua:203 display
At /engine/Game.lua:99 display
At /mod/class/Game.lua:460
I wonder if there is a portal here.. Betubreda, the lost sun paladin, certainly isn't following me.

[edit: can't find a portal]

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Escort quest bug

#2 Post by yufra »

I can confirm this bug, I saw it a bit too.
<DarkGod> lets say it's intended

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Escort quest bug

#3 Post by yufra »

I believe that I have identified the bug. This happened to me again in Amon Sul, and I decided to analyze it a bit. Looking through data/quests/escort-duty.lua I noticed that getPortalSpot can theoretically fail (and in Amon Sul with lots of doors to impede the A* pathfinding this is highly possible). If getPortalSpot fails then the on_grant function immediately returns, and there will be no portal, the escort will not have a target (no portal was placed), the quest will not have a level_name or name (hence it does not show up in the Quest Dialog until you mouse over the invisible entry and the Lua errors for nil level_name are thrown), and the Chat is never initiated. This fits all of the symptoms.

In regards to a solution, well a quick dive into Astar.lua has me a bit perplexed. :D I think that the algorithm will be using the cached paths, and I don't want to go digging into those so I will only suggest that maybe the doors are not being considered as possibilities for the cached paths.

EDIT: I just confirmed that I can remove the quest and escort through the Lua terminal and then reproduce the behavior with "game.player:grantQuest('escort-duty')". I have attached the savefile with no NPC/quest for testing.

EDIT-2: I was surprised (although I guess I shouldn't have been) to be greeted by a repented thief on the way UP the tower after manually removing the quest. He spawned just fine at the exit, but I had also opened nearly all of the doors on the level so that is probably to be expected.
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Escort quest bug

#4 Post by darkgod »

Thanks for the analysis yfra, I fixed it by allowing on_grant to return true to cancel the quest
[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 ;)

mirrizin
Higher
Posts: 79
Joined: Mon Jun 22, 2009 2:08 pm

Re: Escort quest bug

#5 Post by mirrizin »

yufra wrote:I can confirm this bug, I saw it a bit too.
Me too.

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: Escort quest bug

#6 Post by Shoob »

escort quests should also either have the escorted guy a unique or, better yet (read more evil), have the quest auto fail if you leave the level when it is pending.
Oliphant am I, and I never lie.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Escort quest bug

#7 Post by yufra »

Shoob wrote:escort quests should also either have the escorted guy a unique or, better yet (read more evil), have the quest auto fail if you leave the level when it is pending.
Now that is a loop-hole I hadn't considered or tested. You are devious shoob. :wink:
<DarkGod> lets say it's intended

Post Reply