More or less this, except with a simpler way of allocating fractional scores: simply divide the value rolled on that die by the largest such value on any of the dice in the set (or, equivalently, round to either 0 or largest-such-value and skip the division step).