Jump to content

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


Diazo

Recommended Posts

An updated .dll file that handles Joystick Buttons correctly can be found here.

Note I've also added a "button test" field that will display which joystick button is being pressed so you can easily figure out which button is which.

- snip -

Thank you!

It lets me assign them, but the mouse buttons all look like this (only this plugin's menus) and the key test doesn't work with my joystick (It does with all keyboard keys).

1024x640.resizedimage

Link to comment
Share on other sites

Still not working correctly for me. Here are some screen shots to illustrate. In the first screen shot I'm using standard action group configuration. As you can see the Mk1 Cockpit has several actions I can map to the AG's.

Kz4S9NL.png

This screeny shows the same part selected in AGX. I have no actions available to map to any keys.

WUpPlQx.png

Link to comment
Share on other sites

Okay, something really odd is going on.

The empty box below the "Mk1 Cockpit" button, just to the left of the 'KeySet1' button should list all the actions you are looking for.

Here's a Mk1 cockpit on my system (VAB, not SPH, but it should be the same)

ActionExample.jpg

Can you send me your output_log.txt from your KSP-Install\KSP_Data folder (or output_log.txt from KSP-Install\KSP_Datax64 if you run 64 bit) so I can see why that empty box is empty when it should not be please?

Before we get into the KeySet functions, that box needs to populate with the actions available on the part for this mod to work.

D.

Edited by Diazo
Link to comment
Share on other sites

Thank you!

It lets me assign them, but the mouse buttons all look like this (only this plugin's menus) and the key test doesn't work with my joystick (It does with all keyboard keys).

http://cloud-4.steampowered.com/ugc/40848547378985611/1C16B94CC122DE78F85B635AAE54F0C7FFB6730D/1024x640.resizedimage

Errr, that is really wierd.

Let me see if I can figure out which GUI setting that is and lock it down.

edit: Does this .dll improve things any? I seem to have missed something when I locked the GUI down so could I please get the list of mods you are running so I can track down what is bleeding over to my mod?

edi2: Can you tell me the make of your joystick please? The unity docs say the same code should catch both keyboard and joystick button presses so I need to look up what is different about yours.

Edited by Diazo
Link to comment
Share on other sites

I've got some logging regarding the saving/loading bug. I can post the full log later but it contains a lot of stuff because it happened during normal playing.

I noticed it because I repeatedly tested a craft (launching it from VAB and reverting back to VAB many times) and the actions messed up. First only assigned parts for one group were missing, then also the names of the other groups went missing.

AGX Save Group Names FAIL! (SaveGroupNames) 3 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveGroupNames (.Part p, System.String str) [0x00000] in <filename unknown>:0

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

AGX Save KeySet FAIL! (SaveCurrentKeySet) 2 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveCurrentKeySet (.Part p, System.String curKeySet) [0x00000] in <filename unknown>:0

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

AGX Fail: SaveGroupVisibility 1 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveGroupVisibility (.Part p, System.String str) [0x00000] in <filename unknown>:0

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

I will try to replicate it!

Ah and the DMagic stuff is working again :)

Link to comment
Share on other sites

Okay, that is really odd.

From a code perspective, that error is caused by the fact that there is no active vessel at the moment.

Which makes no sense to me as you said you were launching and reverting to VAB which kind of requires a vessel.

I'll think on it and see what error traps I can add.

D.

edit: Just to be clear, this mod respects the persistence save system. That means when you revert to the VAB it loads the vessel from the .craft file made when you previously left the VAB. That means any changes made to the vessel on the pad will be lost.

Edited by Diazo
Link to comment
Share on other sites

I'm using a Logitech Extreme 3D pro, although I have an old, slightly broken Microsoft Sidewinder I could try, and I have a Saitek on order to arrive soon (the Saitek is why I looked for mods like yours).

The latest .dll made no change to AGE, although it made FAR show 3 of its toolbar icons.

I then realized I had software installed from Logitech for remapping buttons on the stick. Although it was disabled, it might have been affecting it. I have uninstalled this.

I uninstalled all mods, reinstalled AGE, and tried the first .dll you sent; I can select joystick keys, but the key test does not work, and the buttons I'm not hovering over are whited out like that.

I tried the second .dll; Same behavior.

I was going to work through and install plugins one at a time to find out any incompatabilities between them, but since it does this with default, that tells me its something in your code. I have no idea what on earth that could be, though.

Edit: These last tests were on a fresh sandbox save in full stock, other than Action Groups Extended and Module Manager. Both the Sidewinder and the Extreme 3D behave the same.

BBD2A6C67775587701A8CA9364B1D410C3DB526B

572457578C16587427B0743078AC0E531FD5D4FD

A0C90FAF93B70280B40138F0AA6FD2008CC2C7C1

I just noticed, if you look at the last screenshot, see how its like there's a button inside another? I was hovering over the actions list window.

I don't know much about unity, but it seems like there might be a simple error with brackets where texture references are getting passed to the wrong hover state/part of code, and the reason for the blank unselected spaces is that's the part where there's no reference at the end of the shift.

Edited by TangibleLight
Added clarification and screenshots
Link to comment
Share on other sites

@TangibleLight: Okay, the buttons all showing white when AGX is the only mod installed confuses me. What system and bit (32 or 64) are you running? That implies that your system is handling textures differently from my system for some reason.

As a test, can you make a backup of ButtonTexture.png and then copy ButtonTextureRed.png to ButtonTexture.png. If it is the textures screwing up, this should make them all display red instead of white. If they stay white I'll have to dig into the GUI as that means something else is going on.

The reason I am so concerned about the Joystick button thing is that the test box uses the same code to detect joystick button presses as actually activating a group in flight does. If that test box does not display the joystick button when you test it, I would expect that pressing a joystick button to activate an assigned actiongroup would also fail.

I'll do some more reading and see what I can come up with.

D.

Link to comment
Share on other sites

Windows 8.1 64 bit.

Where are ButtonTexture and ButtonTextureRed located? Are these compiled into the dlls or have I just found a rather obvious problem?

Redownloaded the mod. I didn't see 1.10, so I was using 1.9. Regardless, if there were these textures in 1.9, they somehow got removed. (Maybe when I copied the .dll over the first time?)

I still need to test it but I think the texture stuff was just user error.

Activating the action groups works fine. This whole situation is confusing.

Edited by TangibleLight
Link to comment
Share on other sites

I could reproduce it!

I started with a new save and the vessel I tested before. I checked the craft file and it contained the action in the ModuleAGExtData as you can see in the screenshot:

When loaded in the VAB the Action isn't assigned any more but the text still persists.

I then added the action back to the vessel (toggle for 4 Commutron antennas) and launched the vessel.

At the Launchpad the actions for the Antennas aren't assigned any more but two other action groups are still there.

I then reassigned the actions in flight, switch to Space Center and back to the vessel via the Tracking Station and the actions were removed again.

The log doesn't contain any AGExt error messages this time.

Logs and Savefile: https://www.dropbox.com/s/5jrw8rhf13we5wg/agext.zip

// (the vessel contains Infernal Robotics and Retractable Engine and DMagic Orbital Science parts!)

I'm testing it now with only stock parts.

Edit: tested it with only stock parts and same thing happened, updated the zip with the new vessel (agx test craft) and new logs!

Regarding the Joystick problem, I also tried this one and assigned Joystick Buttons to actions and they did work. I'm also using a Logitech Extreme 3D Pro and I assigned actions to two different joystick buttons and they both worked. I'm using the updated dll which you posted.

Edited by SMILIE
Link to comment
Share on other sites

Using the most recent versions of AGE and the .dll the textures are fine.

I think the texture issue was just me misclicking when I was moving files, but somehow or another I lost part of the .zip, namely the button textures.

attachment.php?attachmentid=2233&d=1375360652

I'm still have the problem with the button test field, though assigning and using the groups works properly.

Link to comment
Share on other sites

@SMILIE: To be clear, it is only the communications antenna that reliably reproducible correct? I think I see what is going on and can fix that. From your comments two posts ago it does seem there are still save/load issues, but they seem to be irregular?

@TangibleLight: It sounds like Verision 1.10 fixes the texture issue. (Locking down the GUI for issues like this was the major change in 1.10, the ButtonTexture.png files are new with 1.10) For you, does that mean the only remaining issue is that the joystick buttons working correctly to actually activate actions, it is just the test box does not display the joystick button name?

@Joystick Buttons: So joystick buttons work correctly in flight to activate actions, it is just my test box that does not display their name when pressed but keyboard buttons do?

Edited by Diazo
Link to comment
Share on other sites

@TangibleLight: It sounds like Verision 1.10 fixes the texture issue. (Locking down the GUI for issues like this was the major change in 1.10, the ButtonTexture.png files are new with 1.10) For you, does that mean the only remaining issue is that the joystick buttons working correctly to actually activate actions, it is just the test box does not display the joystick button name?

@Joystick Buttons: So joystick buttons work correctly in flight to activate actions, it is just my test box that does not display their name when pressed but keyboard buttons do?

Test box is the only issue now. When a joystick button is pressed or the mouse is moved it changes from whatever is displayed to "none". Keyboard buttons show the name, though.

Link to comment
Share on other sites

@SMILIE: To be clear, it is only the communications antenna that reliably reproducible correct? I think I see what is going on and can fix that. From your comments two posts ago it does seem there are still save/load issues, but they seem to be irregular?

Yes thats right. I got it once or twice with the Tals Cargo Solutions Cargo Bay but not with other parts.

@Joystick Buttons: So joystick buttons work correctly in flight to activate actions, it is just my test box that does not display their name when pressed but keyboard buttons do?

For me they do work and the right text is show (actually the button is a little to short for the text but it's just a visual thing)

Link to comment
Share on other sites

@TangibleLight: Based on what Smilie posted and the fact that the buttons do work for you in flight mode, it sounds like the test box is working as intended. The issue that as soon as it detects a non-key input, such as the mouse moving or a joystick axis, it returns to displaying None. (Joystick buttons count as keys in this case.) If you have one of your joystick axis not centered (one fully 'down' for throttle at 0% maybe?), that will be a continues input that resets the test box to none almost instantly.

That does not explain the keyboard keys working in the test box though, I would expect those to behave the same as your joystick buttons. So I'm not sure.

Anyways, on the intermittent save/load issue, I'm hoping to have a .dll out later tonight that will help with tracking that down. (Will also include the fix for the antenna's that Smilie reported.)

D.

Link to comment
Share on other sites

Okay, next test .dll is here. You need to upgrade to Version 1.10 in the first post before using this .dll.

-Tweak Test box in the key code window so it does not reset to None when a non-key input is present. (TangibleLight, this should show the joystick button for you now.)

-Revise save code to hopefully eliminate the intermittent errors being seen. (Please report any AGX Fail or AGX Error messages in your log.) (SMILIE: this is primarily based on your reports, please let me know how it goes.)

-Fix antenna actions not saving.

-When you select a part, if it has no actions present (either due to not having any, or the actions not loading) there is now a button to refresh the actions list. If you see this button on a part that actually has actions, please report it as this is an error I need to correct.

As always, let me know how it goes.

D.

Link to comment
Share on other sites

Thanks for the great work!!!

I'm sorry but it still isn't working 100%... :(

Now if I launch a vessel from the VAB the actions persists (except the Solar Particle Collector from DMagic) but when I revert back to the VAB the names and the toggle state aren't there any more (they are also not in the craft file). I can't reproduce it really. The first time I reverted all the names went missing, the second time the actions group from the first launch contained their names but not the actions which I assigned after the first revert. After a third launch and revert the names persisted.

I got lots of the following errors when launching the vessel:

[LOG 11:43:26.144] AGX Error: SaveGroupVisibility no root part 2 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveGroupVisibility (.Part p, System.String str) [0x00000] in <filename unknown>:0

[LOG 11:43:26.148] AGX Error (SaveGroupNames) No root part 3 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveGroupNames (.Part p, System.String str) [0x00000] in <filename unknown>:0

[LOG 11:43:26.150] AGX Save KeySet FAIL! (SaveCurrentKeySet) 2 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveCurrentKeySet (.Part p, System.String curKeySet) [0x00000] in <filename unknown>:0

options window

AGX Error (SaveGroupNames) No root part 3 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveGroupNames (.Part p, System.String str) [0x00000] in <filename unknown>:0

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

AGX Save KeySet FAIL! (SaveCurrentKeySet) 2 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveCurrentKeySet (.Part p, System.String curKeySet) [0x00000] in <filename unknown>:0

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

AGX Error: SaveGroupVisibility no root part 2 System.NullReferenceException: Object reference not set to an instance of an object

at ActionGroupsExtended.AGXFlight.SaveGroupVisibility (.Part p, System.String str) [0x00000] in <filename unknown>:0

Edit: the names just reappeared after a launch and revert o.O

also getting this error, I don't know if this has something to do with your addon:

NullReferenceException

at (wrapper managed-to-native) UnityEngine.MonoBehaviour:Internal_IsInvokingAll ()

at UnityEngine.MonoBehaviour.IsInvoking () [0x00000] in <filename unknown>:0

at ModuleTripLogger.InvokeLogVessel (Single delay) [0x00000] in <filename unknown>:0

at ModuleTripLogger.OnVesselSituationChanged (HostedFromToAction`2 vs) [0x00000] in <filename unknown>:0

at EventData`1[GameEvents+HostedFromToAction`2[Vessel,Vessel+Situations]].Fire (HostedFromToAction`2 data) [0x00000] in <filename unknown>:0

at Vessel.updateSituation () [0x00000] in <filename unknown>:0

at Vessel.LateUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

The addon you are developing is really great, I really want to thank you for your work! :)

Edited by SMILIE
Link to comment
Share on other sites

@Alkiir: Unfortunately I'm already at the character limit the forum allow me for the title of the thread so I don't have room to add anything else.

@Smilie: Thank you for putting up with me on this. I still don't know exactly what is happening that is causing these errors for you, but I do have it narrowed down to the exact line of code causing them.

I'll look into the Solar Particle Collector, I must have just missed it when doing the other Dmagic parts.

On the saving thing, I'm now getting really confused. Can I get the entire output_log.txt and a list of the mods you run please? (I'm particularly interested in any mods that affect the root part of the vessel, or mission logging mods that might affect the missionID of the vessel.)

The reason I ask is that the errors you are posting say 'Error' rather then 'Fail' which means the save routine ran into an issue, but it should have been able to compensate and still save the data. (The Keyset Fail is a typo, it happened on line 2 which means it should be Error.)

But you are reporting that the data is still not showing when you reload the vessel, so I don't know.

I'll see what I can come up with today and look at getting another test .dll out tonight.

You mentioned that you are looking at the .craft and .persistence file so a quick rundown:

AGXData is where the actual actions are saved. Only actions for that part are saved on a part.

Leading period (not actually a period): Special character that tells my mod where the saved action starts

First 3 numbers: Action group number action is assigned to

4th number: Is action activated (1) or not (0) <- Supplanted by the toggle state monitoring I've added but simpler to leave it in

Text String: Name of action as seen in code, will not necessarily match what you see in game

Spacer character: Most actions will have a vertical line with 2 horizontal slashes, some actions require special handling and have a different one

Second text string: The actual GUI name of the action for most actions, some actions require a different identifier.

‣0030ExtendPanelsAction‡Toggle Panels: Group 3, action deactivated, ExtendPanelsAction as name in code, Toggle Panels as name shown on GUI in game.

AGXNames is where the action group names are saved, all names for all groups are saved to every part on the vessel and loaded from the root part when you switch to a vessel. I do this because the root part can change during flight (notably undocking).

Leading period (not actually a period): Special character that tells my mod where the saved action starts.

Three Numbers: Action group number for the name

Text string: Group name as seen in game in my mod.

‣005Engine: Group 5, Engine

Note that when you switch scenes, the mod reloads itself entirely. For instance, if you check the .craft file after you switch from VAB to Flight you can tell if the error is the saving in the VAB (.craft file missing data) or loading the data on the pad (.craft file has data not shown in-game). You do a quicksave and see what the quicksave.sfs file says has been saved the same way.

As always, keep those reports coming and the more data you can get to me the better.

D.

Edited by Diazo
Link to comment
Share on other sites

Version 1.11 Release

KSP 0.24.1 compatability check

DMagic Orbital Science fix.

Joystick button fix.

Enhanced logging to track down save/load errors. (KSP 0.24.1 should fix the majority of these with the partModule loader change)

This one feels stable, but as always it is your reports that let me know how things are going.

D.

Link to comment
Share on other sites

I installed this mod and it was way to overloaded for me. ;)

I deleted the mod, but i still can't use the ingame action groups now.

I know that the original action groups was disabled with the mod, but how can i get them functioning back. The keys dont react

regards

Mike

Link to comment
Share on other sites

I tested the new version with a fresh save and still got the errors :(

First it was working well.

Then I reverted to VAB while being on EVA --> AG 6 (ladder) doesn't show the title any more. (This was the action group I added after the last revert to VAB). Then I added another AG (7, eject) and launched the vessel. After reverting back without going on EVA all the titles weren't showing any more.

Logs, save and craft file (craft contains KAS, ScanSat and DMagic parts):

https://www.dropbox.com/s/ahzwsif6krh5m0x/2014_07_25-1319.zip

Installed mods:

6S Service Tubes + Expansion 1.2

Firespitter 6.3.3

ASET ALCOR Advanced Landing Capsule 0.9

DMagic Orbital Science 0.8.2

Dockingport Alignment 4.0

Enhanced Nav Ball 1.3.2

Hull Camera VDS 0.3.7

Kerbal Alarm Clock 2.7.7.0

Kerbal Atachment System 0.4.7

Kerbal Engineer Redux 0.6.2.7

Klockheed Martian Smart Parts 0.6-beta

Magic Smoke Industries Infernal Robotics 0.18.1

Mechjeb 2.3.0

ModuleManager 2.2.0

PartCatalog 3.0 RC5

Procedual Fairings 3.06

RasterPropMonitor 0.18.1

ScanSat 6.1

Science Alert 1.7

Toolbar 1.7.5

VesselView 0.5.1

Critter Crawler & Engines 1.0

Spaceplane Plus 1.3

Cargo Transportation Solutions 0.3.4

Action Groups Extended 1.11

Distant Object Enhancements 1.3

RCS Build Aid 0.4.6

Alternate Resource Panel 2.4.2.0

Extra Contracts 0.4a

TweakScale 1.27

Active Struts

After the weekend I will try it with a clean install without any mods and see if I can reproduce it.

Link to comment
Share on other sites

I installed this mod and it was way to overloaded for me. ;)

I deleted the mod, but i still can't use the ingame action groups now.

I know that the original action groups was disabled with the mod, but how can i get them functioning back. The keys dont react

regards

Mike

All my mod does is unbind the default keys, so if you go into the settings screen and rebind the keys for Action Groups 1 through 10 that will get you going again.

However, the mod is supposed to do that for you and I forsaw this situation arising. Can you give me any details on the last time you ran the game with my mod installed. Did you crash? Alt-F4 to quit? Exit through the main menu?

Thanks.

I tested the new version with a fresh save and still got the errors :(

First it was working well.

Then I reverted to VAB while being on EVA --> AG 6 (ladder) doesn't show the title any more. (This was the action group I added after the last revert to VAB). Then I added another AG (7, eject) and launched the vessel. After reverting back without going on EVA all the titles weren't showing any more.

Logs, save and craft file (craft contains KAS, ScanSat and DMagic parts):

https://www.dropbox.com/s/ahzwsif6krh5m0x/2014_07_25-1319.zip

Installed mods:

6S Service Tubes + Expansion 1.2

Firespitter 6.3.3

ASET ALCOR Advanced Landing Capsule 0.9

DMagic Orbital Science 0.8.2

Dockingport Alignment 4.0

Enhanced Nav Ball 1.3.2

Hull Camera VDS 0.3.7

Kerbal Alarm Clock 2.7.7.0

Kerbal Atachment System 0.4.7

Kerbal Engineer Redux 0.6.2.7

Klockheed Martian Smart Parts 0.6-beta

Magic Smoke Industries Infernal Robotics 0.18.1

Mechjeb 2.3.0

ModuleManager 2.2.0

PartCatalog 3.0 RC5

Procedual Fairings 3.06

RasterPropMonitor 0.18.1

ScanSat 6.1

Science Alert 1.7

Toolbar 1.7.5

VesselView 0.5.1

Critter Crawler & Engines 1.0

Spaceplane Plus 1.3

Cargo Transportation Solutions 0.3.4

Action Groups Extended 1.11

Distant Object Enhancements 1.3

RCS Build Aid 0.4.6

Alternate Resource Panel 2.4.2.0

Extra Contracts 0.4a

TweakScale 1.27

Active Struts

After the weekend I will try it with a clean install without any mods and see if I can reproduce it.

Okay, thanks for the report, I'll take a look.

First, to be clear, at no point were any actual actions lost, it is just the group names that are not saving correctly for you?

Second, does this sound right:

First editor load: Create groups 1-5

Second editor visit: Create group 6, names for 1-5 were okay

Third editor visit: Group 6 name lost (groups 1-5 okay), create group 7 (with name), rename group 6 as it was lost

Fourth editor visit: All group names lost (groups 1-7), actions for groups 1-7 are all okay.

Next time this happens, can you go and manually load the ship named "Auto-Saved Ship" via the load command? It should be what loads when you revert to VAB but I want to see if reloading it right away does anything.

Then after that, what happens if you load the vessel 'test1'?

The reason I ask is that the test1.craft file you attached shows all the group names saved correctly so something is mucking up the loading process.

The other thing to keep in mind is that what happens on the pad does not matter. When you revert to the editor, KSP deletes the vessels on the pad and reloads the vessel from the .craft file and as the group names are saved correctly in the craft file I would expect them to load when the editor loads the .craft file.

So, that leaves me with several things to ponder, it will probably be tomorrow before I have another test .dll ready to go, I want to throw some oddball tests at the mod on my end to see if I can shake something loose.

D.

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