The resistor does depend on the difference between the voltage of the power supply and the sum of the forward voltages of the string of LEDs. You choose the resistor to drop that many volts at the desired current. But you must have known this already, since you did it correctly in your OP.
Bob