Page 1 of 1

DragonBreak #89: "teleport pc" quest action makes dungeon map hang [RESOLVED]

Posted: Sat Oct 21, 2017 8:13 pm
by Jay_H
I'm using a quest with a basic teleport action to dungeon. I get teleported into the dungeon, but if I attempt to open the map, sometimes the map displays no dungeon at all, and closing the map then makes the game hang completely. This was flooded in player log:
NullReferenceException: Object reference not set to an instance of an object
at DaggerfallWorkshop.Game.DaggerfallAutomap.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)
This quest that I wrote does trigger it sometimes, except I believe if teleporting from another dungeon.

Re: DragonBreak #89: "teleport pc" quest action makes dungeon map hang

Posted: Sun Oct 22, 2017 12:48 am
by Interkarma
Thank you. Looks like the automap needs to initialise something not being satisfied by the teleport action.

I'll take a look and lean on Nystul if I need to, as he's the automap master.

Re: DragonBreak #89: "teleport pc" quest action makes dungeon map hang

Posted: Sun Oct 22, 2017 2:20 am
by Interkarma
I think all that was required here was for me to raise the OnTransitionDungeonInterior event from PlayerEnterExit when StartDungeonInterior() was called.

StartDungeonInterior() is the method used by "teleport pc" and can create a situation where player is able to teleport directly from one dungeon to another. Even the Shedungent/Mantellan teleports do this.

Prior to calling the event, the automap did not know the dungeon had changed, so the old automap would be left behind and sometimes crash. Now the event is being raised, the automap appears to refresh properly in both directions.

If you see this Nystul, would you be able to let me know if that's all we need or if there's something else I should be considering when player teleports directly from dungeon to dungeon?

Re: DragonBreak #89: "teleport pc" quest action makes dungeon map hang

Posted: Sun Oct 22, 2017 2:53 pm
by Nystul
I think only important thing is that a transition events callback from DaggerfallAutomap script needs to be reached - where the InitWhenInInteriorOrDungeon() is called inside. As far as I remember this should be enough. And if I understood correctly this happens with teleport since your latest changes.
If not I will fix any problem in case it does not work correctly. Just let me know ;)