Jump to content

[KSP 1.12.x] kOS v1.4.0.0: kOS Scriptable Autopilot System


Dunbaratu

Recommended Posts

  On 6/27/2020 at 9:30 PM, traisjames said:

I have noticed that with Mechjeb installed my probe cores all show as having two KOS systems installed instead of 1.  When flying I have two terminal open, close, power toggle available.  KOS bug, Mechjeb bug, neither?

  dMKCe3a.png

Expand  

Some people have made patches for ModuleManager that add the kOS PartModule to probe cores.  This is fine, but if more than one mod has done this, and one of them wasn't set up right, it can install the partmodule in *addition to* some other mod that is also doing it.  There is a means in ModuleManager's config files to add the condition "only if it's not already there" to the command to add a KOSProcessor.  But somewhere you have a mod that's not doing that.

To figure out which of your mods are adding kOS via ModuleManager, search through all files under the GameData folder that are ending in .cfg, and scan them for the magic word "KOSProcessor".

Link to comment
Share on other sites

  On 6/28/2020 at 12:45 AM, Steven Mading said:

Some people have made patches for ModuleManager that add the kOS PartModule to probe cores. 

Expand  
  On 6/27/2020 at 9:30 PM, traisjames said:

When flying I have two terminal open, close, power toggle available.  KOS bug, Mechjeb bug, neither?

Expand  

TETRIX and SIMPLEX Tech trees are guilty of this.

Link to comment
Share on other sites

 So I might just be missing something, but I've run into an error that's left me scratching my head

 

Something I've done in the past was to adjust the authority limiters on control surfaces in my kOS scripts, and would do it with a sequence of code like this:

set MySurfList to ship:partsdubbed("CtrlSurf").

for Surf in MySurfList {
	Surf:getmodule("ModuleControlSurface"):setfield("Authority Limiter", 30).
}.

I've found this especially useful for reusable boosters on which it is desirable to have the surface authority set positive during ascent and negative during descent, and I was hoping to use it in a shuttle reentry guidance script to throttle airbrake deployment.  But now, possibly due to change of KSP or kOS version, this method doesn't seem to work anymore.

Testing on a single surface shows the partmodule and field exist with the same name and types as they were before, but when I try to set the limiter, kOS claims it's not there.  It doesn't matter if I call the field by name or by index, kOS just goes "nope."  :huh:

edVHktF.png

Anyone have any idea what's going on here? 

Could this be because I'm running KSP 1.9.1 and this version of kOS is labeled for 1.8.1? 

It's been running smoothly for me except for this one issue so I feel like I'm just missing some change to the required syntax.

 

Link to comment
Share on other sites

  On 7/1/2020 at 3:06 AM, EpicSpaceTroll139 said:

 So I might just be missing something, but I've run into an error that's left me scratching my head

Expand  

It sounds like this problem, which is known but not in release yet:

https://github.com/KSP-KOS/KOS/issues/2666

Do you have the ability to compile the kOS Project?  If so, using the latest Develop branch would probably fix it.  Otherwise I think you'll have to wait for release.
With KSP 1.10 coming this week, I do plan to have a release of at least some sort within a week after it comes out - even if it's just a basic compatibility release.

Link to comment
Share on other sites

  On 7/1/2020 at 3:06 AM, EpicSpaceTroll139 said:

 So I might just be missing something, but I've run into an error that's left me scratching my head

 

Something I've done in the past was to adjust the authority limiters on control surfaces in my kOS scripts, and would do it with a sequence of code like this:

set MySurfList to ship:partsdubbed("CtrlSurf").

for Surf in MySurfList {
	Surf:getmodule("ModuleControlSurface"):setfield("Authority Limiter", 30).
}.

I've found this especially useful for reusable boosters on which it is desirable to have the surface authority set positive during ascent and negative during descent, and I was hoping to use it in a shuttle reentry guidance script to throttle airbrake deployment.  But now, possibly due to change of KSP or kOS version, this method doesn't seem to work anymore.

Testing on a single surface shows the partmodule and field exist with the same name and types as they were before, but when I try to set the limiter, kOS claims it's not there.  It doesn't matter if I call the field by name or by index, kOS just goes "nope."  :huh:

edVHktF.png

Anyone have any idea what's going on here? 

Could this be because I'm running KSP 1.9.1 and this version of kOS is labeled for 1.8.1? 

It's been running smoothly for me except for this one issue so I feel like I'm just missing some change to the required syntax.

 

Expand  

Are you using FAR? Not sure how the authority sliders look on stock but with FAR they are sub grouped in the PAW and if that sub group is not displayed then kOS can’t manipulate the sliders

Link to comment
Share on other sites

  On 7/1/2020 at 10:20 AM, Drew Kerman said:

Are you using FAR? Not sure how the authority sliders look on stock but with FAR they are sub grouped in the PAW and if that sub group is not displayed then kOS can’t manipulate the sliders

Expand  

No FAR installed.  This looks exactly like the bug described in the report @Steven Mading referred to (thanks!).  Guess I'll look through the GitHub issues more thoroughly next time before running here. :D @Steven

Edited by EpicSpaceTroll139
DERP
Link to comment
Share on other sites

  On 7/1/2020 at 11:50 AM, EpicSpaceTroll139 said:

No FAR installed.  This looks exactly like the bug described in the report @Drew Kerman referred to (thanks!).  Guess I'll look through the GitHub issues more thoroughly next time before running here. :D

Expand  

That was @Steven Mading not me. Credit where credit is due :P 

Link to comment
Share on other sites

  On 6/28/2020 at 12:45 AM, Steven Mading said:

Some people have made patches for ModuleManager that add the kOS PartModule to probe cores.  This is fine, but if more than one mod has done this, and one of them wasn't set up right, it can install the partmodule in *addition to* some other mod that is also doing it.  There is a means in ModuleManager's config files to add the condition "only if it's not already there" to the command to add a KOSProcessor.  But somewhere you have a mod that's not doing that.

To figure out which of your mods are adding kOS via ModuleManager, search through all files under the GameData folder that are ending in .cfg, and scan them for the magic word "KOSProcessor".

Expand  

If I find one of these cases (found 3 so far), what should they be changed to to be complient?

Link to comment
Share on other sites

  On 7/5/2020 at 9:36 PM, traisjames said:

If I find one of these cases (found 3 so far), what should they be changed to to be complient?

Expand  

Code needs to look something like this:

@PART[*]:HAS[@MODULE[kOSProcessor]]:NEEDS[kOS]:FINAL

{

!MODULE[kOSProcessor],*  //This would remove any current kOSProcessors in the part.

}

--=OR=--

{

@MODULE[kOSProcessor]

     {

          %diskSpace = ####

     }

}

Upload your ModuleManager.ConfigCache to somewhere (GDrive, Dbox).

 

Link to comment
Share on other sites

  On 7/5/2020 at 11:16 PM, TranceaddicT said:

Code needs to look something like this:

@PART[*]:HAS[@MODULE[kOSProcessor]]:NEEDS[kOS]:FINAL

{

!MODULE[kOSProcessor],*  //This would remove any current kOSProcessors in the part.

}

--=OR=--

{

@MODULE[kOSProcessor]

     {

          %diskSpace = ####

     }

}

Upload your ModuleManager.ConfigCache to somewhere (GDrive, Dbox).

 

Expand  

https://www.dropbox.com/s/p3rwqheokalcn0w/ModuleManager.ConfigCache.zip?dl=0

Link to comment
Share on other sites

  On 7/6/2020 at 8:56 AM, traisjames said:
Expand  

Got that.

Upload your KSP.log too.

You've got double kOSProcessors on a bunch of parts.

@theJesuit I don't think this is a Simplex or Tetrix problem.  He's got parts that do not originate with ModuleCommand; yet, have it and two kOSProcessors.  So, something is adding ModuleCommand and then one or both kOSProcessors are getting added afterward.

Edited by TranceaddicT
Link to comment
Share on other sites

  On 7/7/2020 at 6:02 PM, Soda Popinski said:

I heard kOS doesn't fully work with 1.10.  Anybody know what specifically isn't working?  Or is it completely broken?

Expand  

No one has reported anything as far as I'm aware and there aren't new issues on GitHub: https://github.com/KSP-KOS/KOS/issues

However, I don't think anyone can say it works perfectly and there were some statements in the change log for v1.10 that had the potential to cause small breakages.

It'd be interesting to know what you've heard.

 

Link to comment
Share on other sites

  On 7/6/2020 at 2:32 PM, TranceaddicT said:

Got that.

Upload your KSP.log too.

You've got double kOSProcessors on a bunch of parts.

@theJesuit I don't think this is a Simplex or Tetrix problem.  He's got parts that do not originate with ModuleCommand; yet, have it and two kOSProcessors.  So, something is adding ModuleCommand and then one or both kOSProcessors are getting added afterward.

Expand  

Here you go: https://www.dropbox.com/s/502rz8xff8xqxqc/Archive.zip?dl=0

Link to comment
Share on other sites

  • 3 weeks later...
  On 6/28/2020 at 12:45 AM, Steven Mading said:

Some people have made patches for ModuleManager that add the kOS PartModule to probe cores.  This is fine, but if more than one mod has done this, and one of them wasn't set up right, it can install the partmodule in *addition to* some other mod that is also doing it.  There is a means in ModuleManager's config files to add the condition "only if it's not already there" to the command to add a KOSProcessor.  But somewhere you have a mod that's not doing that.

To figure out which of your mods are adding kOS via ModuleManager, search through all files under the GameData folder that are ending in .cfg, and scan them for the magic word "KOSProcessor".

Expand  

Is there a way to tell by the syntax of the KOSProcessor entry in the .cfg whether it is checking to see if it is already there or not?  Or does that logic occur elsewhere?  Pardon my jumping in please, but this applies to something.  I want something to grep for to automate this kind of audit for this and related situations

Link to comment
Share on other sites

  On 7/30/2020 at 12:29 PM, darthgently said:

Is there a way to tell by the syntax of the KOSProcessor entry in the .cfg whether it is checking to see if it is already there or not?  Or does that logic occur elsewhere?  Pardon my jumping in please, but this applies to something.  I want something to grep for to automate this kind of audit for this and related situations

Expand  

Check the ModuleManager documentation, it does allow checking for presence of modules among many many other things.

Link to comment
Share on other sites

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