1. Welcome to the official Starbound Mod repository, Guest! Not sure how to install your mods? Check out the installation guide or check out the modding help thread for more guides.
    Outdated Mods have been moved to their own category! If you update your mod please let a moderator know so we can move it back to the active section.
    Dismiss Notice

StarModMenu v1.0.5

Unified Object Interface for Mod Interfaces

  1. PenguinToast
    StarModMenu

    Provides a unified object interface where mods can add their own user interfaces. Does something similar to Tabula Rasa, but with interfaces instead of items.
    [​IMG]

    Usage

    You can craft the StarModMenu Console object for free from your personal crafting menu.

    A sample mod can be found here: https://www.mediafire.com/?2hazcoqs7zctja7

    Your mod will need to require StarModMenu in your .modinfo:
    Code:
    "requires": ["StarModMenu"]
    The StarModMenu object must also be patched to load your script.
    Create a file called smmobject.object.patch in a /smm/ folder in your mod, and include this:
    Code:
    [
      { "op": "add", "path" : "/mods/-", "value" : "/path/to/your/smmscript.lua" }
    ]
    Your script can be anywhere, as long as it is patched into smmobject.object properly.

    SMM uses PenguinGUI as its interface library, for which documentation can be found here: http://penguintoast.github.io/PenguinGUI/doc/index.html
    In your SMM script, you should have a function that takes a Panel as its argument, and returns the name of your mod, and a list of any tags that will be used when filtering the mod list.
    After your function declaration, you need to call
    Code:
    smm(yourfunction)
    to register your mod menu with SMM.

    SMM has two functions to get information about the player that opened the menu:
    Code:
    smm.source() -- Gets the position relative to the StarModMenu Object where the interaction occurred.
    Code:
    smm.sourceId() -- Gets the entity ID of the player that opened the menu.
    Sample script that makes an interface with a button that spawns a torch:
    Code:
    function smmsampleMenu(panel)
      local button = TextButton(0, 0, 100, 14, "Spawn Item")
      button.onClick = function()
        world.spawnItem("torch", world.entityPosition(smm.sourceId()))
      end
      panel:add(button)
      return "Sample Mod", {"Tag1", "Tag2"}
    end
    
    smm(smmsampleMenu)
    Feedback

    I'm open to any comments or suggestions! If there are any bugs, please let me know. The interface library is still very much in the experimental stage, so if something is not working the way you think it should be working, it's probably a bug. Please send me a message if you need help with anything!
    Mod Pack Permissions:
    You must get the author's consent before including this mod in a compilation.
    Mod Assets Permissions:
    You must get the author's consent before altering/redistributing any assets included in this mod.

Recent Reviews

  1. liopi
    liopi
    3/5,
    Version: v1.0.5
    At first I thought it was something very cool.
    I thought this mod makes the interface as creative, but with mods.
    I'm a little disappointed.
  2. Robhellspawn
    Robhellspawn
    5/5,
    Version: v1.0.4 Upbeat Giraffe U2
    Really useful if you use a ton of mods, helps you regulate them and keep track of them.. 5/5
  3. r3nt0r44
    r3nt0r44
    5/5,
    Version: v1.0.4 Upbeat Giraffe U2
    Started using this for my personal stuff and I gotta say its pretty cool!
  4. aMannus
    aMannus
    5/5,
    Version: v1.0.2 Nightly
    Awesome and powerful.
  5. teihoo
    teihoo
    5/5,
    Version: NIGHTLY-v1.0
    Interesting concept. Was playing around with it a bit, there's some errors in smmobject.object "scripts" paths, but once I added /smm/ to where it was missing, Mod Menu worked fine.
    1. PenguinToast
      Author's Response
      Whoops, fixed the error. Thanks for the review!