Jump to content

[1.6.x] RasterPropMonitor - Development Stopped (v0.30.6, 29 December 2018)


MOARdV

Recommended Posts

HuMjaoS.png
mmrbfYy.png?1

I have a question about the intended amount of transparency on these pods.  Stock internal view doesn't let you see through the back of the pod and leaves the frame on the front of the cupola module.  Currently have just stock game plus MM and this mod for testing purposes on a clean install.  If you notice in the first picture, it also lets you see through whatever may be in front of a given IVA to that one unless another IVA is also in the way.  Thank you for any insight.

Edited by Krakatoa
fixing image links
Link to comment
Share on other sites

5 hours ago, Krakatoa said:


I have a question about the intended amount of transparency on these pods.  Stock internal view doesn't let you see through the back of the pod and leaves the frame on the front of the cupola module.  Currently have just stock game plus MM and this mod for testing purposes on a clean install.  If you notice in the first picture, it also lets you see through whatever may be in front of a given IVA to that one unless another IVA is also in the way.  Thank you for any insight.

RPM has nothing to do with pod transparency.  That functionality was removed a few versions ago when JPLRepo split it off into JSITransparentPods.

Link to comment
Share on other sites

3 hours ago, MOARdV said:

RPM has nothing to do with pod transparency.  That functionality was removed a few versions ago when JPLRepo split it off into JSITransparentPods.

Curious.  Stock game leaves the window frame around the cupola, and installing only RPM straight from the download gives me that result.  That picture was with only RPM, module manager, and the game itself, tried the exact same setup to check occlusion with stock only before quitting out of the game and installing RPM and it looked appropriate.  The result in game is that it seems there's a bubble around the Kerbal that makes invisible any craft textures that it touches, or that are between it and the "camera" of our viewpoint.  If I turn the camera, the dissolved part of the craft moves with me.  Should I try downloading the mod again?

Edited by Krakatoa
Adding details
Link to comment
Share on other sites

So.... I have a problem. I have literally downloaded and re-downloaded this mod FIVE times. Every time, I get this message:

 

Screen Shot 2017-04-20 at 11.45.05 PM

I read it completely, then I go and check the game data setup. Sure enough, it looks like this:

Screen Shot 2017-04-20 at 11.45.15 PM

Exactly what it is supposed to look like. 

HELP!!!!!

Edited by Lo Var Lachland
Link to comment
Share on other sites

2 hours ago, Lo Var Lachland said:

So.... I have a problem. I have literally downloaded and re-downloaded this mod FIVE times. Every time, I get this message:

 

Screen Shot 2017-04-20 at 11.45.05 PM

I read it completely, then I go and check the game data setup. Sure enough, it looks like this:

Exactly what it is supposed to look like. 

HELP!!!!!

It's obviously in the correct path but do you also have one in GameData by accident?

Link to comment
Share on other sites

@MOARdV What would you recommend I do with kOSPropMonitor? I always kind of wanted it to have a lot of interface into RPM - the variable system, buttons, and MFD. Right now, it's a nice MFD page that gives the ability to read all the buttons in kOS and display and capture input from IVA. Now that you're moving on to MAS though, I'm not sure where this all fits in.

Maybe I'll just start ripping RPM apart or something.

 

Edit: Currently reading documentation for MAS

 

Edit 2:

76186ec93be35c9569ad4092b8a25d92.png

And it works too. What have I done.

07fb8e638cf41efa507e8b895136aa39.png

What a sight! Here's the repo - https://github.com/dsonbill/SimpleMFD

 

Take a look at this too, if you get the chance: https://github.com/dsonbill/SimpleMFD/commit/aec84a6689c43a379a7be1fd9c180712af03a8c1

Edited by dsonbill
Link to comment
Share on other sites

1 hour ago, dsonbill said:

@MOARdV What would you recommend I do with kOSPropMonitor? I always kind of wanted it to have a lot of interface into RPM - the variable system, buttons, and MFD. Right now, it's a nice MFD page that gives the ability to read all the buttons in kOS and display and capture input from IVA. Now that you're moving on to MAS though, I'm not sure where this all fits in.

Maybe I'll just start ripping RPM apart or something.

 

Edit: Currently reading documentation for MAS

If you know how to code and decide to rip RPM apart, could you give me a hint on how to code a plugin to hook into RPM that lets me use a button to turn off and on active radiators the way RPM lets me use a button to deploy and retract solar panels? I am just starting out with coding and am rather code dumb.

Link to comment
Share on other sites

5 minutes ago, theonegalen said:

If you know how to code and decide to rip RPM apart, could you give me a hint on how to code a plugin to hook into RPM that lets me use a button to turn off and on active radiators the way RPM lets me use a button to deploy and retract solar panels? I am just starting out with coding and am rather code dumb.

This is a somewhat hard one to do if you aren't experienced. There's 3 or 4 files and like 10 functions you need to write to do this, though it's mostly copy-pasting and adjusting for radiator rather than solar panel. Then you have to make the props and add them to IVA.

I might do this. I already see a lot of what needs to be changed.

Link to comment
Share on other sites

11 hours ago, dsonbill said:

@MOARdV What would you recommend I do with kOSPropMonitor? I always kind of wanted it to have a lot of interface into RPM - the variable system, buttons, and MFD. Right now, it's a nice MFD page that gives the ability to read all the buttons in kOS and display and capture input from IVA. Now that you're moving on to MAS though, I'm not sure where this all fits in.

Maybe I'll just start ripping RPM apart or something.

Mihara designed RPM to support "plugins" - DLLs that are tightly coupled to both RPM and another mod.  SCANsat and VesselViewer both use this capability to allow RPM to display information on the MFDs, and allow the MFD to talk to the other mod (by sending button presses).  This approach is easier to code, since the bridge DLL can have hard dependencies on both RPM and kOS.  It also doesn't require code changes to RPM (or kOS).

The second option is to make the interface to kOS via reflection within RPM - that's how RPM interacts with Chatterer, FAR, MechJeb, KAC, Pilot Assistant, and RealChute.  This is a bit more effort to code, but it allows a fairly seamless integration afterwards.  It requires changes to RPM, and it means someone (other than me :) ) would need to own testing / fixing that code in RPM.

The third option would be a standalone plugin that provides RPM-style functionality to the MFD, but is stripped down to just the features you want (which is what you're doing).  The only issue I see with that is that the monitor that it is attached to would be usable only for the kOS interface - it wouldn't have camera views, or navball views, or whatever, without having to duplicate a bunch of extra code from RPM.  Actually, that's probably what you'd want, anyway.  I would recommend changing the names of some of the classes, so if an error pops up, there's no confusion when looking in the error log.

10 hours ago, theonegalen said:

If you know how to code and decide to rip RPM apart, could you give me a hint on how to code a plugin to hook into RPM that lets me use a button to turn off and on active radiators the way RPM lets me use a button to deploy and retract solar panels? I am just starting out with coding and am rather code dumb.

Radiators would be pretty easy to do - MAS already supports it in the dev version on GitHub.  Porting that code back into RPM wouldn't be terribly difficult, and if someone wants to do it, I'll accept a pull request.  I've just got lots of other things I'm doing, and RPM features are not a priority at the moment.

Link to comment
Share on other sites

3 hours ago, MOARdV said:

The third option would be a standalone plugin that provides RPM-style functionality to the MFD, but is stripped down to just the features you want (which is what you're doing).  The only issue I see with that is that the monitor that it is attached to would be usable only for the kOS interface - it wouldn't have camera views, or navball views, or whatever, without having to duplicate a bunch of extra code from RPM.  Actually, that's probably what you'd want, anyway.  I would recommend changing the names of some of the classes, so if an error pops up, there's no confusion when looking in the error log.

Well, the background handler still works, and the monitor still works as usual - I kept the PFD in there just for fun:

8751b238a606dcfb12ce041cb2d18577.png

The data from the pages obviously can't be displayed as it's been stripped down to nothing - only the content processor can write to the console now. kOSPropMonitor already exists here - that's what's being overlaid onto the PFD above. (The labels are off because I just learned about [hw], somehow). The only functionality that's really broken is page switching, which isn't that big of a deal.

It wouldn't be too hard to rebuild a lot of what RPM does with kPM for the MFDs, but it would be a lot of work. I'm not really sure how far I want to take this. It might be time to pick through MAS instead of RPM. I really need to decide if it makes any sense to integrate kOS into it, or go for a standalone prop.

Link to comment
Share on other sites

6 hours ago, MOARdV said:

Radiators would be pretty easy to do - MAS already supports it in the dev version on GitHub.  Porting that code back into RPM wouldn't be terribly difficult, and if someone wants to do it, I'll accept a pull request.  I've just got lots of other things I'm doing, and RPM features are not a priority at the moment.

I don't suppose a copy / paste would work, eh?

Link to comment
Share on other sites

16 hours ago, dsonbill said:

 

It wouldn't be too hard to rebuild a lot of what RPM does with kPM for the MFDs, but it would be a lot of work. I'm not really sure how far I want to take this. It might be time to pick through MAS instead of RPM. I really need to decide if it makes any sense to integrate kOS into it, or go for a standalone prop.

On the other hand, duplicating that code means two mods doing the same work.  RasterPropMonitor's variable evaluation methods are public, so you can use either reflection or a hard dependency on RPM to access them.  That would let RPM do all the computation work, all you would have to do is pass it variable requests.  OTOH, you would still have to do screen layout.

16 hours ago, theonegalen said:

I don't suppose a copy / paste would work, eh?

It would be close to a copy / paste.  It would need someone to verify it works as intended, too.  The reason why I'm not adding significant features myself is that I don't have a "complex" RPM cockpit to work with.  I converted my main development IVA to MAS last summer.  I use alexustas' RPM IVAs to check things over, but I'm not set up to do serious RPM feature development.

Link to comment
Share on other sites

16 hours ago, dsonbill said:

What's the timetable feel like for MAS? I know this is an awful question to ask. If you foresee it taking long enough, I might just play around with this a whole lot more.

In this case, not an awful question.

MAS as it stands is operational, but MFDs are not fully implemented.  Mainly because I don't use MFDs when I play, so I am not motivated to code them.  The MFDs can display text, and they have a couple of other features that I wrote early on.  I still need (want) to get cameras working, but I wanted to take a break from coding / modding KSP so I can spend some time playing it.  And so I can think of how I want to implement cameras - the big problem with RPM's cameras is that all of the camera functionality is in the MFD (zoom levels, pan limits), but I want to move that configuration into the module that goes in the camera.  The other hangup is performance - MAS uses a Lua interpreter to provide flexibility (as in, you can write Lua functions that MAS executes), but the interpreter is S-L-O-W, and it does a lot of allocations, so the Unity garbage collector gets hammered pretty hard.  It was bad enough that I implemented a rudimentary parser that converts simple MAS commands into C# delegates that execute 10x-20x faster.  As long as an IVA isn't using too many Lua functions, it is comparable to RPM, performance-wise.

Although I guess that doesn't actually answer the question, does it?  I think the short answer is "not soon".  I've dusted off a couple of old parts mods, and I've been getting them working with KSP 1.2.2, and one of them has a sweet IVA layout, so I may be getting back into developing MAS this spring, but I don't want to make a commitment on a timeline just yet.

Link to comment
Share on other sites

On 4/27/2017 at 5:16 AM, MOARdV said:

The other hangup is performance - MAS uses a Lua interpreter to provide flexibility (as in, you can write Lua functions that MAS executes), but the interpreter is S-L-O-W, and it does a lot of allocations, so the Unity garbage collector gets hammered pretty hard.  It was bad enough that I implemented a rudimentary parser that converts simple MAS commands into C# delegates that execute 10x-20x faster.  As long as an IVA isn't using too many Lua functions, it is comparable to RPM, performance-wise.

I'm incredibly familiar with Moonsharp, as I'm using it extensively for a personal project. I've created a system that runs lots of scripts all in different threads - I have no simple interlink to unity values, but that's not too hard to bridge over, as I did it with this for a small project for another game that I ended up not releasing.

More on the system mentioned:

Spoiler

It's built to be like a computer - CPU, memory, hard drive, network card, and motherboard are all different components (I've gone slightly insane, yes). It has two different script environments - kernel, and user. Kernel is a continuous script environment that has access to the memory and other components directly, and can set user globals to allow access to these components and other features in the user space. User space scripts are run in their own script environments, so variables are not carried over, etc. You can schedule script execution to a processor, which handles these environments and running them in a stand-alone thread. Only one user + kernel script can be running on a CPU at once, so it's expected you either build systems that need a dedicated loop which will run on their own CPU (and therefore in their own thread), or your scripts should run quickly, store things in memory, and then schedule themselves to run again to continue a loop.

While I never intended for this stuff to make its way into KSP, I might think about building a new mod with that instead which integrates with MAS. It could bring good research for its eventual use in its intended home.

I've also been forced to modify Moonsharp to allow for some dirty execution, so I may need to find a way to consolidate the fact that I need that version loaded, while you are probably using another version of Moonsharp. I may just rename everything to Moonderp.

 

 

Edited by dsonbill
Link to comment
Share on other sites

@MOARdV -

I hate to bother you but I am at the end of my knowledge of how to even begin to understand the errors being generated.

I am having an issue with RPM that just started two weeks ago. During that time, I've only updated the ASET mod that's a required mod for @Angel-125's mods. I;ve attempted everything I know to do - restoring the previous versions of ASET and RPM, stripping mods, one at a time to see if they are causing the issues, etc. This morning he recommended I approach you with the problem I am having. He has given me permission to share the contents of the private message AND be tagged so he can figure out if the problem is something he coded in his mods. In a private message, he shared the stuff in the spoiler and said this is what is causing the crash, but he does not know why it is happening:

Spoiler

[ERR 07:50:12.782] [JSILabel]: Start failed in prop 79 (switchRotary_StageLock) with exception System.NullReferenceException: Object reference not set to an instance of an object
  at JSI.RPMVesselComputer.Instance (.Vessel v) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.AddVariable (System.String variableName) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.InstantiateVariableOrNumber (System.String variableName) [0x00000] in <filename unknown>:0 
  at JSI.VariableOrNumberRange..ctor (JSI.RasterPropMonitorComputer rpmComp, System.String sourceVariable, System.String range1, System.String range2, System.String moduloVariable) [0x00000] in <filename unknown>:0 
  at JSI.CustomVariable.ProcessSourceNode (.ConfigNode node, JSI.RasterPropMonitorComputer rpmComp, System.Boolean& reverse) [0x00000] in <filename unknown>:0 
  at JSI.CustomVariable..ctor (.ConfigNode node, JSI.RasterPropMonitorComputer rpmComp) [0x00000] in <filename unknown>:0 
  at JSI.JUtil.InstantiateComplexVariable (.ConfigNode node, JSI.RasterPropMonitorComputer rpmComp) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.GetEvaluator (System.String input, System.Boolean& cacheable) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.AddVariable (System.String variableName) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.RegisterVariableCallback (System.String variableName, System.Action`1 cb) [0x00000] in <filename unknown>:0 
  at JSI.JSILabel.Start () [0x00000] in <filename unknown>:0 

Here's a link to the error files and the KSP log: HOSTED ON DROPBOX

Here's the contents of my GameData folder, completely compressed: HOSTED ON DROPBOX

I have tried updating both ASET and RPM, updating Module Manager, and even deleting the old MM chache file after the changes. I also reduced my mod count, and am now running fewer than fifty mods, believing that maybe the crashes were being caused because of memory issues. Any help you can provide is great.

I also am sure, after reading through the thread, I've included everything you've requested be included in a request for assistance. If I am wrong, please let me know.

Edited by adsii1970
Link to comment
Share on other sites

12 hours ago, dsonbill said:

I'm incredibly familiar with Moonsharp, as I'm using it extensively for a personal project. I've created a system that runs lots of scripts all in different threads - I have no simple interlink to unity values, but that's not too hard to bridge over, as I did it with this for a small project for another game that I ended up not releasing.

I've been using the plain-vanilla Moonsharp 2.0.0 release.  I know it's not ideal for my application due to the memory churn, but I'm not in a position to tear it apart and clean it up (I don't speak C# natively, and I can't justify the time sink of learning my way around Moonsharp sufficiently to identify and fix the issues).

1 hour ago, adsii1970 said:

@MOARdV -

I am having an issue with RPM that just started two weeks ago. During that time, I've only updated the ASET mod that's a required mod for @Angel-125's mods. I;ve attempted everything I know to do - restoring the previous versions of ASET and RPM, stripping mods, one at a time to see if they are causing the issues, etc. This morning he recommended I approach you with the problem I am having. He has given me permission to share the contents of the private message AND be tagged so he can figure out if the problem is something he coded in his mods. In a private message, he shared the stuff in the spoiler and said this is what is causing the crash, but he does not know why it is happening:

  Reveal hidden contents


[ERR 07:50:12.782] [JSILabel]: Start failed in prop 79 (switchRotary_StageLock) with exception System.NullReferenceException: Object reference not set to an instance of an object
  at JSI.RPMVesselComputer.Instance (.Vessel v) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.AddVariable (System.String variableName) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.InstantiateVariableOrNumber (System.String variableName) [0x00000] in <filename unknown>:0 
  at JSI.VariableOrNumberRange..ctor (JSI.RasterPropMonitorComputer rpmComp, System.String sourceVariable, System.String range1, System.String range2, System.String moduloVariable) [0x00000] in <filename unknown>:0 
  at JSI.CustomVariable.ProcessSourceNode (.ConfigNode node, JSI.RasterPropMonitorComputer rpmComp, System.Boolean& reverse) [0x00000] in <filename unknown>:0 
  at JSI.CustomVariable..ctor (.ConfigNode node, JSI.RasterPropMonitorComputer rpmComp) [0x00000] in <filename unknown>:0 
  at JSI.JUtil.InstantiateComplexVariable (.ConfigNode node, JSI.RasterPropMonitorComputer rpmComp) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.GetEvaluator (System.String input, System.Boolean& cacheable) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.AddVariable (System.String variableName) [0x00000] in <filename unknown>:0 
  at JSI.RasterPropMonitorComputer.RegisterVariableCallback (System.String variableName, System.Action`1 cb) [0x00000] in <filename unknown>:0 
  at JSI.JSILabel.Start () [0x00000] in <filename unknown>:0 

 

Okay.  I see what's going on.  A couple of modules are flipping out because they're being instantiated in the editor.  Some of the prop modules have a guard against that, but not all of them do.  I'll see what I can do about getting a fix out "soon".

Link to comment
Share on other sites

... And, fixed (hopefully I found all of the problem modules).

RasterPropMonitor v0.28.1 for KSP 1.2.2 is now available on GitHub.  Mostly NRE fixes, although Virinidi-AC provided some integration with CommNet, and hidude398 tweaked the cockpit hatch position in the mk1 demo cockpit.

Link to comment
Share on other sites

42 minutes ago, MOARdV said:

... And, fixed (hopefully I found all of the problem modules).

RasterPropMonitor v0.28.1 for KSP 1.2.2 is now available on GitHub.  Mostly NRE fixes, although Virinidi-AC provided some integration with CommNet, and hidude398 tweaked the cockpit hatch position in the mk1 demo cockpit.

@MOARdV: Is this the fix I need? As I was downloading it, I read your description on GitHub. Although I will not be able to try it until later this evening, I do thank you for your help.

Edited by adsii1970
Link to comment
Share on other sites

@MOARdV Is there any intended path for external libraries to write page components in MAS? I modified MASPage to load components dynamically by class name so I can mess with things a little bit in the mean time. Here's the commit: https://github.com/dsonbill/AvionicsSystems/commit/bdfaa2c367609b865c7f8aa6443dd74e4ea4bcd2

 

Are you planning on building a public API for basically everything or something?

Edited by dsonbill
Link to comment
Share on other sites

11 hours ago, dsonbill said:

@MOARdV Is there any intended path for external libraries to write page components in MAS? I modified MASPage to load components dynamically by class name so I can mess with things a little bit in the mean time. Here's the commit: https://github.com/dsonbill/AvionicsSystems/commit/bdfaa2c367609b865c7f8aa6443dd74e4ea4bcd2

 

Are you planning on building a public API for basically everything or something?

I haven't gotten that far in the design, to be honest.  My first goal was seeing how a Lua interpreter performed within the MAS context.  Once I figured out that was not great, I spent a lot of time working on the parser to generate native C# delegates.  By the time I got that working to my satisfaction, and I had converted a lot of props so I can exercise the code, I was ready to take a break.

(I haven't looked at your commit yet, since I haven't had enough coffee, so sorry if this overlaps it) As for a public API, I think having the variable callback registration / deregistration as part of a public API makes sense.  I think maybe allowing external classes to register a "namespace" like I'm doing with `fc`, `mechjeb`, etc, would be the cleanest way to tie in to external mods.  I don't know how I would integrate that with MoonSharp's automatic generation of function tables, but if it's not currently possible, I should be able to emulate it.  If you have suggestions for what'd help, please let me know - like I mentioned, C# isn't my native programming tongue, so I don't know how best to exploit its capabilities.

It'd probably make sense to move this talk to a PM, so we're not cluttering the RPM thread with talk of another mod.

 

17 hours ago, adsii1970 said:

@MOARdV: Is this the fix I need? As I was downloading it, I read your description on GitHub. Although I will not be able to try it until later this evening, I do thank you for your help.

I believe my fixes should cover the problems you saw.  There's a chance that I missed some stuff, but I definitely got all of the NREs I saw in your log, and a some others I spotted on the way.

Link to comment
Share on other sites

Just downloaded the latest release and ran into two small issues.

The change log says: "The mk1 demo cockpit has had its hatch rotated 90 degrees so it doesn't look so odd, thanks to hidude398. Issue #619." However in game for me, it's most certainly rotated the wrong way (Horizontally instead of vertically if you understand my meaning), leaving a giant gaping whole in the side of the cockpit where the closed door should be.

The Mk1 inline cockpit changes seem to be missing as well as it's completely stock with no MFD's. The presence of .cfg files for it in the folders seems to imply it's supposed to exist. However it's .cfg files were named as .nocfg files, taking the "no" out did not make the changes appear though.

Edited by Rocket In My Pocket
Link to comment
Share on other sites

On 4/29/2017 at 8:31 AM, MOARdV said:

It'd probably make sense to move this talk to a PM, so we're not cluttering the RPM thread with talk of another mod.

Is MAS far enough in development, and have you considered maybe starting a [WIP] development thread for MAS, where public discussion on it could happen?

If you're not ready for that, thats kewl... :)

Link to comment
Share on other sites

17 hours ago, Stone Blue said:

Is MAS far enough in development, and have you considered maybe starting a [WIP] development thread for MAS, where public discussion on it could happen?

If you're not ready for that, thats kewl... :)

It's looking like I should, doesn't it? :)  I'm not actively developing it right now, since I'm taking a break from writing mods, but there is enough functionality to tinker with it and garner feedback.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...