Jump to content


  • Posts

  • Joined

  • Last visited


2,376 Excellent

Profile Information

  • About me
    IVA Creator and Enabler

Recent Profile Visitors

17,332 profile views
  1. I will reply by private message soon. That way, we do not fill the MAS forum thread with Lua programming questions.
  2. This is a little tricky - the game loop in Unity calls the MAS code ten times per second, and if something in a MAS script pauses for two seconds, the entire game will hang for that amount of time. What you need to do is have two parts - one part where you set a timer (such as using onClick, or in a different script), and a trigger event that looks for the timer. -- In a collider onClick event onClick = fc.SetPersistent("VP_Event_Trigger_Time", fc.UT() + 2) -- TRIGGER_EVENT variable = fc.GetPersistentAsNumber("VP_Event_Trigger_Time") >= fc.UT() autoRepeat = false The audio clip name needs to be a "string" surrounded with quotation marks: fc.PlayAudio("VexarpIVA/VexarpIVACore/Sounds/Startup/warning", 100, false)
  3. What do you want the button to do? Press the button to pause RGB mode, press again to start it? Press the button to start RGB mode, press again and the divider becomes a color (like white, or whatever color) and pauses? 1 is easy to do - the collider on the button would be onClick = fc.TogglePersistent("VEX_RGB_ENABLE") The beginning of the Lua script would be function onTick() if fc.GetPersistentAsNumber("VEX_RGB_ENABLE") == 0 then return end -- Rest of function, same as it is now This will make the RGB mode pause when VP_RGB_ENABLE is 0. fc.TogglePersistent("VP_RGB_ENABLE") changes VP_RGB_ENABLE from 0 to 1, or from 1 to 0, each time it is pressed. You do not need an extra TRIGGER_EVENT that way. If you want option 2, it is the same, except in the Lua script: function onTick() if fc.GetPersistentAsNumber("VEX_RGB_ENABLE") == 0 then fc.SetPersistent("VEX_RGB_RED", 255) fc.SetPersistent("VEX_RGB_GREEN", 255) fc.SetPersistent("VEX_RGB_BLUE", 255) return end -- Rest of function, same as it is now
  4. That is a custom function that your friend wrote. With what you have, you are 99% done with something you can test. Change RGB_Backlight.cfg like this (one new component): TRIGGER_EVENT will call the script 10x per second. The Lua script may need some debugging. The 'x' and 'y' variable might need to be declared outside of the function body - I think, the way they are written, they are always going to be set to '0' and 'false' each time the script is called, so the color will not change. The formula used to set the color needs changed - it will set each color to a value between -255 and +255 (anything less than zero will be treated as zero). Maybe instead use 127.5 + math.sin(x) * 127.5 127.5 + math.sin(x + 2) * 127.5 127.5 + math.sin(x + 4) * 127.5 One thing that may happen - the more dividers you have, the faster it might change, since the TRIGGER_EVENT is on each prop, and each prop is going to call OnTick(). I think the script might need a small change to prevent that, but I'll need to look at it in the morning.
  5. I actually thought about rainbow mode when I was writing the response. To answer your question, yes, it's possible to create a script for it, although it will change all of the dividers at the same time (no wave effects). It will be a little bit more complicated. When I finish work today, I will see if I can put it together quickly.
  6. Yes, you can create color shifting panel dividers. You will need to create a new part config, but those props are very, very simple: You will have 3 persistent variables to control the colors (one each for red, green, and blue). You can then add a switch or some dials that control the color, or automate the color.
  7. Did you post this in the wrong thread? Neither MAS nor its dependencies (ASET Props) are in the log you've posted.
  8. For what it's worth, the ROCapsules DSKY looks like it's the ASET DSKY. In KSP, props that the player can interact with have colliders on them covering the button or switch that the user clicks in IVA. The DKSY prop has 14 buttons - the square buttons on the bottom. The text on those buttons are part of the texture, so you would have to use an alternate texture to change what's displayed on them. The lamps to the left of the main display are all indicator lamps. Unless you modify the model to add colliders to them, they are not clickable (I would recommend that you don't try to make them clickable - they're close together, so it'd be easy to hit the wrong one by accident). The text is defined in the config file, so it's easy to change what they lamps display, as well as what color the backlight for them is. The numeric display is a MAS Monitor with an 8 character / 5 row display. The small green bars with text in the middle of the numeric display also have text defined in the config file, so you can change those. However, the size of the green bars is not changeable (it's part of the model). For reference, the MAS config file for the prop is in GameData/MOARdV/MAS_ASET/ASET_DSKY/ASET_DSKY.cfg MAS does not support reading or writing files during play, so it's not going to support reading / writing JSON files. I have plans to add kOS interop to MAS, but I've had a lot going on in RL, and there are higher priority MAS tasks I need to complete before I implement kOS support. There may be other MAS-related questions I didn't answer - please feel free to ask.
  9. Yeah, I didn't bother adding support to the JSI camera, since ASET has a decent looking external camera. I'll add a patch similar to yours in the next MAS release, along with the improved ASET camera that alexustas made a few years ago for MAS - this camera model has a body that rotates and pitches so the lens faces where the camera is pointed.
  10. I can add that in a future update. You could work around it short-term by adding a custom preset that sets the range to 400, but the slider would still be capped at 50, so you wouldn't be able to adjust it without exiting and editing the preset
  11. They aren't mutually exclusive. You can install both, and RPM props will still work using RPM. MAS props will use MAS. Eventually, I will finish making MAS versions of all the ASET props, and then a huge MM patch will be able to update all RPM props to MAS.
  12. It's not done yet, since I haven't converted all the hundreds of ASET RPM props to MAS yet. It'll be done eventually, but some of the props take a lot of work (particularly the MFDs).
  13. Okay, that must be what I was thinking about, then. It's been a few years since I looked at that. I need to go back and figure out how I got that to work, then. Since @ElonsMusk reminded me that there was a seat position adjuster already in RPM, I should be able to get it working in MAS as well, with some additional functionality. I tried making an IVA for the stock Mk 1-3 pod. The problem is that the crew do not sit next to each other. The center seat is closer to the console than the other two, so it is really difficult to use a single prop size for the entire console. If you make props sized so they look right on the center seat, they look tiny for the other two crew. And if you make them easier to read for those two, they're huge for the center seat. It's a real shame, too, since I wanted to use that IVA for an Apollo-style setup. Adapting the IVA for the stock pod is possible, but it'd be a lot of work. Some of the components in that IVA are specific to the BDB Saturn V stack, so they'd be decorations if the command pod is on a different launch system.
  14. I think the answer is "it depends". If the seats are built in to the IVA mesh, then moving the seats may cause the interior to look messed up. If the seats are props, I think you should be able to use a one-shot TRANSLATION on the root node of the prop to get it to reposition (or tie the TRANSLASTION to a control, so the crew member can adjust the seat as needed). alexustas made a seat that had height adjustment so female Kerbals could have the same viewpoint as male Kerbals. I don't remember how he got the Kerbal and their viewpoint to move with the prop. and the prop was never released. It might be that MAS would need some changes to make sure everything gets moved together - prop, Kerbal model, and Kerbal camera. I'll add a GitHub issue to remind me to dig into that when I've got time to dedicate to modding.
  15. Interior lights are tricky. You have to inspect the IVA model (there is a mod called DebugTools that can do that in the game) to locate the transforms that have the interior lights. Once you identify the light's transform, you would have to look at the prop configs for interior light controls to find one that controls that transform. If the prop does not exist, you will have to create a new prop, which is as easy as copying an existing interior light control, giving it a new name, and changing its interior light transform. I have not used the Vulkan IVA, so I am not sure what that switch was that turned on the screens. It may be a power switch that turns on generators.
  • Create New...