Creating Static Decoration Items

Discussion in 'Starbound Modding' started by Campaigner, Dec 9, 2013.

Thread Status:
Not open for further replies.
  1. Campaigner

    Campaigner Giant Laser Beams

    Seeing as how I made a bunch of simple mistakes in creating my own static decorations, I decided to write up a guide on what I did after I figured out the problems and got help. There wasn't already a guide for this, which is unusual since this is so simple. This allows you to craft on any character, not just new ones. I don't use a mod loader, but if you do, then adjust accordingly. I may edit this to reflect mod loaders in the future.

    Let's begin:

    VISUAL GUIDE:
    - Imgur - http://imgur.com/a/dA6Ru
    - The above guide is written out to follow each step. Refer to them if you are lost.

    1. Create the pixel art for the image and the icon.
    - Pixel Art takes time. Do NOT rush yourself. Anyone can draw a box, but only people with patience can draw a good box.
    - If you do not have any art programs that support PNG and transparency, download GIMP http://www.gimp.org/ - It's free to use, and works wonders.
    - If you do not know how to do pixel art, check out this site http://www.hongkiat.com/blog/pixel-art-tutorials/
    - For this example, we're recoloring the \assets\objects\generic\steelchair\steelchair.png and steelchairicon.png to be red and blue.

    2. Copy an .object file from the assets/objects/ folder.
    - The .object file is the brains of the operation. Without it, your item will not exist!
    - The .object file is always next to the image that it is for.

    3. Change the filename to what you want to use. For this example, we'll use "duckhunt.object"
    - This is going to be the standard process with every filename.
    - duckhunt will be used for EVERY name in this example. Your file will be named what you want it to be (picklesniffer, fireballhair, ukeleletooth, etc)

    4. Change "objectName" : "NAME" to "objectName" : "duckhunt"
    - This is your item's ID. Do not forget it!

    5. Change the small values.
    - Rarity, Price, Description, and so on. Short Description is the item's ingame name.
    - Race comments are a minor, but important role for those who like to read. Think twice before ignoring them!
    - If you do not already have it, download Notepad++ from http://notepad-plus-plus.org/. It's free and perfect for coding!
    - Make sure to open this file in Notepad ++ to keep the format. It won't work if the format breaks.

    6. Change "inventoryIcon" : "NAME.png", to "inventoryIcon" : "duckhunticon.png",
    - You need an icon, or else it will appear as a blank box in your inventory!
    - Uses the name of your item, but with icon.png instead of .png.

    7. Change "dualImage" : "NAME.png:<color>", to "dualImage" : "duckhunt.png:<color>",
    - Make sure the png's filename is the same as everything else up til now.

    8. Save
    - The smartest thing you can do. ALWAYS save your work. Yes, this constitutes as a step and not common sense, because people often lack common sense!

    9. Copy a .frames file from the assets/objects/ folder.
    - As with the .object file, do the same thing.

    10. Rename it to "duckhunt.frames"
    - Again, like the .object file.

    11. Change "size" : [x, y], to match the dimensions of your image.
    - X is for the horizontal pixels (left to right), while Y is for the vertical pixels (up and down)
    - For this example, we're leaving them as what steelchair.png had (16, 20)
    - Make sure to open this file in Notepad ++ to keep the format. It won't work if the format breaks.

    12. Save
    - Duh

    13. Copy a .recipe file from the assets/recipes/ folder.
    - Every good chef follows a recipe.
    - Our example does not have its own recipe, so we will be borrowing from iron bed's recipe (\assets\recipes\furniture\tier1)

    14. Select your materials for the crafting.
    - Each material required to make the item must be in this format: { "item" : "XXX", "count" : # }, where XXX is the item's name (see the objectName part of the .object file), and # is quantity. If you want multiple materials, make sure to add a comma after each material, save for the last material item.
    - Make sure to open this file in Notepad ++ to keep the format. It won't work if the format breaks.

    15. Change "item" : "XXX", to "item" : "duckhunt",
    - Always use the same name as your objectName from the .object file.
    - Make sure to open this file in Notepad ++ to keep the format. It won't work if the format breaks.

    16. Save
    - Duh

    17. Move all of what you did to its own folder. This is for ease of installation/uninstallation.
    - Deleting one folder, or deleting multiple files and folders. Of course, a mod loader works just fine.
    - Make sure it's in your assets folder!

    18. Open player.config in your assets folder.
    - No, this will NOT hurt your game.

    19. Look for "tier1" : [, and add //FOLDERNAME, where FOLDERNAME is what you named the folder. Let's say //Duckhunt.
    - You can choose any tier, but this one is good for testing since it is the crafting table.

    20. Directly below //Duckhunt, add { "item" : "XXX" }, for each item you added. XXX is the item's objectName from the .object file.
    - When you hit Enter to go down a row, if you made multiple items, press Space twice to line it up with the other stuff already in the file.

    21. Save
    - DUUUUUUUUUH

    22. Enter the game, and go craft!
    - Find your crafting station, and make the item!
    - Be sure to restart the game to make sure the changes are in effect.


    Big thanks to Doctor Ragnarok for guiding me through the process on how to fix my errors.
    Thanks to NinjaBoffin for reminding me of the simple yet overlooked fact of including images.

    If you have any suggestions, complaints, butt pains, nausea, or questions, feel free to ask. Just don't ask for a lollipop.
     
    Last edited: Dec 10, 2013
  2. NinjaBoffin

    NinjaBoffin Big Damn Hero

    Nice tutorial!
    But just as a suggestion, why not add in some pictures?
    to show the process, it'll help some of the new modders out there
    :)
     
  3. Campaigner

    Campaigner Giant Laser Beams

    Good point on the images. I uploaded an album on Imgur to show the process, as well as touched up a few points in the post to reflect the example.
     
  4. hollisb

    hollisb Void-Bound Voyager

    How do we change the name in the crafting screen? I can't seem to find it anywhere. Thanks for the guide btw!

    EDIT: Found it!
     
    Last edited: Dec 11, 2013
  5. Supergeek

    Supergeek Scruffy Nerf-Herder

    What about spaceScan vs spaces:[] ? Any idea what these options do?

    You might want to cover collision options and anchors in your tutorial as well.
     
  6. _REX_

    _REX_ Void-Bound Voyager

    i'm having a problem i'm trying to edit an existing mod for personal use
    i'm trying to make it that the engine core from madtulips ship mod can snap to the roof as well
    the problem is that when i place it on the roof it doesn't show
    is it a problem with the coding?:

    {
    "objectName" : "madtulip_human_engine_core",
    "rarity" : "Common",
    "description" : "An engine for a spaceship",
    "shortdescription" : "Spaceship Engine Core",
    "race" : "generic",
    "category" : "decorative",
    "price" : 10,
    "printable" : true,
    "inventoryIcon" : "madtulip_human_engine_core_icon.png",
    "orientations" : [
    {
    "dualImage" : "madtulip_human_engine_core.png:<color>.<frame>",
    "imagePosition" : [-29,-24],
    "frames" : 11,
    "animationCycle" : 1,
    "spaceScan" : 0.1,
    "anchors" : [ "bottom" ]
    },
    { "dualImage" : "madtulip_human_engine_core_2.png:<color>.<frame>",
    "imagePosition" : [-29,-21],
    "frames" : 0.1,
    "animationCycle" : 1,
    "spaceScan" : 0.1,
    "anchors" : [ "top" ]
    }
    ]
    }

    i do have an upside down image for the core named : madtulip_human_engine_core_2
    i copy and pasted it, right clicked and clicked on rotate 90 degrees twice and then renamed it to the above name

    what am i doing wrong


    some more info i only added this part

    { "dualImage" : "madtulip_human_engine_core_2.png:<color>.<frame>",
    "imagePosition" : [-29,-21],
    "frames" : 0.1,
    "animationCycle" : 1,
    "spaceScan" : 0.1,
    "anchors" : [ "top" ]
    }
     
Thread Status:
Not open for further replies.

Share This Page