Modding:Portal

From Starbounder - Starbound Wiki
(Redirected from Modding)
Jump to: navigation, search

Quick Navigation

Modding Icon.png
Modding
Modding Icon.png

Portal - Basics - JSON - Lua - Assets - Guides



See here for installing mods: Guide:Mod Installation
Starbound features a robust amount of modding support that makes it extremely easy to get started creating mods. This page details the game's asset structure and how to get started modding.

How Do I Start Modding?

See : Modding:Basics, a step-by-step guide for unpacking the assets and making a simple mod.
Before you can start modding you'll first need to unpack Starbounds' assets, a process detailed in Modding:Basics. The best way to learn how to make mods is to look through Starbound's assets or the assets of a mod to learn how the asset structure and types work.

  • Information on Starbound's Lua API is documented in .md files found in the Starbound/doc/lua or Starbound - Unstable/doc/lua folders.
  • If you have any problems, comb through the included assets. They are a rich source of examples you can follow. Before you try to make anything complex, you should start with copying something simple.
  • You can also download some sample mods (make sure they are up to date, as the mod specifications changed a few times in the beta) to learn from.

Guides

Several starter guides on modding Starbound are available, although many are outdated:

    • Modding Basics is a step-by-step guide for unpacking the assets and making a simple mod (Mildly Outdated)
    • A Unofficial Ebook created specifically for those completely new to the modding scene. (Mildly Outdated)
    • For more specific needs, the official forums have a "tutorial" tag that you can browse.
    • Starbound's steam community page also fosters many guides on modding the game.

Game Assets

The moddable assets are located in the Asset Tree, which is located in your Starbound directory under /Starbound/assets. There are several types of assets. Editing an existing asset will change the base behavior of the game. You can add new assets, although getting those assets into the game may be tricky depending on what you're trying to add. The official modding forums are the best source of up-to-date information on specifics.

  • JSON Objects: There are hundreds of JSON configuration files in various directories inside /assets/, with dozens of different extensions, like .config, .frames, .animation, .gun, etc. Any files with extensions that do not match the ones listed below are probably JSON config files.
  • Lua Scripting: Monsters, NPCs, and certain objects use Lua scripts to control their behavior. Lua scripting has a lot of potential, but currently suffers from severe scoping limitations. Lua files always end with the extension ".lua." The Lua API is documented in some Lua files in the 'Starbound/doc/lua' game's folder, and is also explained here and although it may sometimes be a little outdated, should help.
  • Sound files: File extensions are either ".wav" or ".ogg"
  • Graphics: File extension is ".png" for graphics.

Text Editors

Just about any text editor except the basic notepad that comes with your system will work for Starbound modding, although something that displays errors, like Visual Studio Code, is recommended. see this list of suggested text editors and a few tips for using them with JSON and Lua.

Graphics Editing And Suggested Image Editors

You can see this list of suggested image editors and this Starbound art styling guide.

My Mod Crashed The Game!

You can start by checking the log file. You can find errors in there telling you which line in your code caused the crash.

An online JSON parser will help catch some common mistakes, such as missing commas and unmatched braces in your modified files. For more information about JSON, see the JSON page, or see the index of JSON configuration file types here.

How Can I help the modding community?

Check out Modding:Modding/DocumentationTODO to see a list of things that need to be done for modding documentation on this wiki.

More Information

The official modding forums

The official discord server has a #mod_dev channel you can ask your questions about modding in.

The IRC channel ##starbound-modding in Freenode. Please note that this channel is dedicated to the ins and outs of modding, and is not the place to ask about a mod you downloaded! We don't kick or ban for minor netiquette breaches, but if the room is busy, be courteous and obey the rules or you may have a problem.

If you use the IRC channel, follow these simple rules:

  • Use a pastebin like pastebin.com for anything over 2-3 lines.
  • Check the log files first. If there's an error you don't understand and want us to look at, post it on a pastebin for us to look at, along with any relevant code.
  • Do not spam the chat with excessive emotes or offtopic chat. Some offtopic is fine, but if people are talking about modding, try not to spam up the chat with fluff. You can go to #starbound or #starbound-overflow for that.
  • Constructive criticism is welcome, but be thoughtful and respectful of others.
  • Don't walk into chat and ask "hay guise how do i mod lol." We're all bootstrapping our own modding efforts by doing a lot of reading through the example code, reading others' mods, and experimentation.