Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

[Suggestion] Add ability to change max throttle of engines #287

Open fibonatic opened 10 years ago

fibonatic commented 10 years ago

KSP 0.23 is getting close and in this video it can be seen that the max throttle of each engine can be changed/controlled when building but also during flight. If controlled properly you would be able to control a VTOL much better without having to use PWM to alter each engines effective thrust.

I know that 0.23 is not out yet. But I would already like to add this suggestion to possible functions of kOS in the future.

erendrake commented 10 years ago

That is an interesting idea, for your PWM method do you bind an engine to an action group and turn it off and on? it wouldn't be impossible to throttle all of the engines in an action group, even with 0.22

MaHuJa commented 10 years ago

AFAICT there's no way to bind the throttling of individual engines to action groups. As such, this has as a prerequisite that we get a way to address individual parts in some fashion. There was some discussion of this in the kOS thread a long while back, but I don't remember the details.

erendrake commented 10 years ago

i was assuming you would be able to get the parts out of an action group and then throttle them as a group. the only reason to use action groups was to give a simple way to specify which engines you want to mess with in the in game editor.

I am pretty sure that the real way to do this is to:

that will be a lot of code :)

MaHuJa commented 10 years ago

If the only objective is to allow auto-balancing, it would be easier to have "kerbcom avionics" add a command through the kOS api that allows enabling the combined mode. If we want to be more flexible than that, we'd have to do something else.

I now get what you meant by the action groups. It shouldn't be impossible to get the parts that are "connected" to action groups - some of the code is already available in AGM (action group manager, I think). And then doing some action (where engine throttle is one example) to those parts is then a possibility. Personally I dislike relying on AGs for too much, though.

erendrake commented 10 years ago

@MaHuJa The reason i wanted to make it more flexible is the philosophy of the mod was to emulate a very primitive flight computer, not just a scripting engine that handles all of the complexity for you.

However, I think that with the addition of the tech trees in KSP i wanted to go the way of MechJeb and have progressively more advanced feature unlock as you progress. This would i believe be in keeping with @Nivekk 's original design while letting us add more syntax sugar for users.

PS I agree with you on abusing action groups.

Dunbaratu commented 10 years ago

I think it makes sense to make the computer more powerful the higher up the tech tree you go, but NOT to make the kos scripts you write simpler as the computer gets more automated for you. That makes the mistake of making the mod more hand-holdy and less expert friendly the longer you've been playing, which feels backward.