As the LEDs are white, they will be about 3 V. The design uses 3 batteries to so that the current is reasonably stable. There will be around 4.5 V total, of which 3 V will be across the LEDs, leaving 1.5 V across the resistor, so the current will be about 200 mA in total. That will probably give over 6 hours on alkaline batteries until the voltage of each cell is down to 1.2 V. A t that point the current will be under half the starting current.
Anyhow, 200 mA is about 7 mA per LED.
To run one LED from 18 V at 7 mA, there will be 15 V across the resistor, so you need about 2200 Ohms or 2.2 kOhms, and there will be about 0.1 W of heat dissipated in the resistor.
For more LEDs, divide the resistance by the number of LEDs, and multiply the power. If you run all 30 of the LEDs, you need 2200/30 = 73 Ohms and 0.1 * 30 = 3 Watts.
Small changes in resistor value will give small changes in current, so if you used a 68 Ohm resistor for all 30, the current would be 7.35 mA per LED, which is probably fine.
I suggest you run resistors well under their power rating, so if you do want to use one resistor that dissipates 3 W, I suggest that you use a resistor rated at 6 W or more. I'm suggesting that because a 3 W resistor running at 3 W will be really hot, while a 10 W resistor running at 3 W will be much cooler, but probably still hot enough to burn your fingers.
If you have separate strips, use separate resistors for each strip. Otherwise, if one strip becomes disconnected, the other strips will take more current and may burn out.