As a preface I want to say that I'm quite skeptical that this is something that Obsidian isn't already aware of but I can't find any existing publications about this(Forums search or Google.) and it would be a shame if this didn't ever get fixed and has been around for quite a while now it seems so I'm trying posting this here.
In abstract terms, when Boolean expressions are evaluated(In dialogue files and globalscripts called from dialogue at least. Others I haven't tested.) the 2nd type of logical operator used within a given parenthetical(In Deadfire JSON terms I'm talking about ConditionalExpressions, including the top level of the expression which isn't labelled as such in the JSON) but not inside a descendant parenthetical triggers the rest of the expression to be silently ignored.
To give some examples with a C-like Boolean expression format: "A || B && C" is affected by this because the logical AND is the second type of operator used after logical OR with the result that the expression is evaluated as though it were "A || B". "A || (B && C)" is not affected by this because the second type of logical operator is found only in a descendant parenthetical. "A || B || C" is not affected by this because there is only one type of logical operator used. "A && (B && C || D)" is affected by this because the logical OR in the descendant parenthetical is the second type of logical operator used in the descendant parenthetical after logical AND with the result that this expression is evaluated as though it were "A && (B && C)" In the given examples A-D may be parentheticals or basic expression components without affecting the occurrence of the problem.
Now you know why I'm skeptical that Obsidian patched the whole game every time since at least 1.2.0.0017(The oldest version i tested for this.) while remaining unaware of such a fundamental defect.
The most readily perceptible example of which I'm aware of this causing a problem in the game is when you try to break into VTC headquarters in Neketaka you can only use acid keyword abilities instead of acid and fire keyword abilities to melt the bars as is seemingly intended. This is because in the globalscripts the relevant expression is "A && B || C" where A is "!AbilityIsPassive()", B is "AbilityHasKeyword(Acid)", and C is "AbilityHasKeyword(Fire)" and as described the expression gets evaluated as "A && B". If you modify the expression to be "A && C || B" then fire keyword abilities work and acid ones don't. As a bonus defect it seems likely the intent behind that expression was "A && (B || C)" though I'm not aware of any practical impact from that.
I have verified that this defect is present in versions 1.2.0.0017(Once again: I haven't tested anything older. Note the VTC bars example is NOT present in this version because the expression in that version was actually "B || C" if you refer to the definitions used in the prior paragraph. However, modifying a pair of dialogue responses' conditions to something like "AlwaysTrue() && AlwaysFalse() || AlwaysTrue()" and "(AlwaysTrue() && AlwaysFalse()) || AlwaysTrue()" results in only one of the responses appearing which verifies this defect exists in that version.), 3.1.1.0023, and 4.0.0.0034 and have verified that this defect occurs on 2 different computers(An old Windows 7 system and a recent Windows 10 system) so I suspect that this defect is evident on many if not all installations of the game that are patched to at least 1.2.0.0017.
Based on analyzing the JSON files in version 4.0.0.0034 there are 33 expressions in dialogue presumably affected in some way by this and 30 in expressions in other kinds of files.
Question
EDGvyyBUS9aZpT6054IJ
As a preface I want to say that I'm quite skeptical that this is something that Obsidian isn't already aware of but I can't find any existing publications about this(Forums search or Google.) and it would be a shame if this didn't ever get fixed and has been around for quite a while now it seems so I'm trying posting this here.
In abstract terms, when Boolean expressions are evaluated(In dialogue files and globalscripts called from dialogue at least. Others I haven't tested.) the 2nd type of logical operator used within a given parenthetical(In Deadfire JSON terms I'm talking about ConditionalExpressions, including the top level of the expression which isn't labelled as such in the JSON) but not inside a descendant parenthetical triggers the rest of the expression to be silently ignored.
To give some examples with a C-like Boolean expression format:
"A || B && C" is affected by this because the logical AND is the second type of operator used after logical OR with the result that the expression is evaluated as though it were "A || B".
"A || (B && C)" is not affected by this because the second type of logical operator is found only in a descendant parenthetical.
"A || B || C" is not affected by this because there is only one type of logical operator used.
"A && (B && C || D)" is affected by this because the logical OR in the descendant parenthetical is the second type of logical operator used in the descendant parenthetical after logical AND with the result that this expression is evaluated as though it were "A && (B && C)"
In the given examples A-D may be parentheticals or basic expression components without affecting the occurrence of the problem.
Now you know why I'm skeptical that Obsidian patched the whole game every time since at least 1.2.0.0017(The oldest version i tested for this.) while remaining unaware of such a fundamental defect.
The most readily perceptible example of which I'm aware of this causing a problem in the game is when you try to break into VTC headquarters in Neketaka you can only use acid keyword abilities instead of acid and fire keyword abilities to melt the bars as is seemingly intended. This is because in the globalscripts the relevant expression is "A && B || C" where A is "!AbilityIsPassive()", B is "AbilityHasKeyword(Acid)", and C is "AbilityHasKeyword(Fire)" and as described the expression gets evaluated as "A && B". If you modify the expression to be "A && C || B" then fire keyword abilities work and acid ones don't. As a bonus defect it seems likely the intent behind that expression was "A && (B || C)" though I'm not aware of any practical impact from that.
I have verified that this defect is present in versions 1.2.0.0017(Once again: I haven't tested anything older. Note the VTC bars example is NOT present in this version because the expression in that version was actually "B || C" if you refer to the definitions used in the prior paragraph. However, modifying a pair of dialogue responses' conditions to something like "AlwaysTrue() && AlwaysFalse() || AlwaysTrue()" and "(AlwaysTrue() && AlwaysFalse()) || AlwaysTrue()" results in only one of the responses appearing which verifies this defect exists in that version.), 3.1.1.0023, and 4.0.0.0034 and have verified that this defect occurs on 2 different computers(An old Windows 7 system and a recent Windows 10 system) so I suspect that this defect is evident on many if not all installations of the game that are patched to at least 1.2.0.0017.
Based on analyzing the JSON files in version 4.0.0.0034 there are 33 expressions in dialogue presumably affected in some way by this and 30 in expressions in other kinds of files.
Link to comment
Share on other sites
14 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now