Jump to content

[WIP] [1.12.x] MOARdV's Avionics Systems - MAS Interactive IVA! (v1.3.7, 7 April 2023)


MOARdV

Recommended Posts

@MOARdV I decided to switch from RPM to MAS today. Couldn't figure out how to make RNDZ and DOCK buttons active on MAS IFMS MFD. Ended up using DPAI for docking. How do I activate those buttons?

 

TjJPOEF.jpg

Edited by Enceos
Link to comment
Share on other sites

6 hours ago, Enceos said:

How do I activate those buttons?

@Enceos - Sorry, that's my fault.

The problem is that I never finished implementing that MFD.  That happens to me every time I work on MFDs - I come up with a design style, I get the basics working (launch, orbit, maneuver, land), and somewhere along the way I lose my inspiration.  That's why none of the MFDs I've made are complete - it takes me too long to finish them, and I start playing with something else.

At the very least, I need to finish docking on the IFMS - I've got a good design in mind for visualizing the docking and alignment, but I need to be able to stay interested long enough to get it working.

Link to comment
Share on other sites

6 hours ago, MOARdV said:

@Enceos - Sorry, that's my fault.

The problem is that I never finished implementing that MFD.  That happens to me every time I work on MFDs - I come up with a design style, I get the basics working (launch, orbit, maneuver, land), and somewhere along the way I lose my inspiration.  That's why none of the MFDs I've made are complete - it takes me too long to finish them, and I start playing with something else.

At the very least, I need to finish docking on the IFMS - I've got a good design in mind for visualizing the docking and alignment, but I need to be able to stay interested long enough to get it working.

I feel you dude :) I've been on a hiatus from modding for almost 2 years, got tired from floaty Infernal Robotics parts and constant crashes of my KSP install. Can't be inspired to mod when I'm not playing the game. The latest DLC and Galileo's JNSQ called me to get into KSP once again. I'm slowly modding in stuff I'm missing from my game, was inclined to redo all stock IVAs with your MAS props, that would not be a big deal for me. I'll switch back to RPM for now. Ping me if you ever implement docking. Your props are slick!

Edited by Enceos
Link to comment
Share on other sites

8 minutes ago, Enceos said:

 I'm slowly modding in stuff I'm missing from my game, was inclined to redo all stock IVAs with your MAS props, that would not be a big deal for me.

I would praise you as a god from Mount Olympus if you did this. 

Link to comment
Share on other sites

Hello,

         Would like to be able to have text on the screen to the effect of lNAV VNAV VS etc.. and when the button is pressed for the MFD to have it interact with a kos program and update the screen. Is this possible? Is there a page for this already?

 

 

Link to comment
Share on other sites

7 hours ago, SiRCrashaLot said:

Hello,

         Would like to be able to have text on the screen to the effect of lNAV VNAV VS etc.. and when the button is pressed for the MFD to have it interact with a kos program and update the screen. Is this possible? Is there a page for this already?

 

 

MAS does not currently work directly with kOS,  MAS supports using RPM-style interfaces, so if kOS had an RPM bridge module, someone could set up an MFD page to use that interface.  kOS is on my "eventually" list of mods to look at to see how much effort it'd take to hook up to it directly, but it will be a while before I get to it, since I have too many higher priorities right now.

Link to comment
Share on other sites

So I'm really liking this mod, but I'm having some trouble with finding command pods that make use of it. Are there other mods with command pods that make use of it? Is there a list somewhere or are most mods still using RPM maybe? Feel like I'm maybe misunderstanding how to properly use this mod. Is there a way for me to go about getting more command pods that use it beyond what you included here?

Link to comment
Share on other sites

On 7/21/2019 at 3:45 PM, Clockworkbot said:

So I'm really liking this mod, but I'm having some trouble with finding command pods that make use of it. Are there other mods with command pods that make use of it? Is there a list somewhere or are most mods still using RPM maybe? Feel like I'm maybe misunderstanding how to properly use this mod. Is there a way for me to go about getting more command pods that use it beyond what you included here?

I've got links to two of the mods that I know use MAS IVAs on the OP (both of the IVAs, I made).  I know there was a space shuttle IVA that was a hybrid of MAS and RPM, but I don't think it's been updated since it released a year or two ago.

The problem is that this mod spent 3+ years in development, and most modders (understandably) don't want to adopt something unfinished, especially for IVA.  IVA takes a long time to develop if you're going to make it good - the Mk1 Mercury IVA took me over 20 hours to design, set up, test, and tweak.  The Apollo IVA I made took over 40 hours.  And that's with IVAs that are in pretty good shape to start with (most stock IVAs require a lot of extra work, because they were not modeled very well).

Ultimately, if you want more command pods that use MAS, one way to make that happen is to learn to make IVAs.  Once you have Unity configured, it's not hard to do - it can be time-consuming, especially when you've got to find the right props for what you're trying to do.  Otherwise, it's a case of waiting for someone to step in and take a stab at it themselves.  I've been very busy IRL with work, so I don't know when I'll be able to finish the IVAs that I am currently working on.

Link to comment
Share on other sites

I got pinged because I was linked! Thanks!

Reminds me I still need to overhaul my dragon so the IVA looks much better than what it does now..

Any info on those touch screens?

Edited by damonvv
Link to comment
Share on other sites

19 hours ago, MOARdV said:

I've got links to two of the mods that I know use MAS IVAs on the OP (both of the IVAs, I made).  I know there was a space shuttle IVA that was a hybrid of MAS and RPM, but I don't think it's been updated since it released a year or two ago.

The problem is that this mod spent 3+ years in development, and most modders (understandably) don't want to adopt something unfinished, especially for IVA.  IVA takes a long time to develop if you're going to make it good - the Mk1 Mercury IVA took me over 20 hours to design, set up, test, and tweak.  The Apollo IVA I made took over 40 hours.  And that's with IVAs that are in pretty good shape to start with (most stock IVAs require a lot of extra work, because they were not modeled very well).

Ultimately, if you want more command pods that use MAS, one way to make that happen is to learn to make IVAs.  Once you have Unity configured, it's not hard to do - it can be time-consuming, especially when you've got to find the right props for what you're trying to do.  Otherwise, it's a case of waiting for someone to step in and take a stab at it themselves.  I've been very busy IRL with work, so I don't know when I'll be able to finish the IVAs that I am currently working on.

I can understand that, hopefully more people will pick it up in time. And I'll look into how to make IVA's, maybe it could actually be done. Thanks man :)

Link to comment
Share on other sites

8 hours ago, HalfdeadKiller said:

Is it recommended to use just MAS prefixed props, or can you use a mixture of ASET and MAS?

If it's a prop that does something (button, light, MFD), you need to use MAS-prefixed props for it to function in MAS.  The ASET-prefixed props were designed for RPM.  (Although there is nothing preventing a mix of MAS and RPM props, as long as both MAS and RPM are installed)

Link to comment
Share on other sites

15 hours ago, HalfdeadKiller said:

Ah, that's what I figured. Another question, is it possible to tie a single rotary switch to turn based on two variables? For example, having a 3 position rotary switch that toggles between having RCS translate, Full RCS, or RCS Rotation.

That'd be fairly easy to do.  It would require a small Lua script to manage setting the two modes, but the rest of it is straight forward MAS config file stuff.  I might even be able to find some time to put it together this week - it sounds like a prop I should have thought of, instead of having two separate switches.

Link to comment
Share on other sites

Well Lua is a bit beyond my current knowledge, and I'm not sure if I want to try learning it right now. So any assistance on your part would be excellent. Though I have ran into another issue with trying to resurrect one of the ASET Temperature gauges. I got the backlighting to work, but I can't for the life of me to get the temperature to work. I don't really understand the variable syntax, or how (bool useKelvin) works, so any help on that would be appreciated.

 

The Error Log

Spoiler

[ERR 19:40:44.941] [AvionicsSystems] TryParse(fc.InternalTemperature(bool useKelvin)) threw an exception:

[ERR 19:40:44.941] [AvionicsSystems] System.Exception: Expected token RIGHT_PAREN and found NAME useKelvin
  at AvionicsSystems.CodeGen.Parser.consume (LuaToken expected) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.CallParselet.parse (AvionicsSystems.CodeGen.Parser parser, Expression left, System.Text.Token token) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.parseExpression (Int32 precedence) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.parseExpression () [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.TryParse (System.String source) [0x00000] in <filename unknown>:0

[ERR 19:40:44.942] [MASComponent] Error configuring prop #27 (MAS_ASET_AIRCRAFT_INT_TempGauge)

[ERR 19:40:44.942] [MASComponent] Error in ROTATION LargeTempHand:

[ERR 19:40:44.942] [MASComponent] System.ArgumentException: Error parsing variable "fc.InternalTemperature(bool useKelvin)" ---> MoonSharp.Interpreter.SyntaxErrorException: ')' expected (to close '(' at line 1) near 'useKelvin'
  at MoonSharp.Interpreter.Tree.NodeBase.CheckMatch (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, MoonSharp.Interpreter.Tree.Token originalToken, TokenType expectedTokenType, System.String expectedTokenText) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expressions.FunctionCallExpression..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, MoonSharp.Interpreter.Tree.Expression function, MoonSharp.Interpreter.Tree.Token thisCallName) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.PrimaryExp (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.SimpleExp (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.SubExpr (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, Boolean isPrimary) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.Expr (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.ExprList (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.ReturnStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statement.CreateStatement (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, System.Boolean& forceLast) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.CompositeStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.ChunkStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Fast_Interface.Loader_Fast.LoadChunk (MoonSharp.Interpreter.Script script, MoonSharp.Interpreter.Debugging.SourceCode source, MoonSharp.Interpreter.Execution.VM.ByteCode bytecode) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at AvionicsSystems.MASFlightComputer.RegisterVariableChangeCallback (System.String variableName, .InternalProp prop, System.Action`1 callback, Boolean initializeNow) [0x00000] in <filename unknown>:0
  at AvionicsSystems.VariableRegistrar.RegisterVariableChangeCallback (System.String name, System.Action`1 action, Boolean initializeNow) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponentRotation..ctor (.ConfigNode config, .InternalProp prop, AvionicsSystems.MASFlightComputer comp) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponent.CreateAction (.ConfigNode config, .InternalProp prop, AvionicsSystems.MASFlightComputer comp) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponent.Start () [0x00000] in <filename unknown>:0

[ERR 19:40:44.942] [AvionicsSystems] INITIALIZATION ERROR: Error configuring prop #27 (MAS_ASET_AIRCRAFT_INT_TempGauge)

[ERR 19:40:44.943] [AvionicsSystems] TryParse(fc.InternalTemperature(bool useKelvin)) threw an exception:

[ERR 19:40:44.943] [AvionicsSystems] System.Exception: Expected token RIGHT_PAREN and found NAME useKelvin
  at AvionicsSystems.CodeGen.Parser.consume (LuaToken expected) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.CallParselet.parse (AvionicsSystems.CodeGen.Parser parser, Expression left, System.Text.Token token) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.parseExpression (Int32 precedence) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.parseExpression () [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.TryParse (System.String source) [0x00000] in <filename unknown>:0

[ERR 19:40:44.943] [MASComponent] Error configuring prop #27 (MAS_ASET_AIRCRAFT_INT_TempGauge)

[ERR 19:40:44.943] [MASComponent] Error in ROTATION SmallTempHand:

[ERR 19:40:44.943] [MASComponent] System.ArgumentException: Error parsing variable "fc.InternalTemperature(bool useKelvin)" ---> MoonSharp.Interpreter.SyntaxErrorException: ')' expected (to close '(' at line 1) near 'useKelvin'
  at MoonSharp.Interpreter.Tree.NodeBase.CheckMatch (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, MoonSharp.Interpreter.Tree.Token originalToken, TokenType expectedTokenType, System.String expectedTokenText) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expressions.FunctionCallExpression..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, MoonSharp.Interpreter.Tree.Expression function, MoonSharp.Interpreter.Tree.Token thisCallName) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.PrimaryExp (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.SimpleExp (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.SubExpr (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, Boolean isPrimary) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.Expr (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.ExprList (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.ReturnStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statement.CreateStatement (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, System.Boolean& forceLast) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.CompositeStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.ChunkStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Fast_Interface.Loader_Fast.LoadChunk (MoonSharp.Interpreter.Script script, MoonSharp.Interpreter.Debugging.SourceCode source, MoonSharp.Interpreter.Execution.VM.ByteCode bytecode) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at AvionicsSystems.MASFlightComputer.RegisterVariableChangeCallback (System.String variableName, .InternalProp prop, System.Action`1 callback, Boolean initializeNow) [0x00000] in <filename unknown>:0
  at AvionicsSystems.VariableRegistrar.RegisterVariableChangeCallback (System.String name, System.Action`1 action, Boolean initializeNow) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponentRotation..ctor (.ConfigNode config, .InternalProp prop, AvionicsSystems.MASFlightComputer comp) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponent.CreateAction (.ConfigNode config, .InternalProp prop, AvionicsSystems.MASFlightComputer comp) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponent.Start () [0x00000] in <filename unknown>:0

[ERR 19:40:44.943] [AvionicsSystems] INITIALIZATION ERROR: Error configuring prop #27 (MAS_ASET_AIRCRAFT_INT_TempGauge)

[ERR 19:40:44.944] [AvionicsSystems] TryParse(fc.InternalMaxTemperature(bool useKelvin)) threw an exception:

[ERR 19:40:44.944] [AvionicsSystems] System.Exception: Expected token RIGHT_PAREN and found NAME useKelvin
  at AvionicsSystems.CodeGen.Parser.consume (LuaToken expected) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.CallParselet.parse (AvionicsSystems.CodeGen.Parser parser, Expression left, System.Text.Token token) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.parseExpression (Int32 precedence) [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.parseExpression () [0x00000] in <filename unknown>:0
  at AvionicsSystems.CodeGen.Parser.TryParse (System.String source) [0x00000] in <filename unknown>:0

[ERR 19:40:44.944] [MASComponent] Error configuring prop #27 (MAS_ASET_AIRCRAFT_INT_TempGauge)

[ERR 19:40:44.944] [MASComponent] Error in ROTATION MaxTempMarker:

[ERR 19:40:44.944] [MASComponent] System.ArgumentException: Error parsing variable "fc.InternalMaxTemperature(bool useKelvin)" ---> MoonSharp.Interpreter.SyntaxErrorException: ')' expected (to close '(' at line 1) near 'useKelvin'
  at MoonSharp.Interpreter.Tree.NodeBase.CheckMatch (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, MoonSharp.Interpreter.Tree.Token originalToken, TokenType expectedTokenType, System.String expectedTokenText) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expressions.FunctionCallExpression..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, MoonSharp.Interpreter.Tree.Expression function, MoonSharp.Interpreter.Tree.Token thisCallName) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.PrimaryExp (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.SimpleExp (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.SubExpr (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, Boolean isPrimary) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.Expr (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Expression.ExprList (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.ReturnStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statement.CreateStatement (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext, System.Boolean& forceLast) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.CompositeStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Statements.ChunkStatement..ctor (MoonSharp.Interpreter.Execution.ScriptLoadingContext lcontext) [0x00000] in <filename unknown>:0
  at MoonSharp.Interpreter.Tree.Fast_Interface.Loader_Fast.LoadChunk (MoonSharp.Interpreter.Script script, MoonSharp.Interpreter.Debugging.SourceCode source, MoonSharp.Interpreter.Execution.VM.ByteCode bytecode) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at AvionicsSystems.MASFlightComputer.RegisterVariableChangeCallback (System.String variableName, .InternalProp prop, System.Action`1 callback, Boolean initializeNow) [0x00000] in <filename unknown>:0
  at AvionicsSystems.VariableRegistrar.RegisterVariableChangeCallback (System.String name, System.Action`1 action, Boolean initializeNow) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponentRotation..ctor (.ConfigNode config, .InternalProp prop, AvionicsSystems.MASFlightComputer comp) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponent.CreateAction (.ConfigNode config, .InternalProp prop, AvionicsSystems.MASFlightComputer comp) [0x00000] in <filename unknown>:0
  at AvionicsSystems.MASComponent.Start () [0x00000] in <filename unknown>:0

[ERR 19:40:44.944] [AvionicsSystems] INITIALIZATION ERROR: Error configuring prop #27 (MAS_ASET_AIRCRAFT_INT_TempGauge)

 

The Prop.cfg

Spoiler

PROP
{
  name = MAS_ASET_AIRCRAFT_INT_TempGauge
  MODEL
    {
        model = ASET/ASET_Avionics/ClassicPack/ASET_TemperatureGauge/ASET_TemperatureGauge
    }
 
// hand rotation

    MODULE
    {
        name = MASComponent

// Main temperature hand            

        ROTATION
        {
            name = LargeTempHand
            range = 0,1500
            variable = fc.InternalTemperature(bool useKelvin)   
            transform = Temp_arrow
            startRotation = 0,0,0
            endRotation = 0,360,0
            longPath = true
        }
// small temperature hand                

        ROTATION
        {
            name = SmallTempHand
            range = 0,3000
            variable = fc.InternalTemperature(bool useKelvin)   
            transform = Temp100_arrow
            startRotation = 0,0,0
            endRotation = 0,10800,0
            longPath = true
        }
        
// MAX temp mark animation ---------------------------------

        ROTATION
        {
            name = MaxTempMarker
            range = 0,1500
            variable = fc.InternalMaxTemperature(bool useKelvin)     
            transform = MaxTempMarkObj
            startRotation = 0,0,0
            endRotation = 0,360,0
            longPath = true
        }

// Backlight emissive ---------------------------------

        COLOR_SHIFT
        {
            name = GaugeBacklight
            transform = Temp_Scale
            passiveColor = COLOR_ASET_AIRCRAFTGAUGESCALE_PASSIVECOLOR
            activeColor = COLOR_ASET_AIRCRAFTGAUGESCALE_ACTIVECOLOR
            variable = fc.Conditioned(fc.GetPersistentAsNumber("Backlight"))
            blend = true
        }
        
        COLOR_SHIFT
        {
            name = HandLighting
            transform = Temp_arrow, Temp100_arrow
            passiveColor = COLOR_ASET_AIRCRAFTGAUGEHAND_PASSIVECOLOR
            activeColor = COLOR_ASET_AIRCRAFTGAUGEHAND_ACTIVECOLOR
            variable = fc.Conditioned(fc.GetPersistentAsNumber("Backlight"))
            blend = true
        }
    }
}

 

Link to comment
Share on other sites

For starters, replace "bool useKelvin" with "true" or "false", depending on whether you want it to use kelvin scale or not.

It say so right in the error log.

Edited by Guest
Link to comment
Share on other sites

16 minutes ago, Dragon01 said:

For starters, replace "bool useKelvin" with "true" or "false", depending on whether you want it to use kelvin scale or not.

It say so right in the error log.

Well, the error log didn't really specifically state it was expecting a true/false. And since I don't know how the variables work I couldn't interpret that information from the error log. Replacing "bool useKelvin" with true has stopped the error log from tossing errors, however the needle's have not moved any. This gauge is being placed onto a KV-1 Pod with maxTemp = 1400, skinMaxTemp = 2400, and ablationTempThresh = 500. Module Manager currently replaces the INTERNAL module with a custom one, which I'm fiddling with right now. The Max Temp Marker also hasn't moved it's position.

Link to comment
Share on other sites

No, documentation specifically stated it was intended to be true/false. That's what "bool" (short for boolean) means. The log told you where the problem was. What it was, once you've located it, is most often quite obvious. 

Do note that KSP's temperature system is temperamental. If the needle doesn't move, chances are the temperature you're asking it to report isn't what you think it is. Try making it report throttle position (multiplied accordingly, so it has similar range to temperature). Make sure you're actually looking at your gauge and not the identical one from RPM. Debugging MAS controls has a bit of a learning curve. Be grateful it's not as bad as in the early days, where having one part wrong crashed the whole thing. If you were working on an MFD with many different components, you only had the log and the docs to go by.

Link to comment
Share on other sites

10 hours ago, HalfdeadKiller said:

Well, the error log didn't really specifically state it was expecting a true/false. And since I don't know how the variables work I couldn't interpret that information from the error log. Replacing "bool useKelvin" with true has stopped the error log from tossing errors, however the needle's have not moved any. This gauge is being placed onto a KV-1 Pod with maxTemp = 1400, skinMaxTemp = 2400, and ablationTempThresh = 500. Module Manager currently replaces the INTERNAL module with a custom one, which I'm fiddling with right now. The Max Temp Marker also hasn't moved it's position.

To expand on what Dragon01 said - the documentation at the site describes functions that MAS provides using programmer notation.  The stuff in parentheses tell you the parameter type + a descriptive name for the parameter.  For your example,

fc.InternalTemperature(bool useKelvin)

the 'bool' means it's a boolean value (true or false), and 'useKelvin' (per the documentation here) says that if the boolean is 'true', the value that is returned is in Kelvin, but if it's 'false', it's in Celsius.

Other parameter types you'll commonly see are 'double' - which means a number (although some functions have restrictions on what numbers work - you'll see that mentioned in the documentation), and 'string' which means a string of text in quotation marks.  There is also 'object', which usually means you can use either a number or a string.

As for the results of 'fc.InternalMaxTemperature(true)' - the max temp should be working.  It could be something in the prtop config needs some tweaking - I haven't converted any of the ASET_TemperatureGauge props yet, so I don't know off the top of my head.  That might be something I can look at this weekend.

Link to comment
Share on other sites

Ah. I see. Thank you for the help both Dragon01 and MOARdV. I have been perusing the documentation, and I am really appreciative of the organization. I'm just not well versed in actual proper programming. I'm like 99 percent sure that the gauge I'm working with is the correct temperature gauge. I've only converted over one ASET Temperature prop, and put a MAS Prefix to it. I tried setting the variable for needle to use the throttle and it still didn't move, so I must be missing something in the prop config. I'm not entirely sure what however. I basically put the ASET thermal gauge, and a MAS gauge that uses a needle next to eachother in notepad++, and then manually updated the things that were different or missing on the thermal gauge. It looks like I have it correct, but clearly it isn't since it doesn't work.

Edit: In the part, I tried changing the internal temperature variable to the skin temperature variable to check if maybe that variable wasn't working. Unfortunately that didn't really work either, so I'm thinking it's the configuration of the arrow rotation, and not necessarily the variable.

Spoiler

PROP
{
  name = MAS_ASET_AIRCRAFT_INT_TempGauge
 
  MODEL
    {
        model = ASET/ASET_Avionics/ClassicPack/ASET_TemperatureGauge/ASET_TemperatureGauge
        texture = ASET_SKIN_TemperatureGauge_Diffuse,ASET/ASET_Avionics/ClassicPack/ASET_TemperatureGauge/ASET_INTERNAL_TemperatureGauge_Diffuse
    }
 
// hand rotation

    MODULE
    {
        name = MASComponent

// Main temperature hand            

        ROTATION
        {
            name = LargeTempHand
            range = 0,1500
            variable = fc.Conditioned(fc.GetThrottle())
//            variable = fc.PodTemperature(true)   
            transform = Temp_arrow
            startRotation = 0,0,0
            endRotation = 0,360,0
            cycleRate = 1.0
            longPath = true
        }
// small temperature hand                

        ROTATION
        {
            name = SmallTempHand
            range = 0,3000
            variable = fc.PodTemperature(true)   
            transform = Temp100_arrow
            startRotation = 0,0,0
            endRotation = 0,10800,0
            longPath = true
        }
        
// MAX temp mark animation ---------------------------------

        ROTATION
        {
            name = MaxTempMarker
            range = 0,1500
            variable = fc.PodMaxTemperature(true)     
            transform = MaxTempMarkObj
            startRotation = 0,0,0
            endRotation = 0,360,0
            longPath = true
        }

// Backlight emissive ---------------------------------

        COLOR_SHIFT
        {
            name = GaugeBacklight
            transform = Temp_Scale
            passiveColor = COLOR_ASET_AIRCRAFTGAUGESCALE_PASSIVECOLOR
            activeColor = COLOR_ASET_AIRCRAFTGAUGESCALE_ACTIVECOLOR
            variable = fc.Conditioned(fc.GetPersistentAsNumber("Backlight"))
            blend = true
        }
        
        COLOR_SHIFT
        {
            name = HandLighting
            transform = Temp_arrow, Temp100_arrow
            passiveColor = COLOR_ASET_AIRCRAFTGAUGEHAND_PASSIVECOLOR
            activeColor = COLOR_ASET_AIRCRAFTGAUGEHAND_ACTIVECOLOR
            variable = fc.Conditioned(fc.GetPersistentAsNumber("Backlight"))
            blend = true
        }
    }
}

 

Edited by HalfdeadKiller
Link to comment
Share on other sites

On 7/26/2019 at 8:17 AM, HalfdeadKiller said:

Edit: In the part, I tried changing the internal temperature variable to the skin temperature variable to check if maybe that variable wasn't working. Unfortunately that didn't really work either, so I'm thinking it's the configuration of the arrow rotation, and not necessarily the variable.

It turns out you almost had it - the only thing missing was a "blend = true".

MAS v1.0.1 is now available.  This release adds the following props: MAS_swRotary3_RCSMode, which uses a single rotary switch to control whether RCS can be used to rotate, translate, or rotate and translate the vessel.  It also adds all three ASET aircraft temperature gauges (MAS_ASET_Aircraft_Engine_TempGauge, MAS_ASET_Aircraft_Int_TempGauge, and MAS_ASET_Aircraft_Skin_Gauge).  Thanks to @HalfdeadKiller for prompting me to get all of those working.

Link to comment
Share on other sites

  • 3 weeks later...

So, this lists the ASET prop packs as dependencies, and those list RPM as a dependency. My guess is that they're dependencies for their models and not their actual functions, so RPM isn't a dependency of this mod, but perhaps you should make that a bit more clear?
Regardless, this mod looks excellent, and I can't wait to see what people make with it! And if I had the knowledge (and a KSP install that didn't take 30min to load), I'd probably try my hand at making an IVA or two with this myself!

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