Jump to content

AND/OR in conversation bundles


Recommended Posts

According to Apotheosis (which we trust), the code at the bottom translates to

IF (Dwarf OR Orlan) AND (Athletics < 5)

Now, the Dwarf/Orlan/Athletics checks I understand, but not quite how the AND/OR is constructed. I am thinking the Operator value has something to do with it, yet I can't come up with a reasoning that holds.

(also, weird that it checks the Watcher when this is a choose-your-champion interaction)

BTW, the file is 00_cv_poko_kohara_well.conversationbundle, dealing with going down the well, well, to grab some gems. The code below (do we get to call JSON code?) is about reaching the bag being a struggle for short races. Node 16.

			"Conditionals": {
				"Operator": 0,
				"Components": [
					{
						"$type": "OEIFormats.FlowCharts.ConditionalExpression, OEIFormats",
						"Operator": 0,
						"Components": [
							{
								"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
								"Data": {
									"FullName": "Boolean IsRace(Guid, Guid)",
									"Parameters": [
										"b1a8e901-0000-0000-0000-000000000000",
										"25308722-9480-477a-94cf-d40b6fd0886e"
									],
									"Flags": "",
									"UnrealCall": "",
									"FunctionHash": 1545820124,
									"ParameterHash": 712917969
								},
								"Not": false,
								"Operator": 1
							},
							{
								"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
								"Data": {
									"FullName": "Boolean IsRace(Guid, Guid)",
									"Parameters": [
										"b1a8e901-0000-0000-0000-000000000000",
										"1f60b08e-1966-4bb6-8cdb-757294dcc18a"
									],
									"Flags": "",
									"UnrealCall": "",
									"FunctionHash": 1545820124,
									"ParameterHash": -1216247160
								},
								"Not": false,
								"Operator": 1
							}
						]
					},
					{
						"$type": "OEIFormats.FlowCharts.ConditionalExpression, OEIFormats",
						"Operator": 0,
						"Components": [
							{
								"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
								"Data": {
									"FullName": "Boolean IsSkillValue(Guid, Guid, Operator, Int32, Boolean, Boolean)",
									"Parameters": [
										"b1a8e901-0000-0000-0000-000000000000",
										"fefc4d3d-250d-4c32-85e0-62a851240e62",
										"LessThan",
										"5",
										"False",
										"False"
									],
									"Flags": "",
									"UnrealCall": "",
									"FunctionHash": 193829831,
									"ParameterHash": -1326280703
								},
								"Not": false,
								"Operator": 0
							}
						]
					}
				]
			}

 

Edited by omgFIREBALLS
  • Like 1

My Deadfire mods
Out With The Good: The mod for tidying up your Deadfire combat tooltip.
Waukeen's Berth: Make all your basic purchases at Queen's Berth.
Carrying Voice: Wider chanter invocations.
Nemnok's Congregation: Lets all priests express their true faith.

Deadfire skill check catalogue right here!

Link to comment
Share on other sites

Yes the "Operator" parameter determines whether "ConditionalCall" and "ConditionalExpression" should be and/or (0/1) statements.

"ConditionalExpression" is useful if you need to determine the order of operations for a number of "ConditionalCall"s.
Taking the above as an example.

Spoiler

This is the same statement without all the "ConditionalExpression"s

"Conditional": {
              "Operator": 0,
              "Components": [
                {
                  "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                  "Data": {
                    "FullName": "Boolean IsRace(Guid, Guid)",
                    "Parameters": [
                      "b1a8e901-0000-0000-0000-000000000000",
                      "25308722-9480-477a-94cf-d40b6fd0886e"
                    ]
                  },
                  "Not": false,
                  "Operator": 1
                },
                {
                  "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                  "Data": {
                    "FullName": "Boolean IsRace(Guid, Guid)",
                    "Parameters": [
                      "b1a8e901-0000-0000-0000-000000000000",
                      "1f60b08e-1966-4bb6-8cdb-757294dcc18a"
                    ]
                  },
                  "Not": false,
                  "Operator": 0
                },
                {
                  "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                  "Data": {
                    "FullName": "Boolean IsSkillValue(Guid, Guid, Operator, Int32, Boolean, Boolean)",
                    "Parameters": [
                      "b1a8e901-0000-0000-0000-000000000000",
                      "fefc4d3d-250d-4c32-85e0-62a851240e62",
                      "LessThan",
                      "5",
                      "False",
                      "False"
                    ]
                  },
                  "Not": false,
                  "Operator": 0
                }
              ]
            }

Without the "ConditionalExpression" the statement would be: is the player (Dwarf) OR (Orlan AND Athletics < 5).

 

On 8/10/2023 at 9:37 PM, omgFIREBALLS said:

(also, weird that it checks the Watcher when this is a choose-your-champion interaction)

BTW, the file is 00_cv_poko_kohara_well.conversationbundle, dealing with going down the well, well, to grab some gems. The code below (do we get to call JSON code?) is about reaching the bag being a struggle for short races. Node 

Other than node "0", I'm not seeing any links to node 16 in that conversation. Which likely means it isn't actually used for the skill check.

Edited by Kvellen
  • Like 2
Link to comment
Share on other sites

52 minutes ago, Kvellen said:

Other than node "0", I'm not seeing any links to node 16 in that conversation. Which likely means it isn't actually used for the skill check.

I swear to Abydon, every time I think I've overcome the final unexpected quirk that stands between me and a realistic representation of these skill checks...

52 minutes ago, Kvellen said:

Without the "ConditionalExpression" the statement would be: is the player (Dwarf) OR (Orlan AND Athletics < 5).

Does it matter then, what the operator is for the final conditional of each conditional expression? Like your example is "actually" (Dwarf) OR (Orlan AND Athletics < 5 AND [here ends the story]), so it might as well be that the Athletics check had a 1 operator because (Dwarf) OR (Orlan AND Athletics < 5 OR [here ends the story]) are effectively the same?

Because I'm sure I've seen expressions where the conditionals' operators weren't the same, which made this all that much harder to understand.

Edited by omgFIREBALLS
  • Like 2

My Deadfire mods
Out With The Good: The mod for tidying up your Deadfire combat tooltip.
Waukeen's Berth: Make all your basic purchases at Queen's Berth.
Carrying Voice: Wider chanter invocations.
Nemnok's Congregation: Lets all priests express their true faith.

Deadfire skill check catalogue right here!

Link to comment
Share on other sites

I don't remember whether I verified it in dnSpy, but I've always had the assumption that the last operator is ignored. I'm defaulting the last operators to 0 in Apotheosis, and that has never caused any unexpected behavior.

Edited by Noqn
  • Like 2
Link to comment
Share on other sites

Would you agree the following logic holds? If a component has no siblings below it, its operator can be ignored. (I mean, this is sort of what Noqn said, but I don't know how large a scale it was supposed to apply to...)

The JSON pasted means, according to Apotheosis: IF (the player is an Island Aumaua AND has Deadfire Archipelago as their culture) OR (Tekehu is in the party). One and, one or, but the JSON has six operators in it. 06_cv_biha, node 44.

First operator (line 2): On the whole conditional, but this will never have a sibling. Ignore.
Second operator (line 6): Preceding the race/culture check, does have a sibling (the Tekehu check). Do not ignore. This is the OR.
Third operator (line 22): This is the race check. Has a sibling, the culture check. Do not ignore. This is the AND.
Fourth operator (line 38): This is the culture check. It has no siblings below it. Ignore.
Fifth operator (line 44): Preceding the Tekehu check. It has no siblings below it. Ignore.
Sixth operator (line 59): This is the Tekehu check. It has no siblings below it. Ignore.

I was doing a little test to see if the initial operator (the one on line 2) is always 0, and it turned out there are twenty-or-so cases of it being 1 (which means that 0 is by far the most common). I don't know if this is relevant, necessary or helpful... I figured perhaps it was just a hint that the first child would be an OR-clause, but re_si_crew_event_shore_leave node 24 for example has a 1 operator for its conditionals, but no components.

"Conditionals": {
	"Operator": 1,
	"Components": [
		{
			"$type": "OEIFormats.FlowCharts.ConditionalExpression, OEIFormats",
			"Operator": 1,
			"Components": [
				{
					"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
					"Data": {
						"FullName": "Boolean IsSubrace(Guid, Subrace)",
						"Parameters": [
							"b1a8e901-0000-0000-0000-000000000000",
							"Island_Aumaua"
						],
						"Flags": "",
						"UnrealCall": "",
						"FunctionHash": -1558632484,
						"ParameterHash": 1209903115
					},
					"Not": false,
					"Operator": 0
				},
				{
					"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
					"Data": {
						"FullName": "Boolean IsCulture(Guid, Guid)",
						"Parameters": [
							"b1a8e901-0000-0000-0000-000000000000",
							"7093880b-7527-4087-a764-d6613701a025"
						],
						"Flags": "",
						"UnrealCall": "",
						"FunctionHash": -714406469,
						"ParameterHash": 957745537
					},
					"Not": false,
					"Operator": 0
				}
			]
		},
		{
			"$type": "OEIFormats.FlowCharts.ConditionalExpression, OEIFormats",
			"Operator": 0,
			"Components": [
				{
					"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
					"Data": {
						"FullName": "Boolean IsCompanionActiveInParty(Guid)",
						"Parameters": [
							"b1a7e805-0000-0000-0000-000000000000"
						],
						"Flags": "",
						"UnrealCall": "",
						"FunctionHash": 1667060059,
						"ParameterHash": 1635363358
					},
					"Not": false,
					"Operator": 0
				}
			]
		}
	]
}

 

Edited by omgFIREBALLS
  • Thanks 1

My Deadfire mods
Out With The Good: The mod for tidying up your Deadfire combat tooltip.
Waukeen's Berth: Make all your basic purchases at Queen's Berth.
Carrying Voice: Wider chanter invocations.
Nemnok's Congregation: Lets all priests express their true faith.

Deadfire skill check catalogue right here!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...