Modding:Basics

From Starbounder - Starbound Wiki
Jump to: navigation, search
Mining Hazard Sign.png
Work In Progress!
Mining Hazard Sign.png

This article or section is currently in the process of an expansion or major restructuring.
You are welcome to assist in its construction by editing it as well.

Last edited by 😺 on 2017-04-29 09:59:36.

This article will show you the steps you need to take before you can start actually modding, and also the steps you can take after you are done modding, to pack and publish your mod.

You will need a text editor. Do not use a word processor such as MS Word instead of a text editor. Also do not use the basic notepad.exe, as it does not support UNIX line endings. Only UTF-8 is supported, other encodings are likely to cause crashes.

Alternative sources for getting started in modding include the Official Chucklefish Forums, the Unofficial Modding Ebook, the third-party program ModPakHelper that can be used for both unpacking and packing assets, a video, and some more. See external links below.

Step 1 - Unpacking Assets

Furious Koala introduced a .pak format which improves loading times and eases mod distribution. This means we need to unpack the assets before we can start modding.

Note - This step will not remove or change your packed.pak file, but simply extract its content for use as reference material. Changes you make to the unpacked assets will have no effect on your game.

Windows

Current as of Version 1.2.2, January 18th, 2017

  1. Open up the main directory folder for Starbound.
  2. Shift + right-click within the folder and select Open Command Prompt or equivalent (depends on Windows version).
  3. Type the following into Command Prompt: "win32\asset_unpacker.exe" "assets\packed.pak" "_UnpackedAssets"
  4. Command Prompt will do nothing until asset_unpacker.exe has finished. There are no progress updates.
  5. Once Command Prompt displays a message equivalent to this, "Unpacked assets to _UnpackedAssets in 250.063s," you can close the program and move on to creating mods.

Notes

  • If purchased from Steam, the location of the main Starbound directory folder typically looks like this: Steam\steamapps\common\Starbound
  • The text typed into Command Prompt are three directory locations:
    1. The location of asset_unpacker.exe, which is the program that does all of the unpacking.
    2. The location of Starbound assets, or Mod assets, to be unpacked.
    3. Where you want the unpacked assets to be dumped. This third string can be changed to whichever location or name you prefer.

Mac

Possibly outdated

Right click on Starbound.app and select "Show Package Contents". Next, locate your packed.pak file under Starbound/assets/. Finally create a new directory for the unpacked files, for example Starbound/assets/unpacked/.

Now open your command prompt window and enter first the location of asset_unpacker, then the location of packed.pak, and lastly the directory you want to unpack it into. Let the script run. When it finishes, you should see a long list of files and folders in the location you chose.

Step 2 - Setting Up Your First Mod

The Starbound/mods folder is where you're going to place .pak files or unpacked mods folders. Create a directory inside this.

_metadata file

This file is entirely optional.

The _metadata file contains general information about the mod which will be displayed in the mod list on the Starbound title screen, and informations the game uses to determine load order if needed. Note that parameter's order doesn't matter, and that each parameter is optional; Starbound will deal without it. You could for example only fill the author field and not put the rest, or put everything but the version number. If you don't need a parameter, don't write it.

A _metadata file looks like this

 {
 "version" : "2.00 Alpha Gold",
 "friendlyName" : "Cool mod",
 "link" : "http://example.com",
 "name" : "coolmod",
 "description" : "This a cool mod!",
 "author" : "NAME",
 "requires" : ["anothermod", "coolmod2"],
 "includes" : ["coolmodv1"],
 "priority" : 0
 }
Entry Description
version The version number of your mod.
friendlyname The name that will show up in the mod list menu.
link A URL that links to the mod.
name The "behind the scenes" name that is used for other mods' requires and includes options
description The description of the mod. Type '\n' for a new line, and escape quotations with a \, such as
"description" : "This mod is \"cool\", if you know what I mean."
author The author of the mod.
steamContentId The workshop's unique id that steam uses. The Mod Uploader Tool available with Starbound's Steam version will fill this automatically.
priority The lower the number, the sooner it'll be loaded. The base assets.pak has a priority of -9999.
(remember that any parameter is optional! Don't add this if you don't need it!)
includes Any mods listed here will be loaded before this mod, if they exist.
(remember that any parameter is optional! Don't add this if you don't need it!)
requires Any mods listed here will be required and the game will crash at startup if those mods aren't present.
(remember that any parameter is optional! Don't add this if you don't need it!)

Step 3 - Modding

Tutorials

Reference Pages

If you did everything right, Starbound should load your new mod the next time you run it. If the game crashes, or your changes are not found in the game, check your starbound.log file.

Step 4 - Packing your mod

Before publishing your mod, it is better to pack it as a single <modname>.pak file. This process is recommended because it simplifies the installation (drop the file in the Starbound/mods/ folder), as well as the required I/O to read it. The alternative is to just put all the files into a zip archive.

To pack your mod, use the asset_packer(.exe) tool the same way you've used asset_unpacker to unpack your assets, or use ModPackHelper:

Windows/Linux with ModPackHelper

  1. If you haven't done it already, install modPackHelper (Simply drag script into Starbound\mods folder (and give executable rights for .sh))
  2. Select the "pack mods" action
  3. Choose the mod from the list (or set multiple choice with space, comma or semicolon)
  4. Press Enter. The mod is available in the Starbound/mods/ folder as <modname>.pak.

Step 5 - Publishing

Only one thing left to do - publish your mod! To do this, go to the official modding forums, select "add mod" in the upper right hand section, select the category of your mod, fill out the information form and hit save. It is that easy. The Steam version provides an utility to pack and upload mods to the Steam Workshop directly (and can also generate your _metadata file).

There are other places mods can be uploaded, or you can just share it with friends. What you do with your mod is up to you!

External links


Quick Navigation