1. If you're looking for help-related things (for example, the key rebinding tutorial), please check the FAQ and Q&A forum! A lot of the stickies from this forum have been moved there to clean up space.
    Dismiss Notice

Starbound Modding 101

Discussion in 'Starbound Discussion' started by bradleo, Jun 1, 2013.

  1. bradleo

    bradleo Master Chief

    Hello, Starbound forums! This is Starbound Modding 101, a tutorial walking through all we are able to mod for Starbound. If you are bored and anxious for the beta to come out, and have never learned to mod a game before, this is your guide!

    This tutorial only assumes three things: that you have a computer, an internet connection, and want to make something cool for Starbound. Hopefully the tutorial will be straightforward and guide you through:
    • making sprites for objects
    • editing the data of an object (to give it a name, description, and other cool things
    and (when the modding API gets implemented sometime in the future)
    • scripting your object to do cool things with Lua

    What should I make?

    To start off, you will need an idea of something to make. This is really important, actually, because if you don't you will reach the end of the tutorial and you still wont have anything to show for it! So think... what would be awesome in Starbound that the development team probably won't have time to implement? Maybe you want to implement magical spells or a huge megaboss. Still stumped? No sweat! We have a whole forum section for ideas! Just go in and pick out a simple object (the vanity items thread has a bunch of simple ones!). For this project I will make a Street Lamp.


    Getting your art tools:

    Next, we will be making that idea you have into a sprite. First, you need an editing tool to do it. Microsoft paint unfortunately doesn't have the functionality for spriting (it doesn't have transparent layers) so you are going to have to download Paint.net (Windows only) or GIMP. If you don't want to download anything, you can also use the website Pixlr. Paint.net is a little easier to get the hang of, while GIMP has more features. I will be using Paint.net to make my sprite. Install your tool and open it up.

    Setting up the tools:

    When you open up the program, you need to first create a new file and make its background TRANSPARENT. In Paint.net you can simply use an eraser with a huge brush width to erase the background (In GIMP, when making a new file, click the "transparent" option in "Fill with:" in advanced options, In Pixlr, check the transparent box when making a new file). This will make the space around your object clear in the game instead of white.

    Choosing your resolution:

    Next, before you get crazy with your art skills, you should choose the resolution of your sprite. One block in Starbound is 8 pixels wide and 8 pixels high, 8x8. Each race is approximately 12 pixels wide and 30 pixels high, 12x 30. We will also be making an inventory icon, which will be 16x16.

    If you are making an object that will be placed in the world (like a table or a new block type), try to pick a resolution for your object that is a multiple of 8, like 16x 32 for an object that is 2 blocks wide and 4 blocks tall. You will NOT have to fill all of this space with your object, but if a player places it inside the game, this resolution is how big the object will be.

    If you are making an object that a character wears or holds, it should darn well fit on a character, right? Well then you should probably try putting it on some character sprites before you get too far. Fortunately, Starbound modder NewLiar posted a template of the human race of Starbound along with some hair style options. Using these Starbound character sprites, you can size your item on a character and create it on top of one. If you are making a gun, perhaps use this image as a size guide.​
    Start creating your images:

    Now, we can finally start making the sprite! Create a new file in your editor with the resolution you want. If you still aren't sure, choose a large canvas and then copy and paste your creation later. ​
    You will probably be using the pencil tool at its smallest setting (For Pixlr use the paintbrush on the smallest size with a hard tip), so each click is one pixel. Choose the colors you want and make it happen!

    If you are making an object, you can download some screenshots of Starbound landscapes posted on the forums and playstarbound.com to see how your objects would fit into the game. Additionally, the community has pulled together an awesome thread full of resources for starbound pixel art (among other things). There are templates for ores, guns, characters, and tiles for you to change, and copy. Remember to get permission and give credit.

    If you are making a character or an object for a character to wear or hold, I highly recommend NewLiars Pixel Art Tutorials. He is releasing them semi-weekly, and they show exactly how to overlay your objects over a character. At this time, he has a video about starting a character and adding hair, but the same method applies to most character items.

    As with sizing, if you are making a gun, the same gun template might help you. It contains a lot of gun parts already, and you can follow the above character hair tutorial to put the gun parts together into that sweet killing machine that you always wanted.

    If you want to pick your object up and put it in your inventory, it should also have an inventory icon. You can use the same image, but remember that these are 16x16 wide (as stated above). Shorten or scale your object as needed, and maybe outline it in black so it shows up better.

    Save the files as .PNGs (PNGs don't have pixel scattering). If you don't want to do the animations or fiddle with game file data, make sure to post your creations to the Starbound Fan Art Forum Section, because someone might be happy to use your awesome pixel art in a mod. Spread the love!

    My process album will be coming soon!


    Once you get your object's sprite done, it should look something like this with an icon like this (ctrl + scroll to zoom, right click and "save image as" to save). Now, you may have an object that requires multiple sprites. If it moves, turns, or activates, you are going to need to make all of these frames. My lamp, for example, needs to be off and on, so I will need to make another sprite to be "on." If you just have a stationary, held, or worn object, you can skip the animation step.

    Sometimes, you will need to make multiple animations. For example, in Starbound, a character runs, jumps, stands, etc. When a character is standing, the game cycles through the standing animation. When the character is running, the game cycles through the running animation, etc. If I want my street lamp to have an animation, I would put these two frames in what I will call a "set."

    Once you have made every frame in your animation sets, put them side by side, so that your finished .png file looks like this. Here is an unoffical example of a running character (found on forums - pulled from here), and here is an object spinning (You will see this later).

    That is it for spriting! You can make more of your object in different colors, make different versions, and touch it up, but that is the general gist of how spriting works.

    If you think all of this spriting stuff is way too much work, drop by The Starbound Fan Art Forum Section. Here there are a ton of spriting artists that have made their own creations, and a lot of them will let others use their work. There is even a requests thread! Just remember to ask permission and give proper credit.


    Next up, we are going to edit the data file for the in-game object (it is in JSON format if you happen to care). This part of the guide has basically been done for me by the amazing Mollygos, who made this great tutorial thread for implementing objects.

    Setting up the tools:

    To edit data, all you really need is a plain-text editor (e.g. Notepad, NOT Microsoft Word). Notepad++ (Windows only) is a great addition if you feel like you will be doing this a lot, it helps you match all of the parentheses that you will be using in the data editing section. It also highlights programming keywords, but I'll explain more about programming when we get to the Lua scripting section. You can use normal Notepad as well (not sure about what Macs have, if someone knows, help me out), but it may be harder to see any mistakes you might make, so make sure to triple check it.

    Now, follow Mollygos's tutorial pdf. Since we can't actually copy the files yet, Starbound forum member Eight made this template for you to grab the files from. All you have to do is replace the words surrounded by "<>". I will be doing this with my street lamp data. Since the tutorial does a great job explaining what almost everything is, I will post what I have in my files and then put some notes and hints next to them.​
    My Files:

    First, the .object file:
        "objectName" : "streetlamp",
        "description" : "This is a lamp that you would see on the street!",
        "shortdescription" : "Street Lamp",
        "race" : "human",
        "dropItem" : "streetlamp",
        "category" : "decorative",
        "orientations" : [
                "image" : "streetlamp.png : {colour}.{frames}",
                "imagePosition" : [-8,-16],
                "frames" : 2,
                "animationCycle" : 1.0,
                "spaceScan" : 0.1,
                "anchors" : [ "background" ]

    Next, the .frames file:
        "itemName" : "streetlamp",
        "rarity" : "Common",
        "inventoryIcon" : "streetlampicon.png",
        "dropCollision" : [-4.0, -5.0, 4.0, 5.0],
        "description" : "How are you holding a streetlamp in your inventory anyway?",
        "shortdescription" : "Street Lamp",
        "race" : "human",
        "objectName" : "streetlamp"

    And finally, the .objitem file, for the inventory item:
        "itemName" : "streetlamp",
        "rarity" : "Common",
        "inventoryIcon" : "streetlampicon.png",
        "dropCollision" : [-4.0, -5.0, 4.0, 5.0],
        "description" : "How are you holding a streetlamp in your inventory anyway?",
        "shortdescription" : "Street Lamp",
        "race" : "human",
        "objectName" : "streetlamp"

    Oh and one more thing, sometimes text editors like to save things as .txt, which we don't want. You can see this on Windows by checking the pictures of Mollygos's files and comparing them to yours. If your little icons look like lined paper instead of a plain white sheet with a folded corner, Google "how to show file extensions," and then rename the file to what you want.


    What is Lua? Lua (which doesn't stand for anything) is a programming language for scripting. It has been used in modding Gmod and some Minecraft mods, as well as a ton of other games and applications. Most importantly, it is the scripting language of choice for Starbound! If you have done programming before, it is an interpreted language (this shouldn't matter to a most of you, thats fine!).

    The tools:

    Here is a download link for Lua for Windows. If you aren't in the mood for downloading things, you can also use this online Lua demo to type your code right into a web browser. It should have the same functionality, but I haven't tested it all that much. I won't be giving a whole programming tutorial, so I will leave that to DevHQLessons on Youtube, which should explain it from top to bottom. If you happen to have Garry's mod, there is a Gmod Lua tutorial that you can go through for modding it as well.

    Lua in Starbound:

    Unfortunately, I can't walk you through how to use Lua in Starbound yet, because the devs are still working on that (maybe they are done, but haven't released it because they want to surprise us during beta, I don't know). They have to make sure that its implementation fits, and is safe and secure for your computer. Here is a IRC log of some discussion on its safe implementation. Programming Lua is not quite as straightforward as pixel art though, so I would advise you to go through those tutorials if you are (star)bound and determined to start modding as soon as you can.

    What we do know about Lua in Starbound, however, is that (from announced game information thread) the game will have support for it and that it can be built into dungeons and wiring. It will also have support for interactive objects. Here is a reddit thread about Lua's inclusion.

    Still yet to cover:
    • Making a recipe for your item/object so you can craft it
    • Generating an object on a planet randomly (like ores and trees)
    • Making your item drop randomly, appear in chests
    • Editing the data for weapons
    • Using Lua for Starbound and everything that it entails - basically, how to make everything do cool stuff.

    Things that I probably won't cover here:
    • Generating monsters randomly with AI
    • Generating complicated structures
    • Generating NPC's
    • Making quests
    • Editing the user interface (UI)
    • Editing game physics
    • Lots more because I can't think of everything

    I hope that all of these will be possible to do with the API, but if not, Starbound is still going to be great! Also, all of this tutorial is subject to change. It is a beta, of course!

    Hopefully that gives you enough to learn/do until the Starbound beta comes out. If not, as I get new information I will add it into this tutorial. Happy modding!

    TL;DR: If this is too long, just open up all of the links. Most of them are images, and you can figure it out from there.​
  2. CrimsonWingzz

    CrimsonWingzz Pangalactic Porcupine

    Amazing. Thank you for this.
  3. Active Link

    Active Link Master Astronaut

    A modding guide and the game isn't even out yet. :rofl:
    Quantum and Jonesy like this.
  4. Jonesy

    Jonesy Sarif's Attack Kangaroo Forum Moderator

    My thoughts exactly.
  5. CrimsonWingzz

    CrimsonWingzz Pangalactic Porcupine

    I was thinking that too, but the effort he put into this is quite amazing.
    Jonesy likes this.
  6. bradleo

    bradleo Master Chief

    I gotta pass my time waiting for Starbound doing something. ;)
  7. Flameofice

    Flameofice Pangalactic Porcupine

    You know this thread's probably gonna die before it's of any use, right?
  8. Lobo

    Lobo Spaceman Spiff

    modders will always find a way to mod a game, even if devs try to make it "unmoddable" (at least im glad starbound devs made modding easier :) )
    but what i really hope for, is some kind of in-game coding! :giggle:
    it doesn't even have to be actual written code... blocks of code (like game maker ones) are ok for me, and it would be the most awesomest feature ever!
    post-release-feature tho
  9. Cruellyricisti

    Cruellyricisti Hard-To-Destroy Reptile

    Guthrie28 likes this.
  10. Spike

    Spike Supernova

    I....er.... too.... much....information!
    Active Link likes this.
  11. Xander

    Xander Spaceman Spiff

    A lot of this is just what Molly wrote over in in regards to modding.

    I hate to be that guy but a rehash of it and a guide that basically says get gimp and I'll put in lua stuff when we know more...
    Not kinda so sticky worthy in my view.

    I will give props for at least going over tool setup and that its a good framework for when we have more information. Hang onto this as it will likely get burred and when the forummods open the actual mod section, it'll be a nice first post if you update it in the meantime.
  12. stardust7671

    stardust7671 Big Damn Hero

    ims slow can you please make a video on how to make the mod and how to instal it
  13. Raybrandt

    Raybrandt Jackpot!

    Well, you weren't kidding. This thread is over eight months old and was purely speculation. Please check dates before necroing a thread.
    The | Suit likes this.
  14. FLOknows

    FLOknows Subatomic Cosmonaut

    Thanks for bumping this. I never would have seen this if you hadn't.
    C'mon man this is all still relevant and full of good information. OP worked hard on this and only a handful of people replied to it, probably because he posted it 6 months before the game came out.
  15. BobFenner

    BobFenner Star Wrangler

    If the OP is still around I could REALLY use a guide on how to mod my own ship design. I want to do Slave I and some of the more iconic Eve online ships for my own personal use. AND if they are any good I will add them to the mod list for others. :)
    As it is I have NEVER modded anything before so am not hopeful on them being decent - at first
  16. FLOknows

    FLOknows Subatomic Cosmonaut

    So I apparently suck at making pixel art using GIMP, which is 1000x more complicated than I was expecting. I'm trying to make some armor/vanity sets of various sporting equipment (cricket, baseball, american football), and failing miserably. This might be the wrong forum for this type of thread though, maybe a moderator can move this to the modding forum or something.

Share This Page