Page 1 of 1

Quest NPCs location scope

Posted: Mon Jun 14, 2021 4:31 pm
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.

Re: Quest NPCs location scope

Posted: Mon Jun 14, 2021 5:11 pm
by Hazelnut
Awesome work Ferital. Things that have been rather nonsensical are now making much more sense.

Re: Quest NPCs location scope

Posted: Tue Jun 15, 2021 7:35 am
by Interkarma
This is incredible Ferital! It's so very satisfying to finally know how this works. Looking forward to reviewing the code changes.

Re: Quest NPCs location scope

Posted: Tue Jun 15, 2021 7:50 am
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.

Re: Quest NPCs location scope

Posted: Tue Jun 15, 2021 3:00 pm
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.

Re: Quest NPCs location scope

Posted: Sat Aug 28, 2021 2:09 pm
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.

Re: Quest NPCs location scope

Posted: Sat Oct 02, 2021 7:46 am
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.

Re: Quest NPCs location scope

Posted: Sat Oct 02, 2021 3:51 pm
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.

Re: Quest NPCs location scope

Posted: Sun Oct 03, 2021 7:17 am
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