Repository navigation
feat: Skip Capital Ships, TARGET NEAREST ENEMY without the capital ships - #66
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A gameplay mod: TARGET NEAREST ENEMY skips the capital ships. The game's key takes the nearest hostile ship of any class (
nearestin 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 callsworld.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