Jump to content

[1.3](Jun04/17) Automate Vertical Velocity and Altitude Control


Diazo

Recommended Posts

Erm, I'm not sure that's a good idea.

One of the most common usage scenarios of this mod is for VTOLs where you specifically don't want the up direction set by Control From Here as that ends up with the up direction being forward out the nose and the whole reason I had to add the ability to manually set the up direction in the first place.

More details on what you are trying to do? Some other way it can be accomplished maybe?

D.

Link to comment
Share on other sites

Got it, I use it mainly for skycrane and many times the root part of my skycrane is not the part I want to control it from ( for building reason, but sometime I reroot the part in the editor if I can attach the payload as I want to, using the assembly ), so I usually do this routine, right click on the part I want to control from and hit "control from here" then I go in the setting of the mod to make sure the direction is consistente with the part I used to control.

I thought of consolidate those two action with only one

Link to comment
Share on other sites

Hmmm, I could add an action to auto detect the up directon maybe?

Note that the up direction is set per vessel, it will not change when you use the Control From Here action.

D.

Link to comment
Share on other sites

Mmm dunno Diazo , I found it easy for my gameplay style bind the up direction with "control from here" , but that jsut me if it is use mainly for VTOL you would make unhappy more people :wink: ( and then they should go in the mod setting and choose the control direction it is kind the opposite behaviour )

Edited by brusura
Link to comment
Share on other sites

  • 2 weeks later...

Version 1.30a

-Fix settings file so it doesn't cause MM to void it's cache and apply patches every load.

-UI now show/hides with the rest of the UI on the F2 button.

-Add actions to set the Up direction.

The biggest change this version is changing how my settings file works so this mod doesn't continuously cause ModuleManger to think the config has changed and reapply all patches on every KSP load. Everything will be handled in the background by the mod, but note that this change means there is no longer a "TWR1.cfg" file in the .zip file you download, this is intentional.

@brusura Added the actions you can assign to action groups to change the Up direction. Note that as this mod doesn't load in the editor you will not be able to test which action is which direction until you move to flight mode. The directions on the action group (Up/Down/Etc.) are relative to that part, not the vessel, you will probably have to experiment to see if this works for you.

Happy KSPing all.

D.

Link to comment
Share on other sites

Oooh sounds like interesting stuff has been added, i'll try it out tonight. 

Frequently i've added a dock to the top of my VTOLs, set control from there, then use smart ASS to always point up. Its good for hands-free hovering. But it sounds like i won't need that anymore!

Actual question, and i'm not sure if anyone can answer this: If i set the VV key binding to one of the Action Group numbers, will it turn on if i transmit that number to a non-focused, loaded craft using Smart Parts? eg. I got two VTOLs falling through the air, i'm flying one, but want to tell the other to hover.

Link to comment
Share on other sites

@achrome All commands input by the player (and 99.9% of mods) only go to the craft that has focus. The only exception to this I am aware of is kOS where you can open up the terminal window for a different craft and issue commands through it.

Note that this doesn't mean the craft is out of control, some mods (including all of mine) remember their settings so if you set a craft to hover with this mod, then go on EVA with a Kerbal, the craft will continue to hover as that was the last command it received.

Just don't get too far away however, after anywhere from 200 to 400 meters away the craft becomes subject to KSP's clean up routine and it will be seen as a craft that has been deorbited and has crashed into the ground and been destroyed. (KSP's clean up routine does not account for engines, only orbit and gravity, so it thinks the vessel is falling out-of-control even though the engines are burning.)

D.

Link to comment
Share on other sites

  • 3 weeks later...

Never mind.  Move along, nothing to see here... 

PSA - if your ship runs out of electric charge, you won't be able to control your engines! :)

Hey Diazo - love this mod and the horizontal landing aid mod, but have something weird going on.

I was landing MinOp1 and decided to give VVC and HLA a go.  I punched in 30m and started to maneuver it close to another landed vessel.  All was going well until I decided it was time to actually set down.  The ship kept going up even though I had the vertical vel set to 0 and height to 30m.  I tried reducing the VV to no avail.  I tried reducing the height.  I tried cussing at it and sweet-talking it too.  Then I tried to shutdown the engines, but right click would not even work on the engines.  Worked for other parts though.  I did not run out of electric charge.  MinOp1's engines are no longer controllable by me.  I finally used HyperEdit to jettison all my fuel and then land the ship and Vessel Mover to place it.  I then tried reloading and after that a complete restart, but no matter what I do, MinOp1's engines are not controllable by me.  I can control engines on other vessels, but not on MinOp1.  I looked through logs and save files and can't see what's going on.  Any help you could give would be greatly appreciated.

 

Thanks,

Danny

Edited by CrashTestDanny
stupid
Link to comment
Share on other sites

  • 1 month later...

@Diazo

Figured I'd give your landing mods a try.

Slight problem with this mod: the key binding thinger keeps wanting to bind to what I think is Mouse1 (ingame it says 55665 or something) but it causes VEL to freak out and spam the log with this, non-stop, and I believe might be the culprit in some game performance issues I was having. It clears up when you set it to a "respectable" button, which is also hard to do. The odd part is that it acts as though I have a stuck key or something - as soon as I hit Change Key, it reverts to 58565 whatever, without hitting any other keys. Not sure on that one.

160729T142120.600 [INFO] [VerticalVelocity.TWR1.Update] TWR1 Update Fail! 11 System.ArgumentException: Invalid KeyCode enum.
  at (wrapper managed-to-native) UnityEngine.Input:GetKeyDownInt (int)
  at UnityEngine.Input.GetKeyDown (KeyCode key) [0x00000] in <filename unknown>:0 
  at VerticalVelocity.TWR1.Update () [0x00000] in <filename unknown>:0 

 

Link to comment
Share on other sites

@Deimos Rast After trying to bind the key, the settings screen actually displays (Key:55665) in the top line?

That is really weird, the way the key code enum works it should always display the human readable name of the key, not the key code.

As a workaround you can set the key in the TWR1.settings file in the mod folder using the keycodes found here: https://docs.unity3d.com/ScriptReference/KeyCode.html

I'll have to look into what that number means (if you could confirm the exact number, that would help), the code I'm using should always return a valid key on the keyboard or a joystick button, so I'm not sure how a random number got in there.

D.

Link to comment
Share on other sites

The number seems to vary, but it always starts with 5 and is 5 digits long. The only way to override it is to hold down the key I want and mash "Change Key".

I searched the site and didn't turn up anything.

I wouldn't stress about it; I'm fine with an out of game settings.

Q5Ngi2U.png?1

Link to comment
Share on other sites

  • 2 months later...

Version 1.31

-KSP 1.2 Update.

Github Download.

Straightforward recompile to get it working, should be no visible changes to the player. If there should be to account for the new features (remote-link), let me know and I'll look into it.

@Deimos Rast I was unable to replicate the keybinding issue you are seeing so I have not make any changes to that. If it's still happening I'll get you a custom .dll file that will generate a log file I can use to troubleshoot. This is the only way to proceed as I can't replicate the error on my machine.

Happy KSPing all.

D.

Edited by Diazo
Link to comment
Share on other sites

I tried Vertical Velocity Controller along with Horizontal Landing Aid for the first time today. Honestly, I wasn't expecting much because I thought it would be complicated and unwieldy, making manual control easier to use. I keep a lander docked at an orbiting science station around Minmus so I saved my game and prepared for a long, grueling practice session... Within minutes I was making beautiful, controlled precision landings at the location of my choice. Just wanted to thank Diazo for making an extremely tedious game a little easier and more fun to play. 

The two mods work so well together I think combining them into one mod would be great!

Edited by Betelgeuse
forgot to add something
Link to comment
Share on other sites

On 16/10/2016 at 9:29 PM, Diazo said:

Version 1.31

-KSP 1.2 Update.

Github Download.

Straightforward recompile to get it working, should be no visible changes to the player. If there should be to account for the new features (remote-link), let me know and I'll look into it.

@Deimos Rast I was unable to replicate the keybinding issue you are seeing so I have not make any changes to that. If it's still happening I'll get you a custom .dll file that will generate a log file I can use to troubleshoot. This is the only way to proceed as I can't replicate the error on my machine.

Happy KSPing all.

D.

Thank you for update of this mod. Makes landing much more precise.

Link to comment
Share on other sites

  • 1 month later...

Err, pretty much impossible.

This mod controls the main throttle and that is all it touches in the stock game.

Kerbals on EVA use the RCS system, I'd be writing any code for interacting with that from scratch and it would be something that IMO should get its own standalone mod.

D.

Link to comment
Share on other sites

17 hours ago, Diazo said:

Err, pretty much impossible.

This mod controls the main throttle and that is all it touches in the stock game.

Kerbals on EVA use the RCS system, I'd be writing any code for interacting with that from scratch and it would be something that IMO should get its own standalone mod.

D.

OK... thank you for the answer. It makes sense.

Link to comment
Share on other sites

1 hour ago, Gman_builder said:

Sounds interesting but if you didn't have to change the current keybindings to something out of the way and inconvenient i might download. Pilot Assistant does the same stuff just about without interfering with any stock settings.

For landing / hovering a VTOL. I have yet to see any other mod do it as easily or as effortlessly as @Diazo has done. I believe you can change key bindings in the cfg file if you so desire.

Edited by V8jester
Link to comment
Share on other sites

@Gman_builder As mentioned, the key is rebindable. It used to be bound to Z by default as this mod predates the "set throttle to max" function in stock that now takes up that key.

I have not been able to come up with a replacement key that works. Z was nice because it was easy to hit with it being right next to your throttle keys, but all those keys are now assigned functions in stock so I can't bind to them by default any more.

So this mod is not bound to a key by default so if the player is willing to change the stock settings they can bind any key they wish. However, having lost the Z key (I personally like and use the Set Throttle to Max function), I have pretty much migrated to using the mouse and the on-screen buttons myself.

D.

 

 

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...