Unity 5.4
Engine change from 5.2 to 5.4 - currently 5.4.0p4
Libraries and Packages
Implemented Text Mesh Pro, which basically vectorizes all of our fonts, making them look much better, especially at larger font sizes. Also has a lot of extra utility that we can leverage for various effects.
Upgraded Vectrosity to latest version.
Upgraded Vehicle Physics Pro to latest version.
Code cleanup
Heavily reduced garbage generation caused by foreach loops, Linq usage, and various other things.
Made sure that all of our singleton classes properly clean themselves up.
Optimized KerbalEVA.
Rewrote CrewManifest and related crew handling (roster, vessel crew list, etc).
Optimized PartModules.
Optimize latitude/longitude/altitude calls to often use a combined get-all method.
Fix how some enumerator interfaces are declared in classes.
Optimized waypoint site name generation to generate a lot less garbage with its string lists.
Many part modules now cache parts instead of polling the entire vessel multiple times per frame.
Revised how most forces and torques are applied (see note on this subject below in Moddability).
Added DoubleCurve
ScenarioModules now awake and load during game load and so are valid in modules' OnStart.
Flow Overhaul
Rewrote resource flow entirely. Now just four flow modes. Can set per-tank priority for all but AllVessel and NoFlow. Surface crossfeed for rocket engines as well as jets. Fixed priority issues. Much faster. PartResources no longer MonoBehaviours. Can set crossfeed per attach node. Electric Charge now uses STAGE_PRI so can be prioritized. Resource transfer in flight can be set to require valid crossfeed for those resources which obey crossfeed. With Advanced Tweakables on, can see flow graph in VAB/SPH (right-click on a part).
SAS
Fixed SAS unlocking for all ships in physics range when maneuvering the ship in focus.
The code for the older “Stability Assist” and somewhat newer “Pilot Steering” modes has been unified.
SAS now dynamically adjusts for the vessel’s mass properties and available control authority.
SAS uses a “stability decay” method to reduce oscillations (or twitching) when very near the target orientation.
Pilot Steering modes now include a “coast” and “stop” mode when transitioning between steering points.
See here for additional info:
https://docs.google.com/document/d/1dJHpPqttOFQrYgPNQsX7k4Ti-7NCDnC0UYzz5OWgAas/edit Wheels
WheelColliders are now properly handled by collision manager, and no longer require the wheel "blocking" workaround to clip into other parts.
Wheel gravity is now properly handled in a standard manner, which should fix a good deal of instability.
Fix EVA kerbals blowing up wheels on contact. They now go through them.
Communications Networks
Additional functionality and gameplay components to the Antenna and Probe parts through a series of distinct but related mechanics.
See here for additional info
KerbNet
Added KerbNet, which allows the player to see terrain under their satellite, and place custom waypoints with a targeting interface. Allows the player to see biomes and anomalies at higher levels. Scan resolution for KerbNet varies by part and smoothly changes between surface altitude and orbital altitude.
Debug Window
Completely overhauled the debug window to utilize new Unity GUI.
New debug console has syntax highlighting that highlights classes with persistent pastel colors if they bracket their names. [Bracket] your class names in debug logs modders.
New debug console has command input support which is moddable, type /help for a full listing of commands, and what they do.
Added new debug screen for creating kerbals with specific names, genders, skills, levels, and classes.
Debug options for displaying errors/exceptions as screen messages.
Orbits
All anomalies (ObT, mean anomaly, eccentric anomaly, true anomaly) are now consistently negative when approaching the periapsis for both elliptical and hyperbolic trajectories (previously, only hyperbolic trajectories used negative anomalies). This means that eccentric anomaly and true anomaly are now in the range -?..? instead of 0..2? for elliptical trajectories.
Reference frames instead of quaternions are used for calculating orbital position and velocity, leading to increased speed when rendering patched conics.
Rewrote orbit targeting / closest approach finding.
Fixed issues where objects jump when going on and off rails.
Refactored such that orbital position and velocity and vessel position and velocity are correct for the FixedUpdate cycle.
Made target relative velocity work for celestial bodies.
Trajectories that re-encounter a body just escaped are now detected.
Elliptical encounter trajectories no longer flicker.
Conic patch settings (draw mode and limit) are now exposed in the Video Settings.
Contracts
Contracts are now also weighted by celestial body, so if the player starts declining contracts to Jool, they will see them less often.
Explore contracts overhauled, they now utilize the same logic World Firsts used to use to select a "package" of related objectives. They can appear multiple times per planet now, and should have a much more logical progression than they used to.
Removed old single objective World First contracts, other than the initial four.
Other Work
Advanced Tweakables option in Gameplay Settings. With it off, some advanced features are hidden. Defaults off.
Autostrutting available for all parts (AT).
Parachutes can have automatic holding of deployment until safe (AT).
Actuation toggles now affect symmetry counterparts in editor (some other RCS/gimbal bits do too). Also hidden under Advanced Tweakables (AT).
Utilize HSV color space in more locations.
Quadrupled the amount of loading screen messages. You know, the important stuff.
Loads of new options in the difficulty settings.
Science data can be transferred by the part-part transfer mechanic (for certain probe cores).
Added physics easing for when landed/splashed vessels come off rails.
Certain probe cores (and the new science container part) can transfer data with no EVA required.
There is an additional drag curve whose function is to raise drag coefficient to a power based on the mach number. This leads to blunter things having (relatively) more drag supersonic than they did and pointier things having (relatively) less than they did. Pods will slow down better on steep reentries and planes will produce drag in better proportion to how streamlined they are (less overpowered airplane drag).
Fairings now include support for placing multiple payloads in them (and showing trusses for said payloads).
Misc Fixes and Changes
Fixed issue where disabled RCS would enable during staging. Mods need to set stagingEnabled=False in their ModuleRCS blocks (unless they want staging on).
Catch exceptions during part loading so the loading process doesn't come to a halt.
Fix some issues with decouple modules, allow specifying the ejection force vector.
Try/catch the other PartModule update loops so one bad module doesn't interrupt others.
Don't try to set constant KSPFields.
Null check when getting resource mass on unloaded vessels with removed resources.
Remove some debug spam when querying Science Subjects by ID.
Fix Resource Display to show all resources correctly.
Improve launch clamp stability on revert.
Fix an issue with ModuleTripLogger not applying to kerbals in non-root parts.
Ablative shields with Ablator tweaked down in the VAB no longer show up pre-scorched in flight.
Ablative shields no longer show solid black when reaching zero ablator.
Fix serious regression with flow multipliers in ModuleEnginesFX.
Fix a wrong rotation in Moment of Intertia calculations.
Correct stock temperature gauges to use gauge threshold.
Fixed currency symbols not displaying properly when UI scale is changed by using inline Text Mesh Pro sprites.
Probe cores now have a hibernate feature which offers only partial control when activated but draws much less electricity. Can be set to automatically hibernate in warp (advanced tweakable).
Added a game setting for default throttle (rather than keeping it in Physics.cfg).
Fix bug where space center view can be messed up on loading a save from the main menu if the game was switched away from during load (old workaround was clear the input locks).
Renamed Science Tech to Scanning Tech since that's what it's for.
Fixed where CoPOffset and CoLOffset had CoMOffset added to them during application.
Fixed where an exception during loading of parts would stop the game loading.
IVA navball works like normal navball (vectors hidden when velocity is too small, radial and normal cues only show in Orbit mode).
Fix an issue where prop requirement met (on engine menus) was not being intuitively correct. See note in Moddability, below, for how to update jet parts.
Fix kerbals sliding on ladders.
For EVA kerbals, 'SAS' light shows whether the kerbal will reorient when a translate key is pressed (as set in Input Settings). T toggles this behavior when in EVA mode.
Several dialogs (such as quicksave) now accept Escape and Enter keys for dismissing or accepting contents. Science reports accept Tab to cycle messages.
Quicksave and Quickload hotkeys (F5/F9) work in KSC view.
The VAB/SPH part search tool now clears when pressing Escape.
Crossfeed toggle module can now require a technology researched to enable itself. Radial decouplers now cannot toggle crossfeed until Fuel Systems.
Fixed loader info in saves to not contaminate a stock save if you load a modded save while playing pure stock.
Can toggle whether navball hides going into map view.
Can now use antenna's Start Transmission action in control groups.
Added ability to register credit for Kerbal experience gains in the MPL
When a Kerbal plants a flag, credit is given to all landed/splashed Kerbals in physics range. Prevents the need to have flag-planting parties with large crews.
Made celestial bodies rotate in the R&D archives again
Updated in flight Pause Menu to include Load, Save and Exit options
Updated in flight quickloads to show more detailed load dialog
Fix CBAttributeMapSO (biome detection) to only use nearby biomes as candidates, not all biomes.
Fix for vessels not retaining targets on quickload
Fix for targeting hanging up in limbo state when reverting to launch
Fix for losing targeting when switching vessels (such as when docking)
Targeting properly restores for individual parts (i.e. docking ports) during quickload and vessel switching
Fix for Tracking station list deselcting active vessel on list changes
Fix for Map filter hiding the current and/or targetted vessel
Fix an issue with stars fading in/out instantly.
Add lift and drag displays back to wings/control surfaces.
Fix some EVA state issues not updating correctly, leading to kerbals getting stuck 'floating'.
Retractable landing gear produce less drag than they used to when retracted and much more when extended.
Enable staging toggling on fairings.
Fix ModuleSAS in standalone mode using real time not game time for resource requests.
Moddability
Added FlightGlobals.VesselsLoaded and FlightGlobals.VesselsUnloaded which lets us iterate over a specific portion of Vessels without checking the entire list.
Added onVesselPartCountChanged event, fires any time a part is added or removed, the moment it happens, unlike onVesselModified.
Added onVesselStandardModification event, collects various vessel events and fires them off with a single one. (onVesselPartCountChanged, onVesselModified, docked, undocked, et al)
Added onScreenResolutionModified event, fires when the screen resolution is modified.
Added many accessors/setters.
Vessel control level can be clamped to a field in Vessel (so can be restricted to Partial even if otherwise would be Full).
GetModuleMass/Cost methods can now be passed the situation.
Fix where kerbal mass (if set to nonzero) was not applied in the editor.
Added two new dictionary-related classes (DictionaryValueList and ListDictionary).
Celestial bodies now cache all of their PQS Cities.
All game root nodes now generate a random persistent seed, which is different
from game to game.
All forces on valid parts except wheel forces are now done via Part.AddForce/Torque/AddForceAtPosition. Note that the forcemode used is Force; to use a different forcemode, convert the force to the correct amount. It is the job of the Flight Integrator to then apply all these forces to actual rigidbodies (rather than all the disparate modules' job).
Use mass-weighted average angular velocity of parts for vessel angular velocity.
ITorqueProvider now reports two Vector3s, positive torque (that produced by control actuation 1,1,1) and negative torque (that produced by -1,-1,-1).
Added various accessors.
Node definitions can take an extra digit after size, either 0 or 1: that sets whether the node can crossfeed. Defaults to 1 (yes). NODE definitions can take crossfeed = True/False
ModuleEngines now supports `clampPropReceived = True`. This will clamp the ratio of propellant requested based on prior results, so if IntakeAir is listed first and less than the full requirement is returned, it will only request that ratio of further propellants. In this case the "Prop Req Met" display will show the minimum requirement-met ratio rather than the average. Engines that use IntakeAir (or other cases like that) need to have `clampPropReceived = True` in each of their MODULEs that do that, and need to have that PROPELLANT first and the other PROPELLANTs later. See stock jet cfgs for examples.
Added another crew transfer event.
Added more startup options for KSPAddon
Allow kerbals to have/save/load arbitrary experience points.
ResearchAndDevelopment.GetTechnologyTitle(string id) will convert a tech ID to a tech title and is available as soon as parts start loading (can be used in GetInfo() ).
Support max pressure (dynamic + static), `maxPressure`, and max G, `gTolerance`, for parts.
Added system to allow mods to add custom difficulty settings.
Added CelestialBody.hasSurface so mods that add a PQSController to gas giant don't cause silly things such as "Plant a flag on Jool" contracts.
Replaced all checks for experience traits (Pilot, Scientist, Engineer) with individual experience effects. They are now loaded before part loading so can be queried in GetInfo().
Icons in TechTree.cfg can now use a relative path (allows mod icons to live outside the Squad directory).
Added KSPAssemblyDependencyEqualMajor as an attribute. Use instead of KSPAssemblyDependency if you want to force requiring the stated major version, not >= the major version, from your dependency.
If you are setting a vessel's position and/or changing its orbit, call Vessel.IgnoreGForces(framecount) on the vessel for the number of frames that g forces should be ignored (try 1, then 2 if that doesn't work, etc).
ModuleDeployablePart (covers antennas, solars, radiators) also has a gResistance (for Gs) as well as windResistance (for Q).
NOTE: (This is old but still true): Vessel.obt_velocity and .srf_velocity and the spd versions are not valid in FixedUpdate unless on rails. This is because they are based off what the orbit is estimated to be after PhysX integration runs (i.e. after all FixedUpdates run).
Crew transfer now derives from a generic abstract PartItemTransfer class. Classes can derive from it to implement any kind of (crew transfer-style) part-part transfer. Also we fire an event right before a crew transfer is created so mods can just kill it and easily create their own CrewTransfer-derived class and have that be called on that event.
Extended ModuleScienceContainer to allow sending and, (from ModuleScienceExperiment) receiving, experiment data. Also added support for a Collect All option to such containers.
ModuleColorChanger supports changing arbitrary shader colors and implements IScalarModule. ModuleAnimationSetter works similarly and is used to more directly link an animation to being set by IScalarModule.
PartModules now support upgrades. In a MODULE node, add an UPGRADE node. Inside that add one node per techID you wish to provide upgrades, in ascending order. Inside that place keys and nodes you wish to upgrade. e.g. `UPGRADES { basicRocketry { maxThrust = 250 } }` will change maxThrust to 250 once basicRocketry unlocks. Upgrades will never override persistent data. Further, by default they overwrite each other; to make a node apply on a clean slate (so you can, say, add two PROPELLANT nodes and not have them conflict due to the overwrite logic) set `IsExclusiveUpgrade__ = True` in the upgrade's node. That will clear the upgrade state and apply that upgrade fresh. Upgrades are only applied when you add a part to a craft in the VAB/SPH, they don't magically apply in flight. When a part on a craft is upgraded, a new option will appear in the PAW (when in VAB/SPH) where you can view the current stats of all those modules with upgrades.
ModuleEngines now supports alternate (RealFuels-style) throttling and rates.
ModuleEngines now supports throttle-Isp interactions. Turn on with useThrottleIspCurve = True and set the throttleIspCurve and throttleIspCurveAtmStrength curves. Final Isp = input Isp * Lerp(1, throttleIspCurve.Eval(throttle state), throttleIspCurveAtmStrength.Eval(atms of pressure))
Support part upgrades, see docs.
Added events dealing with kerbals going on/off ladders on parts and added a new vessel field for accessing the vessel of the part of the ladder the kerbal is climbing (if all of those are valid).
CelestialBody now has thermo/atmo stats methods so FlightIntegrator's temperature calcs can be called from anywhere / any mod.
Events that throw an exception now print the full stack trace.
PartModuleUtil.PrintResourceSI() is now just KSPUtil.PrintSI().
Add ModuleDragAreaModifier with field areaFactor. Note: this will also affect buoyancy and thermo.
Added ModuleHeatEffects and FXModuleThrottleEffects which can take any number of IScalarModules and are set by skin temp and throttle respectively.
AvailablePart.entryCost is now get-only and calls a static delegate so they can be
FindEngineNearby and FindEngineInterface are now PartModuleList methods instead of being duplicates in FXModuleAnimateThrottle and ModuleAlternator.
Many KerbalEVA, Kerbal, and KerbalExpressionSystem methods made virtual, and kerbal spawning in ProtoCrewMember and EVA spawning in FlightEVA made delegates.
Add ModuleResourceHandler as a handler for ModuleResource so PartModules can just use it rather than all copying the same code.