Jump to content

[WIP] MSI's Infernal Robotics - Plugin Rework (Updated: 05/04/2015)


erendrake

Recommended Posts

Probably to soon to ask but a "Wait" waits until the joint gets to it's set position? If it is will it wait until all the above joints have reached there position? Is this what kOS will be able to access? Looks like fun.

Indeed it does. Any joints that were triggered to move before the wait will have to finish before the sequence will advance to the next instruction. We may change the name to clarify this.

I hope it's not an actual wait, since that suspends all KOS processing. You'd want to be able to do other stuff while the joints move.

This is completely separate to KOS, but it makes use of the same in-development API for robotics parts that KOS will eventually get support for.

Link to comment
Share on other sites

Probably to soon to ask but a "Wait" waits until the joint gets to it's set position? If it is will it wait until all the above joints have reached there position? Is this what kOS will be able to access? Looks like fun.

'Wait' functionality is coded in the addon, along with other stuff. But IR API lets you access Servos and Groups, move servos to presets/arbitrary positions/direction and groups to Presets/direction.

Link to comment
Share on other sites

Just wanted to saw I'm really happy all this is being done. When erendrake and ziw diverted their time from kOS over to "an IR rework", I stayed over in the kOS world, and hadn't been watching what they were doing. I just noticed this thread today.

I really hope I can get the kOS function re-work fixed along the same time this goes out of pre-release. The two releases together would be a nice combination.

(The biggest problem is that LOCKs are essentially callback functions and therefore they violate all the nice scoping rules, and therefore need closures implemented for them to not blow things up. That's the main reason why the release got delayed a bit.)

Link to comment
Share on other sites

When I install even just the basic plugin and legacy parts from the download in the OP, all my other parts disappear from the editor, except KIS/KAS, KER, and the Dr.Pepper fuel tank from DasValdez.

Logs: https://www./folder/u9427ap71qatd/IR_part_killer_logs All I have do to reproduce is copy the MSI folder from the IR.Rework.P3.zip into my KSP GameData folder.

Link to comment
Share on other sites

When I install even just the basic plugin and legacy parts from the download in the OP, all my other parts disappear from the editor, except KIS/KAS, KER, and the Dr.Pepper fuel tank from DasValdez.

Logs: https://www./folder/u9427ap71qatd/IR_part_killer_logs All I have do to reproduce is copy the MSI folder from the IR.Rework.P3.zip into my KSP GameData folder.

There's no errors in the log related to Infernal Robotics directly, but there are a fair number of NullReferenceExceptions that mention clouds. Not sure how that would be the cause, but I'd suggest you try to see if they still appear without IR. If so they whatever mod is causing it could be the problem.

Link to comment
Share on other sites

As for the other one, for me personally I'd like to see a use-case where preventing the user from changing presets would be wanted, baring in mind they're able to manually move the part between positions using the normal control buttons anyway.
As described in issue #40, basically, I have a warehouse part with a KAS/KIS payload rack carousel that can move between 0, 90, 180 and 270 degrees. Due to space restrictions, the bay doors only cover 1/4 of the circumference.

I don't want people to fiddle with the preset positions for this part, because if someone changed any of the values, the carousel would end up stopping in a position where it would be impossible to grab a payload rack.

As requested, I've described a use case for preventing user changes to servo position presets within third-party IR-powered parts.

Is there any further information you and Ziw need?

Link to comment
Share on other sites

Is anyone else noticing severe memory leak when the servo configurator window is open?

GCMonitor showed ram was increasing about 2.0MB/sec. I let it climb from 2.0GB until the game crashed at 3.7GB.

That is something new. Was it in Flight or in Editor?

- - - Updated - - -

When I install even just the basic plugin and legacy parts from the download in the OP, all my other parts disappear from the editor, except KIS/KAS, KER, and the Dr.Pepper fuel tank from DasValdez.

Logs: https://www./folder/u9427ap71qatd/IR_part_killer_logs All I have do to reproduce is copy the MSI folder from the IR.Rework.P3.zip into my KSP GameData folder.

I found this during part loading


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


Cannot find a PartModule of typename 'TweakScale'

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


FileNotFoundException: Could not load file or assembly 'KSPAPIExtensions, Version=1.7.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool)


at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType) [0x00000] in <filename unknown>:0


at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0


at System.Reflection.MonoField.GetCustomAttributes (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0


at BaseFieldList.CreateList (System.Type type, System.Object instance) [0x00000] in <filename unknown>:0


at BaseFieldList..ctor (UnityEngine.Component host) [0x00000] in <filename unknown>:0


at PartModule.ModularSetup () [0x00000] in <filename unknown>:0


at PartModule.Awake () [0x00000] in <filename unknown>:0
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
Part:AddModule(String)
Part:AddModule(ConfigNode)
PartLoader:ParsePart(UrlConfig, ConfigNode)
:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
PartLoader:StartLoad()
:MoveNext()

(Filename: Line: -1)

EDIT: It's our fault - the latest pre-release did not have all the dependencies in archive -let me re-upload it in a bit

Please re-download the P3 again, it should contain all the necessary files now.

- - - Updated - - -

As requested, I've described a use case for preventing user changes to servo position presets within third-party IR-powered parts.

Is there any further information you and Ziw need?

Do you want users at least see the available presets and just not able to edit them, or you want this window to be inaccessible to them?

Edited by Ziw
Link to comment
Share on other sites

Please re-download the P3 again, it should contain all the necessary files now.

Ah, the ol' kspapiextensions thing. It's been some time since I've had to read a ksp log that I must have breezed by it. It doesn't help that EVE null refs like a mofo :/ I remember it being the cause of many weird things a while back when I had multiple mods that used it. I think parts "disappearing" was one sign of multiple versions or it not being up to date.

I'll have to try it the next time I'm at my comp later tho. Thanks for looking into it tho :) I really dig the work that's been put into this!

Link to comment
Share on other sites

It was in the Editor. I'll do some more testing later today to see if it happens during flight, and also try with no other mods installed.

I wouldn't be surprised if it turns out to be a ksp bug http://bugs.kerbalspaceprogram.com/issues/3926

I'll look into it later today. I have some areas of code where I wanted to optimise the memory usage anyway.

Link to comment
Share on other sites

Got a bit of a bug but I don't think it's new in this version.

In this video I have a docking washer standard, with a probe cores attached on each of the opposing nodes. When I command it to rotate it... well... sorta rotates. The video shows that the little red mark isn't leaving its centre position, but, uh, things are happening XD

There are no other parts connected to the washer, and no struts anywhere.

https://www.youtube.com/watch?v=9y62SbAwDvI

Link to comment
Share on other sites

I can confirm the memory leak when servo config is open in Editor, and not in Flight.

You can watch the memory usage climb at nearly 1mb/s. Close the servo config, leak immediately stops. Open it back up, starts again. Debug log shows no errors while this occurs. Only way to get the memory back is to restart the game.

I believe this issue has been around for a while, pre-rework. I remember noticing it months ago but for some reason never reported it. I wasn't really using the parts at the time so I just removed them and paid it no mind...

Link to comment
Share on other sites

First off, before anything and everything else - THANK YOU FOR THIS MOD!!! This is one of the reasons I play KSP and the game is a much dimmer place without this package. Now on to the report/confirm...

At first, I wasn't sure if it was just my setup or KSP in general but I've also experienced the memory leak with the servo config open. I saw it happening before the rework and still see it happening but haven't had the time to test it independent of all other mods. I do know that I can open the servo editor and watch either GC or the external Memory Usage utility to watch it spool away. I can also confirm that I've watched the memory remain stable without it open, or closing it and watching it stop. That said, I see no information in a log file or, exception monitor or anywhere else that points to a definitive source but thought that I would relay the same thing I've been watching and wondering about for a while. Will be interested to see the results of where it's coming from and would be more than happy to try and help find some time to test it out in varying setups if needs be.

Again, great job everyone on this mod - hands down my favorite thing to play with in KSP. Keep up all the great work!

Link to comment
Share on other sites

Thank you for comments! I have some vague ideas on what could be the the problem and will try to fix it for release

UPDATE: after some brief experiments with GCMonitor I begin to suspect that memory leak is somewhere in TextField GUI element code and is outside of my reach. Our Servo Configuration window employs a bunch of TextFields multiplying the effect. I can try switching to TextArea and see whether it would help

EDIT2: there is a Unity bug similar to what I see, but it is related to 5.0 beta

http://forum.unity3d.com/threads/ui-text-memory-leak.289845/

Edited by Ziw
Link to comment
Share on other sites

Update on the weird washer behaviour: I took the probes off and put them back on a bunch of times. Sometimes it behaved, other times it didn't move, and still other times it behaved as per the video.

I tried to be very careful to ensure that the node connection wasn't actually reversed (particularly common with skinny parts, where they actually clip through to their parent's backside node... extremely common with structural panels which are almost impossible to get attached to the correct node.).

Link to comment
Share on other sites

Update on memory leaks:

It is in the legacy code handling drag-and-drop functionality for servos. Problem is that I don't see anything wrong with it. It must be some weird Unity interaction, I need to read up on the problem.

For now If the leak is too severe, we can disable it in an intermediate pre-release, while we try to fix it. Let me know how critical it is for you.

Link to comment
Share on other sites

Right now it doesn't seem possible (or I don't know how) to change the position of uncontrolled joint rotatron or pivotrons in the VAB/SPH.

Am I just not seeing part of the GUI or is this in fact not possible?

Link to comment
Share on other sites

Right now it doesn't seem possible (or I don't know how) to change the position of uncontrolled joint rotatron or pivotrons in the VAB/SPH.

Am I just not seeing part of the GUI or is this in fact not possible?

It is uncontrolled, how are you supposed to rotate it?

Edited by Ziw
Link to comment
Share on other sites

I'm talking about in the editor, not after launch.

I want to align something in the editor, but I want it to move freely when launched.

Specifically, I want to rotate the free joints in order to strut and dock-on-physics-load the joints as shown by the red lines here:

UD37Xgk.png

Link to comment
Share on other sites

I'm talking about in the editor, not after launch.

I want to align something in the editor, but I want it to move freely when launched.

Specifically, I want to rotate the free joints in order to strut and dock-on-physics-load the joints as shown by the red lines here:

http://i.imgur.com/UD37Xgk.png

Hmm, I see now, it is a valid request. Unfortunately this will have to wait until next week, as I need to consult with Zodius whether or not allowing Editor movement of uncontrolled parts can break anything and he is away. Uncontrolled parts are slightly different in handling from what I've heard.

Link to comment
Share on other sites

No worries, thanks for taking it on!

I figured it might be a bit harder than it sounds, since the position editor is now tied in with presets and so on, and presets don't make sense for an uncontrolled part.

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