-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Improve Naval and Smart missiles #6027
Conversation
- Allow gameplay code to specify a number of missile parameters as a spawn argument. - Don't hardcode missile types in C++.
- Add EquipType.MissileType - Pass the missile_stats table from missile equipment to Ship:SpawnMissile()
- Larger missiles now contain more explosive and are better at damaging enemy ships. - As before, smart and naval missiles are more ECM resistant than basic guided missiles. - The fuzeRadius has been drastically lowered for most missiles, increasing their effective damage to an enemy target in situations other than head-on collision.
- Can't use Space::GetBodyByIndex until PostLoadFixup()
- Since we're no longer grouping by a hardcoded missile id, we need to group by equipment type. - Consequently, the missile display interface got a lot more modular to new missile types. - Generally reduced some of the tech debt of the module related to missile handling.
Is this distinction visible to the player when buying? |
This is fantastic work! 👍🎉 It's a very exciting improvement to an ancient system that needed reworking, good job |
Not yet. That's tracked in #6014 for implementation before we release. |
Just testing this with both the hyperdrive code and this and when I install a Naval missile rack I get the fallowing error: This happens when i but a rack supporting huge missiles. Can reproduce on ac33 as well |
Completely unrelated to either branch, it's caused by attempting to draw details for a MILITARY tech-level item. Will fix in a separate PR. |
Alternative title: finally fixed a bit of the mess that is missile handling in this game.
This PR rewrites how missiles get their "data", i.e. all parameters used in-flight. Missiles still reference a special ShipType file (one of the
missile_*.json
shipdefs), but we're no longer constrained to only four missile types any more!What's more, Naval and Smart missiles now actually do more damage than regular guided missiles (as one would expect), and missiles in general got a bit better about detonating close to the target rather than at a 100m+ standoff.
As a quick perusal of
Missile.cpp
anddata/modules/Equipment/Weapons.lua
will show, most meaningful parameters for missiles are now defined in "data" rather than code, allowing mods to introduce new missile equipment and making it much easier to tweak missile gameplay balance.Fixes #5926.
Fixes #6014.
Fixes #4159.