-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New hyperdrive algorithms and internal hyperfuel tanks #6026
New hyperdrive algorithms and internal hyperfuel tanks #6026
Conversation
- The new hyperdrive algorithm is designed for fractional fuel use and to provide more nuanced gameplay instead of always choosing the closest system to hyperjump to. - New in this algorithm, it is now more fuel efficient to make a single long jump than many shorter jumps, even when travelling the same distance. - Overall, maximum hyperspace range increases slightly for heavily-laden ships, and travel duration reduces from 2-3 weeks at maximum range to approximately 1 week for a maximum range jump. - Updated both civilian and military hyperdrives to match new ship slot sizes.
- HullConfig no longer provides default slots for most types; it's assumed the ship pipeline has matured enough that ships will have manually-authored slots for all types. - Sensor slots are left automatically-defined until a further pass on sensor gameplay has been done. - Added validation messages for ships missing common slot types.
As far, the additional hyperdrive fuel tank works as intended, but i think it is a rather complicated way to fix #5914. As you can move fuel as you want to, you get, as a player, de facto one single, but now bigger fuel tank than in the original ship design. Thoughts:
|
I have completed a need hydrogen rescue mission in the master branch - works there. |
Ion/Fusion thrusters don't need oxygen. |
It is indeed a complicated way to fix 5914, however it was never intended primarily as a fix for that issue. Hyperdrive-internal fuel reservoir and fractional fuel usage has been a planned feature for multiple months, and the fix for the hyperdrive exploit is actually completely unrelated to this new feature.
This is an oversight in the current implementation, and the inability to fuel the drive with military fuel will be fixed before merge. Thanks for catching this one! As for the rest of the thoughts on hyperdrive implementation, most of those are either orthogonal to this specific PR or something we've already addressed during the design phase for this specific feature (i.e. pulling hyperfuel from the ship's main fuel tank). |
Looks like you fixed it. There may be a small secondary bug of the fuel calculations not being rerun when you switch to the galaxy map. And I'm curious if that solves the "dispersing button" but will test further and see if I run into it again. |
Ok with new code i still got this bug. Looks like sometimes with no fuel in cargo bay the button is disabled. |
I'm unable to reproduce either of those bugs with the most recent code. When testing, always make sure to start a new save - there's no guarantee that old saves from the same branch are still compatible (and/or don't contain subtle bugs due to changes in the code). |
This bug is not endemic to this particular branch. The SAR mission was written when all ships had physically improbable cargo holds that were a significant fraction of the fuel tank size; when that was changed with the equipment refactor, some stranded ships don't have enough cargo space to transfer all fuel to the target's cargo hold before refueling the fuel tank. I've fixed the issue in a commit on this branch. With the latest batch of commits, this branch should be ready for merge. I'll give it a last round of testing, rebase what I can, and if nothing crops up I'm pulling the trigger. |
- If a ship starts without atmospheric shielding, the atmo_shield_cap property will be unset.
- Instead of pulling hyperspace fuel from the cargo hold, pull it from the hyperdrive's internal tank. - This allows for fractional fuel usage in hyperspace jumps, resolving a longstanding pain point with attempting to optimize hyperspace jumps. - It's also a stepping stone towards further ship gameplay mechanics. - Allow setting fuel on a drive that is not yet installed - Fix hyperdrives not removing their fuel mass when removed - Correctly handle fractional fuel amounts when creating byproduct - Notify event listeners when fuel state changed
- Add transfer widget in 03-econ-trade to move fuel between main tank and hyperdrive tank. - Fuel purchase interface in lobby buys directly to hyperdrive; it no longer purchases to the cargo hold. - Spare hyperfuel in cargo hold must be purchased through the commodity screen.
- Updates to the sector map to render fuel as a fractional value. - Now correctly reads fuel from the hyperdrive's internal tankage, in addition to excess fuel in cargo hold. - Update hyperjump planner when hyperdrive fuel state changes.
- The 'apply' function modifies a prospective piece of equipment before it is added to a ship.
- Military drives will now only spawn on the targets of Assassination and Combat missions, as well as any other missions which spawn a GenericMercenary ship.
- Primarily useful for testing purposes, but also for players who don't feel like using the console to fix their broken hyperdrive... - Rename module to Player Debug rather than RPG and update icon to player head.
- Ensure ships are selected that have room for at least 1t of fuel. - Refuel target ship with each ton of fuel rather than waiting until all fuel has been transferred.
- Instead of putting hyperdrive fuel in the cargo hold, put the fuel in the hyperdrive. - Rename and cleanup hyperdrive-related methods to simplify the logic.
863096a
to
3860737
Compare
Nice work! I had an idea to implement a fuel computer just made a branch but might need some work on the language. Will make a pull quickly before bed. |
I haven't seen it again in a new save file so might be fixed. |
Redesigns the hyperdrive fuel use and duration-per-distance-travelled equations to implement the redesign we've discussed and accepted.
This PR also converts hyperdrives to use an internal fuel reservoir rather than pulling directly from the cargo bay, and allows transferring fuel between the main tank and the hyperdrive reservoir. This enables fractional fuel usage in jumps - no longer will jumps of differing lengths use the same amount of fuel!
As part of this effort, about 50% of the capabilities of the planned fuel management UI were implemented; the fuel management will be left at this level until we get further time (after the upcoming release) to implement the full management interface.
This PR fully implements all five sizes of hyperdrives in both military and civilian variants. Values have been assigned that "should" give decent jump ranges across the ship masses of that size, but a rigorous balance pass has not been done in interest of time.
Military drives have not been tested yet, but should function fine - I'd welcome any and all testers willing to give this branch a spin!
TODO:
Fixes #5914.
Fixes #6025.