I'm trying to find every combination of $14$ numbers that would add up to exactly $28$. Numbers can only be $0$, $1$, $2$, or $3$.
I'm sorry if my wording is poor. I didn't study as much math as I would have liked too prior to getting into programming.
If your interested in the details. I'm trying to come up with an easier way to create spreadsheets to help with an rpg rule set I'm designing. Each possible combination represents a character class. The player allocates $28$ skill points among $14$ skills with no more than $3$ in each skill.
Here is an algorithm in C, I had a snippet on hand to generate dynamic loops with any number of variables, so here it is:
Try it at tio.run
However are you sure you want to generate that many configurations ?
It turns out there are $6\,472\,168$ of them.