Jump to content
TeardownMods

Magnymbus

Members
  • Content Count

    14
  • Joined

  • Last visited

Files posted by Magnymbus

  1. Universal Door Latch Framework

    This mod will be migrated to steam workshop when available and will no longer be updated. Files will remain. This line will contain a link to the workshop page when this occurs. I apologize for the inconvenience, and thank you for your interest.
     
     
    What it does:
    This script allows for a generalized approach to latching doors without the need to give joints individual names and write custom scripts to look for those name specifically.
     
    Permissions:
    You can use this in any map without the need to ask for permission as long as you:
    List credit on the mod page with a link to this page. Do not include the script within your map itself, as this can cause problems; Instead, have your users grab the newest version from here.
      How it works:
    When the door is near enough to the closed position (limit "0"), it will apply a slight force to keep it closed. When you grab the door, it removes that force, allowing you to open the door. following this, it will remain loose until the door returns to its closed position. That means that if you leave a car door open, you could use your brakes to close it. This is different than other implementations that use interactions (button prompt) that switch the direction of the force. This is due mostly to my own preference, but also due to how the script checks for each door. It could probably be easily changed though if you prefer that method.
     
    For Users:
    Drop the folder from the .zip into your /documents/teardown/mods/ folder.

     
    For developers:
    Add "tags="Latch"" to the VOX of each shape. DO NOT TAG THE JOINT! Otherwise, the script will not work.
    Add sound effects by extending the tag to "Latch=Vehicle" or "Latch=Structure".
    Custom sounds can be added with "LatchOpenSound=../mod_name/path_to_sound.ogg" and "LatchCloseSound=../mod_name_path_to_sound.ogg". Ensure that the path always starts with "../" followed by the name of the FOLDER your mod is in, and then the rest of the path to the sound. If you get no sound instead of a custom one, it's probably a typo.
    Please ensure that all joints you wish to latch are in the closed position at limit 0, as this is what the script considers the "closed" position. This generally means that the door is closed in the .vox file.
    An example vehicle (The yellow van from the thumbnail) is included in the files.

     

    1,300 downloads

       (4 reviews)

    13 comments

    Updated

  2. Unofficial API.lua Workspace Library Converted from xml for VSCode

    After getting frustrated by having to search the api.xml file every time I needed to call a function, rather than being able to use VSCode's Intellisense to autocomplete and check them, as well as getting no good answer on how I could use the XML as a library or what IDE would support it; I decided to use a series of long regex replacements to convert it from .xml format to .lua format so that I could use the lua.workspace.library setting in Sumneko's LUA extension to add the api to intellisense. I am providing it here because I put 7 hours into this and I don't want anyone who has the same problem to have to do the same thing if I can provide a solution for them.
    Bear in mind that this was done with regex replacement, so it's not perfect. And also note that I could not find a way to mark an argument/parameter as optional in a lua library... I may rebuild it and add that to the description section if I get the motivation.
     
    Special thanks to https://regexr.com/ for making the process achievable for me. Without it and it's tools, I would never have been able to finish this project.
     
     
    If you are interested, here is an example of the crazy regex I ended up using... This isn't even the longest one...
    Find: (?:---@return (\b\w+\b ).+?[\s\S]+?)?(?:---@return (\b\w+\b ).+?[\s\S]+?)?(?:---@return (\b\w+\b ).+?[\s\S]+?)?(?:---@return (\b\w+\b ).+?[\s\S]+?)?function (?:\b\w+\b)
    replace:$&\n\treturn $1\n\treturn $2\n\treturn $3\n\treturn $4\n

    71 downloads

       (1 review)

    1 comment

    Updated

  3. Tron: Legacy - Kevin Flynn's Light Cycle

    Kevin Flynn's Lightcycle from Tron: Legacy. Built upon the work of Redddd and his other Tron: Legacy Light Cycles
     

     
         Known Issues
    -It shakes a bit while idle. I have no idea what causes this.
    -Like Redddd's cycles, it easily flips when taking ANY bump at an angle, sometimes even when taken head on.
    -It lacks an interior. This will not be added unless I have a decent reference.
     
         Installation
    -Extract neo_light_cycle .rar.
    -Place neo_light_cycle.vox in the map's folder.
    -Copy the text from neo_light_cycle.xml to your maps .xml file under any "</vehicle>" line.
     
    Dear Redddd:
    You can package this into your mod and change it however you want. I made this because your mod inspired me.

    65 downloads

       (2 reviews)

    0 comments

    Updated

×
×
  • Create New...

How to Disable AdBlock - And why you should do it?

I have disabled AdBlocker. Refresh the page.