Modding Help having a Slight issue with Animation Frames.

Discussion in 'Starbound Modding' started by Dilrax, Dec 30, 2015.

  1. Dilrax

    Dilrax Ketchup Robot

    im having a slight issue on Animation frames for a Monster, and was wondering if i could get another set of eyes to take a look over the code and help point out what the issue is, iv read this usually has something to do with the .animation file, but i appear to be none the wise... iv checked over the animation file and frames a few times, even going so far as reconstructing it as a copy of a pre-existing base game monster file, the monster is self WILL spawn and live but is rendered invisible due to the frame issues.

    i don't overly care about any other issues or anything it might have just from looking at the code, my main focus is to get it visually working first then tweak and modify it from that point onwards, far easier to fix and adjust what you can see compared to what you cant.

    As listed with in the Log File.
    Code:
    [01:27:54.722] Error: Could not load image asset '/monsters/landshark/body.png:idle.1', using placeholder default.
    (AssetException) No associated frames file found for image '/monsters/landshark/body.png' while resolving image frame '/monsters/landshark/body.png:idle.1'
    [01:27:54.934] Error: Could not load image asset '/monsters/landshark/body.png:idle.2', using placeholder default.
    (AssetException) No associated frames file found for image '/monsters/landshark/body.png' while resolving image frame '/monsters/landshark/body.png:idle.2'
    [01:27:55.060] Error: Could not load image asset '/monsters/landshark/body.png:idle.3', using placeholder default.
    (AssetException) No associated frames file found for image '/monsters/landshark/body.png' while resolving image frame '/monsters/landshark/body.png:idle.3'
    [01:27:55.244] Error: Could not load image asset '/monsters/landshark/body.png:idle.4', using placeholder default.
    (AssetException) No associated frames file found for image '/monsters/landshark/body.png' while resolving image frame '/monsters/landshark/body.png:idle.4'
    

    Frames File
    Code:
    {
      "frameGrid" : {
        "size" : [123, 61],
        "dimensions" : [8, 5],
    
        "names" : [
          [ "null", "idle.1", "idle.2", "idle.3", "idle.4", "null", "hurt.1", "hurt.2" ],
          [ "null", "walk.1", "walk.2", "walk.3", "null", "windup.1", "windup.2", "windup.3" ],
          [ "null", "run.1", "run..2", "run.3", "run.4", "run.5", "run.6", "null" ],
          [ "null", "bite.1", "bite.2", "bite.3", "bite.4", "bite.5", "run.6", "null" ],
          [ "null", "bite.7, "bite.8", "bite.9", "bite.10", "bite.11", "bite.12", "null" ]
        ]
      }
    }

    Animation File
    Code:
    {
      "animatedParts" : {
        "stateTypes" : {
          "body" : {
            "priority" : 0,
            "default" : "idle",
            "states" : {
              "idle" : {
                "frames" : 4,
                "cycle" : 0.5,
                "mode" : "loop"
              },
              "walk" : {
                "frames" : 3,
                "cycle" : 0.5,
                "mode" : "loop",
                "properties" : {
                "particleEmittersOff" : [ "spindust" ]
                }
                },
              "run" : {
                "frames" : 6,
                "cycle" : 0.3
              },
              "fire" : {
                "frames" : 12,
                "cycle" : 0.1
              },
              "chargewindup" : {
                "frames" : 3,
                "cycle" : 0.5,
                "properties" : {
                  "particleEmittersOff" : [ "spindust" ],
                  "persistentSound" : "/sfx/npc/monsters/mandraflora_windup.ogg",
                  "persistentSoundStopTime" : 0.15
                }
            },
              "Bite" : {
                "frames" : 8,
                "cycle" : 0.53,
                "mode" : "transition",
                "transition" : "idle",
                "frameProperties" : {
                  "particleEmittersOff" : [ [ "spindust" ], [], [], [], [], [], [], ["spindust"] ],
                  "particleEmittersOn" : [ [], [], ["spindust"], [], [], [], [], [] ],
                  "persistentSound" : [ 
                    "/sfx/npc/monsters/mandraflora_windup.ogg",
                    "/sfx/npc/monsters/mandraflora_windup.ogg",
                    "/sfx/npc/monsters/mandraflora_spinning.ogg",
                    "/sfx/npc/monsters/mandraflora_spinning.ogg",
                    "/sfx/npc/monsters/mandraflora_spinning.ogg",
                    "/sfx/npc/monsters/mandraflora_spinning.ogg",
                    "/sfx/npc/monsters/mandraflora_spinning.ogg"
                  ]
                }
              }
            }
            },
          "damage" : {
            "priority" : 3,
            "default" : "none",
            "states" : {
              "none" : {
                "frames" : 1
              },
              "stunned" : {
                "frames" : 1
              }
            }
          }
        },
    
        "parts" : {
          "body" : {
            "properties" : {
              "transformationGroups" : [ "body" ],
              "offset" : [-0.0625, 0.6875]
            },
            "partStates" : {
              "body" : {
                "idle" : {
                  "properties" : {
                    "image" : "<partImage>:idle.<frame>"
                  }
                },
                "walk" : {
                  "properties" : {
                    "image" : "<partImage>:walk.<frame>"
                  }
                },
                "run" : {
                  "properties" : {
                    "image" : "<partImage>:run.<frame>"
                  }
                },
                "windup" : {
                  "properties" : {
                    "image" : "<partImage>:windup.<frame>"
                  }
                },
                "bite" : {
                  "properties" : {
                    "image" : "<partImage>:bite.<frame>"
                  }
                }
              },
              "damage" : {
                "stunned" : {
                  "properties" : {
                    "image" : "<partImage>:hurt.<frame>"
                  }
                }
              }
            }
          }
        }
      },
    
      "transformationGroups" : {
        "body" : { "interpolated" : true }
      },
    
      "effects" : {
        "blink" : {
          "type" : "flash",
          "time" : 0,
          "directives" : "fade=ffffff;0.5"
        }
      },
    
      "particleEmitters" : {
        "spindust" : {
          "emissionRate" : 15,
          "offsetRegion" : [ 1.0, -1.0, 2.0, -0.0 ],
          "particles" : [
            { "particle" : "mandrafloradust" }
          ]
        },
        "deathPoof" : {
          "particles" : [
            { "particle" : "monstersplosion" },
            { "particle" : "deathember" },
            { "particle" : "deathember" },
            { "particle" : "deathember" },
            { "particle" : "deathember" },
            { "particle" : "deathember" },
            { "particle" : "deathember" },
            { "particle" : "deathember" },
            { "particle" : "deathember" },
            { "particle" : "deathfizz1left" },
            { "particle" : "deathfizz1right" },
            { "particle" : "deathfizz2left" },
            { "particle" : "deathfizz2right" },
            { "particle" : "deathfizz3left" },
            { "particle" : "deathfizz3right" },
            { "particle" : "deathfizz4left" },
            { "particle" : "deathfizz4right" }
          ]
        }
      },
    
      "sounds" : {
        "aggroHop" : [ "/sfx/npc/monsters/monster_surprise.ogg" ],
        "deathPuff" : [ "/sfx/npc/enemydeathpuff.ogg" ]
      }
    }

    Body File
    Code:
    {
      "name" : "body",
      "category" : "landshark",
      "type" : "body",
    
      "frames" : {
        "body" : "body.png"
      }
    }

    Monstertype file
    Code:
    {
      "type" : "landshark",
    
      "categories" : [ "landshark" ],
      "parts" : [ "body" ],
    
      "animation" : "landshark.animation",
    
      "dropPools" : [ ],
    
          "damageTeam" : 1,
      "baseParameters" : {
        "scripts" : [
          "/monsters/monster.lua"
        ],
       
    "behavior" : "monster",
    
        "behaviorConfig" : {
          "damageOnTouch" : true,
    
          "queryTargets" : true,
          "targetQueryRange" : 100,
          "targetOnDamage" : true,
          "targetEntityTypes" : [ "player", "npc", "monster" ],
          "keepTargetInSight" : true,
          "keepTargetInRange" : 130,
          "targetOutOfSightTime" : 5.0,
    
          "foundTargetActions" : [],
    
          "fleeActions" : [],
    
          "hostileActions" : [
          ],
    
          "periodicActions" : [],
    
          "approachActions" : [
            {
              "name" : "approach-walk",
              "parameters" : {
                "canJump" : true,
                "maxJumps" : 3,
                "jumpXVelocity" : 12,
                "jumpYVelocity" : 30,
                "jumpXControlForce" : 50,
                "minXRange" : 10
              }
            }
          ],
    
          "wanderActions" : [
            {
              "name" : "wander-walk",
              "cooldown" : 6.0,
              "parameters" : {
                "wanderTime" : [5, 20]
              }
            }
          ]
        },
    
        "damageParts" : {
          "body" : {
            "damage" : 13,
    
            "teamType" : "friendly",
            "damageSourceKind" : "slash",
            "knockback" : 20,
            "statusEffects" : [ ]
          }
        },
       
        "touchDamage" : {
          "poly" : [ [3, 3], [3, 3],  [3, -1], [3, -1],  [-1, -1], [-1, -1],  [-1, 3], [-1, 3] ],
          "damage" : 10,
    
          "teamType" : "friendly",
          "damageSourceKind" : "slash",
          "knockback" : 20,
          "statusEffects" : [ ]
        },
    
        "metaBoundBox" : [-4, -4, 4, 4],
        "scale" : 1.0,
    
        "movementSettings" : {
          "collisionPoly" : [ [1.75, 2.55], [2.25, 2.05],  [2.75, -3.55], [2.25, -3.95],  [-2.25, -3.95], [-2.75, -3.55],  [-2.25, 2.05], [-1.75, 2.55] ],
    
         "mass" : 1.0,
          "walkSpeed" : 2,
          "runSpeed" : 6,
    
          "airFriction" : 0,
         
         "airJumpProfile" : {
            "jumpSpeed" : 35.0,
            "jumpInitialPercentage" : 1.0,
            "jumpHoldTime" : 0.0
          }
        },
    
        "bodyMaterialKind" : "organic",
    
        "knockoutTime" : 0.3,
        "knockoutAnimationStates" : {
          "damage" : "stunned"
        },
        "deathParticles" : "deathPoof",
        "knockoutEffect" : "",
    
        "statusSettings" : {
          "statusProperties" : {
            "targetMaterialKind" : "organic"
          },
    
          "appliesEnvironmentStatusEffects" : false,
          "minimumLiquidStatusEffectPercentage" : 0.1,
    
          "primaryScriptSources" : [
            "/stats/monster_primary.lua"
          ],
          "primaryScriptDelta" : 5,
    
          "stats" : {
            "knockbackStunTime" : {
              "baseValue" : 0.25
            },
            "knockbackThreshold" : {
              "baseValue" : 500
            },
            "maxHealth" : {
              "baseValue" : 200
            },
            "protection" : {
              "baseValue" : 1.0
            },
            "healthRegen" : {
              "baseValue" : 0.0
            },
            "poisonImmunity" :
            {
              "baseValue" : 1.0
            }
          },
    
          "resources" : {
            "stunned" : {
              "deltaValue" : -1.0,
              "initialValue" : 0.0
            },
            "health" : {
              "maxStat" : "maxHealth",
              "deltaStat" : "healthRegen",
              "defaultPercentage" : 100
            }
          }
        },
    
        "mouthOffset" : [0, 0],
        "feetOffset" : [0, -8]
      }
    }

    Monster Sprite/Animation
    [​IMG]
    !! NOT TO SCALE !!
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    is your frames file called body.frames?
     
  3. Dilrax

    Dilrax Ketchup Robot

    no just the PNG and .part file, why should it be?
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

    yes... the frames file should always have the exact same name as the image file.
     

Share This Page