Maybe check for speed < 1km/h (or <= 1km/h) instead of 0.planetmaker wrote:The code used in 2ccTS is like (might be different for other engines, but I don't believe it is):Thus it checks variable B4 (current speed) when determining running costs. It's set to MU_nnn_RCOST_IDLE when speed is 0. And MU_nn_RCOST otherwise.Code: Select all
//Low cost when standing still, for use in the '10' at the RUN cost spot HEAD -1 * 0 02 00 EC 82 B4 00 FF 01 // 1 case MU_nnn_RCOST_IDLE 80 00 00 // Standing still cost MU_nnn_RCOST 80 // RUN cost //Low cost when standing still, for use in the '10' at the RUN cost spot WAGON -1 * 0 02 00 ED 82 B4 00 FF 01 // 1 case MU_nnn_RCOST_IDLE 80 00 00 // Standing still cost MU_nnn_RCOST_WAG 80 // RUN cost
I'm not too familiar with the exact movement code...
might actually be true. It smells a bit like something one might want to investigate in detail in both the code of this set (which vehicle exactly? Every one?) and OpenTTD's movement code... but not before sleep for me
Sure this will make the train €10 cheaper each year, but if the speed is 0,0001 (or something) because it's waiting at a signal it'll probably work.
Or is this not possible at all?
Regards,
Melvin.