Will using a transformer to convert 230V to 12V DC consume more energy than using a few capacitors and resistors without a transformer?

no, the transformer is much more efficient


HOWEVER- a transformer only changes the voltage of AC current- it does not change it to DC. You will still need diodes or rectifiers. You can also use a motor/generator- a 230v AC motor turns a 12 v DC generator.