Skip to content

feat: Skip Capital Ships, TARGET NEAREST ENEMY without the capital ships - #66

Merged
vdmkenny merged 1 commit into
OpenReliant:mainfrom
zabka14:feat/nearest-fighter
Oct 13, 2026
Merged

vdmkenny merged 1 commit into
OpenReliant:mainfrom
zabka14:feat/nearest-fighter

Conversation

@zabka14

@zabka14 zabka14 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

A gameplay mod: TARGET NEAREST ENEMY skips the capital ships. The game's key takes the nearest hostile ship of any class (nearest in hud.zig), so a capital ship alongside the player wins over the fighter or the torpedo just behind it. With the mod, the key takes the nearest hostile fighter, torpedo, mine or anything else within the key's own reach, and settles for a capital ship only when nothing else is in reach, so a lone capital ship can still be targeted.

Two scripts, as player scripts can't change the game: nearest.luau (player) hears the key on Player Control from the cockpit or the chase view and sends an event; retarget.luau (global) picks the nearest wanted hostile and calls world.set_player_target, skipping any the player can't aim at. The event lands at the next update, so the game's choice shows for a frame at most before the mod's replaces it.

Checked in the Sandbox with the player moved beside the Badanov: with the Badanov the nearest hostile at 22,965 and the Sabres from 51,225, the target after the event is the nearest Sabre. The mod packs with sltool hog pack (5 members, 5.4 KiB). MPL 2.0, with an original 320x240 thumbnail. Needs OpenReliant 0.12.

Generated with an LLM

A gameplay mod: the key takes the nearest hostile fighter, torpedo, mine or anything else, and
settles for a capital ship only when nothing else is in reach. Its player script hears the key
and sends an event, and its global script picks the target.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vdmkenny
vdmkenny merged commit 809f2d0 into OpenReliant:main Oct 13, 2026
1 check passed
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.

2 participants