Jump to content

Common Launch Script (CLS) [kOS Script] v2.0.0


Qwarkk

Recommended Posts

5 hours ago, jwbrase said:

I looked through all the non-source releases of CLS on github, and they all have consistent capitalization of that folder name. The first thing I suspected was that maybe different versions had used different capitalizations, and he'd unpacked a newer version over an older one, but that rules that out, so about the only thing I can imagine is if files are being dropped into the folder at runtime.

With a quick search through the folder tree, I found the following locations where files are referenced with an all-lowercase path (filename:line-number:text-of-matching-line):

Ships/Script/Abort.ks:53:runpath("0:/cls_lib/lib_num_to_formatted_str.ks").
Ships/Script/Abort.ks:54:runpath("0:/cls_lib/lib_navball.ks").
Ships/Script/Abort.ks:55:runpath("0:/cls_lib/CLS_nav.ks").
Ships/Script/CLS.ks:49:runpath("0:/cls_lib/CLS_parameters.ks").
Ships/Script/CLS.ks:89:runpath("0:/cls_lib/CLS_dv.ks"). 
Ships/Script/CLS.ks:90:runpath("0:/cls_lib/CLS_gen.ks").
Ships/Script/CLS.ks:91:runpath("0:/cls_lib/CLS_hud.ks").
Ships/Script/CLS.ks:92:runpath("0:/cls_lib/CLS_nav.ks").
Ships/Script/CLS.ks:93:runpath("0:/cls_lib/CLS_res.ks").
Ships/Script/CLS.ks:94:runpath("0:/cls_lib/CLS_twr.ks").
Ships/Script/CLS.ks:95:runpath("0:/cls_lib/CLS_ves.ks").
Ships/Script/CLS.ks:96:runpath("0:/cls_lib/lib_instaz.ks").
Ships/Script/CLS.ks:97:runpath("0:/cls_lib/lib_lazcalc.ks").
Ships/Script/CLS.ks:98:runpath("0:/cls_lib/lib_navball.ks").
Ships/Script/CLS.ks:99:runpath("0:/cls_lib/lib_num_to_formatted_str.ks").
Ships/Script/CLS.ks:100:runpath("0:/cls_lib/CLS_log.ks").
Ships/Script/ChuteDescent.ks:3:runpath("0:/cls_lib/lib_num_to_formatted_str.ks").
Ships/Script/ChuteDescent.ks:5:runpath("0:/cls_lib/lib_navball.ks").
Ships/Script/ChuteDescent.ks:6:runpath("0:/cls_lib/CLS_nav.ks").

It's a bit odd, because it doesn't look like those files are being written to, but if they're just being read, I'd expect that A) It wouldn't create the files referenced, and B) CLS would fail to find the files and wouldn't work, but it seems it's managing to use the wrong-case filename to reference the files in the right-case directory, and is then creating the wrong-case directory and copying the files to it.

About the only thing I can imagine is if something in the middleware stack between Linux and CLS (most likely Mono, maybe KSP itself) is aware that it may be run on multiple platforms and, when it doesn't find a file, is proactively looking for files that exist with mismatched case, then copying them to the path that's being referenced. I'm not sure that's the best solution; what if the user unpacks a new version of CLS over the right-case folder tree? That won't update the wrong-case files, and they'll likely be referenced instead of the right-case ones, so I wish it would just choke early on the bad filename rather than saving the day now and potentially causing subtle and tricky problems later, but that's not anything you can fix. All you need to do is make sure that you're always referencing files with the same case that they have on the filesystem, and then it doesn't matter what the middleware is doing on the back end.

Thank you for this - immensely helpful.

CLS v1.4.2 is now live! Only two changes - one to address the Linux issue discussed by u/ruiluth and u/jwbase - thank you both for your help. The other is that CLS will now prevent SAS activation while it is running - SAS does not play nicely with its steering commands.

Enjoy!

Link to comment
Share on other sites

  • 2 weeks later...

I am trying to use this script today and am getting a HOLD HOLD HOLD, No Launch Clamps detected error despite the fact I do in fact have launch clamps. I have tried every possible staging combination on a simple two stage rocket and nothing is working. I am using Restock and it does change some of the stock parts, is it possible the string for detecting the launch clamps should be different for use with Restock?

Link to comment
Share on other sites

2 hours ago, Astrofoo said:

I am trying to use this script today and am getting a HOLD HOLD HOLD, No Launch Clamps detected error despite the fact I do in fact have launch clamps. I have tried every possible staging combination on a simple two stage rocket and nothing is working. I am using Restock and it does change some of the stock parts, is it possible the string for detecting the launch clamps should be different for use with Restock?

I've looked into this and I think you're right. When CLS checks for launch clamps, it simply checks for any parts with the 'LaunchClamp' module. I've just downloaded Restock and looked through its patches and it seems restock replaces the stock launchclamp module with the 'ModuleRestockLaunchClamp' module. 

I've made a slight tweak and released version 1.4.3 which should fix this for restock. Thank you for bringing this to my attention .

 

Link to comment
Share on other sites

2 hours ago, Qwarkk said:

I've looked into this and I think you're right. When CLS checks for launch clamps, it simply checks for any parts with the 'LaunchClamp' module. I've just downloaded Restock and looked through its patches and it seems restock replaces the stock launchclamp module with the 'ModuleRestockLaunchClamp' module. 

I've made a slight tweak and released version 1.4.3 which should fix this for restock. Thank you for bringing this to my attention .

 

Wow! Very nice work and quick response time. I'm going to download the newer version and give it a go. I thought it might be the case because I had done some fiddling around with that before and ran into the issue that ReStock changes module names/strings. I tested your script with a stock KSP installation and it did work fine for my rockets. Thanks for looking in to this one.

Link to comment
Share on other sites

I'm back with another bug(potentially)! I'm currently doing a JNSQ career save and using your script to launch my first few rockets. I have encountered an issue with your lowPowerMode function however. The script is setting the Command State to Hibernating during the coast phase of ascent. Then the script is supposed to toggle it back on. However, in my save this is not possible so the probe is staying in the Hibernation state permanently and I only have partial control of the probe from that point on. I can not manually disable Hibernation either which is curious. Again, I'm not sure which mod is the culprit. This has occurred with both the Stayputnik, and QBE probe parts.

Link to comment
Share on other sites

11 minutes ago, Astrofoo said:

I'm back with another bug(potentially)! I'm currently doing a JNSQ career save and using your script to launch my first few rockets. I have encountered an issue with your lowPowerMode function however. The script is setting the Command State to Hibernating during the coast phase of ascent. Then the script is supposed to toggle it back on. However, in my save this is not possible so the probe is staying in the Hibernation state permanently and I only have partial control of the probe from that point on. I can not manually disable Hibernation either which is curious. Again, I'm not sure which mod is the culprit. This has occurred with both the Stayputnik, and QBE probe parts.

Interesting - are you confident this is a CLS related issue, or are there difficulty settings/mods that are potentially not allowing you to bring the probe out of hibernation mode? Can you take it out of hibernation mode if you force CLS to stop running? Can you post a screenshot of your gamedata folder or a modlist?

Link to comment
Share on other sites

22 minutes ago, Qwarkk said:

Interesting - are you confident this is a CLS related issue, or are there difficulty settings/mods that are potentially not allowing you to bring the probe out of hibernation mode? Can you take it out of hibernation mode if you force CLS to stop running? Can you post a screenshot of your gamedata folder or a modlist?

Spoiler

Airplane Plus (AirplanePlus 26.5)
Antenna Helper (AntennaHelper 2:1.0.7.5)
AtmosphereAutopilot (Fly-By-Wire) (AtmosphereAutopilot v1.5.17)
B9 Part Switch (B9PartSwitch v2.18.0)
Better SR Bs (BetterSRBs 1.2.6)
Breaking Ground (BreakingGround-DLC 1.7.1)
ClickThrough Blocker (ClickThroughBlocker 1:0.1.10.17)
CommNet Antennas Info (CommNetAntennasInfo 3.1.0)
Community Resource Pack (CommunityResourcePack 1.4.2)
Community Tech Tree (CommunityTechTree 1:3.4.4)
Contract Configurator (ContractConfigurator 1.30.5)
Contract Pack: Bases and Stations Reborn (ContractConfigurator-KerbinSpaceStation 2:3.7.2.7)
Contract Pack: Clever Sats (ContractConfigurator-CleverSats 1.4)
Contract Pack: Exploration Plus (ContractConfigurator-ExplorationPlus 2.0.1)
Contract Pack: GAP for JNSQ (ContractConfigurator-JNSQ-GAP 1.0.4)
Contract Pack: Kerbal Academy (ContractConfigurator-KerbalAcademy 1.1.10)
Contract Pack: Tourism Plus (ContractConfigurator-Tourism 1.5.2)
Cryo Tanks (CryoTanks 1.6.3)
Cryo Tanks Core (CryoTanks-Core 1.6.3)
Cryogenic Engines (CryoEngines 1:2.0.5)
Cryogenic Engines - Near Future Aeronautics (CryoEngines-NFAero 2.0.5)
Custom Barn Kit (CustomBarnKit 1.1.21.0)
Custom Pre Launch Checks (CustomPreLaunchChecks 1.8.1.1)
Deployable Engines Plugin (DeployableEngines 1.3.1)
Distant Object Enhancement /L (DistantObject v2.1.1.6)
Distant Object Enhancement /L default config (DistantObject-default v2.1.1.6)
Dynamic Battery Storage (DynamicBatteryStorage 2:2.2.5.0)
Environmental Visual Enhancements Redux (EnvironmentalVisualEnhancements 3:1.11.5.1)
Final Frontier (FinalFrontier 1.10.0-3485)
Firespitter Core (FirespitterCore v7.17)
Firespitter Resources config (FirespitterResourcesConfig v7.17)
Harmony 2 (Harmony2 2.0.4.0)
JNSQ (JNSQ 0.10.1)
JNSQ Ribbon Pack (JNSQ-RibbonPack 0.9.0)
JNSQ-KSRGAP  (JNSQ-KSRGAP v1.0.1)
JX2Antenna (JX2Antenna 2.0.5)
Kerbal Actuators (KerbalActuators v1.8.4)
Kerbal Alarm Clock (KerbalAlarmClock v3.13.0.0)
Kerbal Atomics (KerbalAtomics 1:1.3.2)
Kerbal Construction Time (KerbalConstructionTime 1:1.4.11.2)
Kerbal Engineer Redux (KerbalEngineerRedux 1.1.9.0)
Kerbal Konstructs (KerbalKonstructs v1.8.3.0)
Kerbalism (Kerbalism 3.14)
Kerbalism - Default Config (Kerbalism-Config-Default 3.14)
Kopernicus Expansion Continued - Common (KopernicusExpansionContinued-Common release-1.7.1-5)
Kopernicus Expansion Continued - EVA Footprints (KopernicusExpansionContinued-EVAFootprints release-1.7.1-5)
Kopernicus Planetary System Modifier (Kopernicus 2:release-1.12.1-65)
kOS: Scriptable Autopilot System (kOS 1:1.3.2.0)
kOS-SCANSat (kOS-SCANSat 1.2.0.0)
KRASH - Kerbal Ramification Artifical Simulation Hub (simulation mod for KSP) (KRASH 0.5.33.5)
Kronometer (Kronometer v1.12.0.1)
KSP Rescue Pod Fix (KSPRescuePodFix 1.6.4.14)
MagiCore (MagiCore 1.3.2.5)
Making History (MakingHistory-DLC 1.12.1)
Mark IV Spaceplane System (MarkIVSpaceplaneSystem 3.2.0)
MechJeb 2 (MechJeb2 2.12.3.0)
Mk2 Stockalike Expansion (Mk2Expansion 2:1.9.1.2)
Mk3 Stockalike Expansion (Mk3Expansion 1.6.1.3)
ModularFlightIntegrator (ModularFlightIntegrator 1.2.10.0)
Module Manager (ModuleManager 4.2.1)
NavUtilities continued (NavUtilitiesContinued 0.7.2)
Near Future Aeronautics (NearFutureAeronautics 2.1.1)
Near Future Construction (NearFutureConstruction 1.3.1)
Near Future Electrical (NearFutureElectrical 1.2.3)
Near Future Electrical - Decaying RTGs (NearFutureElectrical-DecayingRTGs 1.2.3)
Near Future Electrical Core (NearFutureElectrical-Core 1.2.3)
Near Future Exploration (NearFutureExploration 1.1.2)
Near Future IVA Props (NearFutureProps 1:0.7.1)
Near Future Launch Vehicles (NearFutureLaunchVehicles 2.2.0)
Near Future Propulsion (NearFuturePropulsion 1.3.5)
Near Future Solar (NearFutureSolar 1.3.2)
Near Future Solar Core (NearFutureSolar-Core 1.3.2)
Near Future Spacecraft (NearFutureSpacecraft 1.4.3)
PlanetShine (PlanetShine 0.2.6.3)
PlanetShine - Default configuration (PlanetShine-Config-Default 0.2.6.3)
Rational Resources (RationalResources 1.30)
REPOSoftTech-Agencies (REPOSoftTech-Agencies V1.5.9.0)
ResearchBodies (ResearchBodies 2:V1.12.0)
ReStock (ReStock 1.4.2)
ReStock+ (ReStockPlus 1.4.2)
SCANsat (SCANsat v20.4)
scatterer (Scatterer 3:v0.0825b)
Scatterer Default Config (Scatterer-config 3:v0.0825b)
Scatterer Sunflare (Scatterer-sunflare 3:v0.0825b)
Smart Parts (SmartParts 1.9.16.2)
SpaceTux Library (SpaceTuxLibrary 0.0.8.2)
StageRecovery (StageRecovery 1.9.5.4)
Stockalike Station Parts Expansion Redux (StationPartsExpansionRedux 2.0.5)
Strategia (Strategia 1.8.0)
TAC Fuel Balancer (TacFuelBalancer v2.21.5.2)
TextureReplacer (TextureReplacer v4.5.2)
The Janitor's Closet (JanitorsCloset 0.3.7.8)
Toolbar Controller (ToolbarController 1:0.1.9.6)
Trajectories (Trajectories v2.4.3)
Universal Storage II (UniversalStorage2 1.9.1.2)
UnKerballed Start (UnKerballedStart 1.2.0)
Waterfall - Restock (WaterfallRestock 0.2.3)
Waterfall Core (Waterfall 0.6.7)
Waypoint Manager (WaypointManager 2.8.3.3)
Zero MiniAVC (ZeroMiniAVC 1:1.1.2.4)

Here is my full modlist from CKAN. I was able to workaround the problem by commenting out the lowPowerMode() function in the cls.ks script. Force stopping CLS does not allow me to exit Hibernation. As for what mod or difficulty setting removed the ability to toggle hibernation, that I'm not sure of. I'm currently trying to figure that out. For some reason though, the functionality is still there, just not accessible to the player. So CLS was able to set the command state to Hibernation, with no way to bring it back to Operational. I will look into this further and see what I come up with. I understand if this issue is unique and therefore outside the scope of CLS, especially since I'm not sure yet what removed the ability to toggle Hibernation in the first place.

 

Edit:

It's Kerbalism that removes the ability to control the Command State of the probe. It handles that different using its own scripting. I just tested it using a Stock save with only kOS, and Kerbalism.

Edited by Astrofoo
Additional Info
Link to comment
Share on other sites

11 minutes ago, Astrofoo said:

Force stopping CLS does not allow me to exit Hibernation. 

This suggests it may be a mod / difficulty setting causing it. If you launch a vehicle without using CLS, do you have full capability of toggling hibernation on and off?

11 minutes ago, Astrofoo said:

I was able to workaround the problem by commenting out the lowPowerMode() function in the cls.ks script. 

This was basically my idea for a solution. In future releases, I can add options into the configuration area at the top of the main CLS.ks file which would allow users to stop CLS doing certain things, such as hibernating. That way people who experience these issues which aren't 'terminal' can simply deactivate the CLS feature causing the issue. 

Link to comment
Share on other sites

2 minutes ago, Qwarkk said:

This suggests it may be a mod / difficulty setting causing it. If you launch a vehicle without using CLS, do you have full capability of toggling hibernation on and off?

This was basically my idea for a solution. In future releases, I can add options into the configuration area at the top of the main CLS.ks file which would allow users to stop CLS doing certain things, such as hibernating. That way people who experience these issues which aren't 'terminal' can simply deactivate the CLS feature causing the issue. 

It is Kerbalism that removes the ability to toggle Hibernation on and off. I had to do a quick test with a stock save and only kOS and Kerbalism to confirm this. With that said, I agree with you. Users of Kerbalism will just need to disable this feature. Having a configuration option would be a nice solution without being overly complicated. The thing I still find interesting is that CLS was able to change the command state at all. I guess Kerbalism doesn't completely remove the feature, just hides it from the menu. Thanks for looking in to this one!

Link to comment
Share on other sites

2 hours ago, Astrofoo said:

It is Kerbalism that removes the ability to toggle Hibernation on and off. I had to do a quick test with a stock save and only kOS and Kerbalism to confirm this. With that said, I agree with you. Users of Kerbalism will just need to disable this feature. Having a configuration option would be a nice solution without being overly complicated. The thing I still find interesting is that CLS was able to change the command state at all. I guess Kerbalism doesn't completely remove the feature, just hides it from the menu. Thanks for looking in to this one!

Good to know, I appreciate your testing for this. Next release I will include options to disable this feature and a disclaimer for Kerbalism users. Thank you!

Link to comment
Share on other sites

5 hours ago, Astrofoo said:

It is Kerbalism that removes the ability to toggle Hibernation on and off. I had to do a quick test with a stock save and only kOS and Kerbalism to confirm this. With that said, I agree with you. Users of Kerbalism will just need to disable this feature. Having a configuration option would be a nice solution without being overly complicated. The thing I still find interesting is that CLS was able to change the command state at all. I guess Kerbalism doesn't completely remove the feature, just hides it from the menu. Thanks for looking in to this one!

I have just released v1.4.4 which uses a different method to activate and deactivate hibernation mode, try this with Kerbalism and see if you have any luck.

Link to comment
Share on other sites

21 minutes ago, Astrofoo said:

I'm getting an error when the script initiates the Coast Phase.

kOS Terminal Screenshot

This has been a fun problem to solve! It seems the method implemented in v1.4.4 improved reliability but reduced compatibility. No problem though, v1.4.5 adds a check to ensure the parts it is attempting to activate hibernation mode on actually have the necessary modules and goes back to using an action rather than a field. This *should* solve the problem.

I also found an issue where CLS was overloading the command part while it was in hibernation mode and it wasn't reliably running all instructions. This has been fixed by bringing the vessel out of hibernation mode earlier prior to circularisation burns.

Link to comment
Share on other sites

1 hour ago, Qwarkk said:

This has been a fun problem to solve! It seems the method implemented in v1.4.4 improved reliability but reduced compatibility. No problem though, v1.4.5 adds a check to ensure the parts it is attempting to activate hibernation mode on actually have the necessary modules and goes back to using an action rather than a field. This *should* solve the problem.

I also found an issue where CLS was overloading the command part while it was in hibernation mode and it wasn't reliably running all instructions. This has been fixed by bringing the vessel out of hibernation mode earlier prior to circularisation burns.

I can confirm the script is now working as intended in Kerbalism! The command probe enters hibernation mode during coasting phase, then returns to operational before the circularization burn. Very nice work on this one!

Link to comment
Share on other sites

  • 1 month later...

CLS v1.5.0 is now available on Github.

Make sure to remove old versions of CLS before installing v1.5.0

Changelog

- Ship will now throttle down as its apoapsis  approaches the target to ensure better orbit accuracy. Note: there are conditions under which this will not happen.
- Altered the way CLS detects thrust curves for SRBs. The old method was more accurate but the performance hit was huge. The new method is less accurate but much more compatible and performs much faster.
- Moved to my own method of fine tuning inclination. The old method was math heavy, difficult to tweak and there was a specific condition under which it would mistakenly force a launch abort. As a result lib_instaz.ks is now obsolete.
- The new method of tweaking inclination is way more simple and compares inclination with target inclination to adjust the heading accordingly.
- SRBs will now jettison when thrust curves dip below 15% instead of 25%.
- The HUD readout for throttling down the upper stage now doesn't occur until the vehicle has a high enough twr for throttling to be necessary.
- Default liftoffTWR changed to 1.4 for better ship design compatibility following some feedback.
- Steering tweak to avoid a 'kick' at the start of the gravity turn.
- The CLS menu for choosing orbital parameters now has an 'Instantaneous' launch window option. If provided with the inclination & longitude of the ascending node, CLS will calculate the instantaneous launch window needed to reach this orbit.
- New library (CLS_window.ks) included to calculate the instantaneous launch window. Thanks to u/ElWanderer_KSP on reddit and u/Rybec as the library is just a slight tweak to their work from reddit.
- When using the instantaneous feature, the HUD will show whether the launch is scheduled for the ascending node or descending node.
- Fixed an error during orbital insertion where CLS may incorrectly calculate whether to burn at apoapsis or periapsis.
- CLS will now perform a quicksave on the pad prior to launch. 
- More accurate calculation of the maximum possible apoapsis that is compatible to any planet pack or rescale mod.
- User can now define the launch time as a countdown in minutes, seconds or a combination of both.
- Fixed bug where CLS does not jettison fairings / LES if orbital insertion occurs on the first stage.
- Fixed multiple bugs with the HUD.

NOTE: The instantaneous launch window feature has been tested heavily and works as it is supposed to. However, I am not 100% confident in its compatibility with other people's game setup. If you find it is launching against the target orbit direction, please let me know.

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

TRying to use it with the stock kerbal x and just cannot get it to work.  It does not stage and when I manually stage it aborts saying the ship is breaking up.

Would it be possible to show me the settings to get a stock kerbal x to a 250km orbit?  The only change I made was to set the minimum twr to 1.1 so it would launch.  I am unsure how to set up the staging for the 6 asparagus staged booster and then the last upper stage.

I just need to see one working example of a 6+ stage rocket.   The kerbal x has no srbs. I just start with all the boosters and the center engine in the first stage and the launch clamps in the second stage. and then each pair of booster decouplers in individual stages in the order their fuel would be depleted (pretty much just as the stock ship staging is configured.)

Will try to decipher the instructions in the source but if anyone could just whip together something that would work for the stock kerbal x I would greatly appreciate it.

Thanks

Edited by ctbram
just added some stuff
Link to comment
Share on other sites

On 10/24/2023 at 2:48 AM, ctbram said:

TRying to use it with the stock kerbal x and just cannot get it to work.  It does not stage and when I manually stage it aborts saying the ship is breaking up.

Would it be possible to show me the settings to get a stock kerbal x to a 250km orbit?  The only change I made was to set the minimum twr to 1.1 so it would launch.  I am unsure how to set up the staging for the 6 asparagus staged booster and then the last upper stage.

I just need to see one working example of a 6+ stage rocket.   The kerbal x has no srbs. I just start with all the boosters and the center engine in the first stage and the launch clamps in the second stage. and then each pair of booster decouplers in individual stages in the order their fuel would be depleted (pretty much just as the stock ship staging is configured.)

Will try to decipher the instructions in the source but if anyone could just whip together something that would work for the stock kerbal x I would greatly appreciate it.

Thanks

Manual staging isn’t supported so the first bit here is to be expected.

The staging you describe sounds correct, however I off the top of my head I can definitely think of a couple aspects of the script that may not be compatible with Asparagus staging - I have never really tested the script with this type of staging so maybe a feature for upcoming versions.

I’ll investigate further tomorrow, in the mean time a little more info please:

Do the engines fully shutdown in correct order? Does the script recognise the shutdown in the HUD? If you let the script run through multiple booster shutdowns, does it eventually stage?

Link to comment
Share on other sites

18 hours ago, Qwarkk said:

Manual staging isn’t supported so the first bit here is to be expected.

The staging you describe sounds correct, however I off the top of my head I can definitely think of a couple aspects of the script that may not be compatible with Asparagus staging - I have never really tested the script with this type of staging so maybe a feature for upcoming versions.

I’ll investigate further tomorrow, in the mean time a little more info please:

Do the engines fully shutdown in correct order? Does the script recognise the shutdown in the HUD? If you let the script run through multiple booster shutdowns, does it eventually stage?

@ctbram The Kerbal X ship appears to be designed to stage barely 15 seconds into flight. This is a hard incompatibility with CLS because the script is not actively monitoring for staging events in the initial stage of flight (below 100m/s).  Adjusting the ship design so that first asparagus staging occurred later in flight  solves the issue.

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

CLS v2.0.0 is now available on Github.

It is essential that you remove old versions of CLS before installing.

When I set out to write CLS a long time ago, I had zero experience ever writing anything in code or using kOS. I reverse engineered the script from LaunchtoCirc by /u/only_to_downvote, as that has always been the best way I learn. It was still my first work though and of course that meant it had poor practises and pretty inefficient ways of doing stuff.

CLS v2.0 is basically a complete rewrite of the central code. It is by far the biggest update it has received, and it is also the one which adds next to no new functionality. This is because it focuses on optimisation and reducing the hardware strain present in v1.

Following the rewrite it is now hugely more efficient, much cleaner and much more reliable.

Below are the major changes, but there are loads more - please check the changelog.md file for a complete list.

Key Points

  • Major rewrite of main code with a view of increasing its efficiency, removing some bad coding practise and reducing hardware strain
  • Remove callouts for downrange & altitude due to high hardware strain
  • New staging pitch control to avoid sudden pitch inputs before, during and after staging
  • Pre-flight input box now allows you to specify the chance of a random failure on ascent if enabled, and define longitude of Ascending Node for precise launches
  • Ships with SRBs will now lift off at a TWR of 1.8 (previously used 1.4, but this required unrealistic & aggressive throttling of Main engines)
  • Script now ignores children parts of attached SRBs during staging checks, which was throwing a warning if SRBs had parts attached (Thanks u/StreitLeak)
  • Initial countdown now happens on a single HUD line to conserve space and limit use of scrollprint function due to its hardware strain
  • New compatibility with the TAC Self Destruct Continued Mod - Flight Termination System will deploy if a mid-flight abort occurs - no need to add them to the abort AG
  • New compatibility with the Hullcam VDS Continued mod to add a cinematic element to your launches - The script will auto switch to Hullcam VDS cameras at various points. Cameras for launch need to be tagged "CameraLaunch". Cameras for Stage sep need to be tagged "CameraSep". Cameras for onboard views need tagged "Camera1" or "camera2" with the number associated with their stage.
  • CLS now checks that a crewed pod has chutes attached in case of an abort scenario and will hold the launch if no chutes are detected. 
  • If the user decides to continue with a countdown for a crewed vessel after CLS identifies issues with the abort AG or no chutes are detected, the random launch failure feature is automatically deactived, to avoid the script throwing an error later down the line if an abort occurs.
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...