Skip to content

feat: mods and missions choose which ships the player can land on - #1341

Merged
vdmkenny merged 1 commit into
mainfrom
feat/marked-landings
Oct 29, 2026
Merged

vdmkenny merged 1 commit into
mainfrom
feat/marked-landings

Conversation

@vdmkenny

Copy link
Copy Markdown
Collaborator

The player's ship now lands only on a ship that offers a landing. The game's types keep the game's rules: the Reliant and the Yamato offer theirs, and no other type offers one, so the original campaign lands as before.

  • ShipTypeRecord.landing holds the landing a type offers: reliant, yamato, bay, badanov, or nil for none. Load scripts change it, and a mod's [ShipType] section gives it with Landing=. Without the key, a mod's type takes its base's landing where it keeps its base's model, and none otherwise. Where a carrier's model lacks what its landing needs, such as the Reliant's launch tube or a bay's launch points, nothing lands on it and the log says so.
  • A mission's script can open or close a landing on one ship (object.landing), and choose the ship PERMISSION TO LAND asks (world.player_carrier, world.set_player_carrier).
  • Every Land order follows the rule: PERMISSION TO LAND's, a mission's SetAI and the friendly fire's sending home.
  • A permission_to_land hook, so that a mod can answer PERMISSION TO LAND its own way.
  • A landing in the Badanov's and the Krasny's bay. It shares the hangar bay's landing and comes to rest where the Badanov's launch sets a ship (launch.badanov.gatePlace).
  • The landings move into ailand/reliant.zig, ailand/yamato.zig and ailand/bay.zig, as the launches are under launch/, and share their common steps in ailand.zig.

There is no --original switch: this changes how the game plays, not how it looks.

A change from #1192: a hangar bay carrier such as the Victorious, and a mod's carrier with a model of its own, no longer take the player's ship by default. A mod's carrier needs Landing=bay, or a script gives it the landing.

Checked: the tests, make check-missions, and a tick-by-tick hash of the game's state against main in missions 1, 2, 18, 20 and 30, each through a full landing (PERMISSION TO LAND pressed once the launch is over). Tried in the game with a local mod whose missions launch the player from the Badanov and the Victorious and land there.

Left:

BEGIN_COMMIT_OVERRIDE
feat: mods and missions choose which ships the player can land on (#758)
feat: the player's ship can land in the Badanov's and the Krasny's bay
feat: scripts can hook PERMISSION TO LAND and choose the player's carrier
END_COMMIT_OVERRIDE

Closes #758

Since #1192, the player's ship could land on any carrier that ships launch
from, apart from the Badanov, so a mission couldn't keep the player off a
carrier or plan its own landings. A ship type's record now says which landing
the type offers. The game's types keep the original's rule, the Reliant and
the Yamato only, so the campaign plays as before. Mods and missions give other
carriers a landing through the records, a mod's ship types and scripts.

The landings move into modules of their own, as the launches did, and the
Badanov's bay gets a landing that reuses the hangar bay's.

Closes #758
@vdmkenny
vdmkenny merged commit a5da736 into main Oct 29, 2026
4 checks passed
@vdmkenny
vdmkenny deleted the feat/marked-landings branch October 29, 2026 22:33
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.

Landings only on ships marked for them, mod carriers included

1 participant