Jump to content

[ANY] FloorIt redux - press Z for 100% throttle


Recommended Posts

Requested by ObsessedWithKSP because the original author on Reddit was not reachable. You can choose from 2 versions: FloorIt Slim, the original, single-purpose remake, and FloorIt Enterprise Edition, which adds more functionality and custom keys.

FloorIt Slim

Does what it says on the label. This is just a recode of the exact same functionality, with the exact same name.

Instructions:

Press Z to take the throttle to 100%. That's all it does!

Download from Dropbox (4 kilobytes)

Source:


[COLOR=#008000][B]using[/B][/COLOR] System;
[COLOR=#008000][B]using[/B][/COLOR] UnityEngine;
[COLOR=#008000][B]using[/B][/COLOR] KSP;

[COLOR=#008000][B]namespace[/B][/COLOR] FloorIt
{
[[COLOR=#191970][B]KSPAddon[/B][/COLOR](KSPAddon.Startup.Flight, [COLOR=#008b8b][B]false[/B][/COLOR])]
[COLOR=#0000ff][B]public[/B][/COLOR] [COLOR=#ff0000]class[/COLOR] FloorIt : MonoBehaviour
{
[COLOR=#0000ff][B]public[/B][/COLOR] [COLOR=#ff0000]void[/COLOR] [COLOR=#191970][B]Start[/B][/COLOR]() {
[COLOR=#191970][B]print[/B][/COLOR]([COLOR=#0000ff]"FloorIt enabled.\nPress Z to turn the throttle up to 100%."[/COLOR]);
}

[COLOR=#ff0000]void[/COLOR] [COLOR=#191970][B]Update[/B][/COLOR]() {
[COLOR=#0000ff][B]if[/B][/COLOR]( Input.[COLOR=#191970][B]GetKeyDown[/B][/COLOR](KeyCode.Z) )
FlightInputHandler.state.mainThrottle = [COLOR=#00008b]1[/COLOR];
}

}
}

Compatibility:

This mod should work in all versions of Kerbal Space Program as long as they don't do any massive, plugin-breaking changes to the game. If they do and I don't update the mod within a week, just get a friendly mod to send me an e-mail. (Don't PM me directly, that'll fill up my inbox very quickly.)

FloorIt Enterprise Edition

An extremely sophisticated version of FloorIt. You can bind keys, disable them, increment by X, set to X, and more.

All information and source can be found on GitHub here. Please post issues and suggestions here.

Download from GitHub (10.5 kilobytes)


Credits:

The original author's name is ancientgammoner and he made the original plugin, which disappeared along with SpacePort. He has 800 votes on his Reddit thread.

License:

I grant everyone the worldwide, irrevocable, nonexclusive right to use, reproduce, publish, display, modify, sublicense, and distribute FloorIt.dll at no cost with or without credit.

Edited by longbyte1
Link to post
Share on other sites

Is there any keyboard with many 'Z' keys ? :D

Many modders like this keys (maybe because of the cartoonish 'zzzZZZ' means sleeping), a bit of user's customisation will be welcome.

Nice idea by the way, dunno why there is the 'no thrust' feature without a full thust counterpart.

Link to post
Share on other sites

Compiling isn't available to everyone. I don't know anything about coding for KSP, but I wouldn't think adding a configuration file to set the value of the key would be too hard. just have to get a variable from a file and insert it into "KeyCode.[variable name here]"

For those of us who have yet to become self-compilers, this would be a great update.

Link to post
Share on other sites
Maybe you could also have an option to set throttle to 100% on the lauchpad automatically... yeah im lazy as hell :P

Is there any way you can code it so that it can fly all my missions for me without me even having to turn on my computer?

So this just goes in "GameData"?

Yes.

Link to post
Share on other sites
So this just goes in "GameData"?

No, you can just make a folder called Plugins and it'll still work, just like the old KSP versions.

I might make a FloorIt Enterprise Edition or whatever since people are looking for ways to change it from Z to another key. I might even have keys for incrementing it by 25% or setting it to 25%, like in MS Flight Simulator.

Also, I feel sorry for the original author. His name is ancientgammoner and he made the original plugin, which disappeared along with SpacePort. Although he did get 973 upvotes on his reddit thread, I feel that I'm stealing the credit from him, so I'm going to add a remark on the OP.

Edited by longbyte1
Link to post
Share on other sites

I was messing around and found out ways to add multiple key presses. Might be something you might want to add.

For instance having z floor it. and LeftAlt + z increment or set to whatever. Anyway..

Example only..


public bool leftAlt = false;

if (Input.GetKeyDown(KeyCode.LeftAlt))
{
leftAlt = true;
}
if (Input.GetKeyUp(KeyCode.LeftAlt))
{
leftAlt = false;
}
if (leftAlt && Input.GetKey(keybind2))
FlightInputHandler.state.mainThrottle = .5f;

Link to post
Share on other sites
  • 4 months later...
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...