_selfishPerson

KSP Brake Toggle Mod

Recommended Posts

I've been working for the past few days on resolving an annoyance of mine - the physical button you assign to brakes is not a toggle, it is on when you're pressing it, and otherwise it's off! This annoys me when landing aircraft, so I made a mod to "fix" it! All it does is add another keybind, which is not in the actual keybinding menu (all the people whom I asked said it's not possible :P). So how do you change the keybinds, you ask? Well, if you right click the on-screen break button, a small GUI will show up assisting you to do this! It works nearly like the keybind menu, so it should be self explanatory. You can toggle it off by right clicking the break button again. So yeah, enjoy! I've certainly liked the small thing it does so far!

And if you have ANY bugs, PLEASE TELL ME! I'll look into them ASAP!

Download: https://mega.co.nz/#!EJNQVBqI!V6_mnZf3TKlU6XQgH9jVdYbCelaNVqP2ZI6uEcI1piU

Source code: https://github.com/ericBG/KSP-Break-Toggle/blob/master/LICENSE.txt

License: MIT

Enjoy! :D

Share this post


Link to post
Share on other sites

Gonna check this out, but you're gonna need to put a license and link to or provide the source code in this as well, or the moderators will remove your link...

Edited by UnanimousCoward

Share this post


Link to post
Share on other sites

Sorry to shut you down _selfishPerson, but what Coward says is true. Source code and a license are required.

Also : we have greed and cowardice in the same thread? I summon LustForSpace!

Share this post


Link to post
Share on other sites
Sorry to shut you down _selfishPerson, but what Coward says is true. Source code and a license are required.

Also : we have greed and cowardice in the same thread? I summon LustForSpace!

Sorry, didn't know about those rules. I'll make sure to add them on, they'll be there in 10 minutes at most!

Share this post


Link to post
Share on other sites
Sorry to shut you down _selfishPerson, but what Coward says is true. Source code and a license are required.

Also : we have greed and cowardice in the same thread? I summon LustForSpace!

License and source code have been added. Sorry for the delay, had to handle real life for a while :)

Share this post


Link to post
Share on other sites

You accidentially copied the origional paragraph that you had in the OP, just letting you know.

Share this post


Link to post
Share on other sites
You accidentially copied the origional paragraph that you had in the OP, just letting you know.

Thanks, wow I'm so absent minded.

Share this post


Link to post
Share on other sites

Oh, you don't know how much I've wanted this to become true! Thank you so much, _selfishPerson! :)

Share this post


Link to post
Share on other sites
Oh, you don't know how much I've wanted this to become true! Thank you so much, _selfishPerson! :)

Good to know it helped someone else :)

Share this post


Link to post
Share on other sites

Well, I've finally had time to test it, and unfortunately, it doesn't seem to work. :|

When I hit the B button, it works like the stock way: Hold-to-brake. And nothing happens on log. But when I click the Brakes button, I get this on log:

[Log]: [KSP Break Toggle (BreakToggle)] OnPress()

Here's the full log.

Thanks in advance for the support. :)

Share this post


Link to post
Share on other sites

The Whole point is that the Button is a normal brake and the clicking it can be perceived as a "Parking Brake".

Share this post


Link to post
Share on other sites

y'know, I kid you not, it was just yesterday when I was looking around for a new project and thought to myself "the brakes! oh how that necessary clickage vexes me." Okay, so I'm not that eloquent with my words in my head, but it seemed to fit the mood right now. Anyway, I discarded the idea because I couldn't figure out how I would even begin doing that and tackled something else instead. Great that you've built this just in time to fill the gap.

Share this post


Link to post
Share on other sites
Well, I've finally had time to test it, and unfortunately, it doesn't seem to work. :|

When I hit the B button, it works like the stock way: Hold-to-brake. And nothing happens on log. But when I click the Brakes button, I get this on log:

[Log]: [KSP Break Toggle (BreakToggle)] OnPress()

Here's the full log.

Thanks in advance for the support. :)

I haven't actually checked, but his description and code says that

1) It isn't using the stock brakes key

2) It may not have a default binding (right click on the brakes button to open set binding window)

Share this post


Link to post
Share on other sites
I haven't actually checked, but his description and code says that

1) It isn't using the stock brakes key

2) It may not have a default binding (right click on the brakes button to open set binding window)

Well, what can I say?

I feel ashamed for not paying attention to that description. Either it wasn't there when I first looked at, or I really didn't pay attention. Either way, my bad, and thank you guys for clarifying.

It works like a charm. :)

Share this post


Link to post
Share on other sites
Well, what can I say?

I feel ashamed for not paying attention to that description. Either it wasn't there when I first looked at, or I really didn't pay attention. Either way, my bad, and thank you guys for clarifying.

It works like a charm. :)

Good to know it wasn't a bug, that would be such a stupid thing to do by me haha

y'know, I kid you not, it was just yesterday when I was looking around for a new project and thought to myself "the brakes! oh how that necessary clickage vexes me." Okay, so I'm not that eloquent with my words in my head, but it seemed to fit the mood right now. Anyway, I discarded the idea because I couldn't figure out how I would even begin doing that and tackled something else instead. Great that you've built this just in time to fill the gap.

:D

Share this post


Link to post
Share on other sites

I just want to point that this mod seems to be working flawlessly on 1.0.2. Thank you for the great work once again, _selfishPerson! :)

Share this post


Link to post
Share on other sites

Unfortunately, this stopped working with the introduction of KSP 1.1. But hopefully a rebuild would be enough to make it work again. :)

@_selfishPerson, do you intend to update this mod?

Share this post


Link to post
Share on other sites

@Kowgan I'm not sure if Malah's mod duplicates the function of this mod, or not... I think Malah's is meant mainly for automatically setting the brakes on AT LAUNCH...

Might be worth a look tho, if you havent seen it before:

Malah's QuickBrake

Share this post


Link to post
Share on other sites

Since the author has been offline for more than a year now, and the license allows us modifying and distributing the mod, I've took the liberty to rebuild the mod for KSP 1.1.2.

The core function is working flawlessly; you can toggle the brake key. But currently you can't change keybinds in-game. Only through the key.cfg file.
So I've set the default toggle key to B on the cfg file, and changed my stock brake key to N in game.

Unnoficial version 1.0.1 here: http://puu.sh/oTijd/f9a414a513.zip

Edited by Kowgan

Share this post


Link to post
Share on other sites
2 minutes ago, Kowgan said:

The core function is working flawlessly; you can toggle the brake key. But currently you can't change keybinds in-game. Only through the key.cfg file.

So I've set the default toggle key to B on the cfg file, and changed my stock brake key to N in game.

Cool and thanks, but you may want to rethink your non-toggle brake key, lest you have your AIRBRAKES jiggle open and closed every time you RCS thrust to slow down during docking.

Share this post


Link to post
Share on other sites

@5thHorseman I don't use N for anything else. I created translation RCS binds on my numpad to replace IJKL/etc. It's way more intuitive for me and I don't need to change to docking mode to use them; plus each player can choose their brake-hold key as they prefer. :)

Edited by Kowgan

Share this post


Link to post
Share on other sites

Hey, I know this is an old thread, but just wondering if anyone else had noticed that if you hold B, and go to the map, or the pause menu, the brakes stay on. Handy, if you need to check the map, you can just hold and press M, and know that your craft is braking... brake-ed... broken? Although, it makes me nervous, and I end up going back to check the brake light, anyway. The pause menu is nice, because you can just pop back out of it, and the brakes stay on, but ESC is more out of the way, than M is. Maybe there are other key combos, that already act as a brake toggle. 

Edited by BimmyBot

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now