TalkManager issues

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

TalkManager issues

Post by Hazelnut »

Seems some of the talk behaviour is not quite right as I found testing the guild mod I've made. I've found 2 issues:

@Nystul
The method GetFactionName() is used for the macro %fpa in greetings. It's only been implemented for temples and I don't know why that is. You committed this last year in commit id cc24d707 - any chance you can remember why it was only for temples? I certainly get the resolving error message of "never mind" with Archeologists guild NPC greetings.

@Ferital
The change you made recently, commit id 97567275, to match classic greetings is causing a character with 0 rep with the guild to have the quest giver NPC refuse to talk which seems a bit wierd. Seems to be line 825 where a random reaction is compared to the rep of 0 resulting in a bad reaction. TBH this may be just as classic and might also be nice kinda flavour that just cause you joined doesn't mean they like you yet... but wanted to enquire if that seemed right to you
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: TalkManager issues

Post by Nystul »

Hazelnut wrote: Thu Jul 25, 2019 10:38 pm @Nystul
The method GetFactionName() is used for the macro %fpa in greetings. It's only been implemented for temples and I don't know why that is. You committed this last year in commit id cc24d707 - any chance you can remember why it was only for temples? I certainly get the resolving error message of "never mind" with Archeologists guild NPC greetings.
I am unable to find a commit id with cc24d707.
from what I remember from memory: temples are a special case compared to other organizations
I think %fpa was one of several macros that produced slightly different results in vanilla (%fon being another one I think) - the original issue was that some macros needed special handling to resolve to the same outcomes as vanilla (I remember there were greeting messages that contained both "Order of templeX" and "Temple of templeX" text tokens resolved from different macros - initially it would return some wrong text compared to classic)
I think Fighters guild, Mages guild and knightly orders didn't suffer from this issue (I think it is either not used in those guilds in greeting messages or resolves to just the guild name in those cases)

update: have you experienced any macros being not resolved correctly? I mean maybe we need just other branches there for other organizations in that case

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

Re: TalkManager issues

Post by Ferital »

Yes, the behavior you mention regarding quest givers is the same in classic, but it's actually a kind of issue even in classic, in my opinion. I say that because as you may know, some of the people in temples and knightly orders are not actual members of the faction corresponding to the building they are located in. This concerns all quest givers (but not only them) who are all members of a generic faction called "Temple Missionaries" for holy orders and "Questers" for knightly orders. And since they are not members of the faction they give you quests for, your reputation with them remains at 0. This, at least in classic, but I think DFU changed that a little, I have to look at the code to confirm that.

This means that if your character is a member of The Knights of the Dragon, has accomplished a bunch of quests for them and has a reputation of 30 with the guild faction, the quest giver will always greet you with a reputation of 0. Which may randomly fire some very warm greetings like "I despise your kind, just go away" followed by "You get no response" the second time you click the NPC.

Now, I wanted to changed that in my PR where I implemented classic greetings behavior, but I thought it would be better to do it in a separate commit. What I want to do is to ignore entirely the generic factions when talking to these kind of NPCs, and use the building faction instead, which is always a temple or a knightly order building. That would be much more logical in my opinion. The change would apply only when talking with such generic NPCs, as generic factions IDs are still required to get the correct interaction menu.

Interkarma, Hazelnut, Nystul and others, what do you think of this proposal?

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

Re: TalkManager issues

Post by Hazelnut »

Thanks for the explanation Ferital. The quest giver of my mod is of the guild faction, so once rep increases after doing some quests the issue goes away. regarding the update you describe, not really sure about it. I thought the questers were child factions so the rep should increase as guild rep does. It's all very messy though, so I'm not sure if what you propose will work - I don't understand it enough. I'm happy that you said the behaviour of 0 rep talking is the same as classic, and as I said maybe it gives the mod more character to have a grumpy quest giver until you prove yourself.

Nystul, that's my suspicion is that another code branch is needed for normal non-temple guilds that can use greetings with %fpa macro. I always try to double check my conclusions especially if I cannot see why something is like it is. Thanks for the guidance. I'll check some of the guilds tonight, as it may just be the fact this is a new guild that causes it to use these greetings. I was too hot and tired last night to try to work out the greeting selection code.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: TalkManager issues

Post by Ferital »

I see, in fact in classic, only quest givers from knightly and holy orders are members of generic factions. All other quest givers are members of a child faction of their respective guild. That's the first point I want to change: so when talking to a Temple of Kynareth quest giver (for example), he would react to player as a member of the Temple of Kynareth and not act as if the player is a stranger to him, like he always does in classic.

I will submit a PR once I get some time to work on this, so you could all review it and accept or reject the changes. I think I will also include Random nobles and knights in the process, so they can be linked to the "Court of " their respective region. This would also make much more sense.
Last edited by Ferital on Fri Jul 26, 2019 7:06 pm, edited 1 time in total.

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

Re: TalkManager issues

Post by Hazelnut »

So I think both issues are actually different aspects of the same thing. The greeting messages that use %fpa are now being selected where they were not before. The special case is still required for temples but I am going to replace the error case resolving error ('never mind') with the faction name. In theory Knightly orders need a similar special case like temples, but from what I can see none of those NPCs seem to use messages with this macro. I can add the case (untested) or we can leave it until a case is found where it's required. I lean towards the latter myself, but happy to make the change if you guys would like me to.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply