Page 1 of 1

[0.10.23] R0C10Y04 "The Evil Wizard" drops regional reputation [RESOLVED 0.10.24]

Posted: Sat May 23, 2020 7:26 pm
by Animir
Pretty much what it says in the thread title. I did this quest for Queen Barenziah, and after I turned it in to her I discovered that nobody in Wayrest would talk to me. I took a look at FactionData.txt in my most recent save and discovered that my reputation with Wayrest (and all of its child factions) was suddenly in the toilet. I reverted to an earlier save and redid the quest twice (once in Wayrest again and once in Sentinel), and both times my regional rep would drop by 20.

The UESP says that this quest actually does cause a 20-point reputation hit, but with the Merchants, not whatever region you're doing the quest in. I ran it in vanilla DF to double-check and that definitely is what happens.

If I'm reading the quest decompilation correctly, killing the wizard causes a 20-point reputation hit with the dummy NPC that provides a name for this wizard for use in questgiver dialogue and rumors and whatnot. Vanilla DF applies this reduction to your reputation with the Merchants (for some reason; the dummy NPC has a social group, but no faction) but it looks like DFUnity is applying it to your regional reputation instead.

I've attached before and after saves from when I ran this quest in Sentinel. For the sake of completeness (I don't think any of these touch factions or quests, but you never know), my mod list is:
  • Roleplay Realism
  • Tedious Travel
  • Climates & Calories v1.3.1
  • Roleplay Realism - Items
  • Physical Combat and Armor Overhaul
  • Convenient Clock

Re: [0.10.23] R0C10Y04 "The Evil Wizard" drops regional reputation

Posted: Thu Jun 25, 2020 12:49 pm
by Hazelnut
This looks like an issue with the quest system in DFU to me. The definition of _fakename_ person is

Code: Select all

Person _fakename_ group Local_4.0 female
This is parsed in Person.GetCareerFactionID() and "Local_4.0" is defined like this

Code: Select all

Local_4.0,           0, -4, 0
So p2 is -4 and the switch will default to return the faction id for the local region people which is what you're reporting has the rep drop.

The code has the following comment so Interkarma may need to do another pass on this, or maybe I'm mis-understanding how it works - I wont get a chance to test it directly in the debugger until later today.

Code: Select all

// How Daggerfall links these is not 100% confirmed, some guesses below
// Most of these NPC careers seem to be aligned with faction #510 Merchants

Re: [0.10.23] R0C10Y04 "The Evil Wizard" drops regional reputation

Posted: Sat Jun 27, 2020 5:42 pm
by Hazelnut
I can confirm that the _fakename_ person has a faction of 523 which is People of Sentinel. That's pretty much all the saves are useful for.

My analysis of the issue seems to be correct though, if I start this quest the careerID used to assign factionID is -4 and the switch at line 1031 of Person.cs will therefore default to the perople of current region.

Moving this to bug reports. The handling of the local, and possibly all the groups too, needs more refinement.

Any chance you can upload a classic save that demonstrates this rep drop could you?

Re: [0.10.23] R0C10Y04 "The Evil Wizard" drops regional reputation

Posted: Sat Jun 27, 2020 10:40 pm
by Interkarma
Thanks guys. I've implemented a low impact resolution based on best understanding at this time. We need to be very careful around changes here as small errors can have big consequences to player and quest execution.

https://github.com/Interkarma/daggerfal ... 192012de03

Group careerID P2 value is typically related to a building and is often a business (thus Merchants). When this is a negative value, outcome is undefined and falls through to "people of" as Hazelnut outlined above.

The new behaviour from 0.10.24 will be to read P3 value when P2 is negative, which is always between 0-3 (no quest uses Local_4.10k but I handle it anyway). This will result in all Local_X.X groups associating with Merchants. We know that's correct in this case, and is probably correct or at least adequate in other cases too. If not correct, it's certainly a better outcome than associating with "people of" when it shouldn't.