Skip to content
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

Feat(data): Implement Engine Slot system in Delta #46

Merged

Conversation

Zitchas
Copy link
Member

@Zitchas Zitchas commented Apr 2, 2024

Content / Balance

Summary

Manoeuvrability and propulsion is a source of a lot of problems in Endless Sky. As currently implemented, propulsion systems are basically a liquid that is poured into the available engine space, with as many systems as can fit being shoved in, in whatever combination is desired, generally with a goal to fill up the available engine space. This makes it hard to differentiate ships, hard to differentiate propulsion systems, substantially advantages larger ships over small ones, promotes afterburner abuse, and contributes to the current meta of "bigger is always better, in every way" since it is common for bigger ships to be able to out manoeuvre smaller ships.

Note: this is purely implemented in data. There are no code changes.

Problems targeted

  1. There is a general (although not universal) agreement that small ships need a purpose, and need some sort of advantage versus larger ships. A common sentiment is that - at least within use categories - small ships should be generally faster and more manoeuvrable than larger ships. However, since ships can equip as many thrusters as they have space for, larger thrusters have greater thrust/space density because if they didn't, large ships would just fill the space with small thrusters instead. Bigger has to be better otherwise there is no reason to use the bigger options.
  2. Since all outfits can be installed in any quantity anywhere, all have to be balanced as if a ship may well have dozens of them, which makes it challenging to give individual thrusters meaningful benefits, and almost impossible to give small thrusters meaningful side benefits, since they have to be balanced against the possibility of being extensively stacked.
  3. Given that afterburners currently are just stand alone outfits, players can install them instead of thrusters. This means that afterburners have to be balanced not as occasional use boosts, but rather as potentially constant-use thrusters-with-a-fuel-cost. While thrusters-with-fuel-cost is a perfectly valid thing that some family of thrusters should have, it's not what afterburners are or should be. This potential use results in afterburners needing to be balanced for a situation that shouldn't logically be happening. It's built right into the name. After burners. By definition, they aren't afterburners if there is no initial burning. (leaving aside that none of our thrusters are actually burning anything...)

Details

This implements a slot system on all ships. Namely, as a general rule, every ship gets the following slots:

  • 1 reverse thruster slot
  • 1 steering slot
  • 1 thruster slot

Then, as a general rule, all thrusters are consume 1 thruster slot and provide 1 afterburner slot, all steering consume 1 steering slot, all reverse thrusters consume 1 reverse thruster slot, and all afterburners consume 1 afterburner slot.

The exception is Coalition outfits. Some descriptive elements have emphasized their philosophy of modularity. This has doubled down on that, by having the coalition small modules only take 0.25 of the appropriate slot; and coalition ships get 1.5 slots. The large module has been adjusted slightly to be exactly 3 small modules in a framework that only takes 0.5 slots. This means that coalition ships can effectively have anywhere from 1 to 9 small modules worth of modules of a particular type. Yes, each module gives 1 afterburner, so a degree of afterburner abuse is still possible if one opts to go with 4 small modules, but it significantly reduces the magnitude of the problem. Given that large modules only give 1 afterburner slot, and take up slightly more space than 3 small modules, if a ship is only using 3 it is better to just use 3 small modules instead. Not by much, but a bit. The only advantage it gains is the fact that it saves 0.25 worth of slot per trio of modules. (on a per thrust basis, small and large modules are identical in terms of energy and heat production). This gives Coalition modules a strong and unique advantage of being massively more capable of utilizing every last ton of space, at appropriate cost. Where other factions have to pick one of typically a trio of sizes according to the space available, the coalition just fills it all (rather like the current method).

This is intended to be something of a model for other engine families where smaller engines have noticeable and potentially significant advantages over larger ones, including specifically in the primary metric of thrust per space. The primary advantage of a larger engine is that it provides more total thrust. For most ships with a single slot, it doesn't matter if the tiny engine has twice the thrust/space of the bigger engine, if they have the space for the bigger engine and it provides double the total thrust of the smaller one. Likewise, this provides an opportunity to take a hard look at engine families and their benefits.

For instance, a medium plasma thruster might be smaller but somewhat higher efficiency than the medium ionic. This would provide an upgrade route with the one replacing the other for maybe no gain in total thrust, but a gain in space. However, since they both take up 1 slot, that extra space isn't going to be available to stack up an additional tiny thruster. This allows for potentially allowing greater flexibility in engines and their performance, and potential upgrade options since we don't have to worry about an upgrade saving too much space and allowing an additional thruster to be stacked in there.

It is anticipated that some ships may be identified as being designed for a specific use case. For instance, the Flivver mentions speed, and sounds like a racing ship. It could have an extra thruster slot, giving it an additional measure of flexibility in optimizing its thrust. Since slots are in addition to engine space, not replacing it, this doesn't give the Flivver additional thrust directly, it just makes it easier to make full use of it. Likewise, another ship might be build for agility rather than speed, and it could have an extra turning slot, with the same impact of making it easier to optimize its turning. This could allow content creators to give ships a bit more character; rather than the current system where we only get to pick between "Fast in every way" or "slow in every way", with a hull of a ship built to be a drag racer looking functionally identical to a ship built for acrobatics. This would allow players to retain the freedom to ignore that, as they already do, but impose a gentle restriction in making it easier to customize the ship in the direction it is designed for.

Potential additional changes or follow-up work

  • Balance engines within this context.
  • Identify ships designed for speed or agility.

Usage examples

Values can be any number, including decimals. These are positive where a slot is being provided (usually on ships), and negative where they are being filled up (usually on outfits).

"reverse thruster slot" 1
"steering slot" 1
"thruster slot" 1
"afterburner slot" 1

Testing Done

Played the game and tired outfitting ships.

Save File

Any pilot, any time, with any ship purchased while this PR is active.

Performance Impact

N/a

Zitchas added 3 commits April 1, 2024 08:52
Done all outfits, and up to Pug on the ships.
- Coalition ships all get 1.5 thruster and 1.5 steering slots.
- Small modules take 0.25
- large modules take 0.5 but are explicitly equivalent to 3 small modules. So coalition ships can effectively have 1-9 modules.
- Noted the slot requirements in the outfitter help text.
@Zitchas Zitchas added the balance label Apr 2, 2024
Zitchas added 4 commits April 6, 2024 06:04
This adds code so that the various kinds of engine slots are displayed in the ship info. It will also give specific warnings if the player tries to install something they don't have a slot for.
White space at ends of line, lines too long.
Adds code to show slots, and replaces afterburner slot with propulsion accessory slot.
@Zitchas
Copy link
Member Author

Zitchas commented Apr 6, 2024

Code style things should be fixed now...

But it is also now actually noticing and documenting all the illegal outfitting. That'll be up next on my fix list.

Zitchas added 2 commits April 7, 2024 07:02
All instances of removed thrusters, steering, or afterburners will be commented so I can track where they are. Extra stand alone thrusters are just commented out. Ex, if a ship has a large thruster and a small thruster, I'll comment out the small thruster.l

The 'olofez (world-ship) was an oddity, not entirely sure of its role as an HD capable fighter. Clever build, makes me wish that the Korath had a smaller power generator (<=9 tons. Perhaps a solar? Given their proximity to the core, the Korath having at least one solar panel would be appropriate...

Important note: This is not the end state. I'll be going through every one of these to see if the removal of those excess thrusters was meaningful, detrimental, or contrary to lore. Likewise, there is also a general rebalance of all the thrusters and steering systems planned. So don't make any jugements based on things as they stand here. Also, this isn't all of them. There's more to go, this is just the end of the work day for this.
@Zitchas
Copy link
Member Author

Zitchas commented Apr 7, 2024

Note: this is just the "end of the workday commit", not the end-state for the PR.

All instances of removed thrusters, steering, or afterburners will be commented so I can track where they are. Extra stand alone thrusters are just commented out. Ex, if a ship has a large thruster and a small thruster, I'll comment out the small thruster.

The 'olofez (world-ship) was an oddity, not entirely sure of its role as an HD capable fighter. Clever build, makes me wish that the Korath had a smaller power generator (<=9 tons. Perhaps a solar? Given their proximity to the core, the Korath having at least one solar panel would be appropriate...

Important note: This is not the end state. I'll be going through every one of these to see if the removal of those excess thrusters was meaningful, detrimental, or contrary to lore. Likewise, there is also a general rebalance of all the thrusters and steering systems planned.

So, don't make any serious judgments based on where it stands right now. It's still going to change, probably quite a bit.

Zitchas added 4 commits April 8, 2024 07:42
As pointed out, the Ka'het are also modular. Currently just treating them the same as the Coalition.

For everyone else, continuing to adjust builds to fit the limits. Another couple days, probably, to get them all.
Fixed Stalker to reflect already occupied engine space (removed 0.25 thruster and steering; but still has the rest of the slots in case there are other uses in the future)
- fixed some more excess thrusters & steering Getting close to the end.

It's amazing how many ships have largeliy unnecessary "1 extra of the smallest thruster/steering they have" just tucked into the stock loadout as if every shipyard was a street racing junkie mechanic, and not a dealership trying to maximize profits. (not saying they are all dealerships, but certainly most in human space definitely are)
This should pretty much be the end of the "no more excess thruster" phase.

Next to verifying ships are still reasonable and balancing engines again.
Zitchas added 9 commits April 13, 2024 08:03
Hallucination, Asteroid, and vyu-Ir
Including Timer Ship, Ion Timer Ship, Nanbots, and Rescue Dummy
As part of standard station keeping, all thrusters provide reverse thrust equal to 10% of their forward thrust, with energy and heat costs equal to 10% of the normal thrust costs.

Remnant have been bumped up from 50% to 60% to maintain that edge.
Zitchas added 3 commits May 11, 2024 06:24
This is, of course, subject to adjustment. All the sections are still listed here, just commented out for now. But it fits nicely, isn't crammed, and displays all the relevant info for seeing the ship's capacities.
@Zitchas
Copy link
Member Author

Zitchas commented May 11, 2024

Alright, with all the stats working, I trimmed the hardpoint panel down to just show the stats that I think belong on this panel. Note that I haven't adjusted the right side of the panel yet.

In-progress snap-shot N Hardpoint Panel Stats close to done

Zitchas added 4 commits May 11, 2024 08:52
No, it's not actually centered. I want a bit of space at the top to display ammo counts. But yeah, much closer to center, vertically speaking.

Need to figure out how to adjust the lines because centering it horizontally doesn't work nicely.
The weapon hardpoint display sprite is now centered horizontally and close to centered vertically; and the labelbox has been expanded from 150 up to 200 width so more things should display fully.
It just looks massively better this way.
@Zitchas
Copy link
Member Author

Zitchas commented May 12, 2024

Well, changing how centerline turrets display so they don't all stack up on one side wasn't in the "To-do" list, but it certainly makes things look so much nicer. Thanks to VitalChip for suggesting it as an improvement to the panel.

Todo:

  • move functions into ship info
  • trim ship info panel to only show relevant stats
  • display ship sprite on info panel

These ship sprites and thumbnails will change color as appropriate to match the player's swizzle.
@Zitchas
Copy link
Member Author

Zitchas commented May 12, 2024

WIP Ship Info Panel D

The sprite and thumbnail will adjust based on the swizzle of the player.

Next up:

  • move functions into ship info
  • trim ship info panel to only show relevant stats

@Zitchas
Copy link
Member Author

Zitchas commented May 12, 2024

Oh, I should add a picture of what the Hardpoint info panel looks like now.

WIP Ship hardpoint display G

Note that it is centered, and the turrets lined up on the centerline now split between the two sides, so it looks much better.

Just to really exagerate it, here's an Aerie that had its turrets re-arrange and some extras added, and they're all right on the centerline:
WIP Ship hardpoint display F

Just for contrast, here's (the ship hardpoint weapon display part, at least) it would look like using vanilla's hardpoint display system:
WIP Ship hardpoint display D (rare 6 turret Aerie)

@Zitchas
Copy link
Member Author

Zitchas commented May 12, 2024

Alrighty, things are finally pretty enough to be worth looking at.

So, all the stats here have been broken down into about a dozen methods. All the stats-only methods are now located in ShipInfoDisplay, and are thus accessible wherever one might happen to want them.

For example, the ShipInfoPanel has been cleaned up to no longer be burdened by stuff that doesn't impact in-flight functionality, like all those slots and capacities.

Release - Ship Info Revamped

And here's the HardpointInfoPanel:
Release - Hardpoint Info Reavamped

I hope people like them. And as a plus, if people want to adjust things, it's now really easy to move any subset of those stats back and forth, or dump new stats in other places, or whatnot. I tried just plopping down some of them in some fairly random places on those panels, and it worked very well.

  1. In interfaces.txt create a new box, make sure it is at least 250 wide.
  2. In the appropriate panel that the box is on, at the bottom of the "Draw" calls (around L160 currently), set int infoPanelLine = 0;
  3. Then put in whichever sections of data you want to call after that, but specifying your new box locations instead of "stats"

@Zitchas
Copy link
Member Author

Zitchas commented May 13, 2024

Ammunition Displayed

I thought I posted this, but apparently not. Anyway, the Hardpoint Info tab also displays the ammunition onboard, if any. So you'll be able to see how much ammo is available for each of your hardpoints, assuming you had different kinds of launchers, that is.

@Zitchas
Copy link
Member Author

Zitchas commented May 14, 2024

Game doesn't generate any errors, I've accomplished everything I wanted to get done in this PR. Not much left to do before this gets merged and I move on to the next task for improving combat.

snip.

Removed these, as these weren't part of the engine slot change.

Adjusting the balance of mobility of ships is a larger task, deserving of its own PR (or many PRs) to adjust.

@Zitchas Zitchas merged commit 5fb3ae4 into endless-sky:experimental May 16, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants