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

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from

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
@@ -546,14 +546,14 @@ function ShipEquip:getHyperDriveClass()
return 0
end

-- returns 0..3 representing default to naval
function ShipEquip:getThrusterUpgradeLevel()
Copy link
Member

Choose a reason for hiding this comment

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

Note: @Gliese852 is working on converting the new-game-window to use the new equipment system in a separate branch and this may cause merge conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I only uncommented what was there already.. but I can revert this. Looks like it's not used anywhere at present anyway.

Trying to debug why the ship could still fly even when I changed all the formula so that missing thrusters gave a multiplier of 0 instead of 1 - turned out that this code is completely unused, and most of the LUA-side is only for displaying data; the real magic is in the C++..

Copy link
Member

Choose a reason for hiding this comment

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

Yep - if you've not already found it, this is handled in Ship::UpdateEquipStats() and Propulsion:SetThrustPowerMult() in C++.

},
"MISSILE_RACK_341_FLAVOURTEXT": {
"description": "Equipment description",
"message": "This one is a real beauty, coming straight to you from the R&D labs at Hydri. We've squeezed even more missiles into this rack to allow you to really make some fireworks!"
Copy link
Member

Choose a reason for hiding this comment

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

I had originally intended Hydri to be a brand name similar to the 'Tacoma' in Toyota Tacoma (with the actual manufacturer as-yet undefined), but this is fine. I've added Hydri Defense as a manufacturer - feel free to update the descriptions as makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were only placeholder suggestions; I was tired and got a bit silly.. don't let me influence the lore direction!

That said, it would be kinda nifty if we could have different manufacturers with perhaps slightly different specs for each piece of equipment, with different manufacturers being more or less popular in different regions of space. Might be an awful lot of effort for negligible gain though..

Copy link
Member

@sturnclaw sturnclaw Dec 8, 2024

Choose a reason for hiding this comment

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

That said, it would be kinda nifty if we could have different manufacturers with perhaps slightly different specs for each piece of equipment,

I do agree with this, and it's a direction we've at least sketched out on the Manufacturers page of Notion. However, I think it doesn't make a whole lot of sense to go that route for certain specific types of equipment, like these adapters - it's a lot of work to make extra items, and it's very easy to accidentally create a "local minima" where one specific piece of equipment / manufacturer is always chosen and the rest are ignored.

},
"MISSILE_RAIL_S1_FLAVOURTEXT": {
"description": "Equipment description",
"message": "A quality external missile rail for S1 missiles of all types, brought to you by Cnida."
Copy link
Member

Choose a reason for hiding this comment

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

Hydri and Cnida were both meant to share the same naming scheme (Hydra -> Hydri, Cnidaria -> Cnida) - I would consider both lines of missile racks to be designed/owned by Hydri Defense (see Notion), but perhaps the Cnida line is produced by a subsidiary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see; I misunderstood and thought they were different manufacturers, not different product lines by the same manufacturer. Hence the very different tone in descriptions.

From last night, you mentioned Norwegian Kongsberg as the missile manufacturer? So they're the brand, with Cnida and Hydri being product lines?

ie:
"Norwegian Kongsberg is proud to introduce the Cnida range of missile rails for a compact mounting solution for all of your missile needs. The Cnida S1 supports all S1 missiles manufactured to ISAAEEE standards such as the ubiquitous R40 range of rockets."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

.. and I just realised Kongsberg is a real defence manufacturer, not an in-game one... don't confuse me like that! Lol

Copy link
Member

Choose a reason for hiding this comment

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

I see; I misunderstood and thought they were different manufacturers, not different product lines by the same manufacturer. Hence the very different tone in descriptions.

I am open to making them different manufacturers - though I'd likely want to have Cnida be the brand/product name rather than the manufacturer's name (as otherwise the product name becomes "102 Missile Rail"... which seems more like a street in Britain than a high-tech piece of military hardware).

From last night, you mentioned Norwegian Kongsberg as the missile manufacturer?

That would have been @impaktor rather than myself ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am open to making them different manufacturers

No; I'll tweak the descriptions. That said, did you choose "Hydri Defense" based on my misinterpretation? Might be slightly clearer if the product name and manufacturer name were not the same.. unfortunately I am incredibly bad at making up names so no suggestions here.

Otherwise:
"The Hydri LH-542 missile rack, by Hydri Defense, ..."

As for model-names, how about:

  • Cnida - single-missile rails
  • Hydra - dual-missile racks (Renaming Hydri -> Hydra here would resolve the manufacturer/model ambiguity)
  • Medusa - quad-missile racks

?

Copy link
Member

Choose a reason for hiding this comment

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

Now that you mention the name, I am kind of thinking of "Medusa" for an unguided rocket launcher (20+ rockets per launcher), and perhaps "Gorgon" for a beam laser of some sort (or maybe a heavy mining laser).

The idea of the "Hydra" missile rack was meant for all of the multi-missile launchers to differentiate it from the direct rail->missile adapter (being a pun on the multiple-missiles-per-hardpoint thing) - though I'm fine with "Hydra" for 2-missile rails and "Medusa" for 4-missile rails.

mwerle added 19 commits December 8, 2024 07:44
Added some missing translation strings for weapon and pylon hardpoints.
Most of the code was already there, but the actual stock level was never
set for the rendering code to display.
As well as on the equipment item card, render the stock level in the
equipment details tab as well to make it more obvious.

There's potential for rendering more information about the equipment as
well, such as Tech Level, to make it easier for the player to search for
out-of-stock equipment, for example.
Might help players track down out-of-stock items in other nearby stations.
Could potentially be rendered in the card itself as well, next to the slot
size.
To avoid player confusion, show out-of-stock items as well, but don't
make them available to purchase.

This allows players to see all items which are normally available at a
station instead of showing a partial list leading to player frustration
when they can't find a particular equipment item even at high tech-level
stations.
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.
Added initial descriptions for missiles and missile racks to show up in
the equipment outfitter.

NOTE: These descriptions are also used for the tooltips.
Have a separate optional "_TOOLTIP" string which can be localised in
addition to the "_DESCRIPTION" string. The "_TOOLTIP" is now used for
the tooltip and as a heading for the longer description, while the
description is used for a longer flavour text.
While my OCD prefers "_TOOLTIP", it would mean rewriting all of the
existing descriptions more or less rightaway. While they will likely be
rewritten at some point anyway, it is just easier to stay with
"_DESCRIPTION" for the tooltip/brief description, and add "_FLAVOURTEXT"
for the optional expanded description for equipment items.
Add the missing OPLI internal missile racks for S3 and S4. Number and
types of missiles taken from descriptions in the relevant ship
definitions.

Other statistics (volume, mass, price) made up on the spot.
Feedback from sturnclaw:
- 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.
The "count" field is already defined in the parent class EquipCard.
@mwerle mwerle force-pushed the feat/equipment_sizes branch from b40b22f to eef88aa Compare December 7, 2024 23:29
All equipment names should start with their location, then their
name/type.
It is no longer true that a passenger cabin is only for a single
passenger.
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
data/lang/equipment-core/ar.json Outdated Show resolved Hide resolved
data/lang/equipment-core/en.json Outdated Show resolved Hide resolved
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
2 participants