Jump to content

vulkans

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by vulkans

  1. The colorName field refers to the internal name of the color for the corresponding texture on any given mesh's assigned shader. Using the DigitalIndicator model as an example, that part of the mesh is using the KSP specular shader which has two available colors that can be manipulated: _Color: The RGBA values for the diffuse (or base) color of the texture. Note that this isn't a transparent shader, the alpha value in this case will control the amount of specularity. _SpecColor: The RGBA values for the specular color that will be applied on top of the base texture, which shows up as a slight shiny tint when viewed head-on against a direct light source, this effect is not mapped so it will affect the entire mesh. There is also _RimColor and _TemperatureColor, which I've always assumed are used for highlight and re-entry effects respectively, I've never tried manipulating these on props through MAS but something interesting to note with these is that both of the colors are bound to the emissive component of the shader, might be worth experimenting with that. For meshes that use any of KSP's emissive shaders, the corresponding color is called _EmissiveColor.
  2. It would be done with a COLOR_SHIFT node: COLOR_SHIFT { name = DigitalIndicator Recolor transform = DigitalIndicator.001 passiveColor = 100, 100, 100, 255 activeColor = 255, 100, 100, 255 variable = fc.GetPersistentAsNumber("Backlight") blend = true colorName = _Color } That would go in the MAS_DigitalIndicator_XXX.cfg file of your choice, inside the MASComponent module. In this example, the base color for the DigitalIndicator.001 mesh will go from grey to red-ish based on the Backlight variable, which is the variable that practically every MAS IVA uses for controlling the emissive backlights on props that have them. The control variable can be anything that you want, meaning you could create a button that toggles a variable called "MAS_DigitalIndicator_Recolor" between 0 and 1, and change 'variable = fc.GetPersistentAsNumber("Backlight")' to 'variable = fc.GetPersistentAsNumber("MAS_DigitalIndicator_Recolor")', then the DigitalIndicator.001 mesh would change between colors whenever you press the button. To enable emissive support for the prop, it would either need to be recompiled with the proper shader, or preferably just re-made from scratch as this is a very simple object to model.
  3. Assuming the model is DigitalIndicator.mu, the mesh name is 'DigitalIndicator.001' but note that this mesh doesn't use an emissive shader, you will only be able to change its base color by manipulating the _Color field.
  4. ksp.log:30658- "[ERR 16:36:37.199] [MASLoader] Exception caught trying to load script "PoppaWheelieWorkshop/Scripts/PW_Keypad.lua": System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\Kerbal Space Program\KSP 1 Instances\KSP v 1.12.4 - My IVA Mods - Test\GameData\PoppaWheelieWorkshop\Scripts\PW_Keypad.lua"." Something is causing the .lua file to not load, assuming the path is correct, are you maybe using a non-English OS? Or maybe there's atypical characters in the pathname? Maybe run scandisk/fsck?
  5. Has adding the missing then statement fixed ksp.log:33520- "[ERR 13:22:59.528] [AvionicsSystems] INITIALIZATION ERROR: User Script Loading error", or is it still throwing it?
  6. You've forgotten the corresponding THEN pair for the IF statement in PW_Keypad_Decimal(). IF fc.GetPersistentAsNumber("PW_keypadDecimal") == 1 THEN One other thing you may want to consider is storing the value of PW_keypadDecimal and comparing that instead- function PW_Keypad_Decimal(dummy) local value = fc.GetPersistentAsNumber("PW_keypadDecimal") if value == 1 then fc.AppendPersistent("PW_keypadDisplay", ".", 10) fc.SetPersistent("PW_keypadDecimal", 0) end end As the value of PW_keypadDecimal might be an unexpected type due to how MAS handles persistent variables.
  7. A TRIGGER_EVENT on the button would work, TRIGGER_EVENT { name = Animation Blend event = fc.AddPersistentClamped("Global_Animation_Blend", 0.01, 0, 1) variable = fc.GetPersistent("%AUTOID%_Trigger") autoRepeat = true } On the same button's collider you would just toggle %AUTOID%_Trigger on push and toggle it off on release, COLLIDER_EVENT { name = Button Collider collider = MyButtonCollider onClick = fc.SetPersistent("%AUTOID%_Trigger", 1) onRelease = fc.SetPersistent("%AUTOID%_Trigger", 0) } Then connect the animator to Global_Animation_Blend, ANIMATION { name = Cool Animation animation = MyCoolAnimation variable = fc.GetPersistent("Global_Animation_Blend") } TRIGGER_EVENT will add 0.01 to Global_Animation_Blend every FixedUpdate, clamped between 0 to 1 since ANIMATION blends between those two values. It will fire whenever %AUTOID%_Trigger evaluates to 1. If you want to play the animation backwards, you could add an additional TRIGGER EVENT or a variable that toggles between -1 / 1 and use that to multiply and flip 0.01 to -0.01. 0.01 can be adjusted to determine how fast ANIMATION will blend through the animation.
  8. Place an empty gameobject and parent it to the seat, center it on the X and Y axis and lower it roughly at the base of your seat model, orient it Z+ to forward and Y+ to up IIRC. Name the gameobject something unique (Say, MySeatTransform) and reference it from an InternalSeat module within your INTERNAL config, eg: MODULE { name = InternalSeat seatTransformName = MySeatTransform } This will attach the Kerbal to the seat transform.
  9. It can get a bit confusing with some props, there's a couple of others that contain the PB label which can't be pushed like the solar panel indicator ones for example, the reason they contain the label is because they're derivatives of the push button model. One of the biggest challenges with working with MAS IVAs is remembering what everything is called. For the backlight on some buttons, keep in mind that they sometimes work off a separate "circuit" so to speak. An example of this are the pb_Clock set which won't light up unless toggle_Clock_Power is included and flipped to the on position. There are some Mechjeb and digital display props that also work like this. Backlights on non-MAS props will also not work. I should have also elaborated a bit on the pod lighting knobs, an area which can also get confusing pretty fast- A lot of pods include lights baked into the model itself, and quite often their reference names are always going to be different from one pod to the next as there's no standard way to name them. The included set of buttons and knobs targets a bunch of different reference names that I honestly don't know which pods they belong to so it's very unlikely they will work with the specific pod you are currently working with. The only exception to this is any prop targetting the "MAS_Generic_IntLight" name (Such as MAS_ASET_B-Knob_LD-Generic) within an "INT_LIGHT" object entry, MAS_Generic_IntLight will work on every available built-in light but you won't be able to manipulate them individually. To do this you would need to figure out the specific name of the light you're trying to manipulate (You can do this by importing the MU internal into Blender) and targetting the specific name of the light via the INT_LIGHT object, preferably by creating a custom prop to do this by copying an existing button or knob and changing the relevant values, an example of what the INT_LIGHT section of a knob would look like is: INT_LIGHT { name = Dash Light lightName = ConsoleLight intensity = fc.GetPersistentAsNumber("Dash_Lights") variable = fc.Conditioned(fc.GetPersistentAsNumber("Dash_Lights")) } In that case, the built-in light to be manipulated is called "ConsoleLight", the intensity is handled by a variable named "Dash_Lights" which is manipulated by: COLLIDER_EVENT { name = Knob Collider collider = b_KnobCollider onDragX = fc.AddPersistentClamped("Dash_Lights", %DRAG%, 0, 1) dragSensitivity = 0.4 } The other type of light you can work with is ones included within a prop such as "MAS_InternalOmniLight_3m_Utility" which you would also manipulate through a knob or a button, in this case MAS_InternalOmniLight_3m_Utility is setup to vary its intensity by way of the "Utility_Light" persistent variable which could be changed the same as in the above example. So when in doubt, just use MAS_Generic_IntLight and it should work for everything. Some highly recommended reading: https://github.com/MOARdV/AvionicsSystems/wiki
  10. There's a couple things you might be missing with the ventilator- do you also have a MAS_pb_Ventilator button somewhere to turn the fan on and off? The knob only controls the speed. The button is also setup as conditioned which means that if the pod is setup with the "RequiresPower" flag to true, it won't even light up until power is supplied through a prop that handles that. The buttons at 0:25 labelled "FWD/AFT", "L/R" and "UP/DN" aren't push buttons, There are two sets of these props which are meant to be readback only, one set is for reading back current RCS input and the other set is for reading back whether SAS or Mechjeb is handling any of the available rotational controls. In the Unity editor, is the button labelled "INPUT CTRL" prefixed with "MAS_"? As I can't seem to find it among the push button props myself, it might be an old RPM button that got stranded. Looking at your log there's a mod spamming a bunch of NaN warnings, if you can try running just MAS along with whatever you need for the pod to work and test if this helps with the other problems you're having.
  11. The knob you're looking for to control MAS_ALCORVentilator01_Animated is MAS_ASET_B-Knob-2pos-Ventilator.
  12. I've taken an interest in revisiting MAS over the past few months, and have been working on converting RPM props from the ASET avionics pack (Specifically from the modern folder, as those were of primary interest to me at the time). As @Beetlecat mentions, this is mostly an invisible effort as all these props are already working fine on RPM, but still an important but very time consuming step to undertake. Thankfully MAS makes this task much more straightforward to accomplish compared to RPM due to the many cool changes under the hood it has. Here's a bit of recording showing the NAV radios and HSI running on MAS: https://youtu.be/j5Xc7wgIVA8 Seeing as I've got lots of free time available, I'll continue working on the rest of the missing props and hope to share the end results with @MOARdV, hopefully with the full set of props available, more people can be encouraged to jump from RPM to MAS. Much kudos to @MOARdV for all the grand work, all of us 20 IVA players salute you!
×
×
  • Create New...