Jump to content

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


Diazo

Recommended Posts

2 hours ago, Diazo said:

However, there is no LoadFinshed flag that I could find so I'm using a timer to reset the flag. Is this a large vessel that takes a significant time to load? The timer might be expiring early.

That would somewhat fits to what I'm seeing when trying to reproduce it in my test installation. While I was able to replicate it there with the original vessel (but not with a very small vessel built from scratch), it's also much less reproducible than in my real installation (which has a lot more parts installed and thus might make the editor slower). Also, the more I strip down the test vessel to exclude mods, the rarer the event. I already started spamming stock parts to counter it ;)

So, I was already suspecting, there might be some race condition involved. One thing I just noticed: When the issue is happening, I'm seeing a lot of

Quote

AGX New Load Okay IRHingeOpenScaleable:MoveNextPresetAction:5

messages after

Quote

Buggy 0 -SP-RT-PF-NFS+Parts loaded!

I think, in the cases, where the bug didn't happen, those messages only appeared before the "Ship name loaded!" message. Would the timer firing before the load finished explain what I'm seeing?

Link to comment
Share on other sites

@DiazoPhew, I finally managed to reproduce the bug with just AGExt and ModuleManager installed. The used craft file is in the following GIST. And here is a log (first load of the craft was successful, second one had the bug).

To reproduce, just start a new sandbox game, move the craft file to its Ships/VAB folder and load it from the VAB. Repeat loading until the action groups mess up. The "Big Dish" groups should only have two actions each, the "Dish" groups only one. It seems to be "all or nothing", i.e. it doesn't matter which action group you watch. After one load they suddenly all have their symmetry parts added.

If you can't make it work after several loads, try adding more boosters sepatrons. As you said, the number of parts seems to have an influence, and maybe your computer is faster than mine.

Link to comment
Share on other sites

Wow, thanks for that, makes figuring this out easy.

The .craft file you uploaded does in fact display the bug on my computer and I've already narrowed down the issue.

The complication is that it is the fact that the EditorShipLoad event doesn't fire early enough so a bunch of the loading process happens before then.

Going to have to figure out a workaround.

D.

Link to comment
Share on other sites

@Diazo, I tested your DLL shortly in my heavily modded main-installation with the original savegame and ship. So far, I wasn't able to trigger the bug. So, I would say bug fixed. Thank you!

BTW: If you want a little fun after the hard work, try flying the test craft. At least with stock it has a very "interesting" dynamics ;) Now, I understand what "Space Noodle" is referring to.

Link to comment
Share on other sites

Bug report:

I'm sure this has been mentioned already, since it's fairly obvious, but in the off chance it hasn't...when you dock two ships, the ship that does the docking (the "male" ship) action groups override the dockee ("female"). Might be a bug with the stock game for all I know, had this mod since before I started docking, heh. Anyway, I've been docking a lot lately, and I keep having to retype out the hotkeys titles for the receiving ship. The actions are preserved, just not the hotkey titles (so I have a list a blank hotkeys when I undock the two ships).

Big fan of the mod; keep up the good work.

Cheers.

Link to comment
Share on other sites

So.. just started using this mod.. think i have it figured out but... 1. why does it eat so much ram, so fast?  Loading one ship, setting up AGExt, flying it twice, and I CTD from memory - usually I get 20-30 minutes of editing.  this is using more memory than outer planets/kerbinside .. :(

It also seems to corrupt my crew window in the SPH/VAB... makes it a fixed height so there's tons of wasted space on the left where the kerbals and their crew assignments are listed. 

Any fix for these or is this just the way it is?

Link to comment
Share on other sites

@ss8913 This is the first time anyone's talked about memory problem issues with this mod, I would ask for more information (particularly a copy of your output_log.txt) before I could offer any opinions on what is going on.

Same with the crew window. This mod does show/hide the editor panels (the parts/actions/crew panels are all the same object behind the scenes), but I don't actually touch the crew panel itself so I don't know what would cause that.

Is a screenshot possible?

D.

Link to comment
Share on other sites

15 hours ago, Diazo said:

@ss8913 This is the first time anyone's talked about memory problem issues with this mod, I would ask for more information (particularly a copy of your output_log.txt) before I could offer any opinions on what is going on.

Same with the crew window. This mod does show/hide the editor panels (the parts/actions/crew panels are all the same object behind the scenes), but I don't actually touch the crew panel itself so I don't know what would cause that.

Is a screenshot possible?

D.

The crew window thing only happens if I open the AGExt window in the SPH/VAB first.  It may be because I'm running 4K resolution which most people are not, and thus haven't noticed it before(?)  I'll go run a session and will get a screenshot and a copy of output_log.txt and put them on dropbox for you in a .zip together.

Link to comment
Share on other sites

Hello Diazo. Love your mod, can't live without it now. Thank you so much for creating it, and all the work you do in maintaining it.

I need to report a bug. It was going to be two of them, but I see that you're already aware of the "docking/blanking the names" one.

The remaining one I need to report is there appears to be a z-order issue with the interface while editing the actions while in space. If the interface is over a ship, and the user is clicking buttons or the text fields (or anything else in the AGE interface) it'll select whatever part(s) are underneath. It can become an annoyance. Moving the view so that the interface is over empty space makes everything fine, though. Just thought I'd report it.

Thanks again for a truly indispensable addon, and everything you put into it. ^_^

Link to comment
Share on other sites

@ss8913 Thank you for that.

@BetaguyGZT That is a known issue with "click through" that all UI windows (both stock and mod) have. There is a workaround available for it that I apparently implemented in the editor and then forgot to implement in flight mode. I'll copy the code over, should be a straightforward fix.

D.

Link to comment
Share on other sites

Downloaded. I will test this immediately and report my findings. Thank you for your attention and efforts. :D 

[EDIT] TESTED -- Works like a champ, thanks a million, D. No problems at all. Loaded it and my 3.6GB worth of other mods up as a stress test, and it did fine. No errors reported in the log from AGX.

Edited by BetaguyGZT
Reported test results.
Link to comment
Share on other sites

@BetaguyGZT Good to hear it works.

I'm hoping to get the time to seriously dig into the action group names issue this weekend but I'm pretty sure I'm going to have to gut and re-work that entire part of the mod so it's probably going to be a while before I get that fix out.

D.

Link to comment
Share on other sites

  • 2 weeks later...

Quick question: "Custom01-10" are the internal names of KSP's custom hotkeys; what are your's? I seem to remember seeing it once before, but for the life of me I can't find it now and I looked around this thread and briefly through the source code. (If you're curious, I'm trying to use Snark's DefaultActions mod to bind an action to one of your expanded hotkeys).

Thanks!

Link to comment
Share on other sites

The short answer to your question is "they don't exist".

The long answer is that this mod works differently on the fundamental level then Squad's hotkey system does.

Squad assigns 10 booleans to every action, one for each action group, and when an action is assigned to that group the bool is set to true. (This boolean is what DefaultActions changes.)

That simply doesn't work for 250 groups, so this mod works the other way and creates 250 action groups, then assigns actions to them.

So there is no "Custom11" object for the DefaultActions mod to reference and so it doesn't work.

The best I can offer is to reserve groups 1 through 10 for stuff that DefaultActions will use, then use groups 11 and up for actions you assign in game to avoid conflicts. Because of the difference in the basic methodology between the stock action group and this mod, adding the ability to add actions to an action group would be a prohibitive amount of work.

I'm actually not sure how to even do it, my first three ideas I had to discard as unworkable and the best one I've thought of so far would require changes on DefaultActions's end.

What you are probably thinking of is the Methods I expose that other mods can call to activate/deactivate/check state/etc. of action groups 11 through 250. However those only work in game, they can't be affected by an MM script.

Now, actions assigned to groups 1 through 10 by DefaultActions should show up in those groups in this mod, that is a bug I need to fix if they don't.

Hope that clears things up.

D.

Edited by Diazo
Link to comment
Share on other sites

Thank you for the detailed response; kind of figured as much.

31 minutes ago, Diazo said:

[snips]

Now, actions assigned to groups 1 through 10 by DefaultActions should show up in those groups in this mod, that is a bug I need to fix if they don't.

 

I've actually never figured out what the groups do and only sort of figured out what the key sets do (and only just discovered Toggles & Holds). And this is after playing with the mod for oh...a few hundred hours...I am not a clever man:mellow:. I suppose I could try re-reading the OP, as I remember it be very well documented. I suspect things work just fine, just...user input error.

Cheers.

Link to comment
Share on other sites

Heh, one of the next goals for this mod is to put a youtube video together covering all that.

But something always keeps popping up, right now I'm working on getting the names saving correctly when docking working.

D.

Link to comment
Share on other sites

Hi Diazo,

Am I right in thinking that the IR Sequencer supports action groups extended? I don't see it on your list of mods that support AGX. If so I may have to pick this up! The renaming of Action Groups alone would be extremely useful for some of the more complicated sequences I come up with.

Also, do you know if there is any way to Set/Clear an Action Group rather than just toggle it? Some of my sequences require AGs to be in a certain state, so if it's the inverse bad things could happen.

Thanks,

Link to comment
Share on other sites

@ZodiusInfuser Integration is planned between IR Sequencer and my mods. The latest release of IR Sequencer changes how things work in the code work and I believe I need to update my end of things to match however, have not run any tests yet to see how many changes I need to make.

On the Set/Clear action groups, I'm not 100% clear what you are asking for.

First, on most things that have a state (such as solar panel open/closed), AGX actually monitors the part and will set the state of the action group that action is assigned to, to match the state of the part.

For other actions that don't have a state (or actions in mods I haven't been made aware of yet), there is no way from AGX's GUI to set/clear an action group, only toggle it. The function does exist in code however so could you give me more details on how you'd use this?

D.

Edited by Diazo
Link to comment
Share on other sites

Thanks for the reply! That clears things up for me a bit. 

I guess a good example of what I was thinking of would be a cargo bay, as that doesn't have separate enable / disable actions like lights do. Would AGX let me assign that action to an action group and have it's state match the state of the bay? From what you've said it looks like the answer is yes.

Now, the Set / Clear thought came about because of the IR Sequencer . In that you currently can only toggle action groups, because that's all the game allows, which in the case of the bay isn't ideal as if a sequence is made to open a bay and it's already open, then it will close instead. Does AGX let other mods (such as the Sequencer once integrated) Set / Clear an action group as well as a usual toggle (e.g Set to 1, Clear to 0)? That way a sequence could be made to Set a "Bay State" Action Group and the bay will open if it isn't or do nothing if it is.

I hope that explains my thinking better.

Edited by ZodiusInfuser
Link to comment
Share on other sites

@Diazo in regards to my earlier problem report, I think I may have narrowed it down... I used a cygwin shell window to "tail -f output_log.txt" while things were having problems, and the only errors showing up in the log are related to ... Tweakscale.  What's happening to me is this:

 

1. Action groups will "forget" their assigned function if they're assigned to tweakscaled parts... sometimes.  like my flap controls on my 200% tweakscaled control surfaces.  This is almost 100% for sure a tweakscale issue.  The "forgetting" can happen to anything later on in the chain as well.  It's less of a problem if I have no gaps between action groups, ie all actions are full and dthere aren't any empty action groups in the list.  I don't have any way to explain that.

2. Memory usage - the more action groups I use, the worse it is.  I use a lot of tweakscaled parts though so I'm thinking that may be it.  ie, getting into SPH I'm at 3200mb.  Load a craft with a lot of AG, I'm at 3750mb.  I get one flight and then it crashes on revert at that level of ram usage.  Not sure if this is tweakscale integration problem or not; it could be, but there's nothing in the logs to suggest anything *else*.

3. not a tweakscale issue - using the KSPIE AGI core (unmanned but acts as manned) - AGX action groups do not work.  standard things like lights, gear, flight controls, etc, all work, and with AGX uninstalled the action groups work as well.  Not sure what's causing this but I'm *guessing* AGX is seeing "no kerbals = no control"... the AGI core is a bit of a 'special' part in that it allows "manned" control with no kerbals (needs a powerful reactor to keep it online however).

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