Jump to content

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


Diazo

Recommended Posts

If my periapsis of a plantet is in low space were I do not have a line of sight I will use action groups with a manual delay so that it does the experiments at periapsis when I have no connection to get "in space low science". The same goes for probes that enter an atmosphere, I need them to fold their antennas on atmospheric entry and because I have no connection I need them to have a manual delay on unfolding their antennas. AGE has a signal delay but I would love the signal delay + manual delay. 

Link to comment
Share on other sites

@dave1904 I think this functionality already exists.

If you set a manual delay on the RemoteTech flight computer, when you queue an action up via AGX (mouse-click on the AGX's RemoteTech window), that queue action delays by that manually set amount. (This window only, pressing a key on the keyboard or clicking an action on the normal flight window will always execute after just the signal delay.)

If this works, you will see the Action queue up into RemoteTech's computer like any other command. If it doesn't that's an issue I will have to fix to make it work as it should.

D.

Link to comment
Share on other sites

On 14/12/2015, 15:45:17, Diazo said:

@dave1904 I think this functionality already exists.

If you set a manual delay on the RemoteTech flight computer, when you queue an action up via AGX (mouse-click on the AGX's RemoteTech window), that queue action delays by that manually set amount. (This window only, pressing a key on the keyboard or clicking an action on the normal flight window will always execute after just the signal delay.)

If this works, you will see the Action queue up into RemoteTech's computer like any other command. If it doesn't that's an issue I will have to fix to make it work as it should.

D.

Ok after messing around I found that if I press the 1 key to activate an AG I have a 22m delay but If I activate/deactivate/toggle it with your RT Screen with clicking it works with an additional 40m delay.

 

 

Edited by dave1904
Link to comment
Share on other sites

@dave1904 From a programming standpoint, what you have posted looks to be working as expected.

From a design standpoint, the intention was to match RemoteTech's existing behavior. If you have RemoteTech, but not AGX, installed and press the 1 key on the keyboard, I understood that it queued it up for execution after only the signal delay.

If you want RemoteTech to manually delay the action group, you have to click it into the Flight Computer via the on-screen GUI (without AGX installed) the same way you have to queue it up through AGX's RemoteTech window (if AGX is installed.)

D.

edit: Just saw your last post. Despite the timestamp I hadn't seen it when I originally posted this.

Edited by Diazo
Link to comment
Share on other sites

Version 1.34c

Download here.

-Fix save/load routine so new format Squad has started using works. (Fixes Drill-o-matic.)

-Lock out actions correctly when a vessel is out of control.

Alright, new save/load routine in place to correctly handle the new action format. This will fix the issue with the Drill-o-matic and similar parts not saving their actions.

I also correctly how actions get locked out so you can't issue commands to a vessel that is out of control. (No Kerbal on board, or probe core with no electricity.) Players will notice no change here, the lockout has always been in place, I've just been doing it wrong.

Happy KSPing all.

D.

Link to comment
Share on other sites

Unfortunately there's nothing I can do about that. If you load the vessel with the drill already attached (so leave the editor and return to it) the action names will show correctly.

D.

edit: WTF forums? Thread in a thread? Never seen that before. That was supposed to be just a little More Details link explaining what was going on.

Edited by Diazo
Link to comment
Share on other sites

  • 2 weeks later...

I've got a small issue. I'm trying to make a hovercraft and use rocket engines binded to WASD keys for manouvering instead of normal RCS thrusters. When I want to make a 180 degree turn and hold down D for a second It works just fine and then let go off that D key it shuts down just as it should, but when I want to give it a gentle push in the other way and quickly tap A It just keeps going without turning off. I know, that it isn't a bug and it's just how this mod works, but is there and way around this problem?

Link to comment
Share on other sites

Okay, you say you have the keys bound for mannouvering, I'm assuming all action groups in question are set to HOLD mode where pushing the key down activates the group and releasing the key deactivates the group.

Then when you quickly just tap a key like this, it activates the group but does not deactivate it correct?

I would be interested to see your output log file, I'm specifically looking for a "AGX Action not activated, that group still in cooldown" line but I also want to check that there are no other errors present.

D.

Link to comment
Share on other sites

  • 2 weeks later...

Bah, looks like a side-effect of the forum move.

I've fixed it with the instructions needed, it is pretty simple.

Just change the "OverrideCareer" value to 1 in the KSP\GameData\Diazo\AGExt\AGExt.cfg file.

D.

Link to comment
Share on other sites

  • 2 weeks later...

Hi, with AGExt 1.34d installed via CKAN on a heavily modded KSP 1.0.5."Silent Patch" I'm seeing the old symmetry bug, that was reported here but was deemed fixed in 1.33a as confirmed by the original reporter here

The symptoms are exactly the same as discussed back then:

  • When loading a ship with action groups with "Symmetry: No" in the VAB, the action group suddenly also contains the symmetry parts
  • This happens for both groups below and above #10.
  • This does not happen when just leaving and re-entering the VAB to the KSC or when reverting a flight to the VAB.
  • It happens only when loading the ship with the yellow "Load" button.
Link to comment
Share on other sites

@Diazo I am getting an NRE with some crafts when launched. I am not sure what is causing. I will provide a full log if needed, but the error just starts with some crafts on launch and continues until I return to the space center. Upon going back to the vessel the errors continue. The only relevant cause I can think of is that I make a craft then add roman numerals to the craft name before building so the craft I build doesn't a craft file for the numbered launch version. So I build in the editor Apollo for instance then when I actual go to fly it I rename it Apollo I, II, etc. Therefore I don't have craft files for all the launches. I am on the latest patch of 1.0.5 and the latest version of AGE running on linux 64 bit. Thanks!

AGX Flight Update Error 7o System.NullReferenceException: Object reference not set to an instance of an object
  at ActionGroupsExtended.AGXFlight.Update () [0x00000] in <filename unknown>:0 
Edited by Svm420
Link to comment
Share on other sites

@SpaceNomad I'll look into it, that section of code (loading vessels) has been modified several times since then, I must have undone the fix somehow.

One point of order is that the Symmetry Yes/No setting has no effect when a vessel loads, it is only used when selecting parts to add to the Selected Parts list. A vessel should load exactly the same actions that it was saved.

@Svm420 Odd, the error being at location 7o means that the partModule is missing from the part or has not loaded correctly for some reason. I'm going to need the full log for more information on what might be causing that.

D.

Link to comment
Share on other sites

25 minutes ago, Diazo said:

@SpaceNomad I'll look into it, that section of code (loading vessels) has been modified several times since then, I must have undone the fix somehow.

One point of order is that the Symmetry Yes/No setting has no effect when a vessel loads, it is only used when selecting parts to add to the Selected Parts list. A vessel should load exactly the same actions that it was saved.

Yes, I understood that and didn't expect that the Symmetry setting would affect loading.

One more funny detail I discovered after reporting: It seems that on the first load after starting KSP the actions do not mess up. At least, this time it worked properly once and when I tried to reproduce what I had done different than before (loading, renaming the vessel) it failed again. So, I think the only thing that made it work was, that it was the first load after KSP start.

Link to comment
Share on other sites

@Diazo Thanks to your insight and understand of the error. I was able to come up with a solution! Not sure exactly the root cause of the issue, but I was able to stop the spam. I added a modifier to your MM patch. I bumped it to last to run before the FINAL patches. I have read, and believe as well, that making a patch FINAL is bad for compatibility, so that why it runs just before FINAL. I assume either a mod or myself with some MM patches created some part or added a module after your mod ran so it never "existed" for your patch to affect. Anyways just bumping the order of your patch to run solved the issue. Here is the change. Also THANK YOU for tagging your errors with codes. That makes it soooo easy to then locate the relevant code. I wish more mod authors used this approach.

@PART[*]:FOR[zzzzz_AGX]
{
	MODULE
	{
		name = ModuleAGX
	}
}

 

Link to comment
Share on other sites

@Svm420 I'll move my partModule to the Final pass, this situation is exactly what it is intended for in giving a place you can run your MM script after all other scripts have run.

@SpaceNomad I can't replicate your error but my test rig is pretty simple.

Gq7Yhfn.jpg

I'm using the solar panels to test, this is after several loads in a row and things look as expected.

Can you get me a more detail reproduction step, log file, craft file, any other info that might help? Until I can reproduce the error I won't be able to fix it.

D.

Link to comment
Share on other sites

32 minutes ago, Diazo said:

 

@SpaceNomad I can't replicate your error but my test rig is pretty simple.

I'm using the solar panels to test, this is after several loads in a row and things look as expected.

Can you get me a more detail reproduction step, log file, craft file, any other info that might help? Until I can reproduce the error I won't be able to fix it.

D.

Okay, I'll try to find a minimal reproducer. I hoped, it would be easy to reproduce. If it's an interaction with one of my 130 mods, that might take some time ;) Though, only a very small fraction of them should affect the editor, so it's probably not as bad as it sounds.

Any hint, what was the reason for this bug the first time (a technical explanation will do, I'm software developer)? Might make the hunt for a reproducer a bit easier.

Link to comment
Share on other sites

The issue lies in the fact that when you attach a part via mouse click, that is the same code path as when the editor attaches parts together on load so what happened was the code to copy actions across symmetry parts when placed via mouse was triggering on load as well (when it shouldn't) so all parts in symmetry were getting all actions.

The fix was to set a "don't symmetry copy" flag on opening a vessel, then clear it once the load had finished.

The complication is that I gutted that part of the code in a later version to move the save/load routine back to partModules so everything is different this time around.

That's actually one possibility, are you using the stock Open button or another method to load vessels? I hook into the stock button to set the flag so if you have a mod to open vessels that would explain this behavior.

Never mind, already changed that to use the EditorLoad event.

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.

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