Crzyrndm Posted January 10, 2015 Share Posted January 10, 2015 (edited) All my minor mods are going into a single thread post-1.0 release. Please check my signature for the new threadSimple plugin which adds the function to reset the SAS mode to stability assist after either SAS keybind is used (toggle/hold) or on landing. Settings file allows any of the above to be disabled (so you could have it rest only on touchdown for example)Drop the .dll anywhere in GameData to useDownload hereLicense is CC0 1.0 UniversalVersion 1.1 * Added config options * Added option for reset to activate on touchdown Edited April 26, 2015 by Crzyrndm Link to comment Share on other sites More sharing options...
NonWonderDog Posted January 10, 2015 Share Posted January 10, 2015 Ah, so that's how you listen for control input.Thanks for this. I'd argue that it should only apply to the toggle key, though. I use the hold button for temporary autopilot overrides. Link to comment Share on other sites More sharing options...
MK3424 Posted January 10, 2015 Share Posted January 10, 2015 Isn't it the same thing as this?:http://www.curse.com/ksp-mods/kerbal/226817-resetsas Link to comment Share on other sites More sharing options...
NonWonderDog Posted January 10, 2015 Share Posted January 10, 2015 Same effect, but using callbacks instead of polling.It probably doesn't really make much of a difference except philosophically. Link to comment Share on other sites More sharing options...
Crzyrndm Posted January 10, 2015 Author Share Posted January 10, 2015 (edited) Ah, so that's how you listen for control input.Thanks for this. I'd argue that it should only apply to the toggle key, though. I use the hold button for temporary autopilot overrides.And you always want the autopilot to try force it's way back to whatever it was doing when you unpause? I'm not likely to change that because I can just tap it to reset the SAS mode (instead of having to toggle it off and then on again).Isn't it the same thing as this?:http://www.curse.com/ksp-mods/kerbal/226817-resetsasProbably, but a quick google search turned up no solutions so I just wrote my own (~5 lines of code + some copy paste to handle vessel switching. Sometimes it's just easier to do it yourself).The coding method has some slight differences (looking for a keypress event rather than comparing states, only finding the UI object once, etc.) but the overall effect is the sameEDIT: In my case, mods which only enable/disable SAS without changing the mode would not cause a state reset (which one of my other mods, Pilot Assistant, does do), but I'm not particularly concerned about that since I don't use stock SAS and mods which would affect SAS at the same time. Edited January 10, 2015 by Crzyrndm Link to comment Share on other sites More sharing options...
technicalfool Posted February 12, 2015 Share Posted February 12, 2015 So that's where the autopilot-toggle callback is. I was looking in GameEvents.Ho hum. Link to comment Share on other sites More sharing options...
NikoKun Posted February 12, 2015 Share Posted February 12, 2015 I didn't realize this was needed? O_o Doesn't vanilla SAS reset if you turn it off and back on again? Link to comment Share on other sites More sharing options...
curtquarquesso Posted February 12, 2015 Share Posted February 12, 2015 Honestly, this needs to be a stock change. The current functionality is slightly counter intuitive. The problem is made worse by the fact that the buttons are rather small, and sometimes you'll be fighting the SAS for control, only to realize you're locked to pro/retrograde or something.Thanks for making this. Will try it out. Link to comment Share on other sites More sharing options...
KerbMav Posted February 12, 2015 Share Posted February 12, 2015 Hm, unsure if I would want it to work always that way - any chance to make you add you own hotkey(settings)? Link to comment Share on other sites More sharing options...
curtquarquesso Posted February 12, 2015 Share Posted February 12, 2015 In that case, there ought to be a setting for that behavior if people want it both ways... Link to comment Share on other sites More sharing options...
technicalfool Posted February 12, 2015 Share Posted February 12, 2015 I didn't realize this was needed? O_o Doesn't vanilla SAS reset if you turn it off and back on again?Nope.And of course, I'd rather you use my version. Ego and all, you know....but there's basically no difference to the end user between SAS Reset and ResetSAS. Link to comment Share on other sites More sharing options...
NikoKun Posted February 12, 2015 Share Posted February 12, 2015 Nope.And of course, I'd rather you use my version. Ego and all, you know....but there's basically no difference to the end user between SAS Reset and ResetSAS.Sorry, just to clarify, I wasn't aware of the other mod. I was talking about the unmodded game.And maybe I'm just confused by your meaning of "reset". In what way does it reset? Defaults back to "hold position"? Link to comment Share on other sites More sharing options...
Crzyrndm Posted February 12, 2015 Author Share Posted February 12, 2015 (edited) And maybe I'm just confused by your meaning of "reset". In what way does it reset? Defaults back to "hold position"?It sets the SAS mode back to it's default "hold current attitude" any time the user switches SAS off. Stock just leaves it in it's current mode which can be a real pain@technicalfoolIf I'd seen your version originally, this wouldn't exist (one less thing I have to find time for). Given the simplicity though, I wasn't looking too hard.RE: Checking Inputs vs statePolling SAS state vs. Polling user inputs both have their advantages. Polling Inputs won't affect any mods which switch SAS state (my own Pilot Assistant comes to mind) There are many cases where a mod might want SAS off, but don't bother to reset the state ( ...I need to fix that now I've thought of it... ). On the flip side of the coin, polling inputs won't fight with a mod which toggles SAS on.GameSettings.<function> is for KSP bindingsInput.GetKey(<KeyCode>) is for a specific key@KerbMavEasily (ish) done. It's more a matter of finding time. I might be able to get to it over the weekend if Pilot Assistant development doesn't pop up any hurdles (big if there...) Edited February 12, 2015 by Crzyrndm Link to comment Share on other sites More sharing options...
Crzyrndm Posted February 15, 2015 Author Share Posted February 15, 2015 SAS Reset 1.1Added a config file, created on first run. You can turn off any of the checks you want from thereAdded a check for touchdown Link to comment Share on other sites More sharing options...
DuoDex Posted April 26, 2015 Share Posted April 26, 2015 Closed by request. Link to comment Share on other sites More sharing options...
Recommended Posts