Part 1: highest of A and B
for skill dice
output [highest of 1d4 and 1d8]
You can even chain that, which you can see in action here
Part 2: >1d6
for comparison to difficulty dice
output [highest of 1d4 and 1d8]>1d6
This compares the highest of the two dice with the 1d6, and if it's higher, it's a 1, otherwise a 0.
The end result using > = < is this:
61.46 % higher, 12.50 % Tie, 26.04 % smaller for a difficulty die of 1d6.
Adaption is simple!
To adapt, just alter the dice in the upper portion of this Script:
SKILL_A: 1d4
SKILL_B: 1d8
DIFF: 1d6
output [highest of SKILL_A and SKILL_B]>DIFF named "Higher"
output [highest of SKILL_A and SKILL_B]=DIFF named "Equal"
output [highest of SKILL_A and SKILL_B]<DIFF named "Lower"
Streamling with functions
Anydice allows running functions. And Ilmari Karonen did a very quick streamline on it, that allows working from it later.
Larger, equal, and smaller than can be seen as "[this] - [that]" and then seeing a positive, 0 or negative value. So just to see 1, 0 and -1, you can truncate it with:
function: sign of N:n {
if N < 0 { result: -1 }
if N > 0 { result: 1 }
result: 0
}
The operative line then becomes
output [sign of [highest of SKILL_A and SKILL_B] - DIFF] named "1 = higher, 0 = equal, -1 = lower"
Resulting in this script