Modding Help Lua

Discussion in 'Starbound Modding' started by SlipyB, Feb 19, 2018.

Tags:
  1. SlipyB

    SlipyB Void-Bound Voyager

    Would it be possible for anybody to help me learn lua at all?
     
  2. bk3k

    bk3k Oxygen Tank

    Certainly you're connected to the internet, and can examine the unpacked assets to see how things work. You can also search the forums, as there are some basic tutorials I believe. And what you'd need to learn falls into 2 categories -

    1. General LUA knowledge. Starbound uses LUA 5.3 so tutorials for earlier versions are only so useful. Note the IO table isn't accessible, and neither is most of the OS table.
    2. Starbound engine specific engine functions that you'll call. There is a \doc\lua\ folder full of documentation, and you can examine how these functions are actually used in SB by looking at the unpacked assets. Also many mods.

    So search for what you can first, and see what you can figure out. At the point you get stuck, I or others can help with specific questions.
     
    AmazonValkyrie and Errors4l like this.
  3. SlipyB

    SlipyB Void-Bound Voyager

    What things should i learn in basic lua?
     
  4. Iris Blanche

    Iris Blanche Pudding Paradox Forum Moderator

    I'd say:
    • Structure of functions
    • Variable assignment
    • If-Else statements
    • Loops
    • Structure of tables
    • How to iterate through tables
     
    Errors4l likes this.
  5. SlipyB

    SlipyB Void-Bound Voyager

    any guides that cover these things with minimal reading you can suggest?
     
  6. Iris Blanche

    Iris Blanche Pudding Paradox Forum Moderator

    There is no minimal reading. You have to understand everything and learning all basics. Minimalistic guides are mostly not helpful if you dont know anything about the basics at all.
    The link given by @bk3k above covers the things that are necessary for what i can see. You may also want to read the starbound docs to get an overview about the specific functions.
     
    Boshed likes this.
  7. SlipyB

    SlipyB Void-Bound Voyager

    Okay thank you i have another question lua is like a console language so how does sb utilize that since you write it in a text editor
     
  8. AtomicPegasus

    AtomicPegasus Scruffy Nerf-Herder

    I don't care if there's a lot of reading, I need a guide I can read on starbound lua script, why there isn't anything on the subject is beyond me.
    It irks me that there aren't any decent tutorials on YouTube either.
     
  9. bk3k

    bk3k Oxygen Tank

    As I already mentioned, there are things here. You just need to actually search. Even nicer, if you click on the "tutorial" filter, you get 6 pages with only tutorials. LUA is among them. As for youtube, how do you make a video on a subject which relies so heavily on text? You really need to see actual code and video is very far from ideal towards this end.

    edit:
    Also check the downloadable mods, as The Suit and Hellession have some learning resources too.

    Because that's only one way to use it. You're essentially asking for how scripting languages work I think. That's something which isn't hard to find on Google, but you don't really need to know how things work on the C++ side to use it in Starbound. Or possibly I don't understand what you're really trying to ask.
     
    Iris Blanche likes this.

Share This Page