Line Tool+ - Ultimate Line/Shape Tool

  • Saturnity
    5th September Member 2 Permalink

    AI was used as a coding assistant during development

     

    For install: 

    Drop line_tool_plus.lua into the script folder.

    Script Manager browser under "Line Tool+" :)

    https://starcatcher.us/scripts?view=349

     

    Was trying to make something and was getting somewhat annoyed because I was trying to make a curve for something stupid simple, and realized that it's kind of annoying that we don't have a way to do something like in MS Paint or paint.net where you can do something simple like make a hollow shape, or a polyline, or a bezier line, or a line with a specific arc angle, whatever. Literally something that makes precise shape-making a lot easier for those that may want curved lines without the pain of manually doing it or using the circle shape weirdly. It started very simple, but I kept going "Ah wait but this would be kinda cool"

     

    Mind you, this might exist, I have no idea as I tried checking the Script Manager, but couldn't find anything, and I've done LuA work before so this wasn't too bad.

     

    Took a bit of finessing, but one main focus I wanted was that it doesn't rely on anything, so it should work just fine with whatever mods/scripts you add, as it's independent. It basically goes "What element is selected? I don't care what it is, just tell me" sorta dealio. So, to the actual script:

    There are 2 categories of things to toggle between. M cycles between the two

    1. Line category

    Quad - Bezier curve with 1 shaping handle

    Cubic - Bezier curve with 2 shaping handles

    Arc - circle arc between 2 points with an adjustable sweep angle

    Custom - Open polyline, each click is a new point and it will connect each point with the next one

     

    TLDR: Remember MS Paint and Paint.net how you had a line tool you can move the edges of and change the angle? Pretty much that. 

     

    2. Shape category

    Custom - Same as the above custom, it's a polyline, but it auto-closes back to the first point, so it will auto-connect the first point and the last point. Just a 'closed' version of the line mode.

    TRI/SQUARE/PENT/HEX/OCT/STAR/CIRCLE - Shape presets that you can place using a center origin, you can also click and drag to change the radius of the shape. Circle obviously is not a perfect circle, it uses a bunch of small segments.

     

    So, that's basically the summary, BUT there's more, and if you order right now, we'll throw in a free line made of pixels, just pay separate shipping and handling.

    Anyhow, for the preset shapes, you basically click once to set the center, then drag out to a second point. The distance sets the size, and you can also set the angle/rotation at the same time. After that, you can drag either handle to nudge it, or press [ or ] to rotate in 5 degree steps.

     

    Everything just uses whatever element you currently have selected and your current brush size and shape, so all the same drawing habits carry over for the most part. Shapes and lines basically still use the same brush as if you did the normal shift + drag or whatever.

     

    One thing as well: You can click and drag the ends of the line. You are not stuck with point 1 and point 2 in the spot you first picked.

     

    There are a few toggles that persist between sessions (at least on my end they saved lmao)

    G: Grid snap, 8px, all placements/drags snap to the grid. 

    F: Fill. This is nice because it lets you flood fill a shape, no more resizing your circle brush to make a thin oval or whatever, then scrolling back down with it to get it back to normal size.

    R: Repeat. After you 'print' it basically keeps the outline, so you can drag it somewhere else and place it again.

     

    I tried to make it so that the HUD was straightforward and didn't leave anything out, my memory is awful so half the time I forget what a button does, but I also tried to make it not super obtrusive. Active toggles show up on the HUD so you know what's happening.

     

    Keys review, bear with me:
    C - Turn the tool on/off

    M - Category select (so line or shape)

    Tab - Cycle mode within current category

    1-8 - (Alternative to tab) Jump to a specific mode (1-4 in line, 1-8 in shape, easier than pressing tab a dozen times)

    S - Open the settings menu

    G/F/R - Toggles for Grid/Fill/Repeat

    Enter/Right Click - Place a point/place the shape/press for "do the thing"

    Esc - Cancel or clear whatever shape is in progress

    Backspace - Undo last point (only works on the custom modes, since those do 'endless' points)

    Shift + drag - Angle snap while dragging (configurable in the settings menu, allows 5/10/15/30/45/90 degrees)

    [ / ] - Rotate preset shape by -+5 degrees

    , / . - Rotate preset shape -+1 degree (Also the arc angle in curve mode)

    + / - ARC angle 5 degree steps (And as stated above, , and . for 1 degree)

     

    Settings menu is opened with S, click any row to cycle it. There's also an option for HUD docking, I have the default set to the bottom left as that seems to be the most not-in-the-way but you may have a different opinion, so there's some other spots. There's also options for angle-snap stepping, on/off for grid/fill/repeat, and a "reset to defaults' and even a settings save to line_tool_plus.txt, so basically everything that has a button can also be simply done in the settings menu if you'd prefer.

     

    For install: 

    Drop line_tool_plus.lua into the script folder.

    Script Manager browser under "Line Tool+" :)

    https://starcatcher.us/scripts?view=349

     

     Example photos:

     

    Let me know if there are any issues, or if there's anything you suggest adding! 

    Edited 13 times by Saturnity. Last: 11th September
  • AerospaceFan
    5th September Member 0 Permalink

    is there a gui with buttons? if no can you make one beacuse im on mobile and this seems really cool

  • KyleTheCreator
    5th September Member 0 Permalink

    Holy on God and on the entire mutiverse this sh## is THE MOST IF NOT, THE GREATEST MOD TO EVER EXIST! !!! Can you make a script manager & mobile version????? I WILL LOVE YOU SO MUCH IF DO!!! I just want this tool sO MUCH! Orbits orbits!! I CAN DO ANYTHING (with this) everyone should have this!!! | Does it include orbit mechanics?? Space! Space!! SPACE!!!

    Edited once by KyleTheCreator. Last: 5th September
  • velsuki
    5th September Member 0 Permalink

    Hmm... issue: If i use another script with keybinds, it breaks, so what if i need to press modifier keys to do it.

  • Saturnity
    5th September Member 0 Permalink

    @AerospaceFan (View Post)

     Oh! I COMPLETELY forgot about mobile! I will try to figure something out, are there any screenshots or anything of the mobile layout for reference? Might be able to get my Bluestacks installation running.

    @KyleTheCreator (View Post)

     Fortunately, this is a script manager version! When I make updates it has to get approved, but usually it doesn't take em too long. I had it under a mediafire download, but I guess someone did some dumb stuff a while back with Mediafire and it's not allowed so I removed it haha. If you're in the DC let me know, I can just send the lua there or w/e

     

    I was super super surprised it doesn't exist, I was doing the goofiest thing, making a rocket nozzle for a game thingy someone posted, and I was like "Wait, how do I do a rao bell nozzle with a straight line tool? Booooo" and checked script manager and saw nothing existed, but since I've done LuA work semi-professionally I looked into TPT and figured it wouldn't be complicated at all, LuA is ridiculously versatile and it was super fun making this and seeing what was possible

     

    Orbit mechanics, I suppose? There's a tool that does allow basically creating hollow shapes and uses whatever brush you have enabled, so you can make a super thin circle around something. Always looking for new ideas, though, so if you have something specific let me know. 

     

    @velsuki (View Post)

     Hmm. Okay, interesting note. What are you using if I may ask, and what button is basically being used? I will probably add something that just allows you to bind the main options to anything. One thing so far it does is that it will basically 'deactivate' input for the game (hence why you can press 1-8 without turning the 'views' on haha) but it will probably be easier to just simply allow binding or de-binding buttons, so if someone needs tab for example they can just disable it and use 1-8, and same for the rest. Most are basically cosmetic, and all of them can be enabled/disabled with the settings, plus the script itself only runs once you press C, and then pressing C disables it and allows for normal gameplay. 

  • DMG
    6th September Member 1 Permalink
    @Saturnity (View Post)
    Good mod, I hope the devs add this to the game ^_^
  • Aklego-777
    6th September Member 0 Permalink

    Sure thing! Heres the android layout (latest one). And ignore the LUA symbol there, I just got a few mods there but I deactivated em for this

    https://kommodo.ai/i/LaKZNwY2EIIQ83ccY8rB

    (I couldnt figure out how to turn image to URL)

    Edited 2 times by Aklego-777. Last: 7th September
  • Saturnity
    6th September Member 1 Permalink

    WOOOOOOOH

     

    Okay, so, v1.2(?)
    Got bluestacks going, figured out that the mobile version is ridiculously simple and basically the same except for some simple changes, the game already has widget implementation so it's super easy to reassign stuff.

     

    @AerospaceFan (View Post)

    @KyleTheCreator (View Post)

     Added GUI buttons for mobile!

     

    @velsuki (View Post)

     Every key can now be rebinded to anything of your choosing, including even turning off the binding for some keys, as maybe you might not need the grid for example and you do need your G key back, you can basically go into the binds and unbind it entirely. Same goes for basically every other button.

     

     

    Should get approved here at some point for the script manager, let me know if you guys run into any issues. 

     

    I will have to wait for this to get approved to make sure everything on mobile works properly. Should be good, though. Auto-detects if you're using mobile or PC and gives you that version of settings :)

    Edited once by Saturnity. Last: 6th September
  • pacmanfan123
    6th September Member 0 Permalink

    @Saturnity (View Post)

     Suggestion: can you make the tools visible to the zoom tool?

  • KyleTheCreator
    6th September Member 0 Permalink

    @Saturnity (View Post)

     I love you so much

    Where download

     

    Edito: No mobile version only "pres c 2 ascgivate" :((((((( Show me the ways I N E E D  T H I S

    Edited 2 times by KyleTheCreator. Last: 6th September