If I understand you correctly, something like this should do it:
loop N over {1..10} {
output Nd{0:4, 1, 2} / 2 named "[N]d6, 6=success, 5=half success, round down"
}
You can't directly represent non-integer values in AnyDice. But what you can do is count the number of half-successes in your roll (i.e. one for each 5, two for each 6) and then divide by two.
Division in AnyDice rounds down (actually towards zero), which seems to be what you want here based on your examples, so there's no need to adjust that. If you did want to round upwards instead, you could add one before dividing by two (or, more generally, add \$n-1\$ before dividing by \$n\$).
The code above does not differentiate half a success (which you mentioned you want to treat as "success with complications") from no successes at all. Perhaps the easiest way to get the probability of that happening is simply to calculate it separately:
loop N over {1..10} {
output Nd{0:4, 1, 2} = 1 named "[N]d6, one five, no sixes"
}
This will output 1 if the number of half-successes rolled is exactly one, and 0 otherwise. This kind of "boolean" output is most conveniently viewed in the AnyDice summary view (which the link above takes you to), where the "mean" chart directly shows the probabilities of rolling a single half-success. You can subtract these half-a-success probabilities from the zero success probabilities given by the first script above to get the actual probabilities of rolling not even half a success. (Or just change the = 1
in the code above to = 0
to output them directly.)
If you want to get both the distribution of whole success counts and the probability of getting a single half-success from a single AnyDice script, you're going to have to do a bit more work — in this case, as usual, by writing a helper function to map the half-success counts to the final output.
But first you'll need to decide how to represent the different possible results in the output. One fairly reasonable option would be to use –1 to represent "not even half a success", 0 to represent "only half a success" and positive integers to represent one or more full successes (i.e. 1 = one success, 2 = two successes, etc.). Using that representation, we can write our helper function like this:
function: count HALF_SUCCESSES:n {
if HALF_SUCCESSES = 0 { result: -1 } \ not even half a success \
if HALF_SUCCESSES = 1 { result: 0 } \ "success with complications" \
result: HALF_SUCCESSES / 2 \ otherwise just count whole successes \
}
loop N over {1..10} {
output [count Nd{0:4, 1, 2}] named "[N]d6, -1 = fail, 0 = complications, 1+ = success"
}
The (minor) down side to this encoding scheme is that the mean and standard deviation values automatically calculated by AnyDice become rather meaningless (whereas for the first script above they directly give you the average number of full successes and its s.d.) since the output numbers are no longer linearly proportional to the total number of successes. But you can still eyeball the graphs to see how the distribution changes as you increase the number of dice.