Jump to content

[1.3](Jun08/17) ModActions: Control your vessel (including other mods) via ActionGroups.


Diazo

Recommended Posts

Version 1.1a

Various bugfixes.

Update GPOSpeedPump integration for new maintainer.

Download here.

I'm not sure I'll have any more time to work on this before KSP 1.1 hits so I'm releasing what I've got so players have access to the latest version.

Note this version does not change copying actions in anyway. That issue is caused because there are multiple engine types that are seen as different so the same logic that stops you copying from an engine to a solar panel stops you from copying between different engine types.

I'm looking into how to deal with this but it's not going to be ready anytime soon.

 

D.

Edited by Diazo
Link to comment
Share on other sites

A huge thank you for this!:D Did not expect you to take me up on my request, since it was a bit out there. Hopefully, it wasn't too much trouble to make it compliant with the latest version.

On 3/19/2016 at 4:36 PM, Diazo said:

Note this version does not change copying actions in anyway. That issue is caused because there are multiple engine types that are seen as different so the same logic that stops you copying from an engine to a solar panel stops you from copying between different engine types.

That's sort of what I figured. When you say engine type, I take it you mean the technical config listed "EngineType = SolidBooster" or Electric, LiquidFuel, etc? If so, and I was really desperate to get it working 100%, couldn't I just run a MM patch that changes problem engines to all one type? I've switched the type of engines before with no discernible effects, but maybe there are some that I missed. Just a thought, not saying I'll go that route, or that I even need to (it wasn't that big of an issue to start with).

Oh, and just today, this mod saved Bob Kerman's life by allowing him to throttle back some overtuned SRB I designed mid flight. That's when you know you have a workable UI - when you can set up thrust limiters for your engine with Mod Actions, assign it to a hotkey with AGExt and execute it successfully while you're strapped to an overheating engine that's about to explode and all while spinning wildly out of control. Maybe not the most realistic usage, but useful nonetheless.:P

Cheers, and thanks again.

Link to comment
Share on other sites

@Deimos Rast This mod actually works off partModules so the different engines in question are the ModuleEngines and ModuleEnginesFX.

They are very similar so I should be able to come up with something to allow copying, but it's going to have to be a one-off exception I specifically code for.

Also glad to hear it's working for Bob, all my mods are pretty much aimed at expanding the potential of the action groups system, it's quite limited in stock and is capable of so much more.

D.

Link to comment
Share on other sites

And I suppose it's not as simple as swapping the two modules? From what little I've seen of ModuleEnginesFX I seem to remember it's the one connected (as the name suggests) to all the custom effects, which I'm guessing you'd lose (I'm thinking purely from a MM patch perspective, as that's the extent of my experience). Eh, yeah, I think that'd be messy, especially since with MM it couldn't be done on the fly (that I know of). Oh well, just thinking outloud. :P

Cheers (and thanks again).

Link to comment
Share on other sites

@Diazo For a future (post KSP v1.1) release feature, is there any chance of including the capability of changing the authority strength of control surfaces? I think you'd probably have to do some integration with the StockBugFix mod. (I'm pretty sure authority and response rate are unlocked by that mod rather than being a stock feature.)

I mainly work with space- and airplane designs. Since 1.0.x added stock "flaps", it been relatively useful to use control surfaces as such (mainly on re-entry and landing for me.) But I also use an autopilot system (PilotAssistant). It sometimes get jittery (high velocity and all), so I find myself adjusting control authority on the (literal) fly to compensate. It'd be nice to have action group control instead. (Especially for a recent design I made that has an extra set of multi-use control surfaces. I change their purpose as the flight demands: fixed flaps, extra pitch, extra roll, airbrake.)

Link to comment
Share on other sites

@Diazo I know you said you're done till 1.1, but could you maybe take another peak at integration with GPOSpeedFuelPump sometime down the line? No real rush, but it doesn't quite work 100% it would seem.

  • Adjusting Pump Level Increments works
  • Toggling Balances Doesn't Work
  • Toggling Pumping Doesn't Work

To be clear, I'm talking about the @hab136 version. He's not technically the official maintainer, just to be clear, just a helpful individual who fixed it up. I realize that may complicate things, and if I wasn't clear about that in the beginning, I apologize (I mentioned it briefly, but wasn't clear).

And....the forum ate the rest of my post. Basically, I asked about the file "GPOSpeedFuelPump.actions" and if adjusting values in there would change things in game for the better (my guess is no).

(Also, how does your "part.cfg" work? Or rather, what do the respective modules connect up to? it Just curious - unrelated to the topic at hand).

Cheers, and thanks again.

(I have the latest versions of both - 1.6 GPO and 1.1a ModActions, which seems to be missing a versioning file by the way).

 

Link to comment
Share on other sites

@StahnAileron I should certainly be able to do that, I just need to know where to find the functionality to hook into. I can look into StockBugFix and see if I can add it through that to stock, it looks like that feature is already present if FAR is installed but I couldn't find it in stock so it got left out.

@Deimos Rast As far as I can tell, the current version is working with GPO Pump, the issue I think you are running into is that the right-click part menu does not refresh until you reopen it so you have to right-click the part again after activating the action group to get the new status of the part.

Having said that, version 1.1b here adds code to force the refresh of the right-click part window so it should now update automatically to display the new status of the part. (If this resolved your issue, I'll push it to release. Just want to make sure it actually fixes your issue first.)

I don't use a versioning file in my mods, I print a line to the log when my mod starts inside the game to keep track of which version is running. I started modding before versioning files existed and have seen several types come and go and so I don't bother trying to keep up with what is currently being used.

The part.cfg file is a ModuleManager patch that tells KSP which parts should have the partModules from this mod, those modules are actually found in the ModuleModActions.dll file and their source code can be browsed on my GitHub.

The .action files are how I keep track of the different mods, and their actions, that I am controlling via action groups. In general these files shouldn't be touched as that will break the mod, the exception being the "name = " line, this is what shows in-game on the action button and is the default for what the action name changes to (as seen in the GUI). You could change this line if you wish, just keep in mind it has to fit on the button on-screen.

For actions that have a data entry line, the "data =" line is the default that will appear when you select that action. You could edit this, but you have to be careful as it has to be a number that KSP can understand and it will be that default on a go-forward basis.

Hope that clears things up,

D.

 

Edited by Diazo
Link to comment
Share on other sites

Hey @Diazo I am trying to set up 2 action groups to set the thrust limiter on 2 engines. I want 1 group to set the limit 100% for both engines the other to set 1 engine to 92.5 and the other 65.5. However when i use this mod to create the groups, and I switch between the 2 action groups it is as if it forgets what it was previously set to. In flight it only remembers the last thrust limit set. I can't get 2 groups with different thrust limits. Really kills my use for the mod to avoid having to manually set throttle limits for VTOL. Is it just me or is this working as intended?

Link to comment
Share on other sites

That is certainly not working as intended, each action on each part should remember the thrust limit it is set to individually. There should be no linking of actions like that.

What is the symmetry state of these engines? That is quite possibly what is causing this issue if that is doing something I don't expect. (Also check the log for errors, etc. please.)

D.

Link to comment
Share on other sites

1 hour ago, Diazo said:

That is certainly not working as intended, each action on each part should remember the thrust limit it is set to individually. There should be no linking of actions like that.

What is the symmetry state of these engines? That is quite possibly what is causing this issue if that is doing something I don't expect. (Also check the log for errors, etc. please.)

D.

The engines are not in any symmetry. It is a lift fan and a main engine. Checking logs I see no errors. I am uploading an some screenshots to help convey what is happening. 

 

Thanks for the help!

Oh wow I just realized it is me... :blush: I can make more than 1 throttle limit action per engine. So instead of making an action for 100% and then changing it to 65% for a different action group make 2 distinct action for each engine. Not doing that causes the group set to 100 to go to 65%, but if I (now) obviously set up 2 action with different throttle limits they are work as intended. Hope that make sense. Thanks anyway for your time! I'll still attach the images as I am sure if you see them my error will be obvious, and maybe will help some other poor soul in the future. 

Spoiler

 

 

Edited by Svm420
Link to comment
Share on other sites

@Diazo We have a winner! 1.1b works like a charm. Everything seems to work perfectly now, as far as getting balance and pumping to toggle. I haven't checked my log or anything to see if it's throwing any new exceptions or anything (standard operating procedure, nothing personal:P), but I doubt it (I mean I can if you'd really like me to, it's been running stable in the background for a couple hours).

Many thanks friend.

Link to comment
Share on other sites

  • 1 month later...

Greetings diazo , all...

I am looking for a way to enable / disable control surfaces via action group.

I see that this is / was a planned feature for this mod and may be implemented some time in the future.

is there 'any' way to do this now?  Are there any mods or methods that will allow this to be done?

Many thanks diazo for ALL of your great mods and I hope the transit to 1.1 and now 1.2 has not been too painful.

Cheers and best of luck.

Link to comment
Share on other sites

First, this mod is still supported, I'm just out of town away from my KSP computer for a couple weeks. Planned updating of this mod is on May 17/18th currently.

As for Action Groups Extended, they work perfectly together as this mod simply adds more actions to the available actions list to be assigned to an action group, in either AGX or the stock action group system.

As for the control surfaces control, I thought that was working in KSP 1.0.5, I'll look into what broke when I do the update in a few days.

D.

Link to comment
Share on other sites

@Diazo

Request for when you start to look at updating. Would you see if toggling steering can be added as an action group available action? I have no idea how everyone else deals with this, but squads wheel system doesn't seem to want to tone steering down as speed increases toward takeoff V. I want to be able to lock the steering once my speed is high enough that my rudder has good effect. Thanks!

Link to comment
Share on other sites

Hello Diazo.

I have downloaded and installed 1.1a and then updated with 1.1b dll file.

I am still getting 

[LOG 06:48:32.950] AssemblyLoader: Loading assemblies
[ERR 06:48:32.984] AssemblyLoader: Exception loading 'ModActions': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 

Additional information about this exception:

 System.TypeLoadException: Could not load type 'ModActions.ModActionsEditor' from assembly 'ModActions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'ModActions.ModActionsFlight' from assembly 'ModActions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'ModActions.ModuleModActions' from assembly 'ModActions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type '<>c__DisplayClass4' from assembly 'ModActions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type '<>c__DisplayClass8' from assembly 'ModActions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

[LOG 06:48:33.116] VesselModules: Found VesselModule of type FlightIntegrator with order 0
 

Can you tell from this what i have messed up, or do you need both log files.

Thanks for any help.  I am still trying to be able to access / change / update wing control(s) via the action groups.  Things like disabling pitch  yaw  roll for takeoff with my shuttle and then turning back on once back down in stable air.

Cheers. 

Link to comment
Share on other sites

  • 2 weeks later...

Version 1.2

Download here.

-KSP 1.1 Update.

-Fix settings file so it doesn't void ModuleManager cache every load.

-Add actions to support the new wheel system

Alright, mod is now updated for KSP 1.1 and should be good to go.

The one thing I was not able to do is test every action this mod controls, there's simply too many. (Well, I could test them all, but release would be delayed at least another week.....)

So, if an action set by this mod does not behave as expected (or does nothing), please let me know and I'll have a fix out ASAP making it work again. (It's almost certainly just a variable's name that changed, I just need to know about it to fix it.)

@drtedastro This version should resolve your issues. Let me know (with the new error message) if it doesn't and I'll look into what is going on.

Happy KSPing all.

D.

Link to comment
Share on other sites

Awesome! Just today I was trying to think of a creative way to ask if this was going to get an update without actually asking it outright. Looks like you beat me to it.:D

edit

fyi: your signature cuts off your control lock link

Edited by Deimos Rast
Link to comment
Share on other sites

Ok, first, thanks for all of your work.  This mod and all of your mods are great and help ksp in many ways.

I have just tested the latest version and when selecting a wing control item (elevator for example) I now see toggle deploy, extend, retract, toggle crossfeed, enable and disable crossfeed.  However I do not see ability to turn on or off the items like pitch, yaw and roll.  Is there anyway to do this?  I use / need this for my shuttle as I disable wing flight controls for vertical powered ascent and then reactivate once I have de-orbited and have dropped down to thicker atmosphere and need to have shuttle act like a brick with little wings.

No big deal, I have time to click and reset, but just would be great if could be done via action group(s).  Sometimes if timing is wrong and one set activates before other, high speed flat spin starts and pushes my piloting skills into the dirt...

Cheers and thanks again.

Link to comment
Share on other sites

I'll have a look and see what is exposed now.

As it sounds like you can control those through the right-click menu, it should be straightfoward to add them to this mod.

D.

Link to comment
Share on other sites

It's something I have to do in the .dll file.

Even just in the stock parts, there is no standardization across the different partModules, then every mod developer does things their own way as well so each action has to be custom coded.

It doesn't take long, it's only 4 or 5 lines of code per action I have to add, but the action is hardcoded in the .dll file.

D.

Link to comment
Share on other sites

Hmm, I'm going to need more details on which part you are trying to use.

On my end the stock control surfaces already have those options.

Are you using mod parts and/or FAR?

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