Jump to content

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


Diazo

Recommended Posts

@Jacke: I'm looking at this now. The mod you are looking for is called Strip Symmetry i think.

I'll edit my findings into this post over the next few hours.

D.

edit: Okay, this is weird, I can replicate the issue, but it only happens when you actually use the Open icon in the top right of the VAB. If you lauch and revert to VAB, or exit flight to space-center then enter the VAB and work on the autosaved ship, everything is fine.

Now to figure you why.

edit 2: Okay, figured out the problem. I don't know how to fix it yet but I'm out of time for tonight. I should have something for you tomorrow hopefully.

Edited by Diazo
Link to comment
Share on other sites

Version 1.33a

Download here.

This fixes the symmetry loading bug you reported Jacke.

I did notice the panels going weird as you mentioned, however clicking any of the mode select buttons at the top of the screen (Parts/Actions/Crew) or the AGX button on the toolbar will fix that issue, so it will have to wait a few days. The symmetry bug couldn't however so I'm pushing this version with that fix. (I'm not sure when I'll have time to look into the panels issue.)

D.

Link to comment
Share on other sites

Version 1.33a

Download here.

This fixes the symmetry loading bug you reported Jacke.

I did notice the panels going weird as you mentioned, however clicking any of the mode select buttons at the top of the screen (Parts/Actions/Crew) or the AGX button on the toolbar will fix that issue, so it will have to wait a few days. The symmetry bug couldn't however so I'm pushing this version with that fix. (I'm not sure when I'll have time to look into the panels issue.)

D.

Thanks, Diazo. I did find once or twice while testing the symmetry bug the panels were so screwed up that clicking the mode selection buttons didn't fix it, but I believe exiting the VAB and re-entering did. Since I stopped the testing I haven't seen the panels go bad. I wonder if loading a craft that then got the symmetry error led to it, so by avoiding that error with workarounds maybe I avoided the other. Doesn't matter, if you can track it down, that's bonus.

EDIT: Confirmed symmetry bug is now fixed in 1.33a.

Edited by Jacke
Link to comment
Share on other sites

@Chase Quinnell: Those files are where you actions are actually saved. There is one .cfg file created every time KSP saves. There is a clean-up routine that runs to deleted unused ones on game start, but that leaves one .cfg file per .sfs save file. Do you have a mod making automatic save file backups and making many .sfs files in your save directory? (KAC does this.) Exiting KSP afater a long play session would do it also as the clean up routine runs only on game start, not game exit.

Ahh, that's what it is then. Thanks for the information Diazo.

Link to comment
Share on other sites

  • 3 weeks later...

Real nice mod,

but while fixing a broken save file I found a bunch of parts with

MODULE
{
name = ModuleAGX
isEnabled = True
placeHolder = Hello World
EVENTS
{
}
ACTIONS
{
}
}

Which, at least I think, shouldn't be there ... unless for debug reasons. I assume you did forget to disable the debug code generating this.

Something that also caught my attention is that custom action group names are not stored in craft files... I copied one over (from one save game to another) and lost all names.

Link to comment
Share on other sites

That partModule actually is supposed to be there. When you add a part module with module manager, it happens at the start of the loading sequence before the code on the part modules has initialized so I can't check to see which parts have actions and which don't. Therefore I have to put my part module on every part in the game and accept that most of them will be empty as noted in your example.

I'm open to better ways to handle this, but I need that partmodule on every part that has actions and every part that is a root part of a vessel, and I've yet to come up with a way to filter that out.

Custom group names being lost when you copy the vessel .craft file to a different save is also expected behavior at the moment. That data is saved in the AGExtEdtior.cfg file, if you want the group names (and other data such as toggle state and visibility) to copy over, you need to open the AGExtEditor.cfg file, find the data block for the vessel and copy it into the AGExtEditior.cfg file of the destination save game. (On my mobile so can't give an example.)

Both of these issues should be mitigated in the near future when I return to using the part module to save data. Squad has fixed the bug (part modules resetting to default values and so losing data) that made me go to storing data in my own files several versions ago, I just need to get around to doing it. Real life is getting in the way right now though so I don't have a clue how long it will be before I can release that update.

D.

Link to comment
Share on other sites

  • 2 weeks later...

Diazo I was wondering if you could have a pause or "wait for animations" button in the UI to allow for animations to finish before going to next action in the queue. For example I have retro doors closed over retro engines on the leading edge of the wing. So the flow of actions is:

deactivate main engine

Open Retro doors

activate retro engine

Problem is retro engine fires through the retro doors before animation has retro doors fully open

I also have Hover engines with doors covering them same issue there as well

and thank you for your work.

Edited by Redneck
Link to comment
Share on other sites

  • 2 weeks later...

I keep getting these errors repeated any ideas?


[LOG 21:35:10.388] AGX partModule OnSave fail: 5a System.NullReferenceException: Object reference not set to an instance of an object
at ActionGroupsExtended.AGextScenario.SaveAGXActionVer2 (ActionGroupsExtended.AGXAction agxAct) [0x00000] in <filename unknown>:0
at ActionGroupsExtended.ModuleAGX.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0
[LOG 21:35:10.390] AGX partModule OnSave fail: 5a System.NullReferenceException: Object reference not set to an instance of an object
at ActionGroupsExtended.AGextScenario.SaveAGXActionVer2 (ActionGroupsExtended.AGXAction agxAct) [0x00000] in <filename unknown>:0
at ActionGroupsExtended.ModuleAGX.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0


AGX partModule OnSave fail: 5a System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGextScenario.SaveAGXActionVer2 (ActionGroupsExtended.AGXAction agxAct) [0x00000] in <filename unknown>:0

at ActionGroupsExtended.ModuleAGX.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

AGX partModule OnSave fail: 5a System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGextScenario.SaveAGXActionVer2 (ActionGroupsExtended.AGXAction agxAct) [0x00000] in <filename unknown>:0

at ActionGroupsExtended.ModuleAGX.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0

Link to comment
Share on other sites

@Nori: That error puzzles me. It's throwing a nullRef at line 5A when I check to make sure that object is not null the line before so I'm not sure what is happening.

The good news is that it should not be an issue, this error is happening on the secondary data save, it looks like the primary data save is functioning fine and everything should work from a playing the game perspective. If this isn't true and actions are not saving correctly, let me know and I'll look into it more.

At the moment I have that part of the code ripped apart, I'm getting rid of the external data files and moving my data storage back to the PartModule so that rework will fix the error you are seeing.

@Gaiiden: Issue confirmed with Take Command, I know exactly what is causing it and will talk to him. The fix has to be on his side of things.

D.

Link to comment
Share on other sites

  • 2 weeks later...

Is there a way to put a pause between some of the actions? I have a group of actions:

- Deploy fairing

- Deploy M700 Scanner

- Deploy AIES SUNCAT-2B solar panels

The solar panels won't deploy because it says they are still stowed. My guess is that the actions occur concurrently and there is not enough time between when the fairing is deployed and the solar panels deploy.

Great Mod BTW

Link to comment
Share on other sites

Diazo,

I'm not sure if this is something with your mod or something with stock, but toggling control surfaces to extend/retract doesn't quite work right.

Control surfaces have 3 Action Group commands: Toggle, Extend, Retract. For some reason, I can't get Toggle to work via hotkey action groups. I've only been able to get that to work under a built-in action group (like Brakes). Extend and Retract work like you expect them.

NOTE: I haven't tried using control surface toggling in stock-only yet.

Is this a stock issue or is it the mod? I invest in spaceplanes (thanks to mods like OPT), so I'm learning that "flap" control helps during re-entry (in particular to "feather" plane into a natural nose up attitude instead of having to keep my finger on "S").

It would've been nice if Squad included a "Flaps" stock action group to go along with brakes, lights, etc. (I still dislike how the Airbrakes are permanently tied to the Brake group though...) But until they decide and implement better action group control (ha!), AGX is the go-to mod for this.

Any help would be appreciated. It's a minor thing, but I try to keep my action group numbers low if I can. (Why have 2 groups when 1 should suffice?) If it's a bug you can't fix (because stock...), I can live with the workaround of having 2 actions groups; better than using the right-click menu... (Especially on a tumbling plane...)

Link to comment
Share on other sites

@StahnAileron: Odd. My suspicion is that some variable changed meaning in the aero update in KSP 1.0 and it's just slipped under the radar until now. (So when a control surface is extended, the toggle action tries to extend it instead of retracting it.)

I'll see what I can find, but note I have this mod torn apart for the rewrite as per post #964.

D.

Link to comment
Share on other sites

@StahnAileron: Odd. My suspicion is that some variable changed meaning in the aero update in KSP 1.0 and it's just slipped under the radar until now. (So when a control surface is extended, the toggle action tries to extend it instead of retracting it.)

I'll see what I can find, but note I have this mod torn apart for the rewrite as per post #964.

D.

Actually, now that you mention it, I think it's the other way around... I did try having 3 actions groups, one for each action (Toggle, Extend, Retract). From the normal (un-deployed) state, Extend works but Toggle doesn't. From the Deployed/Extended state, Retract works and I THINK Toggle worked as well. I'd have to try again to be sure.

However, if you're gutting the code to re-work it and make it better, by all means, focus on that. Like I said, I can live without this for the time being. I only just noticed having flap control helps in re-entry for my spaceplanes, so it's not like it was a core step in my procedures. I haven't made a design that mandated this technique (yet).

Link to comment
Share on other sites

  • 2 weeks later...

Howdy peeps, I'm trying to get AGX to work with a joystick.

Now, I'm using autohotkey to remap all joystick buttons to keyboard commands, because KSP (and unity) doesn't do joysticks very well. Currently I have joystick buttons mapped to action groups 1 through 10, which are keyboard keys alpha1 through alpha0.

I am trying to make action groups 11 through 20 available. At first, I tried setting a modifier key in AGX, so that action group 11 would be left shift alpha1, 12 would be left shift alpha2 etc. But when I use autohotkey modifier syntax (eg, Send <+1) KSP doesn't seem to recognise the modifier key.

I then saw that I can assign "shifted" alpha keys (such as exclaim, ampersand, etc) in AGX. I thought this would be my way around the issue, but when I use autohotkey to Send {!} this isn't recognised either.

Note that if I use the keyboard and type shift + alpha1 when that is how AGX is bound, this works. But if I tie the action group to the "exclaim" key, this doesnt work even via keyboard input (shift + alpha1).

Has anyone found a way to do this?

Link to comment
Share on other sites

@allhuran: I never tested AGX with the sending of modified keys (such as ! ) directly so I don't think they will work.

I've built and tested the key detection code using a keyboard and one of the assumptions I made was that a modified key, such as Shift-1, would always have the shift pressed down before the 1 is pressed. I would expect that when you use the joystick mapping software, it sends both at the same time and that this is the cause of the issue.

When binding keys, note that I am limited by what KSP offers me, when you assign an action group to the 'Exclaim' key as seen in AGX's GUI, I'm not actually sure how to trigger that group. AGX expects a binding of Shift-1 for that key combination.

Can you do a quick test for me please?

Assign actions to actions groups 1 and 11, binding group 1 to just alpha1 and group 11 to shift-alpha1. Assign three joystick buttons, one to alpha1, one to just shift, and the third to shift-1.

Then, press the alpha1 joystick button, group 1 should activate. (This already works as per your previous post, it's just a double check the test is setup correctly.)

Then press the joystick button bound to shift-1, does nothing still happen? Or does group 1 activate?

Then press and hold the shift joystick button, then press the 1 joystick button. What happens?

Then still press and holding the shift joystick button, press the shift-1 joystick button, what happens?

Thanks,

D.

Link to comment
Share on other sites

Excuse me but it's unclear to me if AGX is able to switch on/toggle while key pressed, and switch off/toggle again when key released. I tried it, if it's possible I couldn't get it to work.

The reason is I have to double tap to create a note with the tone generators. Playing a tune is very difficult this way.

Link to comment
Share on other sites

@Azimech: It should be able to. I'm on my mobile at the moment and can't directly check, but there should be a Tap/Hold option on the main window for the action group? (Near the text entry box for the group name.)

I can check for sure when I get home from work.

D.

Link to comment
Share on other sites

@allhuran: I never tested AGX with the sending of modified keys (such as ! ) directly so I don't think they will work.

I've built and tested the key detection code using a keyboard and one of the assumptions I made was that a modified key, such as Shift-1, would always have the shift pressed down before the 1 is pressed. I would expect that when you use the joystick mapping software, it sends both at the same time and that this is the cause of the issue.

Yep, that seems like it. The following works with shift + 1 through 0 assigned to action groups 11 through 20 (2joy15 is a button I use as a modifier):


1Joy7::
if GetKeyState("2Joy15") {
Send {LShift Down}
Sleep 40
Send {1}
Sleep 40
Send {LShift Up}
} else {
Send {1}
}
return

The delay has to be fairly significant to work when KSP is having framerate issues, but that's OK.

Link to comment
Share on other sites

Good to see you were able to get this to work.

The delay has to be fairly significant to work when KSP is having framerate issues, but that's OK.

And yes, (assuming I've isolated the problem correctly), the "Send {LShift Down}" line must be received by KSP the frame before the "Send {1}" line.

This also means that there is nothing I can do however, the issue lies in Unity's handling of keystrokes which is buried deep, not even Squad has the access required to do something about it.

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