I believe that resistor is used only for the interior body light and the headlamps. You can snip the wires connecting the wheel contacts to the motor and attach the DCC leads to them. (Red and black to the wheel contacts, orange and gray to the motor.) Just remember to keep a resistor for your headlamp wiring -- especially if using LEDs. Most will quickly burn out on full track power.

Check the electrical contacts between the motor chassis and the trolley body. The lights are linked directly to motor power, so the faster it goes, the brighter they are. And the lheadlamps are directional -- probably just two simple wiring loops with LEDs in opposite polarities. You will need to analyze the body wiring before determining how to adapt this to DCC control. You might be able to continue the current system (keep that resistor!), but you will still have light fluxuations. If the headlamp on "the wrong end" glows, just switch the DCC motor leads.

If instead you wish a consistent steady interior light and headlamps controlled by DCC, you may have to devise a means to connect body wiring to your DCC decoder. This can be extra-long wiring tucked inside the body so you can lift and partially remove the body for maintenance, or add plug connectors. Connect a resistor to your blue common positive wire, and take special care on LED polarities when rewiring the headlamps. You might want to connect both yellow and white wires to the interior light's negative connection, so it remains lit in either direction when headlamps are on.

That is not a resistor but a capacitor.It's function is to attenuate the RF that is caused by the sparking of the contacts and the rotor of the motor.If you look good you will see the number 104, that means 100 nano Farad.A normal resistor has coloured bands that represent the value. If you convert to DCC you will have to remove that capacitor because it can interfere with the DCC signal.

depends on what the values of the resistors on the board are.I usually use 1K Ohm resistors.That is a bit to much but it works fine.The formula is the existing Voltage minus the voltage of the LED (Depends on the colour of the LED) divided by 0.02 Ampere (20 mili Ampere) gives you the resistance in Ohms.Normal resistors have a colour code, look that one up on the Net.SMD (surface moumted devices) resistors have number printed on the body.For example; 102 is 10x10 to the power 2 = 1000 =1K .