Skip to content

feat: mods can fit blind fire and spectral shields to any ship type - #1571

Open
zabka14 wants to merge 2 commits into
OpenReliant:mainfrom
zabka14:feat/ship-type-blind-fire
Open

zabka14 wants to merge 2 commits into
OpenReliant:mainfrom
zabka14:feat/ship-type-blind-fire

Conversation

@zabka14

@zabka14 zabka14 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

The game fits blind fire to six of the twelve ships the player flies, and spectral shields to four, and those lists were fixed in the code. A mod could only change them for a ship type of its own, through its manifest's BlindFire and SpectralShields keys. Load scripts can now change them for any ship type.

  • A ship type's record in records.ship_types has two new fields, blind_fire and spectral_shields. They start as the game has them (create.Specials.original). A mod's type starts with its base's, or with what its BlindFire and SpectralShields keys give.
  • The tables carry both to each new object as one pair (Stats.specials, Slot.specials).
  • main.fittedShip is the only way to get the player's ship: the Kamov in mission 25's first part, or else the ship with the specials its records give. cockpitShip is gone. The mission's start, the client's cockpit, the network frame, the host's arena and its participant binding all use it.
  • The loadout lists both with the ship's specials (tables.fitSpecials).
  • What blind fire aims doesn't change: the fighters' guns, not the Nova Cannon or the turrets' guns.
  • Docs: the fields in scripting.md, an Improvement note in docs/engine/hud.md, the keys in modding.md, and the definitions.

Tests: the openreliant library and scripting tests pass locally. The openreliant program's tests need the transport, so CI runs them.

The mod that uses it, Alliance Blind Fire, is a pull request on openreliant-mods.

Closes #1580

@vdmkenny vdmkenny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

An LLM wrote this review. I directed it, read it and approved it.

Thanks, blind_fire on the ship type records fits well beside landing and cloaking_parts.

1. Spectral shields too. The manifest's BlindFire and SpectralShields keys go together, and the loadout lists both as specials. Please add spectral_shields to the records the same way, so scripts can change both.

2. One place for the fitted ship. cockpitShip still returns the original's blind fire, and only fittedShip applies the record, so a later caller of cockpitShip would miss a mod's change. Please have one function that always gives the ship as its records fit it.

3. Issue and rebase. Please open an issue for it, add Closes #N to the body, and rebase on main.

The game fits blind fire to six of the twelve ships the player flies,
and that list was fixed in the code. A mod could only change it for a
ship type of its own, through its manifest's BlindFire key.

- A ship type's record in records.ship_types has a new field,
  blind_fire. It starts as the game has it (main.originalBlindFire), and
  a mod's type starts with its base's or the one its BlindFire key gives.
- The tables carry it to each new object (Stats.blind_fire,
  Slot.blind_fire), and the mission's start fits it from there
  (main.fittedShip), on the host and in the network frame too.
- The loadout lists it with the ship's specials (tables.fitBlindFire).
- Blind fire still aims only the fighters' guns, not the Nova Cannon or
  the turrets' guns.
- Docs: the field in scripting.md, an Improvement note in hud.md, the
  BlindFire key in modding.md, and the definitions.
…n fits the ship

The manifest's BlindFire and SpectralShields keys go together, and the
loadout lists both as specials, so scripts should be able to change both.

- Ship type records get spectral_shields beside blind_fire. The tables
  and the objects carry both as one pair (create.Specials), which starts
  as the game has it (Specials.original).
- main.fittedShip is now the only way to get the player's ship: the
  Kamov in mission 25's first part, or else the ship with the specials
  its records give. cockpitShip is gone, so no caller can miss a mod's
  change. The client's cockpit and the host's participant binding use it
  too.
- The loadout fits both specials (tables.fitSpecials).
@zabka14
zabka14 force-pushed the feat/ship-type-blind-fire branch from 3ac66d8 to ad4f8f2 Compare November 29, 2026 01:21
@zabka14 zabka14 changed the title feat: mods can fit blind fire to any ship type feat: mods can fit blind fire and spectral shields to any ship type Nov 29, 2026
@zabka14
zabka14 requested a review from vdmkenny November 29, 2026 01:40

This branch has not been deployed

No deployments
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.

Mods can fit blind fire and spectral shields to any ship type

2 participants