Tutorial How to make a craftable gift

Discussion in 'Starbound Modding' started by stufufuku, Nov 28, 2017.

  1. stufufuku

    stufufuku Guest

    make a simple gift box(presume you know at this point the small basic that are extracting the .pak file and manipulate files)

    #1 we need all the files in starboundsasset\items\active\unsorted\rewardbag\
    #2 create the a folder with all the same path as this ----->>>> MyMod\items\active\unsorted\rewardbag\ copy and paste the file needed
    #3 rename files
    • rewardbag.activeitem to mygift.activeitem
    • rewardbag.animation to mygift.animation
    • rewardbag.lua to mygift.lua
    • rewardbag.png to mygift.png
    • rewardbagicon to mygifticon.png

    #4 open mygift.activeitem

    • set the item name to mygift
    • set the price if you need
    • set rarity to Common or Uncommon or Rare or Legendary (first capital letter is really important so no legendary but Legendary)
    • set shortdescription to gift
    • set inventoryIcon to mygifticon.png
    • set script to mygift.lua
    • set pool to mygiftypool

    #5 open mygift.animation

    • at the line 41 set image to mygift.png

    #6 now at MyMod/
    • create the path recipes/emptyhands/

    #7 create a recipe file
    • open your text editor of your choice doesnt matter (i prefer notepad++)
    • type the following code then save it to mygift.recipe:
    {
    "input" : [
    { "item" : "corefragmentore", "count" : 3 },
    { "item" : "goldbar", "count" : 3 },
    { "item" : "ironbar", "count" : 3 },
    { "item" : "leather", "count" : 2 },
    { "item" : "string" , "count" : 1}
    ],
    "output" : {
    "item" : "mygift",
    "count" : 1
    },
    "groups" : [ "plain", "unsorted", "all"]
    }

    #8 now at MyMod/
    • create the path treasure/
    • open the text editor
    • type the following code then save it to mygift.treasurepools:

    {
    "mygiftypool" : [
    [0, {
    "fill" : [
    {"weight" : 0.01, "item" : [ "diamond", 5]},
    {"weight" : 2.9, "pool" : "goodWeapon"},
    {"weight" : 4.9, "pool" : "uniqueWeapon"},
    {"weight" : 4.9, "pool" : "augments"}
    ]
    }]
    ]
    }

    #9 now in MyMod/
    • open the text editor of your choice
    • type the following code then save it to player.config.patch:
    [
    {
    "op":"add",
    "path":"/defaultBlueprints/tier1/-",
    "value":{"item":"mygift"}
    }
    ]


    here you go you have made a gift mod template the only thing
    will be to modificate image

    • -mygift.png & mygifticon.png to have your own stylist gift i suggest gimp or paint.net
     

    Attached Files:

    Last edited by a moderator: Nov 29, 2017
  2. stufufuku

    stufufuku Guest

    i know the first time of anything could look scary you can ask me question if you need help througth the tutorial
     

Share This Page