Jump to content

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


Diazo

Recommended Posts

Hi, first of all I like you mod very much. However, today I finally found the reason why my space center screen takes a loooooong time to load for a week now and it is AGX. Removing it reduced the loading time from "make some dinner" to a couple of seconds. In the output log i found

Deleteing old save games start: 12/18/2014 5:37:19 PM

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Deleteing old save games end: 12/18/2014 5:40:13 PM

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Any idea why this takes forever? I do have a lot of ships in the air (55 flights active) but the difference with AGX on and off seems to indicate some kind of problem.

Oh, and I am still on KSP 0.25...

Link to comment
Share on other sites

@madmatt55: The number of ships in the air has nothing to do with that, rather it is how many .sfs files there are in your save folder. Unfortunately KSP's method to access .sfs files on disk is not efficient and if you keep a lot of backup saves it quickly adds up how long it takes AGX to process them when it is cleaning up after itself and deleting old AGExt00000.cfg files that are no longer used.

You can disable this if you wish by going to the GameData\Diazo\AGExt folder and opening the AGExt.cfg file and changing the "DeleteOldSaves = 1" line to "DeleteOldSaves = 0" (zero). However, if you disable this AGExt will not clean up it's old AGExt00000.cfg files and you will have to do it manually every so often (or just live with a lot of old AGExt00000.cfg files living on your disk).

D.

Edited by Diazo
Link to comment
Share on other sites

Thanks for the quick answer! This does seems very plausible, I have 100 sfs files... However I just checked and there are also 126 AGExtxxxx.cfg files. So I guess they are not deleting themselves anyway? How do I know which ones are no longer in use for some manual cleanup?

Link to comment
Share on other sites

How it works is that the AGExt00000.cfg file auto-increments each time you do any type of save (regular/quicksave/named save). This number is saved in the .sfs file in the SCENARIO AGExtScenario module as the LastSave value. So a .sfs file with a LastSave =15 value will try to load AGExt00015.cfg when it loads.

When the clean up runs, it checks all the .sfs files in the directly for the LastSave value and deletes all AGExt00000.cfg files that do not match a LastSave value or a LastSave value less one.

So if our .sfs file above with a LastSave =15 was the only .sfs file in the directory, the clean up routine would leave AGExt00014.cfg and AGExt00015.cfg and delete all other AGExt00000.cfg files in the directory.

This LastSave value in the .sfs file is also the only place you can tell which AGExt00000.cfg file belongs to which .sfs file. Because I'm hooking into KSP's saving process, I have no control over the file names of the .sfs files and there is no other way to tell which AGExt00000.cfg file a specific .sfs file uses for sure.

A good indicator is the time stamps, a .sfs file and its associated AGExt00000.cfg file will be created at the same time, but I don't guarantee this method as I have not tested it.

I don't know how often you back track, or how far you backtrack, with all those saves. If it is not very often you can make a "backup" folder in your save directory and move all the old .sfs files and AGExt00000.cfg files into it. That way the clean up routing only has a few .sfs files to cycle through so it cleans up after itself without being such a long wait.

The downside to this being that if you want to load on of those saves, you have to move it back into the main saves folder before you can load it.

D.

Link to comment
Share on other sites

So I can't get my action groups to save. I don't know if it's the other mods I might be running with it. On another thread someone said to post some of the debug info and how to look at it. Hope this helps cause this .... is over my head.

[Log]: AGX Root change

[Log]: AGX: vessel switch

[Log]: AGX Update error: 8c System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.Update () [0x00000] in <filename unknown>:0

[Exception]: MissingFieldException: Field '.Part.uid' not found.

Link to comment
Share on other sites

So, on the note of those "count: 0" messages of the ambiguous manner... I wonder if it would be better to just disable that message for the release version of the plugin, or make the verbosity of those messages configurable somehow. Personally, I've downloaded your source and gone through to disable all of those messages (and it takes some searching I must say) and recompiled a local copy for myself. They may be mostly harmless, but they're also annoying.

Link to comment
Share on other sites

@madmatt55: Yes, if you load a save and it can't find the correctly numbered AGExt00000.cfg file, all your actions across all vessels in the game that are assigned to groups 11 or higher are lost. Actions assigned to groups 1 through 10 are saved because I backport all actions to KSP itself and so it saves the data for the base 10 action groups. All group names and other data is lost for all groups however.

@Gaalidas: Version 1.25 currently has an extreme amount of logging enabled while I was tracking down the multiple keypress issue from a few pages back. The next version will have all that disabled and the log spam will stop, I just wanted to leave it enabled to help with version 0.90 troubleshooting that I apparently did not end up needing.

@OuTLaw66613: Now that is odd, my code should not be using Part.uid anywhere I thought. Would it be possible to get you to post the output_log.txt from your KSP_Data directory so I could look at it? It usually has more details then the KSP.log file that the snippet you posted came from.

D.

Link to comment
Share on other sites

Version 1.25a

Download link here.

-Various fixes

-Add AGX Button to stock toolbar if Blizzy's toolbar is not installed. Has the same left/right click functionality.

-Does not fix know issue of only KeySet 1 working in flight, however this issue is inconsistent, my tests tonight worked fine. More investigation required.

-Does not reduce the log file spam

@OuTLaW66613: I'm hopeful this version will help your situation. However, looking at your log file you have other mods besides mine throwing a lot of errors. Notably two mods identified as "KK" and "KConfigDocumentation" and a part with a custom internal model making references to a part.uid that does not exist any more.

I have no clue which part it might be or what KConfigDocumentation is, but based on the errors KK is throwing, I think it is Kerbal Konstructs? Either way, could I ask you to run a test with just AGX installed? That will tell me if it is a problem with AGX itself, or a conflict caused by the two mods being installed at the same time.

Both cases are problems I have to fix, but I need to know where to start looking.

D.

Edited by Diazo
Link to comment
Share on other sites

Right on I really appreciate it. Yeah there are a few more mods I'm waiting on updates for. I don't think Mark IV, B9, foundries and rovers/roadsters have been updated. I do get a prompt before I start the game for cross feed loader (B9 I think).

Thanks again

Link to comment
Share on other sites

I was still having the same problem I've been through a couple of loads going through mods to figure out the one or ones conflicting. I'll post it here and let you know.

Your mod's higher on the list of must haves, might just have to bump a couple of the lower ones ;)

Link to comment
Share on other sites

Alright.

Just to be sure, have you checked your GameData\Saves\{YourSave}\AGExtEditor.cfg to make sure it is not blank? That should not longer be possible on 1.25a but it is a known issue I can ask you to check.

As it is still going on, can you post another output_log.txt from the 1.25a version? The more information I have the better.

D.

Link to comment
Share on other sites

Hi, First off Diazo, I really like this mod, well done.

Ok, now the question. In V90 career mode, you don't get action groups in stock until you've upgraded the VAB. Does AGX respect the idea of having to upgrade the VAB in order to gain access to to AGX's action group functionality? It doesn't appear to at this point. (No biggie if it doesn't, I'm merely curious.)

Dave.

Link to comment
Share on other sites

Not yet it does not.

I need to fix the problem Outlaw is running into and then get the keysets working in flight mode first. The version after that I'll be adding the option to respect the stock limitations.

D.

Link to comment
Share on other sites

Version 1.25d

Download here.

-Fix Keysets so they actually work

-Reduce log spam clutter by removing now unneeded debug messages.

Alright, Keyset now work. Note that this is not a 0.90 thing, Keysets have been broken for several version it looks like. If you've tried Keysets previously and could not figure them out, please try again. They were kind of completely broken apparently. :huh:

I also turned off a whole bunch of debug logging that is not needed any more. This includes the "AGX Ambiguous" message that would appear in the center of the screen, although this does still log so I can fix it.

At this point, AGX itself is 100% working in sandbox and the only issue in career is that it allows you access to action groups before you upgrade your facilities, there is nothing functionally broken.

D.

Link to comment
Share on other sites

Version 1.25d

Download here.

-Fix Keysets so they actually work

-Reduce log spam clutter by removing now unneeded debug messages.

Alright, Keyset now work. Note that this is not a 0.90 thing, Keysets have been broken for several version it looks like. If you've tried Keysets previously and could not figure them out, please try again. They were kind of completely broken apparently. :huh:

I also turned off a whole bunch of debug logging that is not needed any more. This includes the "AGX Ambiguous" message that would appear in the center of the screen, although this does still log so I can fix it.

At this point, AGX itself is 100% working in sandbox and the only issue in career is that it allows you access to action groups before you upgrade your facilities, there is nothing functionally broken.

D.

AGX seems completely broken for me and I don't know why. Here are 2 snippets from output_log:

AGX EditorLoadFromNode Fail 10b System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXEditor.EditorLoadFromNode () [0x00000] in <filename unknown>:0

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[...]

AGX Update error: 24e System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.Update () [0x00000] in <filename unknown>:0

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

The first messages (10b) seem to be in the VAB, the second set are from on the launchpad. When I say completely broken, the UI shows up in the VAB and I can assign actions just fine like normal, and then when I save the ship and go to the launchpad everything disappears as if I never assigned actions. I also can't assign any actions inflight/on the pad, opening the editor there won't allow me to assign actions to anything. Do you want a short video or an imgur album or something since it's a bit hard to describe, or will those log snippets lead you in the right direction?

I've also noticed that when I go to my ships directory, the agx cfg files for each ship seem to be empty. I made sure the folders are not read only too.

Link to comment
Share on other sites

I'm particularly interested in what the contents of AGExtEditor.cfg are. (Located in your save directory)

Also, is there a "ConfigNode is empty" error in your log just after entering the editor?

Both of the error snippets you posted would be explained if the AGExtEditor.cfg has become corrupted somehow and AGX can't load it, or it loads with invalid data.

D.

edit: If the AGExtEditor.cfg file is formatted correctly, it will have a "name = editor" as the first line. If it does not, you can do it manually with notepad and things should work correctly once you do. If it already has that line and things are still not working, let me know because that means something else is going wrong.

Edited by Diazo
Link to comment
Share on other sites

That might be the problem - AGExtEditor.cfg is empty. I don't see a confignode is empty in my most recent output, but I did disable/delete AGX so I could see what else the log would spit out, and it's (mostly) error free. Should I delete the file and have AGX re-create it?

Interesting that once I deleted AGX, the commands I wanted (ie, 1 for main engines toggle, 5 for science collection) appeared and worked under the stock actions. So AGX was writing them in since I didn't use action groups until AGX was installed, but was unable to read or do anything with them.

Link to comment
Share on other sites

Yes, AGExtEditor.cfg being empty causes KSP to throw a critical error and renders AGX unusable. It's a known bug I thought I fixed, but obviously not. :/

And any actions in groups 1 through 10 copy back and forth. AGX will read existing vessels and import any actions in those groups and when actions are assigned to those groups in AGX it copies them back to KSP. It's one of the key features of AGX that it fully integrates with the stock action system like that.

I'll take another look at my code and see if I can squash the AGExtEditor.cfg being empty bug.

D.

Link to comment
Share on other sites

Version 1.26

Download here.

-Add Career mode compatibility so that only action groups you have unlocked via building upgrades are available for use.

In flight, the highest level building will be used for all flights, I can't detect what vessels have launched from the SPH or the VAB.

-Add override on the above feature so you can use all action groups all the time if you wish.

Goto KSP-Install\GameData\Diazo\AGExt\AGExt.cfg and change the OverrideCareer line:

1 (one)= Override KSP career options and use all action groups all the time.

0 (zero)= Respect KSP career options and use only action groups you have unlocked.

As always, comments welcomed.

D.

Link to comment
Share on other sites

Diazo,

Awesome addon! Like many others, I use it to create very realistic control panels for my crafts! I have run into a small problem since 1.25. My actions created in the editor save, but they lose the group names (descriptions) whenever I load another craft in the editor or exit the current game and reload the craft. The AGExtEditor.cfg does have "name = editor" in it and there are no apparent errors in the output_log.txt. Here is what (the first few lines of) the AGExtEditor.cfg looks like before switching crafts or exiting (note "‣001TWR JETT"):

name = editorVAB6511211110810811132120
{
name = Apollo x
currentKeyset = 1
groupNames = ‣001TWR JETT

and then after re-loading:

name = editor
VAB6511211110810811132120
{
name = Apollo x
currentKeyset = 1
groupNames =

Let me know if you need additional info to diagnose. Thanks!

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