Just thought I would share a couple of recent products I spotted that look useful for the kind of stuff we typically do in train world.
First is this guy. A cute little easy-to-wire 20 ma LED driver; about $1.90 each. These should be handy for driving one or several leds in series. As easy to wire as a resistor, but better. Plus you don't need to calculate anything. Very compact. For AC use you would likely need to add an inline diode something like a 1N4003 of course.
Next is this guy. I know; yet another DC-DC buck converter? But this one has selectable fixed outputs of 2.5, 3.3, 5, 12 vdc, and others. Plus you can select a variable output that is adjusted using a small built in trim pot. And its circuitry is over 90% conversion efficiency, so it won't get too hot in normal use. It's small enough that you should be able to mount it inside any engine, railcar or dummy engine. You can hardwire it, or it looks like you could use any 0.1" pitch header such as JST-EH or Dupont pin connectors. And the cost is only $1.10 each in a quantity of 10.
Again for AC supply use you would want to add a bridge diode and filter cap to the input connections, but that would be quite easy to do.
Rod