SenorPez / project-cars-replay-enhancer

Project CARS Replay Enhancer: Combines telemetry data with replay video to improve Project CARS replays.
MIT License
12 stars 1 forks source link

Points structure option -1 is not working #44

Closed Michel-NL closed 8 years ago

Michel-NL commented 8 years ago

If I enter 25 point for number 1 shouldn't the -1 option count down from 25, 24, 23, 22, etc to 0?

Enter points scored for finish poisition 1 (25)--> Enter 0 to finish points structure. Enter -1 to use previous values for remaining positions. Enter points scored for finish poisition 2 --> -1

    "point_structure": [
        0,
        25
    ],
SenorPez commented 8 years ago

First, I should really spell "position" correctly. Second, no, that's not how -1 would work in this case. It's actually (somewhat) less useful than that, but for obvious reasons.

How it does work: Let's say I'm creating race2_config.json using race1_config.json as defaults. Or I'm running with the -c to make changes to race1_config.json. Both cases have the same result.

In this case, when I get to the points structure, hitting -1 would use the same points previously entered for each position. So if I have an F1-style points structure [25, 18, 15, 12, 10, 8, 6, 4, 2, 1], I don't have to hit Enter to accept the defaults 10 times.

In the example you've shown, it's actually working as intended. You had a P1 value of 25, and nothing else, so it just closes up. In that case, with no default, 0 and -1 do the same thing. To actually do a 25, 24, 23, 22, etc. structure, you'd have to type them in individually. (But only once... you could then, and I'd suggest this... use that configuration file as the defaults to create a new configuration file, changing only what you need to!)

Michel-NL commented 8 years ago

aha my bad reading. I was thinking if you hit -1 it would count automatic the remaining points to zero. Good tip to create a default settings file