Classic quests in DFU

For all talk about quests. Creating, testing, bugs, and development progress.
User avatar
Interkarma
Posts: 3174
Joined: Sun Mar 22, 2015 1:51 am

Re: Classic quests in DFU

Post by Interkarma » Thu Mar 08, 2018 10:40 pm

Jay_H wrote:Interkarma, I'm running across a variable that's defined differently in DFU than in DF. When an enemy name is preceded by =, like =knight_, in DF it displays a name. In DFU it displays the race. Here's a screenshot of L0B40Y04
I've looked at this in more detail now. I think the quest itself might actually be wrong here. Here's the reasoning:
  • =symbol_ for a Person resource resolves to class name. Both Tipton's docs (see QRC symbol table) and my own testing came to same conclusion.
  • =symbol_ for Foe resource resolves to foe name. Again, both Tipton's docs and my tests align.
In the quest L0B40Y04, they seem to be using a dummy Person resource called _knight_ for all of the rumours and text and a random Foe resource for the actual spawn. These two resources are in no way linked by the quest system.

So any text in L0B40Y04 that uses the Person resource should actually use the correct macro _symbol_ for name in QRC section. They are instead using the Foe name macro against a Person resource. My feeling is quest was originally written with a single enemy in mind and later changed to a random enemy, and nobody fixed the macros. If I'm right, the same error should be present in classic (provided it's running the same version of quests). Let me know. :)

In any case, I've now fixed things up so non-monstrous Foe resources now select a gender and name. You should also be able to call =symbol_ macro on Foe resources and get back correct name in all cases (monstrous or humanoid). The Foe spawn should also match gender of name as well. It was worth just getting these fixed up.


Edit: More detail - because the quest uses a dummy Person for text and a random Foe for the spawn, there's no way the genders are guaranteed to line up in this specific quest. This quest would be much better off using a single Foe as the target and removing the dummy Person altogether. Then all the macros, genders, and spawns would like up properly. The quest itself is just a mess.

Edit2: Also, the pronoun parser does not consider monster genders. I'll look into adding this later.

User avatar
Jay_H
Posts: 1430
Joined: Tue Aug 25, 2015 1:54 am

Re: Classic quests in DFU

Post by Jay_H » Thu Mar 08, 2018 11:51 pm

L0B40Y04 is replaced by a different quest in my DF, one that talks about a spy who talked to the city guard. I can't test the bug :? But I'll fix up this quest so it all works on a single variable.

Some DF quests were written with unnecessary junk. The Mages Guild quest, Researcher's Notes, makes reference to an Orc Shaman enemy who never appears :lol:

I've fixed it now, so it all uses a foe variable F.01. So we're continuing on with =F.01_ in the dialogue boxes.
Check out the Daggerfall Unity mod page on ModDB.

I rarely read instructions well the first time. Tell me to re-read them. I'll do it.

User avatar
Interkarma
Posts: 3174
Joined: Sun Mar 22, 2015 1:51 am

Re: Classic quests in DFU

Post by Interkarma » Fri Mar 09, 2018 12:08 am

Sounds good! From next round of builds the =symbol_ macro on Foes will return a monster name for monstrous enemies and a humanoid NPC name based on climate for non-monstrous enemies. In current builds they will just display a monster name.

The gender of Foe resource is now also determined at initialisation. This will flow through to the actual spawn, which might have some strange effects for multi-spawn quests (e.g. an all female group of assassins might be sent after player rather than a random mix of male/female). I might actually revert this one after some testing.

I'll need to work out how to use Foe genders in messages as well. I don't believe Daggerfall does this at all, and monsters are always considered male. It's really only a problem if the quest uses =symbol_ macro for Foe name followed by a %g macro and expect the %g to resolve to Foe gender. Daggerfall itself doesn't really seem to have a design for this, which is why the dummy Person referenced and the Foe spawned often have different genders. It's just a limitation of design.

User avatar
Interkarma
Posts: 3174
Joined: Sun Mar 22, 2015 1:51 am

Re: Classic quests in DFU

Post by Interkarma » Fri Mar 09, 2018 2:15 am

Ack, trying to find a good solution for this is harder than I thought.

Generally Foe resources are one-to-many, meaning the same Foe can be spawned multiple times for a quest. This isn't a problem for generic enemies like a "rat" or "werewolf" but it's a real problem for class-based spawns.

With the current design, there's no good way to treat class-based enemies as either an individual or a group without breaking one or the other. This is a limitation of Daggerfall's own quest design. I'll stick the problem in the back of my head and see what comes out later.

I'm going to revert my gender and name change to Foe resource for now. I think for the quest L0B40Y04, the best way to solve this is to keep using the dummy _knight_ Person resource for messages, but fix the macros to use the correct _symbol_ format for Person name macro in text. The genders still won't be guaranteed to line up between Foe and Person, but Daggerfall has no way of doing that anyway.

User avatar
Jay_H
Posts: 1430
Joined: Tue Aug 25, 2015 1:54 am

Re: Classic quests in DFU

Post by Jay_H » Fri Mar 09, 2018 3:52 am

Why don't we just erase the quest and pretend this never happened? :P Nah, I'm kidding. I'll do the substitute then. It's a simple change anyway. If you think of something else, I'll do it.

Just like that, I've already made the change, and it doesn't look bad. Gender mismatch is a minor concern for now.

Image Image
Check out the Daggerfall Unity mod page on ModDB.

I rarely read instructions well the first time. Tell me to re-read them. I'll do it.

User avatar
Interkarma
Posts: 3174
Joined: Sun Mar 22, 2015 1:51 am

Re: Classic quests in DFU

Post by Interkarma » Fri Mar 09, 2018 4:12 am

Thanks Jay. Sorry for the hassle mate. Fixes I make in the morning don't always survive until afternoon. :lol:

User avatar
Jay_H
Posts: 1430
Joined: Tue Aug 25, 2015 1:54 am

Re: Classic quests in DFU

Post by Jay_H » Fri Mar 09, 2018 4:13 am

I promise you it's no hassle at all. The change literally took me 90 seconds, screenshots included. Don't hesitate to try, alter, and get creative, I'm with you :)
Check out the Daggerfall Unity mod page on ModDB.

I rarely read instructions well the first time. Tell me to re-read them. I'll do it.

User avatar
Jay_H
Posts: 1430
Joined: Tue Aug 25, 2015 1:54 am

Re: Classic quests in DFU

Post by Jay_H » Fri Mar 09, 2018 5:51 am

Just a last few more for now, in the Thieves Guild:

-O0B10Y00, lacks quest condition "have ITEM set VARIABLE." Created tavern for NPC placement.
-O0B10Y03, fine
-O0B10Y05, changed house4 to house1. Fixed minor dialogue variables.
-O0B10Y06, fine
-O0B10Y07, needs %rt text variable.
-O0B20Y02, fixed minor dialogue variables.
Check out the Daggerfall Unity mod page on ModDB.

I rarely read instructions well the first time. Tell me to re-read them. I'll do it.

User avatar
Jay_H
Posts: 1430
Joined: Tue Aug 25, 2015 1:54 am

Re: Classic quests in DFU

Post by Jay_H » Sat Mar 10, 2018 5:25 am

Progress has come along well for the remaining guild quests. As of now I've done the first pass for quests in all guilds and made ready the low-hanging fruit. The remaining quests have some serious issues to overcome, so they'll probably have to wait for a while. But with the quests that are now available, every guild will have an ample selection to offer upon implementation.
Check out the Daggerfall Unity mod page on ModDB.

I rarely read instructions well the first time. Tell me to re-read them. I'll do it.

User avatar
Interkarma
Posts: 3174
Joined: Sun Mar 22, 2015 1:51 am

Re: Classic quests in DFU

Post by Interkarma » Sat Mar 10, 2018 7:09 am

Thank you Jay! Solid effort. :)

Hazelnut has been building out quest tables for guilds recently, including reputation gain/loss and quests by member level. The next round of builds should go a long way to adding more gameplay.

For any quests you fix up, be sure to stick your name in comments so you get credit for the fixes. You can either send a PR to github, or link a final zip when you're happy and I can upload changes to git on your behalf if that's easier.

Post Reply