Interkarma / daggerfall-unity

Open source recreation of Daggerfall in the Unity engine
http://www.dfworkshop.net
MIT License
2.71k stars 327 forks source link

Quest A0C00Y12 - no quest item after second fight #1386

Closed info999 closed 5 years ago

info999 commented 5 years ago

If I cannot kill the thief at once and run for my life outside to get some heal - there is no book at the thief later. To get book I have to kill thief at first fight. Too bad for roleplaying.

JayH2971 commented 5 years ago

For roleplaying, wouldn't it make sense that the thief would get rid of the book once he/she was caught? :eyes:

I'll try loading this up and seeing, but I predict the issue is that the book doesn't transfer across multiple instances of the enemy.

https://github.com/Interkarma/daggerfall-unity/blob/master/Assets/StreamingAssets/Quests/A0C00Y12.txt

JayH2971 commented 5 years ago

I just tested it in classic and confirmed, it is as reported:

Classic: If you strike the enemy and then leave, the book will transfer to the new location.

DFU: If you strike the enemy and then leave, the book will not appear on the enemy at the new location.

Interkarma commented 5 years ago

Fascinating! So the book is added to thief's inventory when struck the first time, and their inventory contents should persist across spawn positions when "place foe" is called to relocate thief to a second location?

info999 commented 5 years ago

For roleplaying, wouldn't it make sense that the thief would get rid of the book once he/she was caught?

Well. Roleplaying permits to explain absolutely anything. It's not the problem. The problem is how to finish the quest. I really don't like to save/restore if I can do it other way.

JayH2971 commented 5 years ago

Fascinating! So the book is added to thief's inventory when struck the first time, and their inventory contents should persist across spawn positions when "place foe" is called to relocate thief to a second location?

Classic does that weird classic thing where it duplicates the first enemy's inventory onto the second, and then adds a new inventory (like when you do the Guard the Mages Guild quest and you notice the first enemy has 6 items, the next has 6+6 new ones, then the third one has 12+6 new ones, and so on). Here, the "second thief" you fight also has the first one's inventory, including the quest book.

Interkarma commented 5 years ago

Cheers, I had forgotten that. It seems the mechanism is quite basic in classic. I'll see if I can improve how this is handled in DFU.

JorisVanEijden commented 5 years ago

It seems classic instantiates the resources (foes, items, npcs, locations) at the start of the quest and references the same instances. Looks like DFU creates new instances every time a resource is "placed". That would mean that in classic the thief would be hurt when showing up at the next location and in DFU it would be healthy again after every placement.

For this particular quest a workaround would be to place the book on the thief when it is killed, rather than injured. Or, less elegantly, to place the book on the thief every time the thief is placed somewhere. But then it could be pickpocketed without a fight.

JorisVanEijden commented 5 years ago

Possible instance of the same issue: https://forums.dfworkshop.net/viewtopic.php?f=29&t=2589

Interkarma commented 5 years ago

An elegant solution for this one has already been implemented. Items added to Foes will now follow Foe to their next instance if the quest moves them.

Foes are a one to many resource with any number of instances created by quest. It's not generally viable to create these ahead of time or track them as singletons.

I'll close this one now as fix is already in code.