Quest NPCs location scope

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Ferital
Posts: 282
Joined: Thu Apr 05, 2018 8:01 am

Quest NPCs location scope

Post by Ferital »

Quest NPCs location scope is available from QBN data but was not understood until now. I extracted it and submitted a PR which also corrects the gender of all quest NPCs. This adds the "local" or "remote" attribute for NPCs when it is set in the QBN data. If not set, this means that the location scope has to be generated at random, except for questors and permanent NPCs.

I have also reverse engineered the meaning of groups which is not exactly what I said a few weeks ago in this post: http://forums.dfworkshop.net/viewtopic. ... 3ea#p54859

The meaning is the following one:

Local_3.n: Ally of NPC #n, whose faction is taken at random from the list of the related NPC's allies.
Local_4.n: Enemy of NPC #n, whose faction is taken at random from the list of the related NPC's enemies.
Group_5.n: NPC who is in the same faction as NPC #n.
Group_6.n: NPC who is in relation of any kind with NPC #n.
Group_7.n: Lover of NPC #n.

As an example, in quest A0C01Y03:

Code: Select all

Person _hermit_ face 1 group Group_7.2 remote
means that the hermit is in love with NPC 2, which is the spouse. And the spouse, which is set as

Code: Select all

Person _spouse_ group Group_7.1 remote
means that she is in love with NPC 1, the questgiver.

In classic, this sets the spouse gender as the opposite of the questgiver one, and sets the hermit gender as the opposite of the spouse one (so, the same as the questgiver).

I will open a new PR for this once the above one is merged.

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Quest NPCs location scope

Post by Hazelnut »

Awesome work Ferital. Things that have been rather nonsensical are now making much more sense.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Quest NPCs location scope

Post by Interkarma »

This is incredible Ferital! It's so very satisfying to finally know how this works. Looking forward to reviewing the code changes.

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Quest NPCs location scope

Post by Ralzar »

I was not able to follow all of this, but might this have been causing all the gay weddings? :D

There was a tendency for all those quests to be a guy in love with another guy and a woman trying to stop the merriage from happening. Which was always funny but it seemed a bit odd how often it was the case.

User avatar
Ferital
Posts: 282
Joined: Thu Apr 05, 2018 8:01 am

Re: Quest NPCs location scope

Post by Ferital »

Ralzar wrote: Tue Jun 15, 2021 7:50 am I was not able to follow all of this, but might this have been causing all the gay weddings? :D

There was a tendency for all those quests to be a guy in love with another guy and a woman trying to stop the merriage from happening. Which was always funny but it seemed a bit odd how often it was the case.
Yes that's the reason, these NPCs are of the "Lover" kind and should have their gender set to the opposite of that of the NPC with whom they are in relationship.

13thsyndicate
Posts: 75
Joined: Sat Jul 25, 2020 5:53 pm

Re: Quest NPCs location scope

Post by 13thsyndicate »

Ah, yes. I remember Classic being much less LGBT aware than DFU, but it is a little sad that I won't be helping any more gay couples run away from jealous straight suitors :lol: Still, I think it's far better to have the game be working as intended, especially now that we understand how it was supposed to work in the first place, than to have these interactions happening by accident.

User avatar
haloterm
Posts: 391
Joined: Sat Feb 16, 2019 5:21 am

Re: Quest NPCs location scope

Post by haloterm »

Ralzar wrote: Tue Jun 15, 2021 7:50 am There was a tendency for all those quests to be a guy in love with another guy and a woman trying to stop the merriage from happening. Which was always funny but it seemed a bit odd how often it was the case.
Are random marriages between same genders now impossible by that change?

Even if it was due to some bug, I found it a nice modern touch that there were no forced man-woman couples all the time.

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

Re: Quest NPCs location scope

Post by Jay_H »

The quest persons in A0C10Y05 (to give one example) have no gender defined. That means either one can be male or female:

Code: Select all

Person _betrothed_ face 1 group Group_7.0 remote
Person _qgiver_ group Questor
Previously the "remote" flag was misinterpreted to always be "male" (I believe?), giving an excessive tendency towards double-men marriages.

13thsyndicate
Posts: 75
Joined: Sat Jul 25, 2020 5:53 pm

Re: Quest NPCs location scope

Post by 13thsyndicate »

It's the group 7 part that makes it so that the characters are both opposite-gender once the fix goes in place, as it sets the group to "lover" which triggers the lover character to always be opposite-gender to the other. If I understand what Ferital is saying correctly. Of course it would be easy to make a mod that "fixes" this by just removing the Group identifiers and letting the quest engine do what it wilt

Post Reply