LUA capabilities/information

Discussion in 'Starbound Modding' started by Whitey, Dec 8, 2013.

  1. Whitey

    Whitey Poptop Tamer

    Hey guys,

    I've just been looking through the assets directory and noticed there are a ton of LUA files which seem to be able to be modified and used in game. This is fantastic news!

    However from what I can gather, they're all built for certain situations and events - e.g. NPC wandering, code for various techs, logic for how cameras behave, etc. The selection seems random too - I would have though that NPC wandering for example would be incorporated in the binary, rather than being loaded and modifiable after. Not complaining though!

    The point I'm getting at, is will there be or is there currently a method to run your own LUA on game launch/init? I'm sure it wouldn't be too hard to bootstrap something in (just watch what LUA files get loaded when the game starts and there's your winner), but it'd be great if there was a "non-hack" way to do this.

    Also, is there any information on variable names, functions, etc that we can call and use?

    Thanks!
     
  2. lyravega

    lyravega Poptop Tamer

  3. Whitey

    Whitey Poptop Tamer

  4. Loading custom scripts can be done through the "scripts" flag in JSON. It seems to only support Wired objects right now from what I have found.
     
  5. Whitey

    Whitey Poptop Tamer

    Cool. I understand JSON formatting, but is there a specific file that you can load this from?
     
  6. Can you clarify? I do not understand what you are asking.

    Are you asking how to load Lua?
    Code:
      "scripts" : [ "PATHTOLUA/LUAFILE.lua" ],
      "scriptDelta" : 5,
     
  7. Whitey

    Whitey Poptop Tamer

    Thanks! That's exactly what I'm asking. But I also want to know what file the above JSON is added into.
     
  8. Your object file. Although from testing, it only seems to support Wire type objects.
     
  9. Whitey

    Whitey Poptop Tamer

    Sorry for seeming so dense, which file is the object file? I can't see any files with a name like that:

    Code:
    whitey@macbook:~/Library/Application Support/Steam/SteamApps/common/Starbound/assets$ find . -iname *object*
    ./objects
    ./sfx/objects
    
    Can you advise what specific file this is? Thanks!
     

Share This Page