Search the Community

Showing results for tags 'api'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • The Daily Kerbal
  • General KSP
    • KSP Discussion
    • Suggestions & Development Discussion
    • Challenges & Mission ideas
    • The Spacecraft Exchange
    • KSP Fan Works
  • Gameplay and Technical Support
    • Gameplay Questions and Tutorials
    • Technical Support (PC, unmodded installs)
    • Technical Support (PC, modded installs)
    • Technical Support (PlayStation 4, XBox One)
  • Add-ons
    • Add-on Discussions
    • Add-on Releases
    • Add-on Development
  • Community
    • Welcome Aboard
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
  • Making History Expansion
    • Making History Missions
    • Making History Discussion
    • Making History Support
  • International
    • International
  • KerbalEDU Forums
    • KerbalEDU
    • KerbalEDU Website

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


Location


Interests

Found 12 results

  1. Connected Living Space (CLS) NOTICE to CLS USERS: Codepoet's real life is preventing him from supporting CLS. He has asked and I have volunteered to support CLS going forward. Codepoet is NOT gone, but has no time. Therefore, I'm cloning his OP and creating a new thread to continue the support and maintenance of CLS. Source code and download locations will remain the same, only the Forum thread will change (vBulliten limitation). The link to the original CLS thread is here. The link to the original development thread is here. The Forum mods have locked the original thread, so post your needs in this thread going forward. Current Version, 1.2.6.2, For KSP 1.4.3. Can be downloaded from SpaceDock || GitHub NOTE: Version 1.2.6.2 is backwards compatible to KSP version 1.3.1. (Thanks to @cakepie for the PR) You will also need ModuleManager to load the config files for CLS to work. CLS now supports KSP-AVC, an addon version checker. If you have KSP-AVC inistalled, it will detect when CLS needs to be updated. CLS also is listed in CKAN for your automatic installation convenience. You can access the source code here. If you spot a bug please let me know. Ideally bugs should be raised in Github. More helpful than raising a bug report is to raise a bug report with lots of information about how to reproduce the problem, and with logs files, save files, craft files etc. Even more helpful is to write a fix by forking the code in Github, and then generating a pull request Introduction This mod identifies areas within a vessel that can be crewed by Kerbals and through which kerbals can pass internally to reach other parts that can be crewed. It is provided to make the concept of connected living spaces easily available to other mod developers and so to provide a single consistent understanding of which pars connect to each other, bringing together both multiple features via plugins and multiple part pack via configurations. CLS itself has a simple GUI to show the player which parts are connected to which. It also has an optional feature that conforms the stock crew transfer system to CLS's view of internal connectivity. License: ConnectedLivingSpace is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License CLS API WIKI - of interest to modders using CLS in their own mods. There is also some early documentation in the development thread. While CLS is primarily an API, it will operate in standalone mode, and does offer a few features. Check out Acessing CLS and CLS Features in the Wiki for details.Updates Acknowledgements: @codepoet, for the original ConnectedLivingSpace. Thanks for a great idea and your support. @JPLRepo, for many nights of helping me better understand KSP and reflection. @Kerbas_ad_astra, for contributions to config files @cakepie, for contributions to enable Airlock Plus compatibility and bug fixes @Booots, for contributions to enable Recoupler compatibility. @linuxgurugamer, for helping keep the mod going in my absence! and many others. I will continue to add as I go back and review my change logs. This section was long overdue. Change Log: ---------- release v1.2.6.2 release date: 13 Jun 2018 - recompiled for 1.4.3 - incorporate PR #102 Add Italian translation. Thanks to CRL42! - incorporate PRs #101 from cake-pie make CLS 1.3.1 compatible. Thanks cakepie! - Updated KSP-AVC version file to reflect backwards compatibility to KSP 1.3.1 - fixed Git issue #99 inflatable airlock deploy/retract does not update clsvessel state. Incorporate PR #100 from cake-pie. - incorporate PR #98 from cake-pie correct updating cls state on crew movements Thanks cake-pie! - fixed Git issue #96 localization of certain languages due to string order. - Added surface attached is passable to structural tubes (Making History). - Recoupler issue hatch status not changing when opening/closing hatches after recouple release v1.2.6.1 release date: 09 Apr 2018 - Made solution structural changes to ensure improved multi developer support and distribution. Reorganized / cleaned up solution folders - Added missing configs configs to CLSStockFreedomAddon.txt per PR97 by wookieegoldberg, Thanks wookie! this updates some renamed parts, and adds some Making history parts. release v1.2.6.0 release date: 09 Apr 2018 - Added configs for new Mk1-3 pod to base CLSStock.cfg - Added configs for Making History Expansion - Added configs to CLSStockFreedomAddon.txt per PR97 by wookieegoldberg, Thanks wookie! this updates some renamed parts, and adds some Making history parts. release v1.2.5.8 release date: 17 Mar 2018 - New: Recompiled for KSP 1.4.1 - Fixed: CLS ApplicationLauncher Button is blurry in KSP 1.4 update. Updated textures to 128x128 px. Git issue #95. - Added back in Recoupler support. Previous PR#83 accidently removed it. Merged PR#94. Git issue #83. release v1.2.5.7 release date: 30 Jan 2018 - Changed: Color for "No" response in information displays changed from Maroon to OrangeRed to improve readability (contrast) - Fixed: Blizzy's Toolbar wrapper needs updating. Git Issue #77 - Fixed: Vessel data is not updated when creating/modifying/deleting a vessel in the Vessel Editor. Git Issue #85 - Fixed: Passable strings reversed. Git Issue #92. (thanks to @yalov!) - Fixed: Hatch status reporting error in tweakable. Git Issue #93. release v1.2.5.6 release date: 29 Jan 2018 - Correct errors in config files for Mod version, and KSP version supported. release v1.2.5.5 release date: 03 Jan 2018 * New: PR from linuxgurugamer for an Updated CLSB9.cfg: Thanks to @Mine_Turtle: linuxgurugamer has added CDP docking port(supposed to be used with s2 parts) to the list and made s2 crew parts passable, when surface attached. Reason: there is no inline s2 docking adapter, nor it is possible to attach stock docking ports to s2 modules and have crew transfers with CLS. release v1.2.5.4 release date: 28 Oct 2017 (beta by linuxgurugamer) * New: Merged PR from @tyehle: Make kibble storage passable. Fixes #87 * New: Merged PR from @yalov: Localizations * New: Merged PR from @cake-pie: Refactor * New: Merged PR from @kerbas-ad-astra: Some new part configs release v 1.2.5.3 release date: 1 Jun 2017 * New: Added Spanish translation. (Thanks to Deltathiago98!) release v 1.2.5.2 release date: 31 May 2017 * New: Added compatibility with Airlock Plus. (thanks to cakepie!) release v 1.2.5.1 release date: 29 May 2017 * New: Added support for Recoupler. Modders can now request to merge spaces on reconnect of parts. -------Note to Modders: This changes the CLSInterface.dll, so if you use this and want the new features please include the latest CLSInterface.dll with your mod. * Misc: Cleaned up text rendering to consistently use C# string interpolation. release v 1.2.5.0 * New: Refactored to support KSP 1.3 * New: Implemented Localization system. Now it is possible to translate CLS into other languages. English included to start. * New: Revised Crew and part display window for spaces. now takes less real estate, and is more intuitive. * New: Revised Space selection buttons to make it easier to tell which space is selected. Now buttons toggle to allow deselection of a space. release v 1.2.4.2 * New: Added a custom event to notify mods that the CLS vessel data has been refreshed. * New: Added a some configs per GitHub issue and PR 79 Thanks Kerbas-ad-Astra! release v 1.2.4.1 * Fixed: Some parts were not merging spaces event when hatches were opened. Github Issue #75. Forum Post: http://forum.kerbalspaceprogram.com/index.php?/topic/109972-122-connected-living-space-v1240-30-dec-2016-customize-your-cls-parts/&do=findComment&comment=2906269 * Fixed: CLSDefaultPart.cfg was included in distribution. There should only be a CLSDefaultPart.cfg.txt file. Removed. Github Issue #78. release v 1.2.4.0 * New: Refactored to support KSP 1.2.2. * New: Completely refactored method used to Add hatches to vessels. Now utilizes a module manager config, eliminating prefab manipulation in game. * New: Code refactored to improve performance and garbage collection. * Fixed: Some parts containing ModuleDockingNode without a referenceNodeName would be rendered impassable in some nodes. * Fixed: NRE generated during Vessel load. The addition of a female kerbal broke the CLS Module attachment code when a vessel is loaded at Flight. (This was a old undetected bug, that may explain some parts not showing as passble) * Fixed: Spammed Index out of range error during space changes while CLS Window is opened. release v 1.2.3.0 * New: Added support for intercepting Parts selection list during stock Transfer target part selection. A part not in the same space will be unselectable and is highlighted orange like full parts. * New: Added support for overriding the "Allow unrestricted Crew Transfers"in CLSInterfaces.dll setting via other Mods to prevent "competition" between mods when handling stock crew transfers. * New: Updated config for Docking Port Jr. Squad now says that a kerbal can squeeze thru. * New: Refactored code to improve performance, recuce garbage collection, & use Explicit typing. * Fixed: CLS windows now properly close when changing scenes. * Fixed: In the Editor, part highlighting does not work correctly when adding new crewable parts. release v 1.2.2.1 * Fixed: Stock Crew Transfer fails for "not in same space" even when the 2 parts are in the same space. release v 1.2.2.0 * New: Refactored Stock Crew Transfer Handler to use new KSP 1.1.3 events to pre-empt the transfer if disallowd by CLS. release v 1.2.1.5 * Fixed: Finally squashed NullRef exceptions when RemoteTech is installed. * New: Added Distribution folder to project for ease in locating binaries from Git. * New: Added folder check for PluginData to ensure proper config file creation when Mod is installed. release v 1.2.1.4 * Fixed: NullRef exceptions when RemoteTech is installed. * New: Moved configuration file from GameData root folder to GameData\ConnectedLivingSpace\Plugins\PluginData folder to comply with KSP folder standards for mods. release v 1.2.1.3 * New: Changed behavior of CLSClient.cs (API wrapper class) to prevent additional assembly scans when called. Ref Git Issue #72. * New: Added new configs for Taurus HCV. Git Issue #71 * New: Added config changes for KOSMOS SSPP Git Issue #69 * New: Refactoring for KSP 1.1.2 (WIP) release v 1.2.1.2 * Fixed: When a Stock Crew transfer is overridden, the override message is not properly displayed. * Fixed: When a Stock Crew transfer is overridden, the original move message is not properly removed. :release v 1.2.1.1 * Fixed: Null reference errors. * Fixed: Window would not open release v 1.2.1.0 * New: Updated mod for KSP 1.1.2 compatability. prerelease v 1.2.0.9 New: Updated mod for KSP 1.1 compatability. New: Corrected Stock Screen Messages so that they are properly removed when CLS overrides a Stock Crew Transfer. Fixed: CLS would not display a window when the stock Icon was clicked. Fixed: CLS should now only display 1 icon in Editor or flight. Removed redundant icon call in Start, now that stock buttons now behave as intended.Version 1.2.0.2 - 21 mar 2016 New: Added Changes to configurations based on conversations in forums and a Pull Requests by Technologicat, khr15714n & Kerbas-ad-astra. Fixed: Correct build deploy automation to project (missing icons for blizzy). Fixed: CLS tweakables incorrectly visible when custom passability is disabled. Version 1.2.0.1 Corrects an implementation bug. in 1.2.0.0 release, the wrong dll was distributed.. Build and deploy process is now automated. Version 1.2.0.0 makes CLS KSP 1.0.5 ready, and adds a new feature to the VAB/SPH Customizable Part configs for CLS. This feature is off by default. Refer to the CLS Wiki for more details on this handy new feature. Version 1.1.3.1 Fixes a KSP 1.0.2 toolbar issue when Blizzy Toolbar is not insatlled, a display issue with options when no vessel is loaded, and a change to the Freedom Alt Stock MM config. Version 1.1.3.0 Fixes a KSP 1.0.2 toolbar issue, a vessel loading bug, and adds support for Blizzy's toolbar. CLS now supports KSP-AVC if you have it installed. Version 1.1.2.0 Fixes a bug. Version 1.1.1.0 makes changes to the way hatches and highlighting work to make is easy to co-operate in these areas with other mods. Version 1.1.0.0 makes CLS work with KSP 0.90 Version 1.0.11.0 fixes a bug with the stock crew transfer integration Version 1.0.10.0 fixes a bug and integrates with the stock crew transfer system Version 1.0.9.0 is to support KSP0.25 and adds more config for various mods. Version 1.0.8.0 is to support KSP0.24.2 and uses the new stock toolbar. A bug in the VAB/SPS descriptions is fixed too. Version 1.0.7.0 fixes a bug in the editor when the root part is deleted, and adds config for FASA Version 1.0.6.0 fixes some problems with the hatches closing themselves across saves, and also allows hatches to be opened for attached rather than docked docking ports. Version 1.0.5.0 provides a scheme for mods using CLS to "loose bind" to it, which means that they can more easily work without CLS. However if you upgrade to 1.0.5.0 you should update other mods such as Ship manifest that use (or do not use!) it. Version 1.0.4.1 fixes bugs, allows for shielded docking ports and is the result of a major rework of the code. Hatches in docking ports have been re-written. There is also config for many more mods, and more options for the configs. Version 1.0.3.0 fixes a few bugs and adds more configs Version 1.0.1.0 is now available. this version adds closable hatches in docking ports, as well as improvements to the GUI, and configuration for more part packs. Here is a deep space transport vessel docked at an LKO transfer station with 3 crew shuttles also attached. Mods using the CLS API Here is a list of mods that have been released that make use of ConnectedLivingSpace. If you would like to add your mod to this list, send me a PM. KerbalHotSeat Ship Manifest Kerbal Crew Transfer Wetworks crew tanks KeepFit Recoupler (thanks to @Booots!) AirLock Plus (thanks to @cakepie!) Mods that provide CLS configuration themselves. This list is by no means complete. If you would like to add your mod to this list, send me a PM. Sum Dum Heavy Industries USI Modular Kolonization System GingerCorp Station Hubs Lack Luster Labs. (separate link from the forum thread) Fustek Kip Engineering: Low profile structural hub set MRS Space Station Parts Expansion Near Future Spacecraft Civilian Population Mods that CLS provides config files for: Here is a list of mods that CLS provides configuration files for. If you would like to add your mod to this list, send me a PM. FASA Novapunch B9 Home Grown Rockets KSOS LSSC ASET Stack-able inlight lights Kosmos KW Rocketry Porkjet's Habitat Pack 2 different stock configurations. and loads more (I loose count!) Mods that the community has provided config files for: Taurus HCV. Contributed by: ModZero Roadmap Provide configuration for every part pack anyone has ever heard of. improvements to the GUI (added in v12.5.0) hooks that can be used by mods such as Porkjet or wetworkshops to change the passability / habitability of parts in flight.
  2. KSPWheel - An alternate physics-based wheel collider solution for Kerbal Space Program. This is not a parts mod. It does not add new parts to the game. It is useless by itself. What it is, is a new Wheel Collider component, and a set of PartModules to enable its use on stock-rigging-compatible wheel models. It is intended to be packaged as a dependency with other mods, similar to how FireSpitter / ModuleManager are used. What it does is provide a new physics-based wheel collider that is not subject to the limitations or performance constraints of the Unity5 WheelCollider component or the stock KSP PartModules. It allows for multiple colliders in a single model with arbitrary collider orientations. It uses a discrete spring/damper based suspension model that properly responds to changes in wheel loading (add more weight, and the suspension compresses more) (also now includes an optional auto-spring-calculation mode). Includes curve-based independently tune-able lateral and longitudinal friction calculations, configurable rolling resistance, accurate and configurable motor power use calculations, and configurable steering parameters. There is nothing here intended for end-user use. This plugin is an API and consists purely of functions and features intended for other mods and modders to use. This thread is intended as a centralized area for discussion of features and balance. DO NOT use it to submit bug reports. You may -check- with others to see if something is a bug through the forum thread, but if it turns out to be a bug, you -must- file a report through github; failure to properly file the bug report will result in the bug not being fixed. Downloads: https://github.com/shadowmage45/KSPWheel/releases Documentation: https://github.com/shadowmage45/KSPWheel/wiki Bug Reports: Only accepted through Github. Include logs (KSP.log), screenshots if applicable, and steps for duplication or your issue will be summarily closed without response. Be polite, do the responsible thing, and file proper bug reports. Bugs reported on the forums will result in being reported to moderators for cluttering the thread and being personally ignored. Just don't do it. If you can't be bothered to submit a proper bug report, I'm not going to bother to fix your problem. Source: https://github.com/shadowmage45/KSPWheel License: Source is licensed under GPL. Please see the accompanying license files, browse them at the repository, or view them on the web at: https://www.gnu.org/licenses/gpl-3.0.en.html Legal / Other: This mod redistributes ModuleManager under its own license terms. KSPWheel is Used in the following mods (pm me to be added to the list):
  3. The KSP api has become pretty large now, with over 2000 classes, and as it has no documentation it can be a struggle to find out what anything does. There have been a couple of attempts to create community driven documentation, but they have all been difficult to update and have stalled. I present to you the KSP API Wiki It uses reflection to build up a framework of all the classes, methods, fields etc and then allows you to attach a comment to each. It also downloads the squad API documentation and includes that. It is pre-populated with the comments already created in the anatid documentation created by The_Duck Come if you want to know what the modding communities best guess of what a method does, and if there is a class that you have used that isn't documented, please help out by adding an appropriate comment. No account required. Huge thanks to @micha for providing working hosting allowing this project to continue.
  4. Hello KSP forum players I need help to create a plugin for the OptionalAtmosphere mod, the plugin will deactivate the non-existent atmospheres in UI only (help me please)
  5. Dear international friends: I've been working on the plugin recently, and I wonder what's the Instance fields in kerman's hatch and back? As is shown in Thanks!
  6. I'm maintaining the USAF Orion mod, and it's been noticed that vessel mass is not decreasing as pulse units are expended. I chucked in some diagnostic logging and what seems to be happening is the parts (essentially custom fuel tanks) are decreasing in mass, but the vessel isn't. So, adjusting the mass of a pulse unit magazine is done with this super complex formula; this.mass = (this.bombStockpile * this.bombMass) + this.dryMass ; Debug.Log("[USAFOrion] adjusted mass of magazine " + this.bombStockpile + " to " + this.mass); With my little debug line. And mass (and bombStockpile) decrease as the units are used up. But when I add in; Debug.Log("[USAFOrion] Nominally this should have updated the vessel mass. It now shows : " + vessel.totalMass); the vessel doesn't change mass at all. Even if I run vessel.UpdateResourceSets(); base.onPartFixedUpdate () ; which would seem to be the sort of thing you do to recalc vessel things. So, A: Am I adjusting the part mass at all, or just some value that doesn't actually come into play anywhere? B: If (A:), is there a way of triggering KSP to recalculate mass (and CoM) of the vessel?
  7. I've got serious problem with using a List / Dictionary collection classes where adding data in one event does not propagate to other event. Code example: using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace TestPartPlugin { public class TestPartPlugin : PartModule { public struct teststruct { public string s; public int i; } public class testclass { public string s; public int i; } // this is shared among events, it will be passed as argument, for purposes of this example its not a problem ? public List<teststruct> l = new List<teststruct>(); public string ss; public override void OnLoad(ConfigNode node) { base.OnLoad(node); ss = new string('x', 10); // just allocate in runtime and fill it with dummy data, for reference to the problem at hand teststruct t; //now the interesting part for (int i = 0; i < 10; i++) { t = new teststruct(); //also did same with testclass, same problem t.s = "a"; //dummy fill t.i = i; l.Add(t); //add new item. if i looped in collection inside here, it would work } } public override void OnStartFinished(StartState state) // now the troublesome part { base.OnStartFinished(state); Debug.Log("LIST DUMP START"); foreach (teststruct t in l) Debug.Log("string: " + t.s + " int: " + t.i.ToString()); // BANG ! List/struct is empty ! Debug.Log("LIST DUMP END"); Debug.Log("simple string test: " + ss); //this worked, meh ... } } } I need a mutable collection that will be filled in OnLoad() and then later being used in OnStartFinished() . Right now, when i fill data in OnLoad(), inside OnStartFinished() my collection will be empty, no data is present. What now ? would using "out" keyword in method argument work ? I tried "ref" also with no result.
  8. Hello everyone from ksp here is my second mod (it's not a mod but a plugin!) My plugin will be alien manager. But in the future the mods will be public. thank you for your patience
  9. Bonus Tips : A Random Guide to PartModules A year ago I started to delve deeper into C# and Unity's API as a hobbyist programer. I've learned a lot since then and now I'm giving that information to you, in no particular order. Random Tip #1 - KSP PartModules are Unity Game Object Components Any class in C# that inherits from the Unity Monobehaviour class is a Game Object component. This is more a conceptual cornerstone rather than a practical tip. KSP's API already has a bunch of ways to get at its many different classes and structs, but keep this in mind. You can always use Unity's vanilla methods regarding component Adding, Subtracting, Destroying, Instantiating, and the like regarding your own PartModule class as well as other KSP Classes which have inherited from Monobehaviour. Random Tip #2 - Don't Forget About Unity KSP's API is built on top of the Unity API. Unity has pretty vast documentation and StackOverflow style Unity Answers. Don't forget to use these resources. Most of the progress I've made modding KSP has come from going through Unity tutorials on Youtube. Random Tip #3 - Don't Listen to Anyone Older than One Well, maybe listen, but certainly don't blindly trust. There is a lot of information out there about Unity and a good amount from 2011. Much of it is obsolete now that KSP is built on Unity 5.4. For instance, did you know that Unity 5 now automatically caches Transforms? Yeah it does, when you access a Transform through a method search like Find() Unity will automatically cache that transform in memory. However in 2011 you had to assign the Transform to a variable within your class if you wanted to keep that Transform available in memory. So, don't fully trust information older than a year. Random Tip #4 - How to Lerp Using lerp functions is actually very easy. Lerp or linear interpolation is a way to return the incremental value between two bounds at a given time assuming a constant speed. Think of an animation clip. It has a frame at the beginning, Frame 0, and a frame at the end, Frame 60. Frames 0 through 60 represent 61 units of time. Now imagine we want to animate the position of a game object on the Y axis from 0 meters to 1 meter. We set the value of Y for the first frame to 0 (Frame 0, Y = 0) and the value of Y for the last frame at 60 to 1 (Frame 60, Y = 1). Imagine we scrub to Frame 30 in the timeline, what will the value of Y be? Yes it's 0.5, because the value of Y is progressing in a linear fashion. So, how do we use the lerp function. There's a couple of things to keep in mind. A lerp function will only ever return a single value, it's just an equation. Lerp isn't meant to be used as an easing function. It can be, but that's just a hack. Because it only returns a single value at a given time, all lerp functions need to be used in a loop of some kind. Preferably in a Unity update method, like FixedUpdate(). Let's lerp: public Transform t = somethingWeWishToMove.transform; public float startTime = -1f; public bool isLerping = true; public void FixedUpdate() { if(isLerping) { if(startTime == -1f) startTime = Time.time; t = new Vector3(0f, (Mathf.lerp(0f,1f,startTime/Time.time))*TimeWarp.fixedDeltaTime, 0f); if(Time.time >= 60f) { isLerping = false; startTime = -1f; } } } That's it for today, I'll be posting more again soon. Next time we'll be delving into the Delta of Time. Till then, Happy coding
  10. In a museum setting, Kerbal Space Program would be COOL, but very high maintenance out-of-the-box for the casual visitor (e.g. dedicated docents keep people trapped while configuring and testing lengthy missions). I'm thinking about something more self-serve, freeing up time for docents to move around and open up a display for additional users. A dream (without much knowledge about KSP add-ons or functionality...yet): Create a kiosk app that lets people choose a few options in a visual menu system (not in KSP yet). Wing configuration, body type, rocket length, stage options, etc.,. Will it make it to orbit??? The kiosk app creates a script and launches KSP with options. Kerbal people nod at each other and the rocket launches. Fail or success?? You will see, then have the option to try again. Bonus: share with your friends via the touch screen kiosk (post-flight kiosk feature). No keyboard. No mouse. No KSP menus unrelated to kiosk goals. Just touch and go and repeat. Does this seem remotely possible? I see an extensive API and add-on capabilities. This looks like a great start! Worst case, I see recording several options and playing videos based on selections. This does get complex to handle with more options though. I don't need specifics, but good clues will help me get started. Thanks for taking a look!
  11. tomf

    New KSP API Wiki

    The KSP api has become pretty large now, with over 2000 classes, and as it has no documentation it can be a struggle to find out what anything does. There have been a couple of attempts to create community driven documentation, but they have all been difficult to update and have stalled. I present to you the KSP API Wiki It uses reflection to build up a framework of all the classes, methods, fields etc and then allows you to attach a comment to each. It is pre-populated with the comments already created in the anatid documentation created by The_Duck Click if you want to know what the modding communities best guess of what a method does, and if there is a class that you have used that isn't documented, please help out by adding an appropriate comment. No account required.
  12. I'm working on yet another landing guidance plugin. I'm almost ready to share an early version, but I'm having trouble with the coordinate system. In particular, I'm trying to find the latitude and longitude of the active vessel on its current orbit at some arbitrary time in the future, taking into account the rotation of the planet. The code looks something like this (with a nod to KER for inspiration): Vector3d position = vessel.GetOrbit().getPositionAtUT(currentTime + deltaT); double bodyRot = 360 * (deltaT) / body.rotationPeriod; double lat = body.GetLatitude(position); double lon = NormAngle(body.GetLongitude(position) - bodyRot); //NormAngle normalises the angle between -180, 180. When I continue on the current orbit and sample the actual lat and long at UT = currentTime + deltaT, I find: a ) Lat and long are both a bit off (0-2 degrees), thought long is usually more wrong than lat (possibly suggesting that my bodyRot is incorrect). b ) The error is greater the further in advance I try to calculate the lat and long (if I calculate no more than a few minutes into the future the error is negligible). I suspect that my understanding of the value returned by Orbit.getPositionAtUT() might be incorrect. It seems to return a value which is sort of "the position that the vessel would be in at time UT if the main body stopped moving", which I think would make my logic consistent. But either of those assumptions may be wrong. Can anyone offer any advice, or an alternative method?