Steven Mading

[1.8.1] kOS v1.2.1.0 : kOS Scriptable Autopilot System

Recommended Posts

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

Share this post


Link to post
Share on other sites
3 hours ago, 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

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

Share this post


Link to post
Share on other sites
10 minutes ago, Steven Mading said:

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

3 hours ago, traisjames said:

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

TETRIX and SIMPLEX Tech trees are guilty of this.

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites
1 hour ago, EpicSpaceTroll139 said:

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

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.

Share this post


Link to post
Share on other sites
7 hours ago, 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.

 

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

Share this post


Link to post
Share on other sites
Posted (edited)
12 hours ago, 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

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

Share this post


Link to post
Share on other sites
9 hours ago, 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

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

Share this post


Link to post
Share on other sites
On 6/27/2020 at 7:45 PM, 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".

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

Share this post


Link to post
Share on other sites
1 hour ago, traisjames said:

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

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

 

Share this post


Link to post
Share on other sites
1 hour ago, traisjames said:

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

In Tetrix or simplex tech tree (if that is one),  deleted the offending lines.  That should be near the top of the mod configuration files.

Share this post


Link to post
Share on other sites
9 hours ago, 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).

 

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

Share this post


Link to post
Share on other sites
Posted (edited)
5 hours ago, traisjames 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.

Edited by TranceaddicT

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
55 minutes ago, 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?

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.

 

Share this post


Link to post
Share on other sites

I asked if there were any issues with 1.10 on /r/kos, and got a reply that it's broken.  Not a lot of details, unfortunately.

Share this post


Link to post
Share on other sites
On 7/6/2020 at 9:32 AM, 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.

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

Share this post


Link to post
Share on other sites
On 7/7/2020 at 8:12 PM, Soda Popinski said:

I asked if there were any issues with 1.10 on /r/kos, and got a reply that it's broken.  Not a lot of details, unfortunately.

Ah, that's not too helpful.

I've just run a simple orbit and back script in v1.10 and didn't encounter any problems.

Share this post


Link to post
Share on other sites

How does this work with Principia?I’ve noticed that the data kOS displays is not specific when I use Principia......

Share this post


Link to post
Share on other sites
30 minutes ago, Kepler452b said:

How does this work with Principia?I’ve noticed that the data kOS displays is not specific when I use Principia......

Google is your friend.

Share this post


Link to post
Share on other sites
On 6/27/2020 at 8:45 PM, 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".

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

Share this post


Link to post
Share on other sites
4 hours ago, 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

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

Share this post


Link to post
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.