Jump to content

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


MOARdV

Recommended Posts

Is it possible to have the display of a variable be conditional on a different value? For example, display suicideburnstartsecs only if vertspeedrounded is negative?

Link to comment
Share on other sites

2 minutes ago, dlrk said:

Is it possible to have the display of a variable be conditional on a different value? For example, display suicideburnstartsecs only if vertspeedrounded is negative?

Yes.  There are a couple ways to do that, depending on the layout of the line of text it goes on.  If it's the last bit of text, you can do something like

Burn Start: {0:;"       ";}{1,7:METMM:ss.f} $&$ VERTSPEEDROUNDED SUICIDEBURNSTARTSECS

or you can use a select variable

RPM_SELECT_VARIABLE
{
  name = MY_BURNSTART
  defaultValue = SUICIDEBURNTIMESECS
  VARIABLE_DEFINITION
  {
    name = VERTSPEEDROUNDED
    range = 1,100000

    value = 0
  }
}

and use the variable SELECT_MY_BURNSTART, which will return 0 if VERTSPEEDROUNDED is between 1 and 100000m/s, and return SUICIDEBURNTIMESECS otherwise.  Then, for the data display, you can use some text like "--:--.-" for the text displayed when the select variable is zero.

Link to comment
Share on other sites

Thanks!

Also, I've read through the string.format docs, and I've been able to make some useful changes to the landing page, but I'm still not quite understanding how this works. What exactly does the semicolon do, and how does it select? As I understand it, if a semicolon is present, the string before it is displayed if the number is positive, and the string after it is displayed if the number is negative. Is that correct?

Link to comment
Share on other sites

10 hours ago, dlrk said:

Thanks!

Also, I've read through the string.format docs, and I've been able to make some useful changes to the landing page, but I'm still not quite understanding how this works. What exactly does the semicolon do, and how does it select? As I understand it, if a semicolon is present, the string before it is displayed if the number is positive, and the string after it is displayed if the number is negative. Is that correct?

It depends on if there is a single semicolor or two.  If it's one, it works as you describe.  If there are two, it's (positive; negative; zero).  That's why some defined variables are effectively tri-state - they return 1, 0, or -1.

Link to comment
Share on other sites

Silly question, but...

I've had RPM installed for as long as I can remember, yet I've still never managed to look at video feeds from external cameras when in IVA.

Is there any particular button or trick one must perform to turn view such?

 

Thanks. :)

Link to comment
Share on other sites

6 hours ago, DavidHunter said:

Silly question, but...

I've had RPM installed for as long as I can remember, yet I've still never managed to look at video feeds from external cameras when in IVA.

Is there any particular button or trick one must perform to turn view such?

 

Thanks. :)

Did you install cameras on your craft?  If so, the MFD has a button labeled "EXT" that will display camera views.  The RPM installation has an "external camera" part, and last I checked most/all of the Hullcam VDS parts had configurations that worked with RPM.

If you have docking ports, you can also use the "TRGT" menu to select a docking port as a reference camera, and then you will see the docking port view when using the "DOCK" page.

Link to comment
Share on other sites

9 hours ago, MOARdV said:

Did you install cameras on your craft?  If so, the MFD has a button labeled "EXT" that will display camera views.  The RPM installation has an "external camera" part, and last I checked most/all of the Hullcam VDS parts had configurations that worked with RPM.

If you have docking ports, you can also use the "TRGT" menu to select a docking port as a reference camera, and then you will see the docking port view when using the "DOCK" page.

Ahh right. Thanks. I'll try this out next time I play KSP. I thought I had tried mashing every button but I can't recall if I pressed the EXT button specifically. :wink:

I'm actually using RPM for the Canadarm mod; the part has a camera built into the arm and the mod page recommends installing RPM (presumably in order to display the video feed from the camera).

 

Thanks again for the explanation. :)

Link to comment
Share on other sites

MOARdV, I have an issue with navball page (that's activated with upper left MFD button) not being displayed when a waypoint is active. The monitor just shows a blank screen. Once the waypoint navigation is deactivated, the navball page restores. So I can't have both navigation and navball active at the same time.

Logs contain this:

Matrix stack full depth reached
 
(Filename:  Line: 31)

NullReferenceException: Object reference not set to an instance of an object
  at JSI.JSIPrimaryFlightDisplay.RenderPFD (UnityEngine.RenderTexture screen, Single aspect) [0x00000] in <filename unknown>:0 

  at JSI.MonitorPage.RenderBackground (UnityEngine.RenderTexture screen) [0x00000] in <filename unknown>:0 

  at JSI.RasterPropMonitor.RenderScreen () [0x00000] in <filename unknown>:0 

  at JSI.RasterPropMonitor.OnUpdate () [0x00000] in <filename unknown>:0 

  at InternalProp.OnUpdate () [0x00000] in <filename unknown>:0 

  at InternalModel.OnUpdate () [0x00000] in <filename unknown>:0 

  at Part.InternalOnUpdate () [0x00000] in <filename unknown>:0 

  at Part.Update () [0x00000] in <filename unknown>:0 	

 

Edited by Ser
Link to comment
Share on other sites

19 hours ago, MOARdV said:

Did you install cameras on your craft?  If so, the MFD has a button labeled "EXT" that will display camera views.  The RPM installation has an "external camera" part, and last I checked most/all of the Hullcam VDS parts had configurations that worked with RPM.

If you have docking ports, you can also use the "TRGT" menu to select a docking port as a reference camera, and then you will see the docking port view when using the "DOCK" page.

Yep, found the EXT button. Sadly it goes to a screen which says "No Signal". Presumably that's an issue with the Canadarm mod, though.

Thanks for the help, @MOARdV. :)

Link to comment
Share on other sites

7 hours ago, Ser said:

MOARdV, I have an issue with navball page (that's activated with upper left MFD button) not being displayed when a waypoint is active. The monitor just shows a blank screen. Once the waypoint navigation is deactivated, the navball page restores. So I can't have both navigation and navball active at the same time.

 

If you're using Waypoint Manager, that was reported a couple of weeks ago.  I never heard anything else from nightingale regarding it, but I'll add some null checks since there's something that mod does when its active that I don't see stock doing.  It'll be a while before I update RPM - I've got a big mess to fix with docking and undocking before I can release.

Link to comment
Share on other sites

32 minutes ago, MOARdV said:

If you're using Waypoint Manager, that was reported a couple of weeks ago.  I never heard anything else from nightingale regarding it, but I'll add some null checks since there's something that mod does when its active that I don't see stock doing.  It'll be a while before I update RPM - I've got a big mess to fix with docking and undocking before I can release.

I'm afraid this happens apart from WaypointManager. I'll double check that despite I'm sure I've tried without it.

Link to comment
Share on other sites

27 minutes ago, Ser said:

I'm afraid this happens apart from WaypointManager. I'll double check that despite I'm sure I've tried without it.

Ah, that's different, then.  Or it's a detail I didn't have previously.  Regardless, it'll be fixed in the next update.

Link to comment
Share on other sites

2 hours ago, MOARdV said:

Ah, that's different, then.  Or it's a detail I didn't have previously.  Regardless, it'll be fixed in the next update.

Yes, I can confirm that. Tried with almost virgin clear GameData and no WaypointManager. Reproduction steps if you need'em:

Load a career game where survey contracts are available. Accept the contract. Start a flight and go to the map view. Activate navigation on a waypoint. Check RPM - no navball displayed, the exception is in logs. Deactivate navigation - navball is back.

Link to comment
Share on other sites

Hi,

I've had some messing around and generally great success getting RPM props set-up.  But I can't seem to make the RPM_MATH_VARIABLEs work.  If I try referencing them in the prop, the prop fails to load.  I'm basing the config on the notes at https://github.com/Mihara/RasterPropMonitor/wiki/Custom-Variables

I can't find existing examples to steal config from.  :-D

I've generally made peace with not using the MATH variables and moved on (there are plenty predefined variables after all), but I was wondering if this was a known issue (maybe broken in 1.1.X?) or if I'd just mucked up the config.

 

Example config I've been trying;

PROP
{
  name = DefTorq
 
    MODEL
    {
        model = KerbinRover/Props/DefTorq/DefTacho
    }
    MODULE
    {
        name = JSIVariableAnimator
        refreshRate = 3
    
        VARIABLESET
        {
            scale = 0,20
            variableName = ENGINE_TORQ
            controlledTransform = Needle
            localRotationStart = 0,0,-120
            localRotationEnd = 0,0,120
            longPath = yes
            maxRateChange = 1
        }

    }    

}

RPM_MATH_VARIABLE
{
   name = ENGINE_TORQ
   operator = MULTIPLY

   sourceVariable = ACCELFORWARD
   sourceVariable = MASSWET
   sourceVariable = HORZVELOCITYFORWARD
}

Ta.  :-)

 

Link to comment
Share on other sites

5 hours ago, TiktaalikDreaming said:

Hi,

I've had some messing around and generally great success getting RPM props set-up.  But I can't seem to make the RPM_MATH_VARIABLEs work.  If I try referencing them in the prop, the prop fails to load.  I'm basing the config on the notes at https://github.com/Mihara/RasterPropMonitor/wiki/Custom-Variables

I can't find existing examples to steal config from.  :-D

I've generally made peace with not using the MATH variables and moved on (there are plenty predefined variables after all), but I was wondering if this was a known issue (maybe broken in 1.1.X?) or if I'd just mucked up the config.

 

Example config I've been trying;


PROP
{
  name = DefTorq
 
    MODEL
    {
        model = KerbinRover/Props/DefTorq/DefTacho
    }
    MODULE
    {
        name = JSIVariableAnimator
        refreshRate = 3
    
        VARIABLESET
        {
            scale = 0,20
            variableName = ENGINE_TORQ
            controlledTransform = Needle
            localRotationStart = 0,0,-120
            localRotationEnd = 0,0,120
            longPath = yes
            maxRateChange = 1
        }

    }    

}

RPM_MATH_VARIABLE
{
   name = ENGINE_TORQ
   operator = MULTIPLY

   sourceVariable = ACCELFORWARD
   sourceVariable = MASSWET
   sourceVariable = HORZVELOCITYFORWARD
}

Ta.  :-)

 

They definitely work (ASET Props uses them, my FlightSystemRedux uses them, and DeputyLOL's B737 uses them, too, I think).  You need to refer to the math variable as a math variable when referencing it in the JSIVariableAnimator config.  Otherwise, RPM doesn't know what you're looking for (the same rule applies for CUSTOM and SELECT variables).

Try this:

    MODULE
    {
        name = JSIVariableAnimator
        refreshRate = 3
    
        VARIABLESET
        {
            scale = 0,20
            variableName = MATH_ENGINE_TORQ
            controlledTransform = Needle
            localRotationStart = 0,0,-120
            localRotationEnd = 0,0,120
            longPath = yes
            maxRateChange = 1
        }

    }    

 

Link to comment
Share on other sites

7 hours ago, MOARdV said:

They definitely work (ASET Props uses them, my FlightSystemRedux uses them, and DeputyLOL's B737 uses them, too, I think).  You need to refer to the math variable as a math variable when referencing it in the JSIVariableAnimator config.  Otherwise, RPM doesn't know what you're looking for (the same rule applies for CUSTOM and SELECT variables).

Try this:


    MODULE
    {
        name = JSIVariableAnimator
        refreshRate = 3
    
        VARIABLESET
        {
            scale = 0,20
            variableName = MATH_ENGINE_TORQ
            controlledTransform = Needle
            localRotationStart = 0,0,-120
            localRotationEnd = 0,0,120
            longPath = yes
            maxRateChange = 1
        }

    }    

 

That makes sense.  I couldn't find any examples in ASET, but I was looking using findstr when I'm used to grep, so maybe I was looking wrong.  I'll try that later (at work now).

 

Awesome, it worked.  And now I can see that in the doco as well.  Missed it 'cos I'm an idiot.  Thanks @MOARdV

Now I just need to figure out why my props aren't rendering in the Unity editor.  But the steering wheel is done, the "tacho" is done and the other more standard gauges all work.

Edited by TiktaalikDreaming
update
Link to comment
Share on other sites

8 hours ago, TiktaalikDreaming said:

Now I just need to figure out why my props aren't rendering in the Unity editor. 

I just thought I'd put this here in case someone else comes across this.  There's a reasonable chance anyone making props will be using RPM 'cos it's awesome.

If you make a prop.  It works, you see it in KSP and it functions fine, but in the Unity editor it spawns as just a transform (which makes it pretty awful to get placement and rotation right) then it might be the issue I had.  It seems like if you define the MODEL { model = } in the prop config, then it's mysteriously not rendered by Unity in the editor.  Even though it's layered right, works fine in KSP, unity don't like it.  Possibly a case of the exact unity version I have mixing badly with part tools or some such.  Dunno. 

Link to comment
Share on other sites

4 hours ago, TiktaalikDreaming said:

I just thought I'd put this here in case someone else comes across this.  There's a reasonable chance anyone making props will be using RPM 'cos it's awesome.

If you make a prop.  It works, you see it in KSP and it functions fine, but in the Unity editor it spawns as just a transform (which makes it pretty awful to get placement and rotation right) then it might be the issue I had.  It seems like if you define the MODEL { model = } in the prop config, then it's mysteriously not rendered by Unity in the editor.  Even though it's layered right, works fine in KSP, unity don't like it.  Possibly a case of the exact unity version I have mixing badly with part tools or some such.  Dunno. 

I haven't seen that myself, and all of my props use MODEL (since they're using ASET props with different configs).  What I have seen, and I've had reported to me, is that the RPM example props using stock meshes (also using MODEL nodes) show up in a different place in the editor than where the transform says it is.  In-game, it's okay, but in the editor, it's somewhere else.  It seems like the commonality is the use of MODEL, so I'd blame part tools - Squad props (last I checked) never use MODEL, since they're in the same directory as the mesh.  I'm using the Squad-recommended Unity 5.2.4f1, fwiw.

Link to comment
Share on other sites

40 minutes ago, MOARdV said:

I haven't seen that myself, and all of my props use MODEL (since they're using ASET props with different configs).  What I have seen, and I've had reported to me, is that the RPM example props using stock meshes (also using MODEL nodes) show up in a different place in the editor than where the transform says it is.  In-game, it's okay, but in the editor, it's somewhere else.  It seems like the commonality is the use of MODEL, so I'd blame part tools - Squad props (last I checked) never use MODEL, since they're in the same directory as the mesh.  I'm using the Squad-recommended Unity 5.2.4f1, fwiw.

Yeah that issue with the props location is a bug (assigned to the mighty Mu, and hopefully will be fixed one day)
http://bugs.kerbalspaceprogram.com/issues/8998
As for them completely disappearing haven't seen that... @TiktaalikDreaming are you sure it's not just offset like mentioned in the bug report?
What you will initially see is just a transform if you are zoomed in to far. Zoom out and you will find your prop offset.
The work-around is to make sure you set your prop main transform location to 0,0,0 before you write it out to a mu file. When you spawn it back into Unity it will be aligned to it's transform.

@MOARdV I believe if all the RPM props were reset in Unity to 0,0,0 and their mu's re-created that would fix the offset issue hen they are spawned back into Unity for now

Edited by JPLRepo
Link to comment
Share on other sites

2 hours ago, MOARdV said:

I haven't seen that myself, and all of my props use MODEL (since they're using ASET props with different configs).  What I have seen, and I've had reported to me, is that the RPM example props using stock meshes (also using MODEL nodes) show up in a different place in the editor than where the transform says it is.  In-game, it's okay, but in the editor, it's somewhere else.  It seems like the commonality is the use of MODEL, so I'd blame part tools - Squad props (last I checked) never use MODEL, since they're in the same directory as the mesh.  I'm using the Squad-recommended Unity 5.2.4f1, fwiw.

I suspect it's to do with Unity version (plus parttools).  I upgraded from 5.2 (before 1.1 came out with it's part tools and version recommendations) because I ran into a bug where it kept crashing when Win10 locked the screen, and I've noticed other part tools things that don't seem to function for me.  I might need to downgrade.  I ended up extending my screen lockout to ludicrous times anyway cos it excrementss me on a home PC.  Maybe if I switch to 5.2.4f1 I can get that emissive generating tool to work.  :-)

1 hour ago, JPLRepo said:

Yeah that issue with the props location is a bug (assigned to the mighty Mu, and hopefully will be fixed one day)
http://bugs.kerbalspaceprogram.com/issues/8998
As for them completely disappearing haven't seen that... @TiktaalikDreaming are you sure it's not just offset like mentioned in the bug report?
What you will initially see is just a transform if you are zoomed in to far. Zoom out and you will find your prop offset.
The work-around is to make sure you set your prop main transform location to 0,0,0 before you write it out to a mu file. When you spawn it back into Unity it will be aligned to it's transform.

@MOARdV I believe if all the RPM props were reset in Unity to 0,0,0 and their mu's re-created that would fix the offset issue hen they are spawned back into Unity for now

I'd run into THAT bug already with the stock props, so I did check it quite thoroughly.  Unless they end up rendered many miles away, they're just not there.  That's not to say they're not just too far away to see.  Also, I've been creating my props at 0,0,0 as a precautionary measure.  I've been aiming at that for all IVA related stuff, even though it ends up being a bit of a nuisance when working with multiple props.  I'm putting my money on Part Tools interacting with my Unity version, which isn't the recommended one.  And, I'll test that.  I'm accumulating reasons to switch to the recommended.  :-)

Link to comment
Share on other sites

5 hours ago, JPLRepo said:

Yeah that issue with the props location is a bug (assigned to the mighty Mu, and hopefully will be fixed one day)
http://bugs.kerbalspaceprogram.com/issues/8998
As for them completely disappearing haven't seen that... @TiktaalikDreaming are you sure it's not just offset like mentioned in the bug report?
What you will initially see is just a transform if you are zoomed in to far. Zoom out and you will find your prop offset.
The work-around is to make sure you set your prop main transform location to 0,0,0 before you write it out to a mu file. When you spawn it back into Unity it will be aligned to it's transform.

@MOARdV I believe if all the RPM props were reset in Unity to 0,0,0 and their mu's re-created that would fix the offset issue hen they are spawned back into Unity for now

I opened a feedback bug because I didn't find 8998.  Ah, well.

"if all the RPM props were reset in Unity to 0,0,0 and their mu's re-created" ... errr, I'm a coder, not a modeler.  What tongue are you speaking? :wink: Less flippantly - the only props *I've* seen behaving badly have been Squad props that use the MODEL node.

Link to comment
Share on other sites

3 minutes ago, MOARdV said:

I opened a feedback bug because I didn't find 8998.  Ah, well.

"if all the RPM props were reset in Unity to 0,0,0 and their mu's re-created" ... errr, I'm a coder, not a modeler.  What tongue are you speaking? :wink: Less flippantly - the only props *I've* seen behaving badly have been Squad props that use the MODEL node.

Probably just refer it to 8998 since it's already assigned to Mu.

"I'm a coder" - So am I. :cool:  I'm pretty sure I had a bunch of RPM props that had this behaviour when I was fixing my Endurance IVAs for 1.1. I'll go back and get a list.

Link to comment
Share on other sites

1 hour ago, MOARdV said:

I opened a feedback bug because I didn't find 8998.  Ah, well.

"if all the RPM props were reset in Unity to 0,0,0 and their mu's re-created" ... errr, I'm a coder, not a modeler.  What tongue are you speaking? :wink: Less flippantly - the only props *I've* seen behaving badly have been Squad props that use the MODEL node.

I never checked which Squad props do the misplacement.  I shall in future (cos it's pretty annoying).  But definitely just the Squad props in my experience.

Link to comment
Share on other sites

On 6/3/2016 at 3:49 AM, MOARdV said:

I haven't seen that myself, and all of my props use MODEL (since they're using ASET props with different configs).  What I have seen, and I've had reported to me, is that the RPM example props using stock meshes (also using MODEL nodes) show up in a different place in the editor than where the transform says it is.  In-game, it's okay, but in the editor, it's somewhere else.  It seems like the commonality is the use of MODEL, so I'd blame part tools - Squad props (last I checked) never use MODEL, since they're in the same directory as the mesh.  I'm using the Squad-recommended Unity 5.2.4f1, fwiw.

"upgraded" to 5.2.4f1 from 5.3.4 and uncommented my MODEL tags.  All working fine.  :-/

PKq2gxe.png

Link to comment
Share on other sites

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