Modding Basics p1 - Editing Vanilla Files v1.4

Discussion in 'Starbound Modding' started by The | Suit, Dec 12, 2014.

Thread Status:
Not open for further replies.
  1. The | Suit

    The | Suit Agent S. Forum Moderator

    You did check the log right?
    You won't always get runtime errors.
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    CHANGELOG v1.4

    Added "Click for Translation" Button on top.
    Now Tutorial supports Multiple Languages.
     
    Last edited: Feb 28, 2015
  3. blahblahdrugs

    blahblahdrugs Star Wrangler

    Swat thanks for the guide! It has made jumping into this much less daunting. I am curious as to why this patch won't work.. I'm sure you can help.

    Code:
    [
    {
    "op" : "replace",
    "path" : "/description",
    "value" : "This is one weird looking pineapple.",
    "op" : "replace",
    "path" : "/shortdescription",
    "value" : "Super Coal"
    }
    ]
    This is what the patch returns:

    Code:
    {
      "itemName" : "coalore",
      "rarity" : "Common",
      "inventoryIcon" : "coalore.png",
      "description" : "It's coal. A decent source of fuel.",
      "shortdescription" : "Super Coal",
      "learnBlueprintsOnPickup" : [ "gunpowder" ]
    }
    Notice the shortdesc changes but the description doesn't. What am I missing?[DOUBLEPOST=1428920284][/DOUBLEPOST]Forget it. I got it.

    Code:
    [
    {
    "op" : "replace",
    "path" : "/description",
    "value" : "This is one weird looking pineapple."
    },
    {
    "op" : "replace",
    "path" : "/shortdescription",
    "value" : "Super Coal"
    }
    ]
    MOAR BRACKETZ
     
    Last edited: Apr 13, 2015
    The | Suit likes this.
  4. blahblahdrugs

    blahblahdrugs Star Wrangler

    Alright so this is what I'm working on. I have all of these files but no clue how to get them in the game. For now I want to be able to craft the item with one coal from both the players default crafting abilities and from the crafting table. Hopefully you can shed some light on what it is I am missing exactly.

    Maybe I'm missing something fundamental regarding the interface folder.

    UPDATE: I figured it out. For anyone checking this out in the future I had to add the item via a .patch. I figured it out by looking at some other mods that I KNEW added resources to the area I wanted to. The difficult part was that they're massive and deciphering which part of it adds the asset to the game was confusing to me.

    Here's the patch:
    Code:
    [
    { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "backgroundminer" } }
    ]
     

    Attached Files:

    Last edited: Apr 13, 2015
    MysticMalevolence and The | Suit like this.
  5. Muffenman

    Muffenman Aquatic Astronaut

    i am confused with what you mean in
    Code:
    {
    "name" : "nameofmod",
    "requires" : [],
    "includes" : []
    }
    Go to file --> save as. Save it in starbound/mods/example
    With the file name pak.modinfo
    name the file with the extension of modpak for example packed.modinfo
    Please make 100% sure you didn't inadvertently name the file packed.modinfo.txt - which will not be read by the game.
    (did you mean change the name of the file or make a new one next to it)?
    and when you said

    DIRECTORY STRUCTURE

    What we need to understand that is our mod folder is an exact parallel to the assets folder. The location of our modinfo file is essentially telling the game this is the root assets location (unless you change the path directory - which you shouldn't do - unless you are an advanced user )

    Lets go to our unpacked assets folder. You will notice files such as player.config - liquid.config - universe.config are all found in the root of the unpacked assets. If we make any changes to them, we need to place them in the exact parallel folder directory. Or in our case the root of the example folder where our modinfo file is.

    Let us look at another example coalore.item
    This file is located in
    Code:
    [root]\items\generic\crafting\coalore.item
    So if we make any changes to this file. We need to place our modified file in
    Code:
    starbound\mods\example\items\generic\crafting\coalore.item
    Where the example folder as mentioned above is our root - or parallel to our assets folder.

    PATCHING VANILLA
    Now since we are at coalore, let us make our first mod. Open coalore.item in our text editor, it should look something like this;

    Code:
    {
    "itemName" : "coalore", --item reference name. Used when referencing this item in json
    "rarity" : "Common", -- rarity level
    "inventoryIcon" : "coalore.png", --image used
    "description" : "It's coal. A decent source of fuel.", -- description of item
    "shortdescription" : "Coal", --name of item shown in game.

    "learnBlueprintsOnPickup" : [ "gunpowder" ] -- this line lets you learn a blueprint when you first pick up the item. It is an optional line.
    }
    There are 2 types of edits we can do. One edit is called a dirty edit. These edits generally involve simply changing a value and placing it in our mods folder in the parallel location. These edits are highly incompatible with other mods. And only should be used in personal mods that are never distributed.

    (am i supposed to copy everything from the unpacked and paste it in the mode file?)
     
  6. The | Suit

    The | Suit Agent S. Forum Moderator

Thread Status:
Not open for further replies.

Share This Page