Jump to content

[1.2.2](Dec10/16) Action Groups Extended: 250 Action Groups, in-flight editing. Now kOS/RemoteTech


Diazo

Recommended Posts

Now that I've remembered to update this to 1.22a, I should not have that particular issue again...

Some pages ago, back during 0.23.5, I posted in here regarding having some issues with parts with multiple science experiments. Did you ever get around to resolving the issue?

Link to comment
Share on other sites

@Einarr: I believe I have. Can you recall which parts they were?

Even if I have not, I have since added the AGX Action Ambiguous message on screen that will inform you that the issue still exists and give me the details I need to fix it.

D.

Link to comment
Share on other sites

I believe that they were the science parts from B9 that combine the four main stock science modules (temperature, pressure, accel, etc). IIRC the problem was that while I could select each item when setting up a group, when moving to flight (on launchpad, runway, etc), it would overwrite the second, third, etc selections with the first, so it calls the temp three times, for instance (I tend to stick science bits into one group per altitude category so I can hit 'em all at once). I seem to remember you saying something about working on it, but I don't remember if you completed that.

Link to comment
Share on other sites

This is one mod I really got used to having around. At first I did not see the point, untill I tried it and now I don't want to launch without especially the list of available actions as clickable buttons on screen is really useful.

Would it be possible to enter a set of names for this mod and then import them unto any ship? I tend to have solar on 4, it'd be nice if I could define this once and then import the naming scheme to a new ship. I don't mind adding the solar panels to the group myself. But not having to type the group name over and over again would be nice.

Also, you have toggle groups. Which is awesome, but right now they only work with toggleable actions. Is it possible to have a toggle group have an on activate and on de-activate actionset? So that instead of "toggle engine" I can use "activate engine" and "deactivate engine"? Some mods don't offer toggle groups.

Link to comment
Share on other sites

@Einarr: I'm 90% certain that the Science Module is fixed. I remember the issue you are talking about and it was one of the first AGX Ambiguous fixes I did. (Of course, memory can play tricks on you, if it is not fixed let me know, it will take me less the 5 minutes to get a fix out, that one is simple to deal with.)

@willow:On the group names thing, there is no official way to do that, however their is a workaround. If you save an "Untitled Space Craft", AGX will try to load that vessel when you start a new craft as that is what the default name is. So load one of your vessels, change its name to "Untitled Space Craft" and save it, then when you start a new vessel it should import the Group names (and Toggle Group, Group Visibility, and Assigned Keyset as well). There is no way to do it for an already existing vessel which is why this is not officially a feature. Note that the SPH and VAB have different "Untitled Space Craft".

On parts only having a toggle action, that is out of scope for this mod. However, that is a problem for me as well and I am addressing it here with the Actions Everywhere mod. Currently all that is available is the Gimbal on/off for engines and a Control From Here action (same as the right-click menu) in my proof of concept download, but I hope to have a first release with several more actions officially out this weekend.

D.

Link to comment
Share on other sites

Yes, they are logged to the debug console. A "AGX Action Load Fail" message will show when it happens. Appended to that will be the partModule and actionName of what triggered it.

Or it should anyway, that message had an error I have since fixed where it might not append the partModule and actionName. I have since fixed it but I'm not sure if that fix is in the current version or only on my dev computer so far.

If it does not log the partModule, you can narrow it down by immediately saving the vessel with a different name. So if "Mun Lander" loads with the error, immediately change the name to "Mun Lander 2" and save it. Then if you go into the AGExtEditor.cfg file and find those two vessels you can see which actions are missing by the differences between the two of them. (Also please forward that AGExtEditor.cfg file to me so I can fix it.)

D.

Link to comment
Share on other sites

Was hoping for a log file, but I'll make do the next time I see 'em. The one I can remember catching any useful detail from had something to do with the Karbonite Scanner (I had an action group for toggling the scan on or off (for SCANSat)). I've also seen some relating to antennas (I have RemoteTech as well, and it changes actions available to antennas, as well as adding some).

Link to comment
Share on other sites

Version 1.22b

Download here.

-Fix SCANsat (Karbonite) for AGX Action Ambiguous message.

-Begin implementing support for Modifier Keys so Alt-1 can be used to activate an action group. These are the two new buttons on the top left of the keyset window in the editor, do not use them yet as they don't actually do anything yet in flight mode. I will have the next release out tomorrow night that fully supports modifier keys. I rushed 1.22b to get the SCANsat fix out for Karbonite users.

@Einarr: This release should fix your SCANsat issues. Note that this release requires replacing the AGExt.cfg file in GameData\Diazo\AGExt, although you can copy the five "KeySet" lines over if you want to keep your keybindings intact. It also fixed the AGX Ambiguous logging so you can see in the log file which part, partModule and Action created the ambiguous problem.

The AGExt00000.cfg files are where AGExt saves its data, there is no AGExt related data in the .sfs file itslef. I did this because in KSP 24.2 partModules had an annoying habit of losing data and reverting to default values when partModule order on parts changed due to adding/removing mods. As AGExt stored its actions in partModules at the time, this resulted in players randomly losing the actions they had assigned on their vessels. KSP 0.25 appears to fix this, but I have a working system now and I'm not going to rewrite everything to use partModules again at this point.

The number in the file is the save increment, it goes up every time KSP saves and there should be one file per .sfs file in your save directory. If you find the AGextScenario config node in the .sfs file, the LastSave value is the AGExt00000.cfg file associated with that .sfs file, so the AGExt00260.cfg file you linked above would be associated with a .sfs file that has a LastSave = 260 value in it.

There is a clean up routing that runs as well so old AGext00000.cfg files that no longer have an associated .sfs file get deleted which is why you don't have 260 of those files present.

Hopefully this deals with the issues you have been experincing, I'll be in the code again tomorrow to finish up the modifier key work if there is anything else not working for you.

D.

Link to comment
Share on other sites

I think you missed the bit about RemoteTech antennas from my other post. Unfortunately, KSP seems to overwrite it's log with each run, or I'd have more data for you on that.

Edit: Have run into a small issue where an Ambiguous Count: 2 message is displayed briefly when loading a particular vessel. There was so much happening that I couldn't find it in the ingame Debug console, but I did find it in the log.

AGX actsToCompare.count != 1 2 Part: B9.Engine.SABRE.M_4292452946 Module: ModuleEnginesFX OnAction

This crops up any time I load this vessel in the SPH or the Runway (I'm building an SSTO). The action group it's likely having an issue with is the Toggle Engine (as displayed when adding things to groups in the AGX editor) on the B9 SABRE M. I expect the SABRE S will have the issue as well. Essentially, there are 3 Toggle Engine actions that the AGX editor sees. I expect it might not be able to resolve which one I mean when loading the vessel. It is kinda important to be able to shut off the engines when I don't want to use them to prevent accidental burns...

Edited by Einarr
More issues abound!
Link to comment
Share on other sites

@Einarr: Alright, Remotetech and the SABRE engines will get looked at tonight. And yes, the multiple toggle engine groups is likely the cause.

@Darren9: Good to hear you are looking forward to it. I'm only mostly done implementing it so while it is possible that release will be tonight I'm not going to promise anything.

D.

Link to comment
Share on other sites

@Einarr: Alright, Remotetech and the SABRE engines will get looked at tonight. And yes, the multiple toggle engine groups is likely the cause.

@Darren9: Good to hear you are looking forward to it. I'm only mostly done implementing it so while it is possible that release will be tonight I'm not going to promise anything.

D.

I've also run into AGX error messages with the K+ (Karborundum) mod mini-drill. I think that piece needs a fix too.

It seems like most of the EPL issues are resolved now. Thanks for looking into it! However, I did see one thing I wasn't sure about. It looks like the group membership settings aren't being recovered. So, if a key is defined on ship A and not on base B, and A is launched from B, then the name and the parts associated with the action do work on A (correct), but the group memberships (i.e. Action #X is in group 1,3,5 and not 2,4) seem to revert to being Action #X in all groups of groups (is there a better terminology for these groupings?). This is something I've noticed but haven't heavily tested so I may not have the details perfectly accurate, but I have been losing at least some group memberships for sure. Could it be that base B's memberships for the action which in their default, unset state would be in all groups, are being overwritten into A's action?

Thanks again for all your great work. Your mods have made some designs possible that I wouldn't have been able to try before. For example, fan-based VTOL probes, base cores, miners, and more for atmospheric planets using your horizontal and vertical hover controls, and most recently a Karborundum transport that launches from Eve using many banks of sequentially fired capacitors which would have been difficult or impossible without AGX.

Link to comment
Share on other sites

@Coreador: Glad to hear you're getting good use out of my mods, it's why I do these things. :)

First, it is quite possible the docking code still has issues, I did a pretty large re-work of it in the same release I added EPL compatibility and it is possible I missed something.

Note that EPL uses the docking mechanic. When you launch a new vessel at the pad, EPL first makes the new vessel and spawns it, then it docks it to the lauch pad. So AGX's docking code runs when you spawn a new vessel and undocking code runs when you "Release" the new vessel from the pad.

I'll also add Karborundum to the list to look into.

Now, I'm going to have to get rather wordy here as I'm going into terminology.

Action: The actual action. This is assigned to an action group on a per part, not a per vessel, basis. So if you assign a Solar Panel's Extend Panels action to group 3, anytime you are controlling the vessel with that solar panel attached, activating group 3 will Extend that solar panel. Docking, staging, the part breaking off due to accident, none of that matters as the action is assigned to the part and will always be present until that part is destroyed (or you remove the action yourself).

Action Group (or just Group): The numbered action groups, from 1 to 250. These groups are not saved, but rather they recreate themselves automatically every time from the Actions assigned to parts. So there is no saving of "Action Groups" directly, rather Actions are saved to parts and any Groups used in those Actions automatically make the current Groups list.

Group Names: This is saved on a per-vessel basis and does not require an Action assigned to a Group in order for that Group to have a Name. As this is saved on a per vessel basis I have to compromise. When two vessels dock (this includes EPL spawning a vessel at a pad) the list of group names is combined so that if a group is named one on vessel and not named on another, the group will be named that on the new, larger vessel. If a group is named on both vessels, the group name on the vessel being docked *to* will be the group name on the new, larger vessel. 90% of the time, the vessel being docked to is the vessel you are not controlling, but sometimes it is and I can only blame KSP weirdness for that. When you undock, both of the new vessels will have the same group names that the larger vessel did before undocking.

Key (Group Key, KeySet, KeyCode): Anytime I use the word Key, I'm referring to the key on the keyboard bound to an action group. A KeySet is the current profile of Keys assigned to the vessel. There are 5 KeySets provided, but by default all 5 KeySets have Groups 1 through 10 bound to the 1 through 10 keys across the top of your keyboard. KeyCode is the string representation on the screen, so the 1 key above Q is shown in game as the 'Alpha1' KeyCode.

Toggle State Monitoring (or just Toggle): If you enable the Toggle Monitoring (Toggle Grp. button), in flight mode, an action group will display in green text if activated and red text if deactivated as opposed to just in gray text that is default. Note this is saved on a per-vessel basis but not affected by docking. So if you dock Vessel B to Vessel A, making Vessel C, Vessel C will use Vessel B's toggle state monitoring, but when you undock, Vessel A's toggle states will return. This is different then how Group Names are handled.

Group Visibility (or just Visibility): In flight mode, you can only show specific action groups in the flight window if you wish. This works the same as the Toggle State and is saved on a per-vessel basis with docking overriding your settings, but those settings coming back when you undock.

Now, rereading you post I'm unclear what you mean by "group membership". It sounds like you mean an action is assigning itself to a part somehow. Is this happening only on groups 1-10? I'll run some experiments tonight myself to see if I can recreate what is happening.

D.

Edited by Diazo
Link to comment
Share on other sites

@Coreador: Glad to hear you're getting good use out of my mods, it's why I do these things. :)

First, it is quite possible the docking code still has issues, I did a pretty large re-work of it in the same release I added EPL compatibility and it is possible I missed something.

Note that EPL uses the docking mechanic. When you launch a new vessel at the pad, EPL first makes the new vessel and spawns it, then it docks it to the lauch pad. So AGX's docking code runs when you spawn a new vessel and undocking code runs when you "Release" the new vessel from the pad.

I'll also add Karborundum to the list to look into.

Now, I'm going to have to get rather wordy here as I'm going into terminology.

Action: The actual action. This is assigned to an action group on a per part, not a per vessel, basis. So if you assign a Solar Panel's Extend Panels action to group 3, anytime you are controlling the vessel with that solar panel attached, activating group 3 will Extend that solar panel. Docking, staging, the part breaking off due to accident, none of that matters as the action is assigned to the part and will always be present until that part is destroyed (or you remove the action yourself).

Action Group (or just Group): The numbered action groups, from 1 to 250. These groups are not saved, but rather they recreate themselves automatically every time from the Actions assigned to parts. So there is no saving of "Action Groups" directly, rather Actions are saved to parts and any Groups used in those Actions automatically make the current Groups list.

Group Names: This is saved on a per-vessel basis and does not require an Action assigned to a Group in order for that Group to have a Name. As this is saved on a per vessel basis I have to compromise. When two vessels dock (this includes EPL spawning a vessel at a pad) the list of group names is combined so that if a group is named one on vessel and not named on another, the group will be named that on the new, larger vessel. If a group is named on both vessels, the group name on the vessel being docked *to* will be the group name on the new, larger vessel. 90% of the time, the vessel being docked to is the vessel you are not controlling, but sometimes it is and I can only blame KSP weirdness for that. When you undock, both of the new vessels will have the same group names that the larger vessel did before undocking.

Key (Group Key, KeySet, KeyCode): Anytime I use the word Key, I'm referring to the key on the keyboard bound to an action group. A KeySet is the current profile of Keys assigned to the vessel. There are 5 KeySets provided, but by default all 5 KeySets have Groups 1 through 10 bound to the 1 through 10 keys across the top of your keyboard. KeyCode is the string representation on the screen, so the 1 key above Q is shown in game as the 'Alpha1' KeyCode.

Toggle State Monitoring (or just Toggle): If you enable the Toggle Monitoring (Toggle Grp. button), in flight mode, an action group will display in green text if activated and red text if deactivated as opposed to just in gray text that is default. Note this is saved on a per-vessel basis but not affected by docking. So if you dock Vessel B to Vessel A, making Vessel C, Vessel C will use Vessel B's toggle state monitoring, but when you undock, Vessel A's toggle states will return. This is different then how Group Names are handled.

Group Visibility (or just Visibility): In flight mode, you can only show specific action groups in the flight window if you wish. This works the same as the Toggle State and is saved on a per-vessel basis with docking overriding your settings, but those settings coming back when you undock.

Now, rereading you post I'm unclear what you mean by "group membership". It sounds like you mean an action is assigning itself to a part somehow. Is this happening only on groups 1-10? I'll run some experiments tonight myself to see if I can recreate what is happening.

D.

Sorry, I guess I wasn't really clear. What I meant by group membership is that every action group can be in zero or more of 5 groups (identified by a small 1 2 3 4 5 in the dialog). All the action groups on a ship can be categorized into those five groups of groups, which you can also name. They act as a filter to what action groups are displayed as buttons. You choose these groups individually per action group by clicking on the numbers 1 - 5. Maybe what you refer to as "Group Visibility" is what I'm talking about? So what is happening is that I set those in VAB, but when the ship is spawned and then released on a launchpad (the base has no actions tied to any of the action group numbers used by the ship), all of my actions are reset to being in all 5 visibility groups, even though the action groups, the actions, and the group names are all correct.

Is this more clear?

Link to comment
Share on other sites

Yes, those are the Visibility Groups you are talking about.

Those are saved on a per-vessel basis and what should be happening is that when you spawn the new vessel, it immediately docks to the launchpad and so the lauchpad's group visibility settings are applied. Then when you release (undock) the vessel you have just built, it should revert to using the group visibility settings of the vessel as they were setup in the VAB.

As it sounds like this is not working I'll take a look.

D.

Link to comment
Share on other sites

Looks like you have a few things to take a look at, Diazo. Much luck to you. I assume you're coding this in C♯ as that seems to be what most KSP plugins are coded in. Unfortunately, I have little knowledge of C♯. I'm more of a C++ guy.

Link to comment
Share on other sites

Looks like you have a few things to take a look at, Diazo. Much luck to you. I assume you're coding this in C♯ as that seems to be what most KSP plugins are coded in. Unfortunately, I have little knowledge of C♯. I'm more of a C++ guy.

Me too. :)

Link to comment
Share on other sites

Version 1.22c Version 1.22e

This is a .dll download only. The full version 1.22b .zip must be installed first.

Download AGExt.dll file here.

Version 1.22c

-Fix ModuleEngineFX for AGX Ambiguous (B9 SABER engines)

-Investigate RemoteTech and confirm compatible. At the very least I was unable to replicate any issues and will need more details if RemoteTech does not work for you.

Version 1.22d

-Not released

Version 1.22e

-Fix docking for Group Visibility and Toggle States now save correctly when docking/undocking. This is the fix for the EPL issues you are experiencing Coreador.

I'm not finished for tonight yet but this was a quick fix I could get out right away, I'll see if I can turn up anything on the Groups Visibility issue and work on the modifier key still tonight.

And yes, KSP mods are done in C# mainly. Java is also supported but most devs around here use C# it seems. (Really, it's determined by what Unity supports that limits what we can use.)

D.

edit: And that's it for tonight. The modifier key will have to wait until tomorrow, but I think I have all the other outstanding issues dealt with.

Edited by Diazo
Link to comment
Share on other sites

Hey Quick Question for when you wake up....

I see that the Toolbar Addin is needed (if I want to be able to edit while inflight)...

is there any hope that you will be able to use the .25 -stock- toolbar instead of the addon one at some point in the near future?

Link to comment
Share on other sites

@Fyrem: That's sitting on the "it would be nice" list at the moment.

Right now my to do list for AGX looks like this:

1) Squash bugs (note I am not aware of any at the moment after the SABER and EPL fixes, but bugs always come first)

2) Finish Modifier Key support

3) Get a youtube video how-to up (Does anyone know how to save subtitles and captions on youtube? I can add them but not save them.)

4) Add support for sub-assemblies

5) kOS support (this is actually mostly done, I'm just waiting for the kOS guys to get some free time after the 0.15 kOS release)

Everything else sitting in my gitHub issues list goes here in the "at some point in the future" time frame, this is where the stock toolbar sits at the moment.

Somewhere in there I plan to find time to get a release of my Actions Everywhere mod out this weekend too.

Hmm, maybe I'm a little ambitious but w/e.

D.

Link to comment
Share on other sites

Version 1.23c

Download 1.23c here.

Note that you must replace the AGExt.cfg file in GameData\Diazo\AGExt\AGExt.cfg when you install, otherwise the modifer key assignments will not save.

Even if you already updated AGExt.cfg for version 1.22b, you must do it again for Version 1.23

-Add modifier key support so 1, Alt-1, and Shift-1 can all activate different action groups.

How to use modifier keys:

In the top left of the KeyCodes window, there is now two new buttons in that corner.

From left to right the 3 buttons are the "Clear Key" button. Renamed from just "None" in previous versions, this is still the key to select to unbind and have no key assigned to that action group.

The second and third buttons are the Modifier Keys. The text on the keys displays the currently assigned modifier key, on a fresh install both will be None.

The button on the left of the two (so middle of the three in the top left corner) is modifier key 1, the one on the right is modifier key 2.

Where ever a keybind name is displayed, if that name has a (1) in front of it, that means that group requires modifier key 1 down, a (2) indicates modifier key 2 and a 1/2 (one-half symbol) indicates both keys must be down to activate that action group.

Example setup:

Step 1: Pick a modifier key.

Open up the KeyCodes window and rightclick on the Modifier key 1 button, the button will go red to indicate you are picking the modifier key, not the key for the action group, and click on RightAlt. The text on the button will change and the red will go away indicating you have chosen the modifier key and that now if you click a key, you are assigning it to that action group.

Repeat for Modifier key 2, picking the RightCtrl key.

Step 2: Assign modifiers to an action group.

Make group 11 the current group and open the key codes window. Left-click the modifier key 1 button (displaying RightAlt), it will turn green and then pick the Alpha1 key. The KeyCode for group 11 should now show (1)Alpha1 in the bottom right of the Main AGX window.

Repeat for group 12 using modifier key 2 (RightShift) and group 13 using both modifier keys.

Step 3: Use them in flight.

Now, in this example setup, group 11 can be activated by RightAlt-1, group 12 by RightCtrl-2 and group 13 by RightAlt-RightCtrl-3.

Note that the left and right are important and are considered different keys by KSP so that Left Ctrl remains throttle down.

Having done it this way, any key can be used as a modifier key, including joystick buttons. Only have 4 buttons for custom actions? Assign one as a modifier and you have 6 action groups across the other 3 buttons now.

Note that this modifier key does NOT override the key. If you assign Alpha1 (number 1 above Q) as modifier key 1 and then assign it also as the key to activate group 1 (with no modifiers), it will still activate group1 every time you press it. This limits its usefullness as a modifier key but I can see situations where it would be useful.

So, let me know how it goes.

D.

edit: Version 1.23a/b/c have minor fixes to the AGX Ambiguous and Toggle State monitoring code.

Edited by Diazo
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...