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

Mechanics/Bugfix: better AI distancing when using artillery or explosives at short range #7552

Merged
merged 84 commits into from
Jan 27, 2023

Conversation

Hurleveur
Copy link
Member

@Hurleveur Hurleveur commented Nov 8, 2022

Feature: This PR is a repost of #6483 that I improved as much as I could.

Feature Details

Same as the original one except I consider homing weapons as artillery if their range is bigger than 500.
I also added a ramming AI personality that will continue to be as stupid as default AI was, fixed all conflicts whitespaces and style issues I could find. The safe range overwrite still can be used to make explosive non safe weapons be used as a shotgun.

AI will no longer blow itself up except if that weapon is its main source of damage and it cant use it otherwise.
It will try to make use of its range to its advantage.

I improved the caching over the other PR, by only recalculating the AI when needed (but in that case doing it straight away instead of every 2 seconds). And, cherry on cake, player escorts out of ammo will not yolo in!

UI Screenshots

N/A

Usage Examples

Ships will be smarter in general. This wont affect Pug ships because most of their dps does not come from seekers.

Testing Done

Not tested yet, but the original PR was tested a lot I think?

Automated Tests Added

I have no idea how to make automated tests of this so N/A.

Performance Impact

N/A

StuffPhotonDev and others added 28 commits January 9, 2022 18:30
Currently, the AI will gladly suicide into the splash radius of it's own weapons.
I was able to identify 2 probable causes of this:

1. MoveToAttack overriding the anti-suicide check. MoveToAttack is always ran, regardless of whether the anti-suicide check succeeds or not. this could cause MoveToAttack to override the commands issue by the anti-suicide check.

2. anti-suicide not taking into account the ship's size. currently it will ships will not turn around unless *their center* are within 1.25x of the splash radius of their weapons. but at this time they already could be damaged since splash damage is checked against the vertices of the ship.

I am new to c# programming so I might have made some very major issues. I would love for a more capable programmer to proofread these changes.
PRs to the main repo are squashed anyways.
Co-authored-by: quyykk <quyykk@protonmail.com>
As per suggested.
I think they're good
all pugs go CHAAAAAAAAAAAAARGE at you if you need to kill them (I hope)
@Hurleveur Hurleveur added the mechanics Things dealing with the mechanics & code of how the game works label Nov 8, 2022
source/Ship.cpp Outdated Show resolved Hide resolved
source/AI.cpp Outdated Show resolved Hide resolved
Hurleveur and others added 3 commits January 26, 2023 08:56
Co-authored-by: Amazinite <jsteck2000@gmail.com>
Co-authored-by: Amazinite <jsteck2000@gmail.com>
source/AI.cpp Outdated Show resolved Hide resolved
source/ship/ShipAICache.h Outdated Show resolved Hide resolved
source/ship/ShipAICache.cpp Outdated Show resolved Hide resolved
source/ship/ShipAICache.h Outdated Show resolved Hide resolved
source/Ship.cpp Outdated Show resolved Hide resolved
source/Engine.cpp Outdated Show resolved Hide resolved
source/Ship.h Outdated Show resolved Hide resolved
source/AI.cpp Outdated
@@ -2904,7 +2920,7 @@ Point AI::TargetAim(const Ship &ship, const Body &target)
result += p.Unit() * abs(damage);
}

return result ? result : target.Position() - ship.Position();
return result ? result : ship.Position() - target.Position();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why's this flipped? (Not saying it's wrong, just curious.)

Copy link
Member Author

@Hurleveur Hurleveur Jan 26, 2023

Choose a reason for hiding this comment

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

No idea I didnt do this
I'll cancel it tbh

Copy link
Collaborator

@Amazinite Amazinite Jan 26, 2023

Choose a reason for hiding this comment

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

I'll dig into it and figure out why it might have been flipped. My first guess is that normally we get a result and so that gets used and we don't notice any odd behavior, but in the cases where we have no result, target - ship might be the wrong direction to aim. StuffPhoton might've spotted that and flipped it.

Copy link
Member Author

@Hurleveur Hurleveur Jan 26, 2023

Choose a reason for hiding this comment

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

I have seen AI use meteors aimed at the other direction tbf
but that bug was reported within this PR too so idk what to think
just tested a basegame ship with seekers it seems to aim right at the enemy so all good?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That seems like a separate issue: #6024

Copy link
Member Author

@Hurleveur Hurleveur Jan 26, 2023

Choose a reason for hiding this comment

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

I just did a quick testing with a ship using only seekers and it was able to aim correctly (but wasnt running away), so mb its because Photon wanted the AI to aim the opposite of the ships in general though, to run away when using homing/turreted weapons?
prob makes sense actually

Copy link
Collaborator

Choose a reason for hiding this comment

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

No idea I didnt do this

The changes to this line were actually all on you. :james:

Commit from December 21st:

fix logic issue? ships would aim at the opposite of where the target is and not at the target

Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment on the TargetAim function above this one:

// Get a vector giving the direction this ship should aim in in order to do
// maximum damaged to a target at the given position with its non-turret,
// non-homing weapons. If the ship has no non-homing weapons, this just
// returns the direction to the target.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I remember now, I changed it when smbd told me of the meteor bug, thinking it could fix it xD

@RisingLeaf
Copy link
Contributor

It looks like alsa under ubuntu is broken

@Hurleveur
Copy link
Member Author

Hurleveur commented Jan 26, 2023

Yeah only one of the 3 integration tests does anything I said it a few times on the discord but nobody cares

edit: also I added some safeties so we dont get segfaults when the functions are badly used

source/ship/ShipAICache.cpp Show resolved Hide resolved
source/Ship.cpp Outdated Show resolved Hide resolved
Co-authored-by: Amazinite <jsteck2000@gmail.com>
@Amazinite Amazinite merged commit 9e55973 into endless-sky:master Jan 27, 2023
@Hurleveur Hurleveur deleted the ai-range-aware branch January 27, 2023 07:13
Aszutai added a commit to Aszutai/endless-sky that referenced this pull request Mar 29, 2023
* feat(content): Adjust Firelight description (endless-sky#8153)

* fix(ci): Actually build an AppImage in CD (endless-sky#8182)

* feat(enhancement): Conditional starts expansion (endless-sky#8035)

* fix(content): Raven has too many torpedos (endless-sky#8186)

* feat(content): Shorten descriptions for brig & luxury jobs (endless-sky#8169)

* fix(typo): Fix hex-based scientific notation (endless-sky#8168)

* fix(typo): Fix typos in data files (endless-sky#8190)

* test(cleanup): Remove obsolete "test:" variables (endless-sky#8179)

Remove obsolete "test:" variables; those variables were once needed for debugging, but not anymore.

* feat(enhancement): Allow customizable ship landing speeds (endless-sky#7145)

* fix(AI): Secretive personality does not ignore system fence and properly runs away (endless-sky#8191)

* feat(enhancement): Provide per-system ramscoop settings (endless-sky#8046)

* fix(typo): Fix typo in human events (endless-sky#8196)

typo

* fix(content): Bug in Gegno Genocide Defense & various code comment typos. (endless-sky#8195)

* fix typo in CMakeLists.txt

* fix typo in gegno intro missions.txt

* fix typos in source code comments

* fix(content): add missing reputation changes in Wanderers: Hai Diplomat (endless-sky#8176)

fix different rep change for hai governments

* feat(integration tests): Use mission injection and improve test data names (endless-sky#8183)

* feat(balance): Sea Scorpion and Cicada tweaks (endless-sky#8193)

* fix(UI): Properly display unpark buttons with one parked ship and no flagship (endless-sky#8167)

* Enable 'unpark all' and 'unpark local' buttons when the player only has one parked ship and no flagship.
* Enable use of `k`, as indicated by the button label, to park/unpark from the ship info panel.
* Prevent a segfault when attempting to 'unpark local' with many ship but no flagship.

* feat(enhancement): Split "heroic" personality into "daring" and "hunting" (endless-sky#8117)

* split heroic into daring and ranging

* revert changes to korath.txt

* tabs instead of spaces

* ranging -> hunting

* Update source/AI.cpp

Co-authored-by: mOctave <73318970+mOctave@users.noreply.github.com>

* Apply suggestions from code review

From @RisingLeaf

Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>

* daring ships are defenders

* swap IsDaring and IsNemesis

* Fix my bad conflict resolution.

* Prevent segfault

* Fix my too many tabs

Co-authored-by: mOctave <73318970+mOctave@users.noreply.github.com>
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
Co-authored-by: warp-core <warp-core@users.noreply.github.com>

* feat(UI): Send random interval untranslated hail messages when the player doesn't have a governments language (endless-sky#8038)

* fix(content): Ensure late HR spuriking conversations offer in the correct order. (endless-sky#8163)

* feat(enhancement): Minables can have display names and nouns (endless-sky#8164)

* fix(data parsing): Correct government penalty loading broken by typos (endless-sky#8204)

* feat(UI): Custom wormhole arrow colors (endless-sky#7934)

Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>

* refactor(internal): Cache LocationFilter::IsEmpty (endless-sky#8162)

* feat(build): Suppress vcpkg package usage information in cmake (endless-sky#8175)

* feat(conversations): Add support for phrases in conversations (endless-sky#8166)

* fix(ui): Fix link drawing for wormholes connecting more than two systems (endless-sky#8208)

* refactor: Move CanSendHail to Ship (endless-sky#8198)

* feat(AI): Improve the AI's awareness of their own weapons (endless-sky#7552)

Ship AI now does the following:
* Improve avoidance of self-damage when using blast radius weaponry.
* Make better use of long range "artillery" weaponry.
* Try to keep a distance where their weapons will hit, but aren't barrel stuffing their target. Make use of the "ramming" personality to get behavior closer to the old behavior.

Co-authored-by: HTMLPhoton <61311312+HTMLPhoton@users.noreply.github.com>

* feat(enhancement): Boarding missions can make uncapturable ships temporarily capturable (endless-sky#7767)

* docs: Change version to 0.10.0 (endless-sky#8223)

It was decided to bless the next version as 0.10.0 instead of 0.9.17.

* fix(AI): Correct broken caching of jump navigation and weapon data (endless-sky#8224)

* fix(typo): Add a missing space in a friendly civilian hail (endless-sky#8232)

* feat(mechanics): Support "apparent payment" for "<payment>" mission text replacement (endless-sky#8229)

* feat(tests): Mute audio during integration tests (endless-sky#8234)

The mute can be overridden by passing `--nomute` alongside the `--test` argument when launching the game.

* chore: Fix build with gcc 13 by including <cstdint> (endless-sky#8235)

* feat(enhancement): Add function for proper credit string formatting (endless-sky#8236)

* test(integration): Cleanup uncapturable-override test (endless-sky#8237)

* feat(content): Give Unstable Wormholes Red Links (endless-sky#8210)

* fix(typo): Various Typos in Sheragi Archaeology and Coalition Missions (endless-sky#8233)

* fix(content): Remove Deep: TMBR 0 from active missions after receiving the next mission in the chain (endless-sky#8165)

* fix(content): Make "FW: Zug Expansion" offer correctly (endless-sky#8242)

* refactor(mechanics): Deprecate "scan speed" in favor of "scan efficiency" (endless-sky#7876)

* feat(content): Prevent Ka'het sending random interval hails (endless-sky#8213)

* feat(mechanics): Add <npc model> text replacement for missions (endless-sky#7176)

* test(content-style): Expanded CI data file style check (endless-sky#8189)

* feat(UI): Separate trade commodity profit and price level into two columns (endless-sky#8028)

Co-authored-by: warp-core <warp-core@users.noreply.github.com>

* feat(UI): Improve display of of requirements to install an outfit(endless-sky#6963)

* feat(content): Rulei contact conversations (endless-sky#7995)

* feat(mechanics): Returns auto aim only when firing as an option (endless-sky#7560)

* feat(integration tests): Disable "Ira Contact" mission for integration tests (endless-sky#8248)

* fix(typo): Fix capitalization of Syndicate in HR (endless-sky#8253)

* fix(content): Add missing default text substitution to Tripulse Shredder mission (endless-sky#8261)

* feat(UI): Additional zoom levels (endless-sky#8081)

* Also adjusted the status overlay hull ring when zoomed out very far.

Co-authored-by: warp-core <warp-core@users.noreply.github.com>

* feat(content): Give more specific details in Cognizance 28 description (endless-sky#7591)

* feat(content): Ember Waste & Remnant Ramscoop Changes (endless-sky#8201)

* feat(content): Narrative change when first offered the Emerald Sword (endless-sky#8251)

* feat(enhancement): List outfit cost & requirements above attributes & weapon data (endless-sky#8263)

* fix(code style): Correctly order includes in Panel.cpp alphabetically (endless-sky#8267)

Only consider the file name, not the path.

* feat(content): Unfettered shipyards sell different variants (endless-sky#8262)

Co-authored-by: Hurleveur <94366726+Hurleveur@users.noreply.github.com>

* chore(ci): Miscellaneous CI cleanup and fixes (endless-sky#8241)

* feat(UI): Added option for firing primary weapons and rotating the ship with mouse (endless-sky#6936)

* feat: Add a preference to increase previous save count (endless-sky#8245)

* refactor: Some PrintData refactoring (endless-sky#8270)

* feat(ui): Hide storage on planets without outfitters (endless-sky#8215)

* docs: Emphasising CMake in Readme (endless-sky#8238)

* feat(ui): Separate colors for various targetting colors (endless-sky#8097)

* feat(AI): Skip using RendezvousTime with beam weapon turrets (endless-sky#7168)

* feat(content): Add ambient sounds to appropriate stations (endless-sky#8143)

* feat(sound): Bay Launch Sounds (endless-sky#7933)

* fix(typo): Correct auto-pilot to autopilot (endless-sky#8285)

* feat(content): Gegno hand to hand outfits and some small adjustments (endless-sky#8147)

* feat(UI): Change message for attempting to land on unlandable planets or moons (endless-sky#8209)

* feat(content): Adds more attributes to human planets & new forest attribute jobs (endless-sky#8142)

* fix(typo): Fix typo in color name (endless-sky#8290)

* Revert "feat(UI): Additional zoom levels (endless-sky#8081)" (endless-sky#8281)

* feat(content): Remove "Wandering Nightmares" mission (endless-sky#8294)

* build(cmake): Small CMake tweaks (endless-sky#8289)

* fix(ci): Fix jobs running when they shouldn't (endless-sky#8302)

* ci: New ES release process that simplifies the existing one (endless-sky#8301)

This changes the release process in such a way that it now requires pushing the new version tag manually to the repo to trigger the release workflow that builds all the assets. The workflow will create a draft release, which can be published once the workflow finished uploading all the assets.

* feat(content): Give the "Cruiser (Jump)" a Catalytic Ramscoop (endless-sky#8284)

* fix(conversations): Fix displaying wrong text with conditionally displayed choices (endless-sky#8291)

* fix(typo): Fix capitalization of some outfit names (endless-sky#8278)

* fix(AI): Carryable ships do not choose targets to plunder (endless-sky#8305)

* fix(UI): Flicker name entry field on invalid inputs (endless-sky#5717)

* chore: Remove old mission and event marked for deletion (endless-sky#8300)

* fix(content): Do not offer Hai Reveal election coverage after the election is over (endless-sky#8280)

* fix(content): Ensure each HR5 path blocks the other (endless-sky#8306)

* refactor: Handle scrambling damage alongside other unique damage types, not DoTs (endless-sky#8321)

* feat(balance): Nerf the Value Detector (endless-sky#8318)

* feat(content): Purging two swears from Remnant content (endless-sky#8269)

* fix(typo): Add a missing word in Quarg Satellites mission (endless-sky#8328)

* feat(UI): Add support for hold to mouse turn (endless-sky#8310)

* feat(UI): Option to hide asteroid scanner overlay for untargeted minables (endless-sky#8307)

* fix(typo): Typo in Ballistic Cannon Turret description (endless-sky#8333)

* feat(content): Adjust wording in Hai Rescue: Gipeep (endless-sky#8327)

* fix(conversation): Use a PlayerInfo transaction to prevent saving state from mid-conversation (endless-sky#7751)


Co-authored-by: UnorderedSigh <116329264+UnorderedSigh@users.noreply.github.com>
Co-authored-by: warp-core <warp-core@users.noreply.github.com>

* feat(ai): Check if a ship has the means to run from its target (endless-sky#8296)

Don't let the AI try to run away from targets that are faster than them.

* feat(settings): Default to "fast" parallax for performance (endless-sky#8341)

* feat(mouse control): Reduce precision when turning towards the cursor to avoid constant corrections (endless-sky#8304)

* feat(content): Some small improvement to Hai Reveal (endless-sky#8243)

* fix(AI): Plundering ships will not consider plundering ships they've already boarded (endless-sky#8346)

* feat(content): Improve Dangerous Games riddle display (endless-sky#8347)

* fix(content): Correct "Hai Wormhole Warning" offer conditions (endless-sky#8342)

* fix(UI): Carried ships that can't assist the player no longer offer to when hailed (endless-sky#8360)


Co-authored-by: tibetiroka <68112292+tibetiroka@users.noreply.github.com>

* fix(typo): Fix 'magnetic' in the description of Plasma Grenades (endless-sky#8361)


Co-authored-by: Corraban2 <66099507+Corraban2@users.noreply.github.com>

* feat(AI): Ships conducting scans will attempt to match position and velocity with their target (endless-sky#8323)

* fix(typo): Fix typos in Hai Rescue: Ooonem (endless-sky#8335)

* feat(AI): Reduce constant steering corrections when far from a the target (endless-sky#8343)

* feat(content): More improvements to Hai Reveal (endless-sky#8329)

Co-authored-by: EjoThims <JEIPH@MAC.COM>
Co-authored-by: tibetiroka <68112292+tibetiroka@users.noreply.github.com>

* fix(content): Improve Hai Reveal and Pirate Troubles integration (endless-sky#8345)

Co-authored-by: EjoThims <JEIPH@MAC.COM>

* fix(content): Shorten Paradise Job: Debtors description to fit (endless-sky#8369)

* feat(content): Make the stock Manta's weapon loadout symmetrical (endless-sky#8367)

1 Meteor Missile Launcher -> 2 Torpedo Pods

* fix(typo): Standardise "off world" and "offworld" to "off-world" (endless-sky#8352)

fix

* fix(outfit check): Correct required crew minimum value logic with "automaton" (endless-sky#8320)

Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>

* feat(UI): Mouse hold disables mouse steering while the toggle is on (endless-sky#8362)

* refactor: Standardise the construction of "<x> tons" and "<x> tons of <cargo>" strings (endless-sky#8373)

* fix(internal): Prevent a divide by zero error in Ship::Move() (endless-sky#8368)

* fix(content): Various improvements to Hai Reveal (endless-sky#8330)

* fix(mechanics): Allow mission clearance to bypass language barriers (endless-sky#8377)

Clearance is documented as a tag you add to allow you to land on a planet you otherwise couldn't. This is always true if the clearance lacks a message, but having a message caused the hail panel to block you if you didn't have the planet's language.

* fix(typo): Correct automatic aiming preferences panel typo (endless-sky#8378)

* fix(typo): Add missing quotation mark in Wool Smuggling dialog (endless-sky#8374)

* fix(typo): Fix typo in quarg news (endless-sky#8381)

* feat(content): Give "plant2" and "large plant2" minables display names (endless-sky#8380)

* fix(typo): Fix capitalization of outfit names (stage 3) - Engines (endless-sky#8356)

* fix(typo): Fix capitalization of outfit names (stage 2) (endless-sky#8355)

* fix(typo): Fix capitalization of outfit names (stage 4) - Missiles (endless-sky#8357)

* fix(typo): Fix capitalization of outfit names (stage 7) - H2H and the most controversial outfits (endless-sky#8358)

* feat(content): Change Ibis license from "Remnant Capital" to "Remnant" (endless-sky#8384)

* feat(content): Add 'gegno quarg' attribute for 'Giaru Gegno' (endless-sky#8386)

* fix(content): Replace deprecated star sprites (endless-sky#8389)

* fix(UI): Disabled hostile ships no longer apologize for being unable to help when hailed by a disabled player (endless-sky#8382)

* feat(content): Add a mission and job about selling the Heliarchs Jump Drives (endless-sky#8181)

* fix(ci): Install pkg-config on MacOS if it is missing (endless-sky#8394)

GitHub changed their MacOS runners to not come with pkg-config by default.

* feat(content): New Space Life Region ft. the Vyrmeid! (endless-sky#7931)

* feat(mechanics): Add support for gamerules (endless-sky#7740)

* Re-enable universal ramscoop
* Add customisable values for person spawn period and the weight of hte "no spawn" person option.

* docs: Add new contributors to the credits (endless-sky#8383)

* feat(AI): Increase the proportional DPS threshold for long range/homing weapons before a ship behaves differently (endless-sky#8393)

* feat(content): Add the Bunrodea Race (endless-sky#6438)

👀

* fix(content): Add missing goto in First Contact: Bunrodea (Hostile) (endless-sky#8403)

* fix(content): Remove floating pixel for Astral Cetacean (endless-sky#8402)

* feat(content): Acheron Touch-Up (endless-sky#8399)

* Lock Hai Reveal from offering for v0.10.0 (endless-sky#8396)

* feat(content): Adjust Tanto Engine Hardpoints (endless-sky#8407)

* feat(content): Add brown haze to some Acheron systems (endless-sky#8401)

* feat(content): Add Bunrodea First Contact mission display/name (endless-sky#8409)

* feat(content): Add Rulei Megastructure (endless-sky#8408)

* feat(content): Remove inappropriate asteroids and imperial units (endless-sky#8410)


Co-authored-by: Arachi-Lover <82293490+Arachi-Lover@users.noreply.github.com>

* docs: Update changelog for v0.10.0 (endless-sky#8134)

* fix: Make 3 the minimum number of previous saves (endless-sky#8406)

* docs: Update man page and appdata.xml file to 0.10.0 (endless-sky#8413)

* fix(changelog): Correct "required crew" to "bunks" for a change to the Falcon (endless-sky#8414)

* chore: Update version number in plist file (endless-sky#8415)

It was still set to 0.9.16

* chore: Update version numbers to 0.10.1-alpha (endless-sky#8416)

* Revert "Lock Hai Reveal from offering for v0.10.0 (endless-sky#8396)" (endless-sky#8417)

This reverts commit 5db5916.

* feat(enhancement): Use an std::bitset to support more personalities (endless-sky#8387)

Co-authored-by: UnorderedSigh <116329264+UnorderedSigh@users.noreply.github.com>

* fix(documenation): Remove duplicate copyright entries (endless-sky#7881)

Co-authored-by: quyykk <quyykk@protonmail.com>

* fix(content): Fixes related to Hai Leaks Response 4B and remove combat rating requirement for HR4 (endless-sky#8398)

* feat(content): Improve Unfettered Hai subfaction relationships (endless-sky#8337)


Co-authored-by: Hurleveur <94366726+Hurleveur@users.noreply.github.com>

* fix(content): Change Coalition requirement for some missions to License instead of Contributor Mission (endless-sky#8418)

* feat(documentation): Add comments Personality class about correctly setting the size of the flags std::bitset (endless-sky#8423)

* feat(enhancement): Enable and disable plugins from in-game (endless-sky#7192)


Co-authored-by: Ben Hauch <tehhowch@users.noreply.github.com>
Co-authored-by: tibetiroka <68112292+tibetiroka@users.noreply.github.com>
Co-authored-by: Terin <4471575+Terin@users.noreply.github.com>
Co-authored-by: warp-core <warp-core@users.noreply.github.com>
Co-authored-by: Nick <quyykk@protonmail.com>

* chore: Remove TODO comments from changelog (endless-sky#8433)

* fix(typo): Correct plural for Solar Batteries (endless-sky#8432)

* fix(typo): Use backticks in Basrem Reverse Thrusters description to allow use of quotes (endless-sky#8430)

* feat(balance): Add a reverse thruster to the Mule's standard loadout (endless-sky#8428)

* feat(content): Split Wanderer and Hai language conditions in game data files (endless-sky#8435)

* fix(content): More HR fixes (endless-sky#8442)

* feat(content): More HR improvements (endless-sky#8441)

* typos

* Include remington in Hai-home arrival

* allow black lich to engage escorts

* escort fleet for disabling not killing

For the geocoris fight

* feat(trading panel): Do not uninstallable outfits with minables (endless-sky#8411)

* fix(AI): Allow fewer NPCs to follow the player when cloaked (endless-sky#8324)

* fix(artwork): Clean up brown haze sprite (endless-sky#8454)

* feat(content): Change Heliarch swizzle to Gold (endless-sky#8420)

* feat(UI): Reduce settings crowding with multiple pages (endless-sky#8455)

* feat(build): Use a static assertion to fail compilation if personality count is not updated correctly (endless-sky#8425)

* feat(content): Add the Scrapper to Bounty/Escort Jobs (endless-sky#8434)

* feat(content): Make the Sheragi box a more reasonable size (endless-sky#8445)

* feat(content): Repeatable Unfettered jobs grant clearance (endless-sky#8463)

* feat(content): Adding solar collection to the Modified Dromedary (endless-sky#8480)

* feat(content): HR wording tweak (endless-sky#8462)

* feat(balance): Increase Gun Count on Small Combat Ships (endless-sky#8469)

* feat(balance): Add clustering to Ka'het Nullifier (endless-sky#8494)

* feat(integration tests): Update some test data to not use deprecated "outfit scan speed" attribute (endless-sky#8500)

* feat(content): Add an Auxiliary Mark II Variant (endless-sky#8431)

* fix(ui): Fix failed truncation for certain strings (endless-sky#8466)

* feat(mechanics): Add '<planet stopovers>' substitution (endless-sky#8467)

* fix(ui): Fix blurry thumbnail on outfitter selection panel (endless-sky#8481)

Fixes endless-sky#7424

* feat(balance): Add a fuel pod to afterburner Raven (endless-sky#8501)

* build: Add a preset to run the unit tests in Release mode (endless-sky#8461)

* fix(ci): also run when CMake files have been edited (endless-sky#8514)

* fix(style): Correct declaration order of private members of Conversation class (endless-sky#8457)

* feat(content): Added Landable Gas Giants outside of the Ember Wastes (endless-sky#8274)

* feat(content): More Landable Planets in Gegno space (endless-sky#8452)

* chore: Add a missing #include, caught by gcc 13 (endless-sky#8511)

* build: Don't create the unnecessary static library for faster builds (endless-sky#8513)

Since the static library is not designed to be a first-class output to be used by others, we can just skip creating it in the first place. This is especially useful on MinGW, which uses a slow linker.

* fix(typo): Fix spelling mistakes (endless-sky#8524)

* feat(enhancement): Make inscrutable on player ships useful (endless-sky#8486)

* feat(mechanics): Make active cooling scale with heat even with zero cooling energy (endless-sky#8518)

* feat(content): Improve shattered light 2 blocking (endless-sky#8522)

* build: Fix MacOS compilation error in some cases (endless-sky#8526)

* build: Don't treat warnings as errors for release builds (endless-sky#8510)

* fix(typo): Adjust text of some Deep missions (endless-sky#8540)

* feat(content): Expand the completion text of Han Sizer jobs (endless-sky#7805)

* fix(content): Puny no longer disappears after reloading (endless-sky#8546)

* feat(content): Add jobs relating to the atomic bombing of Martini (endless-sky#7854)

* feat(artwork): New Sunbeam Projectile Sprite (endless-sky#8534)

* fix(typo): Skadenga saga tweaks, Bulk Freighter capitalization, and various typos fixes (endless-sky#8483)

* fix(content syntax): Fix three incorrect uses of dialogs (endless-sky#8503)

* fix(typo): Remove duplicate backtick in a tooltip definition (endless-sky#8545)

* fix(AI): Ensure flotsam targeting and collection checks are the same (endless-sky#8528)

* feat(enhancement): Phrases in mission description, display name, illegal, cargo, blocked, clearance, and dialog text (endless-sky#8359)

* refactor(UI): Use interface defined box for planet, spaceport, bank, and trade panel content (endless-sky#8535)

* feat(content): Simplify conversation branches and remove choice loops using "to display" conditionals (endless-sky#7660)

* feat(balance): Give the Wanderers non-default crew attack and defense stats (endless-sky#8525)

* feat(enhancement): Add attributes which allow shields to be permeable, passing damage through to the hull (endless-sky#8322)

Behaves similarly to pierce on a weapon, except it is always active on the ship.

* feat(content): Change first Pookie mission to have a 100% offer chance (endless-sky#8560)

* feat(UI): Clicking a selected mission cycles through its involved systems (endless-sky#6934)

* feat(enhancement): Allow weapons to define how their inaccuracy is distributed (endless-sky#6803)

* feat(mechanics): Asteroid scanners can now automatically catalog minable locations when nearby (endless-sky#7103)

* feat(content): The Quarg now acknowledge the player flying a Pug Arfecta (endless-sky#7688)

* feat(enhancement): Support for min and max reputation limits on governments (endless-sky#7137)

* feat(artwork): New landscape "hills11" by 1184 (endless-sky#8550)

* feat(ui): Capability for adding to credits in plugins + changing credits scroll speed and direction with arrow keys (endless-sky#7708)

* feat(mechanics): Disruption and discharge damage now deal 50% less damage against hull (endless-sky#7913)

* feat(content): Stranded Field Trip jobs now mention their cargo in the description (endless-sky#8471)

* fix: Clean up grammar in Stone of our Fathers 5 (endless-sky#8575)

* feat(enhancement): NPCs can now trigger mission actions on ship events (endless-sky#7326)


Co-authored-by: Amazinite <jsteck2000@gmail.com>

* feat(content): Add Quicksilver Package Mix-up mission (endless-sky#8350)

* feat(enhancement): Allow events to remove sprites from galaxies (endless-sky#8563)

* docs: Some README improvements (endless-sky#8552)

* fix(AI): Surveillance ships now maintain the same target until succeeding their scan + removed scan decay (endless-sky#8426)

* refactor(content): Clean up Ringworld Debris missions (endless-sky#8566)

* feat(content): Split the Quarg government into regional govs for better story interactions (endless-sky#8561)

* feat(content): The banker in the start gives the exact interest paid instead of an approximation (endless-sky#8576)

* feat(UI): Added a message that appears when an escort is destroyed (endless-sky#8568)

The appearance of this message can be deactivated by the "Extra fleet status messages" preference.

* fix(content): Bring marauder iv bounty distance in line with others (endless-sky#8585)

* fix: Use double quotes around your escort name in the mission failed message (endless-sky#8587)

* refactor: Refactor and improve the shop's handling of purchasing errors (endless-sky#6952)

* fix: Correct galaxy parsing to use the proper token as the key (endless-sky#8590)

* feat(content): Create Paradise World jobs with pirate worlds as intentional destinations (endless-sky#8544)

Removing pirate worlds as destinations from some other jobs, which was probably unintentional.

* fix(content): Adjust the "Local Politics" mission source filter and offer conditions to better fit the intended locations (endless-sky#8114)

* feat(content): Killing the Ravens in Deep Archaeology 3 now causes them to disappear in DP5 (endless-sky#8582)

* fix(mechanics): Require that governments explicitly state that they can send untranslated hails (endless-sky#8444)

* fix(content): Remove Zenith's required reputation when taking the alternative path (endless-sky#8405)

* fix(typo): Fix capitalization of jump drive (endless-sky#8536)

* feat(content): Add random lifetime to Flamethrower projectiles (endless-sky#8584)

* feat(balance): Wanderers now defend Unfettered tribute ships if you attempt to farm them (endless-sky#8225)

* feat(parsing): Don't warn about GameActions that fail missions without definitions (endless-sky#8598)

* feat(content): Add system attributes that catalog the location of notable stars and system configurations (endless-sky#8474)

* feat(UI): Licenses that you lack appear under the cost in the shop if the item description is collapsed  (endless-sky#6953)


Co-authored-by: warp-core <warp-core@users.noreply.github.com>

---------

Co-authored-by: Saugia <93169396+Saugia@users.noreply.github.com>
Co-authored-by: Nick <quyykk@protonmail.com>
Co-authored-by: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com>
Co-authored-by: Zitchas <32169904+Zitchas@users.noreply.github.com>
Co-authored-by: bene-dictator <115441627+bene-dictator@users.noreply.github.com>
Co-authored-by: Aurora Theriault <atheriault@bowdoin.edu>
Co-authored-by: tibetiroka <68112292+tibetiroka@users.noreply.github.com>
Co-authored-by: Peter van der Meer <peter.vd.meer@gmail.com>
Co-authored-by: Hurleveur <94366726+Hurleveur@users.noreply.github.com>
Co-authored-by: Ruslan Gadeev <rgadeew@yandex.ru>
Co-authored-by: Quantumshark <thedup.adg@gmail.com>
Co-authored-by: warp-core <warp-core@users.noreply.github.com>
Co-authored-by: EjoThims <JEIPH@MAC.COM>
Co-authored-by: UnorderedSigh <116329264+UnorderedSigh@users.noreply.github.com>
Co-authored-by: mOctave <73318970+mOctave@users.noreply.github.com>
Co-authored-by: Azure_ <42621251+Azure3141@users.noreply.github.com>
Co-authored-by: HTMLPhoton <61311312+HTMLPhoton@users.noreply.github.com>
Co-authored-by: roadrunner56 <65418682+roadrunner56@users.noreply.github.com>
Co-authored-by: Heiko Becker <mail@heiko-becker.de>
Co-authored-by: ThrawnCA <shell_layer-github@yahoo.com.au>
Co-authored-by: Ferociousfeind <35383563+Ferociousfeind@users.noreply.github.com>
Co-authored-by: Kari Pahula <kaol@iki.fi>
Co-authored-by: hmglasgow <102213051+hmglasgow@users.noreply.github.com>
Co-authored-by: Alex TD <alextearsedoyle@gmail.com>
Co-authored-by: Daniel <101683475+Koranir@users.noreply.github.com>
Co-authored-by: Aneutronic <Aneutronic@users.noreply.github.com>
Co-authored-by: Dashkal <464894+dashkal16@users.noreply.github.com>
Co-authored-by: CAPTAIN1947 <87000456+CAPTAIN1947@users.noreply.github.com>
Co-authored-by: TomGoodIdea <108272452+TomGoodIdea@users.noreply.github.com>
Co-authored-by: Terin <4471575+Terin@users.noreply.github.com>
Co-authored-by: williaji <70952724+williaji@users.noreply.github.com>
Co-authored-by: Hecter94 <Hecter94@gmail.com>
Co-authored-by: Djordje Petrović <80059906+Kepler-69c@users.noreply.github.com>
Co-authored-by: Willem Jan Palenstijn <wjp@usecode.org>
Co-authored-by: Sam Gleske <875669+samrocketman@users.noreply.github.com>
Co-authored-by: MasterOfGrey <60949828+MasterOfGrey@users.noreply.github.com>
Co-authored-by: Corraban2 <66099507+Corraban2@users.noreply.github.com>
Co-authored-by: Amazinite <jsteck2000@gmail.com>
Co-authored-by: Arachi-Lover <82293490+Arachi-Lover@users.noreply.github.com>
Co-authored-by: Ben Hauch <tehhowch@users.noreply.github.com>
Co-authored-by: Benjamin Milman <Fzzr@users.noreply.github.com>
Co-authored-by: Lorenzo_BR <81255699+LorenzoBolla@users.noreply.github.com>
Co-authored-by: Anarchist2 <60202690+Anarchist2@users.noreply.github.com>
Co-authored-by: ziproot <109186806+ziproot@users.noreply.github.com>
Co-authored-by: 10010101001 <44052322+10010101001@users.noreply.github.com>
Co-authored-by: thewierdnut <9004013+thewierdnut@users.noreply.github.com>
Co-authored-by: DeBlister <80174383+DeBlister@users.noreply.github.com>
Co-authored-by: Andrew Rove (Rover) <rovermicrover@gmail.com>
Co-authored-by: 3agleEmpire <122647973+3agleEmpire@users.noreply.github.com>
Co-authored-by: wolfy <wolfy@shitwolfymakes.com>
samrocketman added a commit to samrocketman/endless-sky that referenced this pull request Apr 9, 2023
Fix Details
-----------

Player escorts and AI escorts misbehave while attacking asteroids.  This fix addresses the issue by reverting a small code change previously made.

Partially reverts endless-sky#7552

The turning radius needs to be calculated based on the ship's current speed instead of the absolute max speed.  This widely varies based on the current ship accelleration and velocity.

This also fixes my afterburner fighter AI which was completely broken due to high ship speeds and accelleration.

Testing Done
------------

- [x] Load ships and AI without the fix and replicated the current (bad) behavior.
- [x] With this fix witnessed the issue is repaired.

Tested with normal fighters doing mining and with after burner fighters mining with extreme speeds.

Performance Impact
------------------

None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A suggestion for new content or functionality that requires code changes mechanics Things dealing with the mechanics & code of how the game works
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants