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(equipment): add equipment for all size slots #5993

Merged
merged 11 commits into from
Jan 12, 2025

Conversation

mwerle
Copy link
Contributor

@mwerle mwerle commented Dec 7, 2024

WIP PR to add (placeholder) equipment and descriptions for all slot sizes.

Fixes #5950 , #5951

(Feel free to reserve a set of equipment, work on it, and push to this PR)


Feature creep

  • translations: add a bunch of missing weapon hardpoint translation entries

  • ships: fix fuel-scoop slot for the Sinonatrix (and Police variant) and the Mola Ramsayii; they were missing the "hardpoint":true flag on the slot, preventing it from accessing the correct translation string.

  • equipment outfitter:

    • added an optional "flavourtext" which can be supplied for equipment. This should be a longer description of the equipment. Possibly useful, but mostly for adding some background and lore into the game itself.
    • fixed showing equipment stock levels
    • added showing equipment stock levels in the equipment tab
    • added showing out-of-stock equipment items to avoid player confusion
    • added showing tech-level of equipment to aid players track down out-of-stock equipment

Thrusters

Design : https://www.notion.so/bszlrd/RCS-thrusters-1018c82e283f80a98bf5da0576472191

Adds a set of placeholder thrusters for slot sizes 1 through 5: default, improved, optimised, naval. (renamed from default, basic, medium, best) with proposed weight, volume, and price.

Each thruster improvement increases the linear and rotational thrust multipliers. Apart from weight and volume, no other statistics are currently taken into account.

TODO:

  • Current game code assumes a ship always has at least "default" thrusters installed, even if the player has sold them. Either ensure the player can't leave ship-outfitting without buying at least default thrusters, or prevent the ship from taking off/flying without thrusters.
  • Create more diversified thruster types - separate settings for delta-V, thrust, fuel/power-efficiency, etc.

Fuel scoops

DONE: added S4 and S5 fuel scoops.


Missile Racks

TODO : (Micha) Move from PR #5992 ; or merge that PR

Design: https://www.notion.so/bszlrd/Databases-1018c82e283f80d29d30e09a1f72f095

DONE: Merged the commits from #5992 here; that commit should be discarded now, unless people think it's better to keep these separate.


OPLI internal missile racks

Added S3 and S4 sizes to support the Natrix, Nerodia, and Molar Ramsayi.


@mwerle mwerle force-pushed the feat/equipment_sizes branch from 34ecd51 to f902597 Compare December 7, 2024 11:30
@mwerle mwerle force-pushed the feat/equipment_sizes branch 3 times, most recently from 737d6d4 to b40b22f Compare December 7, 2024 15:13
Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! So far everything looks good, other than a few spots where what was prototyped on Notion didn't/doesn't match the intended design.

I've left some comments / change requests on specific points, but overall I'm extremely glad to see this being worked on while I'm stuck in the mire of larger refactors.

data/modules/Equipment/Weapons.lua Show resolved Hide resolved
data/modules/Equipment/Weapons.lua Show resolved Hide resolved
data/pigui/libs/equipment-outfitter.lua Outdated Show resolved Hide resolved
data/pigui/libs/equipment-outfitter.lua Outdated Show resolved Hide resolved
data/pigui/modules/new-game-window/ship.lua Outdated Show resolved Hide resolved
data/lang/equipment-core/en.json Outdated Show resolved Hide resolved
data/lang/equipment-core/en.json Outdated Show resolved Hide resolved
@mwerle mwerle force-pushed the feat/equipment_sizes branch from b40b22f to eef88aa Compare December 7, 2024 23:29
data/lang/equipment-core/ar.json Outdated Show resolved Hide resolved
data/lang/equipment-core/en.json Outdated Show resolved Hide resolved
@sturnclaw sturnclaw self-requested a review December 27, 2024 10:13
@ollobrains

This comment was marked as off-topic.

Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything so far looks good to me! I've pushed one commit, which just integrates the display of equipment stock and tech level into the existing stats display mechanism rather than adding a new table; otherwise, so far everything looks good!

@mwerle do you plan on pushing additional changes to this PR (now that I've at long last reviewed what's here) or should this be merged and a new PR created for further equipment changes?

I plan on implementing non-empty slots in the next week or so (independent of this PR), depending on how long the reworked fuel system takes to implement.

@sturnclaw
Copy link
Member

Please accept my apologies for the long downtime - I apparently was more burnt-out after the GunManager and EquipSet v2 merges than I anticipated, hence my disappearance during most of the month of December.

@mwerle
Copy link
Contributor Author

mwerle commented Jan 9, 2025

@mwerle do you plan on pushing additional changes to this PR (now that I've at long last reviewed what's here) or should this be merged and a new PR created for further equipment changes?

I'm sorry, but since arriving in Australia I've not had a chance to look at Pioneer again. Not sure I'll get much time until I'm back in Japan (Feb10) either.. might be best to merge what we've got so far and add more later. I'll try to find some time to squash the commits in the next couple of days.

@sturnclaw
Copy link
Member

@mwerle do you plan on pushing additional changes to this PR (now that I've at long last reviewed what's here) or should this be merged and a new PR created for further equipment changes?

I'm sorry, but since arriving in Australia I've not had a chance to look at Pioneer again. Not sure I'll get much time until I'm back in Japan (Feb10) either.. might be best to merge what we've got so far and add more later. I'll try to find some time to squash the commits in the next couple of days.

That's perfectly fine, and I hope you enjoy your stay in Australia! Take all the time you need - I'm just glad the PR isn't stuck in limbo entirely 😄

A squash would be lovely; this PR addresses most of the outstanding lack-of-equipment issues, and the rest I think I can clean up over the next few weeks.

Added some missing translation strings for weapon and pylon hardpoints.

All equipment names should start with their location, then their
name/type.
The following additional information is now rendered in the equipment
card:
- equipment stock level
- equipment tech level

It should be trivial to add more equipment details to the display now,
such as weapon damage or firing rates etc.

Additionally, out-of-stock items are now rendered instead of hidden.

This allows players to see all items which are normally available at a
station instead of showing a partial list which could lead to player
confusion when they can't find a particular equipment item even at high
tech-level stations.
@mwerle mwerle force-pushed the feat/equipment_sizes branch from ae0928a to a8cc24b Compare January 11, 2025 22:07
@mwerle
Copy link
Contributor Author

mwerle commented Jan 11, 2025

That's perfectly fine, and I hope you enjoy your stay in Australia! Take all the time you need - I'm just glad the PR isn't stuck in limbo entirely 😄

Thanks, weather has been a bit meh, but overall having a great time with friends and family; good to be back for a bit.

A squash would be lovely; this PR addresses most of the outstanding lack-of-equipment issues, and the rest I think I can clean up over the next few weeks.

I did some squashing/rebasing, please let me know if I should condense this PR more or if it's ok as-is now.

@sturnclaw
Copy link
Member

If able, I'd appreciate dropping the changes to data/pigui/modules/new-game-window/ship.lua - otherwise this looks good! I'll unfortunately have to re-write the change to the stock/tech level display, as it appears that commit got dropped in the rebase, but that won't take long.

@mwerle
Copy link
Contributor Author

mwerle commented Jan 12, 2025

I can drop the changes to data/pigui/modules/new-game-window/ship.lua.

The other changes should still be there .. just that I merged all the changes to the equipment outfitter display into a single commit (26c62a2). I compared my final rebased branch to before rebasing and the code was identical, so no changes should have been dropped..?

@mwerle mwerle force-pushed the feat/equipment_sizes branch from a8cc24b to d7a3265 Compare January 12, 2025 02:19
@mwerle
Copy link
Contributor Author

mwerle commented Jan 12, 2025

I can drop the changes to data/pigui/modules/new-game-window/ship.lua.

Dropped in the latest force-push.

@sturnclaw
Copy link
Member

I pushed a commit to this branch yesterday - unless you pulled before rebasing I don't think it got included. I looked at the post-rebase diff and didn't see the changes for that commit. As I said earlier, it was mostly cleanup so no issues with recreating the commit - I don't have it locally because the tooling I used got rid of the temporary branch I checked this PR out into.

@sturnclaw
Copy link
Member

And by yesterday I mean 3 days ago with my review approval.

@mwerle
Copy link
Contributor Author

mwerle commented Jan 12, 2025

I pushed a commit to this branch yesterday - unless you pulled before rebasing I don't think it got included. I looked at the post-rebase diff and didn't see the changes for that commit. As I said earlier, it was mostly cleanup so no issues with recreating the commit - I don't have it locally because the tooling I used got rid of the temporary branch I checked this PR out into.

Oh, I see.

Hmm, I did git fetch --all before I started the rebasing work, and git push --force-with-lease, so it should have either merged the commit in or warned me. But I don't see the commit in the commit log on GitHub either..

Let me see if I can figure out a way to recover it. Alternatively you should be able to use git reflog to recover your local branch..

@mwerle
Copy link
Contributor Author

mwerle commented Jan 12, 2025

Ok, found got the commit. Let me integrate it and update the PR.. chotto matte okudasai.

sturnclaw and others added 4 commits January 12, 2025 14:01
- Use the existing equipment stats list to display stock and tech level information for each equipment item.
- Note that both the selected and equipped item must have the same prefix-order of fields in the stats array for comparison to work correctly.
Adds a set of placeholder thrusters for slot sizes 1 through 5: default,
improved, optimised, naval. (renamed from default, basic, medium, best)
with proposed weight, volume, and price.

Each thruster improvement increases the linear and rotational thrust
multipliers. Apart from weight and volume, no other statistics are
currently taken into account.

TODO:
- Current game code assumes a ship always has at least "default" thrusters
  installed, even if the player has sold them. Either ensure the player
  can't leave ship-outfitting without buying at least default thrusters,
  or prevent the ship from taking off/flying without thrusters.
- Create more diversified thruster types - separate settings for delta-V,
  thrust, fuel/power-efficiency, etc.
Make S4 and S5 fuel scoops available for purchase.
The Mola Ramsayi, Sinonatrix, and Sinonatrix (police) were missing the
"hardpoint" flag for the fuel scoop slot, preventing the slot from being
properly translated.
This is to make it consistent with the other missile rack names. Basically
the numbering scheme is LH-XY0, X: size of missile, Y: number of slots.
Tech level is the same as the tech level of the missile which can fitted
into the missile rack.

Price is calculated as the base price of the "111" rack, which is 150,
multiplied by the tech-level multiplier (1, 2.5, 3), and multiplied by
the number of slots.
Ships like the AC33 Dropstar have slots sizes up to 5 for missile racks,
so let's add equipment up to that slot size.

After discussion, use "Hydri Defense" as the manufacturer name for
missile rails and racks, with the following model names:
- Cnida - single-missile rails
- Hydra - dual-missile racks
- Medusa - quad-missile raccks

For the OPLI internal missile racks, add the missing S4 and S4 sizes.
Missile capacities were taken from comments in the ship definitions and
discussion with sturnclaw; specifically:
- the S3 opli_internal missile bay for the Natrix and Nerodia should
  hold 3x S3 missiles.
- the S4 opli_internal missile bay for the Mola Ramsayi is not
  finalised, but use 5x S3 and 3x S2 for a start. Ignore the comment in
  the ship definition.

Other statistics (volume, mass, price) made up on the spot and may need
reviewing during playtesting/balancing.
Add descriptions and flavour text for missiles and missile racks.

NOTE: The descriptions are also used for the tooltips. The flavour text
is optional additional text which is displayed in the equipment
outfitter.
It is no longer true that a passenger cabin is only for a single
passenger.
@mwerle mwerle force-pushed the feat/equipment_sizes branch from d7a3265 to cccf9d8 Compare January 12, 2025 05:17
@mwerle
Copy link
Contributor Author

mwerle commented Jan 12, 2025

Ok, added your commit back in and it appears to work.

Somewhat confused why it just got silently dropped - the "git push force-with-lease" -should- have warned me.. but "git reflog" to the rescue. Git really is an amazing tool..

@sturnclaw
Copy link
Member

Thanks! That's one less task on the "to do before release" pile. Will give this a whirl tomorrow and likely merge if no issues arise. Thanks for the work!

@sturnclaw sturnclaw marked this pull request as ready for review January 12, 2025 09:58
@sturnclaw sturnclaw merged commit fa7567e into pioneerspacesim:master Jan 12, 2025
@sturnclaw
Copy link
Member

Merged - thanks!

@mwerle mwerle deleted the feat/equipment_sizes branch January 12, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Equip-v2 : need equipment of all sizes
3 participants