Modding Help [Solved]Animating a object already in the game

Discussion in 'Starbound Modding' started by Satanicpotatocat, Jun 23, 2017.

  1. Satanicpotatocat

    Satanicpotatocat Tentacle Wrangler

    I'm currently having trouble creating a mod to animate the guillotine. I have created a patch file (guillotine.object.patch) to change the picture that the guillotine uses to an animation file. I have also created a patch file (guillotine.frames.patch) to edit the frames of the guillotine. I managed to get the guillotine to appear invisible until you lay down on it then the cover file shows up.
    patch files:
    guillotine.object.patch:
    Code:
    [
      {
        "op": "replace",
        "path": "/orientations/0/dualImage",
        "value": "guillotineanimation.png:<color>.<frame>"
      },
      {
        "op": "replace",
        "path": "/orientations/0/frames",
        "value": 6
      }
    ]
    guillotine.frames.patch:
    Code:
    [
    [
      {
        "op": "add",
        "path": "/allaises",
        "value": {
          "default.default": "default.0"
        }
      },
      {
        "op": "replace",
        "path": "/frameGrid/dimensions/0",
        "value": 6
      },
      {
        "op": "replace",
        "path": "/frameGrid/names/0/0",
        "value": "default.0"
      },
      {
        "op": "add",
        "path": "/frameGrid/names/0/-",
        "value": "default.1"
      },
      {
        "op": "add",
        "path": "/frameGrid/names/0/-",
        "value": "default.2"
      },
      {
        "op": "add",
        "path": "/frameGrid/names/0/-",
        "value": "default.3"
      },
      {
        "op": "add",
        "path": "/frameGrid/names/0/-",
        "value": "default.4"
      },
      {
        "op": "add",
        "path": "/frameGrid/names/0/-",
        "value": "default.5"
      }
    ]
    
    ]
    what the guillotine.object.patch produces:
    Code:
    {
      "objectName" : "guillotine",
      "colonyTags" : ["glitch","glitchcastle","evil"],
      "rarity" : "Common",
      "description" : "A brutal yet effective execution device.",
      "shortdescription" : "Guillotine",
      "race" : "glitch",
      "category" : "furniture",
      "price" : 175,
    
      "apexDescription" : "An old but effective form of punishment.",
      "avianDescription" : "Not as bad as being defeathered.",
      "floranDescription" : "Blade cutss fasst! Great for food preparationss!",
      "glitchDescription" : "Sadness. The preferred form of capital punishment among the Glitch.",
      "humanDescription" : "I would not want to be on the receiving end of this thing.",
      "hylotlDescription" : "A barbaric form of punishment...",
      "novakidDescription" : "Quick and easy. Too easy for my likin'!",
    
      "objectType" : "loungeable",
      "sitFlipDirection" : true,
      "sitPosition" : [-7, 14],
      "sitOrientation" : "lay",
      "sitAngle" : 90,
      "sitCoverImage" : "/objects/glitch/guillotine/guillotinecover.png",
      "sitEmote" : "sleep",
      "sitStatusEffects" : [
        "bed1"
      ],
      "sitEffectEmitters" : [ "sleepbubbles" ],
    
      "inventoryIcon" : "guillotineicon.png",
      "orientations" : [
        {
          "dualImage" : "guillotineanimation.png:<color>.<frame>",
    
          "imagePosition" : [-26, 0],
          "frames" : 6,
          "animationCycle" : 1.0,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ]
    
        }
      ]
    }
    
    what the guillotine.frames.patch produces:
    Code:
    {
    
      "frameGrid" : {
        "size" : [48, 48],
        "dimensions" : [6, 1],
        "names" : [
           [ "default.0", "default.1", "default.2", "default.3", "default.4", "default.5" ]
        ]
    
      },
      "allaises" : {
            "default.default" : "default.0"
      }
    }
    
    
    This is the animiation file:
    guillotineanimation.png
     
    Last edited: Jun 23, 2017
  2. projectmayhem

    projectmayhem Spaceman Spiff

    What does your error log say? Usually I have to add aliases to my frames file. Your error log should say something like "No frame file found for default" or something like that
     
  3. Satanicpotatocat

    Satanicpotatocat Tentacle Wrangler

    Here are all the errors thrown in the log
    And I went back and added aliases in
    Code:
    [14:15:40.044] [Error] Could not load image asset '/objects/glitch/guillotine/guillotineanimation.png:default.1', using placeholder default.
    (AssetException) No associated frames file found for image '/objects/glitch/guillotine/guillotineanimation.png' while resolving image frame '/objects/glitch/guillotine/guillotineanimation.png:default.1'
    [14:15:40.157] [Error] Could not load image asset '/objects/glitch/guillotine/guillotineanimation.png:default.2', using placeholder default.
    (AssetException) No associated frames file found for image '/objects/glitch/guillotine/guillotineanimation.png' while resolving image frame '/objects/glitch/guillotine/guillotineanimation.png:default.2'
    [14:15:40.306] [Error] Could not load image asset '/objects/glitch/guillotine/guillotineanimation.png:default.3', using placeholder default.
    (AssetException) No associated frames file found for image '/objects/glitch/guillotine/guillotineanimation.png' while resolving image frame '/objects/glitch/guillotine/guillotineanimation.png:default.3'
    [14:15:40.457] [Error] Could not load image asset '/objects/glitch/guillotine/guillotineanimation.png:default.4', using placeholder default.
    (AssetException) No associated frames file found for image '/objects/glitch/guillotine/guillotineanimation.png' while resolving image frame '/objects/glitch/guillotine/guillotineanimation.png:default.4'
    [14:15:40.641] [Error] Could not load image asset '/objects/glitch/guillotine/guillotineanimation.png:default.5', using placeholder default.
    (AssetException) No associated frames file found for image '/objects/glitch/guillotine/guillotineanimation.png' while resolving image frame '/objects/glitch/guillotine/guillotineanimation.png:default.5'
    [14:15:40.790] [Error] Could not load image asset '/objects/glitch/guillotine/guillotineanimation.png:default.0', using placeholder default.
    (AssetException) No associated frames file found for image '/objects/glitch/guillotine/guillotineanimation.png' while resolving image frame '/objects/glitch/guillotine/guillotineanimation.png:default.0'
    [14:15:38.318] [Error] Cannot set Steam achievement dismisscrewmember
    [14:15:38.318] [Error] Cannot set Steam achievement kill10poptops
    [14:15:33.432] [Error] Could not load recipe /recipes/anvil2/armor/swm.recipe: (ItemException) No such item 'water'
    [14:15:32.609] [Error] Could not load image asset '/objects/glitch/guillotine/guillotineanimation.png:default.default', using placeholder default.
    (AssetException) No associated frames file found for image '/objects/glitch/guillotine/guillotineanimation.png' while resolving image frame '/objects/glitch/guillotine/guillotineanimation.png:default.default'
     
  4. projectmayhem

    projectmayhem Spaceman Spiff

    it says you do not have a frames file.
    If you changed the png name, make sure to change the frames name
     
  5. Akari_Enderwolf

    Akari_Enderwolf Pangalactic Porcupine

    This might actually help me fix a non-animating object from my own mod.
     
  6. Satanicpotatocat

    Satanicpotatocat Tentacle Wrangler

    Thanks I did this and it worked Thank you very much
     
    projectmayhem likes this.
  7. Satanicpotatocat

    Satanicpotatocat Tentacle Wrangler

    I have another question that has arisen when try to place the guillotine it is invisible until you place it as well as after you place it, it can overlap other objects in some instances
    this error message still pops up in the log as well
    Code:
    [12:21:46.816] [Error] Could not load image asset '/objects/glitch/guillotine/guillotineanimation.png:default.default', using placeholder default.
    (AssetException) No such frame default.default in frames spec /objects/glitch/guillotine/guillotineanimation.frames
     
  8. projectmayhem

    projectmayhem Spaceman Spiff

    You misspelled "aliases" in your frames file
     
  9. Satanicpotatocat

    Satanicpotatocat Tentacle Wrangler

    I didn't notice, thanks
     
    Last edited: Jun 25, 2017

Share This Page