Jump to content

[1.12.x] ModActionsRenewed: Control your vessel (including other mods) via ActionGroups.


linuxgurugamer

Recommended Posts

Originally made by forum user @Diazo, original thread is here:   https://forum.kerbalspaceprogram.com/index.php?/topic/116142-*

ModActions

This mod is designed to allow you to control your vessel entirely via action groups, no more having to right-click on parts and control things through the part menu.

This allows you to do such things as change the thrust limiter on all engines on your vessel via a single action group command.

In addition to many stock actions, you can also control several mods via action groups in this fashion.

Availability

Available via CKAN

Dependencies

Changes Made During Adoption

  • Adoption by LinuxGuruGamer
  • Added support for ToolbarController
  • Added support for ClickThroughFix
  • Removed Blizzy & stock toolbar code
  • Replaced call to:
    • KSP.UI.Screens.EditorActionGroups.Instance.SelectGroup();

with reflection call because method was made private:

  • typeof(KSP.UI.Screens.EditorActionGroups).GetMethod("SelectGroup", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(KSP.UI.Screens.EditorActionGroups.Instance, null);
  • Moved mod folder to GameData (out of Diazo)
  • Moved all textures to PluginData & changed loading to use ToolbarControl.LoadImageFromFile
  • Added .version file
  • Added Changelog, added details from all releases
  • Added InstallChecker Added
  • Assemblyversion.tt
  • Moved following classes into their own files:
    • ModActionsFlight
    • ModActionsEditor
    • ModActionsMainMenu
    • ModActionData

Terminology note: If an action uses the "Set" keyword, that is directly setting the associated value. If the "Change" keyword is uses, that action modifies the associated value. (Use negative numbers to decrease the value.)

Supported actions:

  • Vertical Velocity Control
  • Landing Aid
  • GPOSpeedFuelPump
  • Ferram Aerospace Research
  • Control Surface Deflection/Axis control in stock.
  • Wheel control (steering/brake/traction/friction/etc) in stock.
  • Saturable Reaction Wheels Momentum Dump

 

  • (Planned)TAC Fuel Balancer
  • (Planned) MechJeb

smTmovf.png

To use:

1) Go to the Action Editor mode in the Editor and click the Mod Acts button (will appear on the toolbar mod if installed, otherwise on the stock toolbar). Note that this mod will not show except on the actions editor screen in the editor and that in both the editor and in flight, the mod is hidden by default and will not show until the ModActs button is clicked.

2) Select your part to edit actions on.

- Directly click the part in the 3D editor game space.

Or, if you are not sure which parts can be controlled by which mod, make sure no parts are selected and select a mod to see all parts that can be edited for that mod. The selected mod's button with turn green and all parts that mod can control will be indicated by the purple circles. Click on the desired part in the 3D editor game space to select a part.

3) An unassigned action will have a "Click to select" button. When in this state, the action is hidden from the action group editor and if you somehow manage to activate it, it will do nothing.

Click the "Click to select" button to view a list of mods that can be controlled from this part and select the desired one. The "Clear Action" button is always present and when selected deletes the action and returns it to the "Click to select" state. When a mod is selected, the first action in that mod will be chosen to fill the fields in this action in. At this point, the action will become visible in the action selector to add it to an action group.

4) Keep narrowing down your selection in the third and fourth columns (Thrust Limit and Thrust Limit#:). While each column only has a single selection at the moment, once larger mods are implemented they will be grouped and filtered by these columns.

5) Enter the desired percentage for the thrust limiter in the right-most column. The value is in percent, so a value of 50 will set the engine thrust limiter to 50%.

6) Enter an appropriate description in the left-most field. This is a free-text field that you can use as you desire to remember what the action does. The text that shows here will be the text visible as the action name when adding the action to an action group. Note that this field resets any time the fourth column changes because that means the action in this slot has changed and so your old description is no longer valid.

7) Click the Mod Acts button again to hide this window and go to the action group editor to assign your Thrust Limiting actions to an action group to be usable in flight.

Note: This mod adds new actions to a part's available actions list. You must still select the action and assign it to an action group as you do with any other action.

Copying Actions:

If you enable the "Copy" options in the top right (turns red when enabled), when you click on another part to select it, the actions on your current part will attempt to be copied to the new part. (All actions on the target part will be deleted before hand.) Only actions usable by the target part will be copied.

Copying actions is still experimental, engines will quite possibly have issues as there are multiple different types.

D.

- - - Updated - - -

Supported Stock Actions:

Set/Change Main Throttle (Found on the Command button)

Directly set, or change, the main throttle percentage. (Use a negative number to reduce the throttle.)

Set/Change Engine Thrust Limit

Directly Set or Change an engine's Thrust Limiter.

Set/Change RCS Thrust Limit and toggle control directions (Roll/Pitch/Yaw/X/Y/Z axis)

Directly Set or Change an engine's Thrust Limiter.

Control From Here in right-click menu (ModuleDockingNode, ModuleCommand)

-Control From Here: This will shift vessel control to the part this action lives on, the same as right-clicking the part and selecting Control From Here from the right-click menu in flight.

Lock/Unlock control directions on wings (ModuleControlSurface for default, FARControllableSurface if FAR is installed)

-Toggle Pitch: Does this wing attempt to control in the named direction?

-Enable Pitch

-Disable Pitch

-Toggle Yaw

-Enable Yaw

-Disable Yaw

-Toggle Roll

-Enable Roll

-Disable Roll

Go on Eva (part CrewCapacity >= 1)

-Go on EVA: Each part with a crew capacity will have this action available. When activated, it sends the first Kerbal in the pod on EVA. Each time it is activated it will send the next kerbal in the pod out. When there are no kerbals left it will print a message to the screen saying so. It will not search other parts on the vessel, it will only send kerbals in the part with the action on EVA.

Crossfeed (all parts in your GameData folder, including mods)

-Toggle Crossfeed: See caution below about Resources Lock and Crossfeeding.

-Enable Crossfeed

-Disable Crossfeed

Lock Resource level on Part (all parts with resources)

-Toggle Resource: See caution below about Resources Lock and Crossfeeding.

-Allow Resource

-Lock Resource

Lock Electricity level on Part (all parts with electricity)

-Toggle Electricity: See caution below about Resources Lock and Crossfeeding.

-Allow Electricity

-Lock Electricity

Add/Remove brakes from braking action (B key) (ModuleWheel)

-Add/Rem Brakes: These actions add or remove the wheel the action is attached to from the Brakes action group. (B key by default.) It does not actually activate/deactivate the brakes itself.

-Add Brakes

-Remove Brakes

New Wheel System

-Control Steering/Differential Steering/Motor/Brakes direction/force/enable and such for the new KSP 1.1 wheel system.

 

Crossfeed and Resource Lock Caution

Crossfeeding and Resource Locking have a couple of particulars you need to know about.

Electric Charge is a resource and follows the rules for Resource Locking, but as it is a special case I gave it it's own set of actions separate from the general Resource Actions. (Enabling the Resource Lock will not Lock Electric Charge.)

 

Edited by linuxgurugamer
Link to comment
Share on other sites

  • 3 weeks later...

Just got this mod to be able to lock/unlock fuel tanks, but the Lock Resource option isn't showing up on any of the tanks. I'm only seeing the stock autostrut options show up. Is it incompatible with b9 fuel switching?

 

log: https://drive.google.com/file/d/1lazQGwoIe38RTbjQk-j_TYFma36ZpvYu/view?usp=sharing

Edited by Rodger
Link to comment
Share on other sites

18 hours ago, Rodger said:

Just got this mod to be able to lock/unlock fuel tanks, but the Lock Resource option isn't showing up on any of the tanks. I'm only seeing the stock autostrut options show up. Is it incompatible with b9 fuel switching?

 

log: https://drive.google.com/file/d/1lazQGwoIe38RTbjQk-j_TYFma36ZpvYu/view?usp=sharing

Mod support is limited to either what's listed in the oP, or those mods which use stock actions.

Link to comment
Share on other sites

Yeah just kinda surprised that the stock action for tank locking was broken by fuel switch. 

I found the mod TankLock that you maintain instead though, and it works fine, so I’ll just use that instead!

Link to comment
Share on other sites

  • 9 months later...
  • 9 months later...
  • 6 months later...
  • 1 month later...

Looks like the version file for this links to Science Alert, so it thinks there's an update.

Edit: And the copy function doesn't seem to work currently. I set up a bunch of actions to toggle RCS axis modes, and tried to copy them to another identical RCS part, but no new actions were made. Nothing shows up at all in the logs when I attempt the copy action.

Edited by Rodger
Link to comment
Share on other sites

4 hours ago, Rodger said:

Looks like the version file for this links to Science Alert, so it thinks there's an update.

Edit: And the copy function doesn't seem to work currently. I set up a bunch of actions to toggle RCS axis modes, and tried to copy them to another identical RCS part, but no new actions were made. Nothing shows up at all in the logs when I attempt the copy action.

Version file is easy, I'll have to look at the copy funciton

Link to comment
Share on other sites

New release, 1.7.0.2

  • Fixed version file to point to correct version file
  • Added config for ModuleRCSFX
  • Added config for ModuleEnginesFX
  • Added hard-code for both ModuleRCS and ModuleEngines in ModActionsMainMenu.cs to add an extra entry for the FX version
  • Changed mods on selection lines from 5 to 4
  • Fixed textures not being loaded for buttons and part locator circle
  • Change loading GUIWindow from being a loaded class to a MonoBehaviour
  • Changed thisSkin from being a full copy of the skin to just having what's used
  • Made thisSkin static, to avoid having to load GUIStyles multiple times
     
Link to comment
Share on other sites

  • 5 months later...

Hi, I was just curious if there was any chance you could add support for the mobile science lab's clean experiment action? This was a feature available in Diazo's predecessor to ModActions called Actions Everywhere but unfortunately it looks like it didn't make the transition to ModActions before you adopted it. No worries if you're not looking to add new features at the moment, thank you for keeping the mod alive at all :)

Link to comment
Share on other sites

4 hours ago, Ice_Arrow said:

Hi, I was just curious if there was any chance you could add support for the mobile science lab's clean experiment action? This was a feature available in Diazo's predecessor to ModActions called Actions Everywhere but unfortunately it looks like it didn't make the transition to ModActions before you adopted it. No worries if you're not looking to add new features at the moment, thank you for keeping the mod alive at all :)

I can take a look

Are you referring to the Material Bay? or the Large Crewed Lab?

Edited by linuxgurugamer
Link to comment
Share on other sites

5 hours ago, Ice_Arrow said:

Hi, I was just curious if there was any chance you could add support for the mobile science lab's clean experiment action? This was a feature available in Diazo's predecessor to ModActions called Actions Everywhere but unfortunately it looks like it didn't make the transition to ModActions before you adopted it. No worries if you're not looking to add new features at the moment, thank you for keeping the mod alive at all :)

 

14 minutes ago, linuxgurugamer said:

I can take a look

Are you referring to the Material Bay? or the Large Crewed Lab?

It can be done, but it's a bit messy.  In short, I would have to write a small part module which inherits the ModuleScienceExperiment, and then add an action to call the Cleanup code.  Then would need a ModuleManager script which will replace all references to ModuleScienceExperiment to my new part module.

 

i'll see if I can do something about it in the next few days

Link to comment
Share on other sites

On 12/13/2022 at 5:43 PM, Ice_Arrow said:

Hi, I was just curious if there was any chance you could add support for the mobile science lab's clean experiment action? This was a feature available in Diazo's predecessor to ModActions called Actions Everywhere but unfortunately it looks like it didn't make the transition to ModActions before you adopted it. No worries if you're not looking to add new features at the moment, thank you for keeping the mod alive at all :)

I'm a bit puzzled.  I just spent a half hour comparing the last release from @Diazo on 1.3.1 to the current release.  The Clean Experiment IS there, and works.  I used my latest release, installed by CKAN

So can you be a bit more specific as to what's not happening?

Link to comment
Share on other sites

I'm so sorry, after looking again it seems I've made an embarrassing mistake. I thought that the mod automatically populated the action group menu with the new actions it makes available after I saw stuff like "go eva" and "toggle crossfeed"  get added. I then immediately jumped to the science lab and tried to find the clean experiments action but obviously couldn't find it since I didn't add it through the mod actions toolbar menu. After that I checked the original forum thread for Mod Actions and didn't find any mention of the science lab or it's clean experiments action so I thought the feature hadn't been carried over.

The action is in fact available and working just like you said, again I'm so sorry for causing you any trouble and thanks for all your help.

Link to comment
Share on other sites

  • 5 weeks later...

Hi, First of all -- Thank you so much for continuing this mod.   Just found it and am loving it for several uses.  Always been frustrated with stock KSP not giving you all things in the available actions. Especially nice to have clean out on the Science Lab.  And also using this a bunch with moving hinges and motors to set and unset autostruts on parts to keep things locked in place after moving a hinge or turning a part with motors.

So, the copy part doesn't seem to work at all for me. I'm on latest KSP release (1.12.5).  So far anytime I hit the "Copy?" button and then select another part, all it does is remove any ModActions I already had defined on that other part and then just makes no ModActions on that part.  Not a big deal, still happily using the mod.  Just mentioning it.

Thanks!

P.S. -- Anyone thought about making a mod that allows assigning Kerbal EVA activities to action groups?  Plus even better yet - some way to automate actions over different entities in one KAL-1000 controller? I realize that could be a big undertaking.  But my dream: (probably with KAL controller) 1 button that runs through a procedure like: Run all science experiments, send scientist on out the hatch and do EVA report and surface sample, store all experiments in a Experiment storage unit, clean and reset the mystery goo and science jr.  I'm trying to build up Experimental storage units filled with every experiment possible to then send them up to Science Labs.

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