Jump to content

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


Diazo

Recommended Posts

Editor UNDO Status Update:

Default behavior on the editor undo is that when a part is recreated via undo it is a fresh part with assigned actions lost (actions in the default 10 KSP groups). AGX currently mimics this behavior and any AGX actions on a part deleted and reset with undo has its actions lost. I will investigate this but will not promise anything.

Considering what happens if you set the part down and hit Undo (you have the part you pulled off and a duplicate where it was), that's reasonable. The actions associated with the part would have to be fixed manually. Unless it was a stock group (gear, lights) that get parts automatically.

In my demo, it was a landing leg that wasn't a part of any AGExt action group but just the stock gear action group. All AGExt actions were being cleared. Somehow the Undo actions leads to something that ends up with AGExt not thinking it has any defined actions. Don't know if the outcome would be affected by what groups, AGExt or stock, the part being moved is a part of.

Link to comment
Share on other sites

At this point I'll have to ask you to wait until I do the kOS rewrite. I was able to get the previous tweak out so quickly because it was a single line of code I had to add, this is more complicated.

Sounds good. Great stuff, Diazo.

Link to comment
Share on other sites

@Editor Undo:

KSP, why do you do this?

Apparently, when you Undo in the Editor, KSP actually reloads the ship to an earlier point and so every part on the ship is different, which means every AGX action is lost because the part it is assigned to no longer exists after the undo.

So, if you use the Undo function in the Editor, every AGX action is lost.

This is actually going to be quite a big deal to work around, no estimate on timeline for a fix for this.

D.

Link to comment
Share on other sites

Apparently, when you Undo in the Editor, KSP actually reloads the ship to an earlier point and so every part on the ship is different, which means every AGX action is lost because the part it is assigned to no longer exists after the undo.

So KSP is supposed to be modding friendly, which means when it does that checkpoint it later reloads for the Undo, it should provide a hook to mods to allow them to save their state. And then when it does the Undo, provide another hook to signal to mods to revert their own state. But if it doesn't offer these hooks correctly.... Wow, best of luck with that, Diazo.

As a stopgap, what about AGExt controls in the editor to manually reload its state from the AGExtEditor.cfg file? Won't be perfect and will still likely need some manual action corrections, but at least it'll allow the Undo function to be used with AGExt with only a little overhead.

Link to comment
Share on other sites

I can automatically reload the actions from the AGExtEditor.cfg file easily, that's not an issue.

The issue is that I need to do it while on the Parts tab, not the Actions tab somehow.

The joker in the deck is I want to do this without breaking my support for symmetry. (In AGX, actions on a part propagate correctly when the symmetry count of that part changes, the first couple of fixes I though of would have broken that.)

But yes, this is a bit of a challenge.

D.

Link to comment
Share on other sites

Version 1.17d

Okay, this is a test release supporting the Undo function Editor.

Download pulled, grab 1.17e please.

Download is .dll only, you'll need the full .zip install as well.

This is actually a significant change to how the Editor works so feedback is appreciated on this.

D.

Edited by Diazo
Link to comment
Share on other sites

Just downloaded RoverDude's survival pack and I get this when I put the propulsion module in:

Root diff

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

AGXEd EditorLoadFromFile Fail 10 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)

Using 1.17d

nevermind. It is spamming it for all parts.

~ downgraded to 1.17c and no more spamming.

Edited by Nori
Link to comment
Share on other sites

Version 1.17e

Download here.

-Fix handling of "Untitled Space Craft" so AGX can not get stuck loading a different vessel.

@Nori: Thank you for catching that, I missed that. It would only happen when "Untitled Space Craft" was a saved ship in AGExtEditor and you started building a new vessel so the actions would not match and it would get stuck.

Existing ships and new ships that ignored the message spam long enough to save should be fine.

D.

Link to comment
Share on other sites

Cool. Thanks for the quick release. Strange though it may sound I always have the debug window open for a while after updating mods. Makes for easy error catching. Well at least obvious ones. Don't know how you knew what was wrong from what little I posted though.

Link to comment
Share on other sites

Good to hear it is working for you.

On the error finding, I cheat.

AGXEd EditorLoadFromFile Fail 10 System.NullReferenceException

That 10 after the fail tells me the error occurred at line 10 so I know exactly where to look.

D.

Link to comment
Share on other sites

Version 1.17f

Version 1.17 full .zip download (Install first.)

Version 1.17f .dll file only. (Install second.)

Add Near Future and RemoteTech support (remove Action Ambiguous message).

Hopefully tweak ModuleScience correctly.

@Gaiiden: This version should add support for the mods you ran into issues with.

The exception is the middle one (ModuleScienceExperiment) as that is a default module that Squad has supplied so I was not able to actually determine which mod part was giving you problems. I tweaked the code for that module with my best guess so I'm hopeful but please let me know how it goes for you.

D.

Link to comment
Share on other sites

Diazo, I got another Action Ambiguous for a BTSM part: "AGX Load Action ambiguous. Count: 0 Module: BTSMModuleScienceExperiment BTSMDeployExperimentAction". Its circumstances are special, see below.

Output_log.txt is here.

I was in my current BTSM career game, in the VAB. I'd just loaded the rocket I was going to fly next, without getting a message. However, due to changes and wanting not to get bit by oddball issues, I've been rebuilding the previous careers' rockets from scratch. So I'd taken note of its design, then I wiped it out by clicking on New. I'd changed the name at the top to the rocket's name, "1-C-2 Kerbin O", then clicked on the Stayputnik to start the design. At that point, I got the action ambiguous message flash up.

I saved the rocket as just a Stayputnik, then loaded it again. Got no message. I clicked New again and clicked on a Stayputnik to start, again without a message.

I was able to make it happen again with this sequence of actions:

1. Have a named rocket with AGExt actions and load it.

2. Clicking New.

3. Changing the name at the top of the editor to that of the rocket in #1.

4. Clicking on a part to start.

Link to comment
Share on other sites

Diazo, I got another Action Ambiguous for a BTSM part: "AGX Load Action ambiguous. Count: 0 Module: BTSMModuleScienceExperiment BTSMDeployExperimentAction". Its circumstances are special, see below.

Output_log.txt is here.

I was in my current BTSM career game, in the VAB. I'd just loaded the rocket I was going to fly next, without getting a message. However, due to changes and wanting not to get bit by oddball issues, I've been rebuilding the previous careers' rockets from scratch. So I'd taken note of its design, then I wiped it out by clicking on New. I'd changed the name at the top to the rocket's name, "1-C-2 Kerbin O", then clicked on the Stayputnik to start the design. At that point, I got the action ambiguous message flash up.

I saved the rocket as just a Stayputnik, then loaded it again. Got no message. I clicked New again and clicked on a Stayputnik to start, again without a message.

I was able to make it happen again with this sequence of actions:

1. Have a named rocket with AGExt actions and load it.

2. Clicking New.

3. Changing the name at the top of the editor to that of the rocket in #1.

4. Clicking on a part to start.

Hmmm, so it is trying to load the old vessels actions on the new vessel somehow. It almost certainly has to be tied to the new Undo compatibility mode somehow.

In this case, that message does not actually indicate a problem and you have lost no assigned actions, but I should be able to make it so the ambiguous message does not come up in these circumstances.

D.

Link to comment
Share on other sites

Version 1.18

Download here.

Compile into a full release of all the version 1.17 test releases into a full release. Change log in first post.

This includes the fix for the Actions Ambiguious on the USI Survivability Pack in the previous post.

D.

I don't have the USI Survivability Pack. But otherwise AGExt appears to be working okay. Thanks, Diazo! :)

Link to comment
Share on other sites

I noticed yesterday that the "other" action groups (brakes, lights, abort, etc) cannot be set from the VAB/SPH. Is that something that can be fixed? I'm working on a VTOL, and I'd like to not have to add the airbrakes every time I launch after tweaking it.

Link to comment
Share on other sites

Adding that feature to AGX in the editor is planned.

In the meantime if you click on the AGX button when you are already in action groups mode, AGX will hide itself and reveal the default KSP action group editor where you can set those actions.

D.

Link to comment
Share on other sites

Bit of a strange issue, here - new in 0.25. Fair disclosure: I have a number of other mods running, some of which are out of date.

When I try to launch from the VAB the button doesn't do anything. Looking at output_log I see:

[...]
[Pre-Flight Check]: All Checks Complete. Go for Launch!

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

Launching vessel from LaunchPad. Craft file: C:/Program Files (x86)/Steam/steamapps/common/Kerbal Space Program/KSP_Data/../saves/Ryan/Ships/VAB/Auto-Saved Ship.craft

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

AGX EditorSaveToFile called

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

AGX Editor Fail (SaveGroupNames) 7 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXEditor.SaveGroupNames (System.String str) [0x00000] in <filename unknown>:0

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

AGExt No parts to save 17d System.NullReferenceException: Object reference not set to an instance of an object

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

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

AGX EditorSaveToFile FAIL 23 System.NullReferenceException: Object reference not set to an instance of an object

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

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

NullReferenceException: Object reference not set to an instance of an object
at ActionGroupsExtended.AGXEditor.EditorWriteNodeToFile () [0x00000] in <filename unknown>:0

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

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

at ScenarioModule.Save (.ConfigNode node) [0x00000] in <filename unknown>:0

at ProtoScenarioModule..ctor (.ScenarioModule module) [0x00000] in <filename unknown>:0

at ScenarioRunner.GetUpdatedProtoModules () [0x00000] in <filename unknown>:0

at Game.Updated () [0x00000] in <filename unknown>:0

at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) [0x00000] in <filename unknown>:0

at FlightDriver.StartWithNewLaunch (System.String fullFilePath, System.String missionFlagURL, System.String launchSiteName, .VesselCrewManifest manifest) [0x00000] in <filename unknown>:0

at EditorLogic.goForLaunch () [0x00000] in <filename unknown>:0

at EditorLogic.proceedWithVesselLaunch () [0x00000] in <filename unknown>:0

at PreFlightCheck.Complete () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.runNextTest () [0x00000] in <filename unknown>:0

at PreFlightCheck.RunTests () [0x00000] in <filename unknown>:0

at EditorLogic.launchVessel () [0x00000] in <filename unknown>:0

When in the VAB idle, my output_log is spammed with:

[...]

NullReferenceException: Object reference not set to an instance of an object
at ExLP.ExWorkshop.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

GUIContent is null. Use GUIContent.none.

(Filename: Line: 32)

GUIContent is null. Use GUIContent.none.

(Filename: Line: 32)

NullReferenceException: Object reference not set to an instance of an object
at ExLP.ExWorkshop.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

GUIContent is null. Use GUIContent.none.

(Filename: Line: 32)

GUIContent is null. Use GUIContent.none.

(Filename: Line: 32)

NullReferenceException: Object reference not set to an instance of an object
at ExLP.ExWorkshop.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

GUIContent is null. Use GUIContent.none.

The mod and textures seemed to load ok and AGext is up to date:

AGExt Ver. 1.18 loaded

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