Modding Help Animation modding help.

Discussion in 'Starbound Modding' started by Fearytiger, May 20, 2017.

  1. Fearytiger

    Fearytiger Scruffy Nerf-Herder

    I am trying to make an animated custom crafting table for a mod. However it wont ever load up the sprite frames. I tried many things to fix the sprite errors, one made the game crash whenever I tried to open up the crafting interface to craft it, the other did absolutely nothing different. It all works correctly and has all of the recipes but just wont accept the animation sprite file I have prepared for it. I'm out of options and may have to give up as I cant tell what is going wrong. It works perfectly fine currently but just doesn't have the sprite.

    .object code
    {
    "objectName" : "sharicitecrafting",
    "colonyTags" : ["crafting","light"],
    "printable" : false,
    "price" : 30,
    "rarity" : "Legendary",
    "interactAction" : "OpenCraftingInterface",
    "interactData" : {
    "config" : "/interface/windowconfig/sharicite.config",
    "filter" : [ "sharicitecrafting" ]
    },
    "description" : "A sharicite to craft things from a land called Gamindustri.",
    "shortdescription" : "^orange;Sharicite^white;",
    "race" : "generic",
    "category" : "crafting",

    "apexDescription" : "...",
    "avianDescription" : "...",
    "floranDescription" : "...",
    "glitchDescription" : "...",
    "humanDescription" : "...",
    "hylotlDescription" : "...",
    "novakidDescription" : "...",
    "inventoryIcon" : "shariciteicon.png",
    "orientations" : [
    {
    "image" : "sharicite.png:<color>.<frame>",
    "imagePosition" : [0, 0],
    "frames" : 16,
    "animationCycle" : 0.5,
    "spaceScan" : 0.1,
    "anchors" : [ "bottom" ]
    }
    ]
    }


    .frame code
    {
    "frameGrid" : {
    "size" : [16, 32],
    "dimensions" : [16, 1],
    "names" : [
    [ "default.share0", "default.share1", "default.share2", "default.share3", "default.share4", "default.share5", "default.share6", "default.share7", "default.share8", "default.share9", "default.share10", "default.share11", "default.share12", "default.share13", "default.share14", "default.share15", "default.share16" ]
    ]
    },
    "aliases" : {
    "default.default" : "default.share0"
    }
    }
     
  2. projectmayhem

    projectmayhem Spaceman Spiff

    Anything in error log?
     
  3. Fearytiger

    Fearytiger Scruffy Nerf-Herder

    I figured it out. I added too much frames as I started the naming at name 0 and ended at name 16 and had 16 frames.
     
    projectmayhem likes this.
  4. bk3k

    bk3k Oxygen Tank

    I would think you'd need more based on what you posted above.
    Code:
    "default.share1"
    
    for example wouldn't come from
    Code:
    "sharicite.png:<color>.<frame>"
    
    Anymore your <color> is always "default" and <frame> is going to be an integer number. After the game manages the tag swap, you'd get strings like "default.1", "default.2", etc. Nothing that would match "default.share1". So you'd either rename your frames, or do this.
    Code:
    "sharicite.png:<color>.share<frame>"
    
    or
    Code:
    "sharicite.png:default.share<frame>"
    
    Ultimately you're aiming for an exact string match(after tag swap). An alias match of course works too.

    I'll also note that if you ever want your animated objects to have different states - for example one state for idle and another during production - you'd need to use a .animation file. The states can all have their own individual animation loops, you can have transition states too.
     
    projectmayhem likes this.
  5. Fearytiger

    Fearytiger Scruffy Nerf-Herder

    Oh I see. Thank you!
     

Share This Page