Set hyperdrive last service date to game start date for new games. #4910
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This sets the hyperdrive last service date to the game start date for new games. Currently, the hyperdrive service date is still set to Jan 1 3200 for new games:
Currently, that means that new games start with a hyperdrive that is 19 years out of service!
A new game after this change:
Also in regards to the likelihood of the hyperdrive breaking:
Perhaps I'm particularly unlucky, but it would seem that a breakdown becomes fairly likely above 15 jumps after the service period ends. Just doing some quick testing, I got the drive to break 4 times in a row (out of 4 test runs) in the 13-17 jump range. I don't think this is necessarily bad, but it's not anywhere close to the maximum in BreakdownServicing.lua (255), and the likelihood of a random number being less than 0.0588 (~ 15/255) seems like it wouldn't be a given (the test is
Engine.rand:Number() < service_history.jumpcount / max_jumps_unserviced
).Actually, if I'm thinking about this correctly, the chance that the drive will break after 15 jumps should be about 5.8% (if random is perfectly random , etc.). Each jump after the service period ends should increase the likelihood of the drive breaking by just under 0.4% each time.
Out of curiosity, I ran 1 million random numbers (
Engine.rand:Number()
) and it's not favoring either end, so perhaps I am just that unlucky?