1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

KSP Scripting wishlist

Discussion in 'Feature Suggestions' started by ASCap, Jun 19, 2018.

  1. ASCap

    ASCap New Member

    Messages:
    12
    • Vertical sliders
    • Center text vertically in a label
    • Create a multiline label within the initial set_text() command (maybe using \n for a new line?), and deprecate the command to add a new line
    • Meters to display output of individual groups
    • Ability to pass a value (number, string, variable, etc.) in a user-defined function. e.g.:
      • function my_function(x)
        ... (uses x somewhere in here)...
        end function

        call my_function($test)
     
  2. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    1. Vertical sliders are already possible (use your own graphics).
    2. Centering text is sorta possible by using $CONTROL_PAR_TEXTPOS_Y
    3. Eh, not a big deal.
    4. Agreed
    5. Would be nice but with SublimeKSP it's already kinda possible.
     
  3. ASCap

    ASCap New Member

    Messages:
    12
    1. Built-in would be nice. When you use your own graphics, what is usually the underlying UI element? Haven't tried this yet (custom graphics).
    2. I am looking for something like $CONTROL_PAR_TEXT_VALIGNMENT (0: top, 1: middle, 2: bottom).
    3. Right, that'd be more of a convenience thing.
    4. :thumbsup:
    5. You've piqued my interest. I will look into SublimeKSP. But what do you mean "kinda possible?" Is it a kludgy workaround like $CONTROL_PAR_TEXTPOS_Y?
     
  4. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    1. For custom sliders always use ui_slider. It is possible to adjust orientation of mouse movement by using $CONTROL_PAR_MOUSE_BEHAVIOUR. Negative values for vertical, positive for horizontal movement.
    2. I know what you mean, this is already possible by setting a value in pixels by yourself.
    5. Well basically it works exactly how you typed it in (except you don't use the "call" keyword), then after you compile the script everything works. You need: Sublime Text 3 text editor, install Package Control plugin for it, then via package control install plugin called "KSP (Kontakt Script Processor)". Or if you don't wanna mess with Package Control, download the whole repo from here and install it manually (check the wiki on the repo for description of added functionality by this awesome compiler).
     
    • Informative Informative x 1
  5. ASCap

    ASCap New Member

    Messages:
    12
    Did the package control thing. I am hooked. Looking forward to discovering more of the shorthand/added features.
     
  6. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Sounds like you have prior programming experience. That is good. Welcome! :)
     
    • Like Like x 1
  7. ASCap

    ASCap New Member

    Messages:
    12
    I was able to get the vertical mouse movement on the ui_slider. But how do you get around the obvious problem?: At the slider's max value (at a normal drag speed), the mouse is no longer on top of the slider, so letting go and clicking again would not allow you to drag back down the slider's value.
     
  8. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    This is where you adjust the value of mouse behavior. From 0 to 5000 or 0 to -5000 depending on direction. The correct number will depend on the length of the slider graphic used. Needs trial and error, there's no silver bullet here. I usually start around -500.
     
    • Informative Informative x 1
  9. ASCap

    ASCap New Member

    Messages:
    12
    I just tried this out with a custom knob image & got the hang of it, so I will have to try it out with some vertical slider image next.
     
  10. ASCap

    ASCap New Member

    Messages:
    12
    You know what I think I was confused with... the fact that NI's default ui_slider is simply just an image with an animation, as well. I was somehow convinced that whatever image you used in place of the slider, you still had to be conscious of the ui_slider's original position, width, and handle. I think I understand better now that (and correct me if I'm wrong about this) your image completely replaces the built-in Kontakt slider image, and any mouse clicks/drags/movements take effect when clicking in the region of your new image file, wherever it sits in the UI.
     
  11. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    That is correct.
     
    • Like Like x 1
  12. Elpiniki @ NI

    Elpiniki @ NI NI Team NI Team

    Messages:
    3
    Hey all,

    Thank you for the KSP wishlist! We have added the request for Meters to display output of individual groups to our backlog. We don't have an estimate yet but we will keep you updated!

    Best,
    Elpiniki :)
     
    • Like Like x 1
  13. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Elpiniki @ NI That's nice to hear! :)

    Please also don't forget that it would be very cool to attach the level meter after a particular FX slot, not just at group output. :) After all, the KSP command seems like it was made to support exactly that, but this support was never actually implemented: attach_level_meter(<UI ID>, <group ID>, <slot ID>, <channel ID>, <bus ID>)

    And it would be really nice if we had a way to skin meters, as well.
     
  14. Elpiniki @ NI

    Elpiniki @ NI NI Team NI Team

    Messages:
    3
    All noted! :)