Dialogue select functions Not class, Not cell, Not race…

Everything about development and the OpenMW source code.
User avatar
potatoesmaster
Posts: 112
Joined: 26 Dec 2012, 17:01

Dialogue select functions Not class, Not cell, Not race…

Post by potatoesmaster »

In vanilla MW, the dialogue condition functions Not… (class, cell, race, faction and local) don't seem to use the value entered for comparison. I searched on the web but found no satisfactory response (people opinions differ, so it doesn't help).

The comparison value seems to be used inconsistently in vanilla dialogues. For example, here are two responses not spoken by Dunmers, with different conditions using the function 'Not race':
  • An info record with a condition 'Not race Dark Elf == 0':

    Code: Select all

    Record: INFO ''
      Id: 26653148642147220888
      Previous ID: 28808202713101558
      Next ID: 1816415572264858065
      Text: Morrowind is a peculiar mixture of Dunmer tradition and Imperial modernism. The council system of government works well, and the Temple provides shelter, education, and health for all. At the same time, the Legions and magistrates guarantee rule of law and justice, and free trade has made everybody in Vvardenfell prosperous. But there's still a lot of race hatred, and slavery ought to be outlawed, regardless of 'sacred Dunmer customs.' And the proud Dunmer will always be bitter about the Occupation.
      Class: Noble
      Factionless: 0
      Disposition: 50
      Result Script: [skipped]
      Quest Status: None (0)
      Unknown1: 0
      Unknown2: 0
      Select Rule: Not Race     Dark Elf                         == variant int: 0
      Select Rule: Not Local    NoLore                           == variant int: 0
  • An other info record with a condition 'Not race Dark Elf == 1':

    Code: Select all

    Record: INFO ''
      Id: 1099415527244467957
      Previous ID: 555729883470615831
      Next ID: 61353802131015109
      Text: Dark Elves are the dark-skinned, red-eyed Elven peoples of Morrowind. The 'dark' part may come from their dark grey skin, but it also fits their gloomy dispositions. Folks call them 'Dark Elf' in the West, but they call themselves the 'Dunmer.' They have no sense of humor, and always take themselves very seriously. They look down their noses at all the other races -- particularly the Khajiit and Argonians, which they treat like animals.
      Class: Noble
      Factionless: 0
      Disposition: 30
      Result Script: [skipped]
      Quest Status: None (0)
      Unknown1: 0
      Unknown2: 0
      Select Rule: Not Local    NoLore                           == variant int: 0
      Select Rule: Not Race     Dark Elf                         == variant int: 1
Here is a strange info record (either conditions Race and Not race are set for Argonians):

Code: Select all

Record: INFO ''
  Id: 274456285702816317
  Previous ID: 885081952991516541
  Next ID: 1845225656310539227
  Text: Excuse me, sera.
  Race: Argonian
  Class: Slave
  Factionless: 0
  Disposition: 50
  Gender: 
  Sound File: vo\a\f\Hlo_AF071.mp3
  Result Script: [skipped]
  Quest Status: Invalid (1836204320)
  Unknown1: 1
  Unknown2: 0
  Select Rule: Not Race     Argonian                         == variant int: 1
I want to investigate further on this, but the TESCS is broken under Wine (saving plugins doesn't work). Can someone help me?

Here are my changes for the moment: https://github.com/PotatoesMaster/openm ... efb45be6a7
User avatar
potatoesmaster
Posts: 112
Joined: 26 Dec 2012, 17:01

Re: Dialogue select functions Not class, Not cell, Not race…

Post by potatoesmaster »

I just tested MWEdit as alternative to the TESCS under Wine. It works pretty well (it can save its plugins files and, as a bonus, it loads data files much more rapidly than the TESCS). There is no "world view" (render view?), however.

All I wanted to say is that I will test these dialogue function later today. But for now, I have to go back to work.
User avatar
potatoesmaster
Posts: 112
Joined: 26 Dec 2012, 17:01

Re: Dialogue select functions Not class, Not cell, Not race…

Post by potatoesmaster »

I first used MWEdit to edit dialogue and add topics for the test. But the resulting esp file was sort of broken (lot of "Select Rule: INVALID" with esmtool and an error message on loading with MW).
I opened this file with the TESCS to check it up and found out that the TESCS can actually save an existing esp file set as active file. :)

Here are the results.

The comparison is not used for these functions:
  • Not Cell
  • Not Faction
  • Not Id
  • Not Race
  • Not Class
But it is for "Not Local", sometimes. It seems a little… err… special. This function seems to return 1 when the local variable is found in NPC's attached script, but a comparison < 0 return success. :-/
The comparison has no effect when the variable is not found.

The detailed test follows.
Spoiler: Show
User avatar
potatoesmaster
Posts: 112
Joined: 26 Dec 2012, 17:01

Re: Dialogue select functions Not class, Not cell, Not race…

Post by potatoesmaster »

Just checked with esmtool: the "Not Local" response filter function is used only with the variable NoLore in Morrowind, Tribunal and Bloodmoon ESMs.

Some stats (I love stats :p):
  • Morrowind:
    • Not Local NoLore = 0 present 2593 times
    • = 1 one time
    • = 50 (seriously, wtf?) one time
  • Tribunal.esm:
    • = 0 present 491 times
  • Bloodmoon.esm:
    • = 0 present 29 times
A question now: should we try to mimic the behaviour of the "Not Local" function?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue select functions Not class, Not cell, Not race…

Post by Zini »

Guess we have no choice about that, right? Otherwise we break content.
User avatar
potatoesmaster
Posts: 112
Joined: 26 Dec 2012, 17:01

Re: Dialogue select functions Not class, Not cell, Not race…

Post by potatoesmaster »

Since response conditions using "Not local" function with weird comparisons (=1, =50, <0) always succeed, they don't filter any response at all. If they appear as is in a mod (or even in Morrowind.esm), it is certainly a bug. I know reproducing Morrowind bugs is sometime necessary because they could be (mis)used by mods, but this one doesn't serve any purpose.
Last edited by potatoesmaster on 20 Mar 2013, 12:49, edited 1 time in total.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue select functions Not class, Not cell, Not race…

Post by Zini »

Okay. I think I get what you mean. Sounds reasonable.
Fritz1
Posts: 3
Joined: 12 Nov 2013, 15:21
Location: Russia

Re: Dialogue select functions Not class, Not cell, Not race…

Post by Fritz1 »

>= 1 one time
= 50 (seriously, wtf?) one time
Who may told in what dialogues this happens, looks like this is bugs and we may fix this in UMP.

// Lgro: link removed.
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

Re: Dialogue select functions Not class, Not cell, Not race…

Post by lgromanowski »

Fritz1 wrote:>= 1 one time
= 50 (seriously, wtf?) one time
Who may told in what dialogues this happens, looks like this is bugs and we may fix this in UMP.
Please don't spam or you will be banned. We know already abut this tool, and we don't use it.
User avatar
sjek
Posts: 442
Joined: 22 Nov 2014, 10:51

Re: Dialogue select functions Not class, Not cell, Not race…

Post by sjek »

there's djangos dialogue and lgnpc and others which aim to will that gap

finding those is possible for topics containing filters list.
Spoiler: Show
for getting combined with nolore in scripts its manual with nolore search.

----------------------------------------
The comparison is not used for these functions:
Not Cell
Not Faction
Not Id
Not Race
Not Class

But it is for "Not Local", sometimes. It seems a little… err… special. This function seems to return 1 when the local variable is found in NPC's attached script, but a comparison < 0 return success. :-/
The comparison has no effect when the variable is not found.
from MSFD it only works if the variables match in dialogue and script
Useful dialogue variables
A number of short variables are used by Bethesda to block certain dialogue. These must
simply be declared in a script on the actor, no value is required.
They are checked for using the Not Local filter as described in the helpfile:

Nolore_______Blocks most non-specific dialogue
NoIdle_______Blocks Idle voice, used for vampires
NoFlee_______Blocks flee voice, used for vampires
NoHello______Blocks Hello voice, used for vampires

This is true if the speaker does not have this local variable. Unlike most "Not" functions, this
one does care what you set the variable to. Both the dialogue and the variable itself should be
set to 0. This can be confusing. Here is a table of how this works:

Not Local______Variable Exists______Value_________Pass?
(in dialogue)_______(y/n)_________(in the script)____(speaker will say this)
___= 0____________No_____________NA___________Yes
___= 0____________Yes_____________0____________No
___= 0____________Yes_____________5____________Yes
___= 1____________No_____________NA___________Yes
___= -3___________Yes_____________-3____________No
so not race, etc. are affected just by string with a name. noflee, etc. checks the zero in AI settings and nolore has the culprit for comparisons not working in vanilla

as said earlier this doesn't hurt much, as there's only 1 and 0 to choose from
(edit: or more as -3 and such but it needs to be exact also in vanilla. CS could make a warning if not already when conditions doesn't match for "==".
for comparison <> if there's possibility generally alter script's local values from other ones, warning not needed without whole structure check? )

: )
as of other functions ingame test would be good as tesCS and game has different error reporting
looking for forums if there's other aspects later

fixing this in UMP would only reguire setting variables to same where needed if MSFD holds universally
Post Reply