Modding Help Idle Animations

Discussion in 'Starbound Modding' started by Atromixx, Feb 20, 2016.

Tags:
  1. Atromixx

    Atromixx Scruffy Nerf-Herder

    Hello I am trying to make a sword with an idle animation, i can't seem to get this to work. Could somebody please tell me how to give a weapon an idle animation?
     
  2. Relten

    Relten The Waste of Time

    I'm thinking the only that will be possible is to make it an activeitem.
     
  3. Atromixx

    Atromixx Scruffy Nerf-Herder

    ok how do i do that?
     
    Relten likes this.
  4. lazarus78

    lazarus78 The Waste of Time

    Dig into the assets and reverse engineer an existing item.

    There are no tutorials for this kind of thing, so we have to kinda guess based on what the devs do.
     
  5. Atromixx

    Atromixx Scruffy Nerf-Herder

    thats what I've been trying to do, But my Backkuppak does not contain every item in the game. Im trying to find the chainsaw file as that is an animated weapon but i cant find it.
     
  6. lazarus78

    lazarus78 The Waste of Time

    Download nightly. It has everything thus far. Primarily the backer weapons. Most all have animations.
     
    Atromixx likes this.
  7. Atromixx

    Atromixx Scruffy Nerf-Herder

    ok I'll try that thanks :up:
     
  8. lazarus78

    lazarus78 The Waste of Time

    When you unpack the assets, lookin /items/active/weapons/other. Those are the backer weapons. They will be the best guides for what you are looking to do. I'm not on !y PC right now, otherwise I'd just post a sample weapon for you.
     
    Atromixx and Relten like this.
  9. Dunto

    Dunto Guest

    .activeitem
    Code:
    {
      "itemName" : "energywhip",
      "level" : 6,
      "maxStack" : 1,
      "rarity" : "legendary",
      "description" : "Get cracking!",
      "shortdescription" : "Lucaine's Energy Whip",
      "tooltipKind" : "sword",
      "weaponType" : "Whip",
      "twoHanded" : true,
      "itemTags" : ["weapon"],
    
      "inventoryIcon" : "energywhip.png:idle",
      "animation" : "whip.animation",
      "animationParts" : {
      "weapon" : "energywhip.png",
      "weaponFullbright" : "energywhipfullbright.png"
      },
      "animationCustom" : {
      "lights" : { "glow" : {
      "active" : true,
      "position" : [0.75, 0.5],
      "color" : [40, 73, 117]
      }},
      "particleEmitters" : { "crack" : { "particles" : [ ]}},
      "sounds" : {
      "swing" : [ "/sfx/melee/energywhip_swing1.ogg", "/sfx/melee/energywhip_swing2.ogg", "/sfx/melee/energywhip_swing3.ogg" ],
      "crack" : [ "/sfx/melee/energywhip_impact1.ogg", "/sfx/melee/energywhip_impact2.ogg", "/sfx/melee/energywhip_impact3.ogg" ]
      }
      },
      "scripts" : [ "whip.lua" ],
    
      "animationScripts" : [
      "/items/active/effects/chain.lua"
      ],
    
      "altAbilitySource" : "/items/active/weapons/whip/altabilities/energyorb.altability",
    
      "primaryAbility" : {
      "scripts" : ["/items/active/weapons/whip/whipcrack.lua"],
      "class" : "WhipCrack",
    
      "fireTime" : 1.1,
      "chainDps" : 2.4,
      "crackDps" : 7.2,
    
      "damageConfig" : {
      "statusEffects" : [ ],
      "damageSourceKind" : "electric",
      "timeoutGroup" : "primary",
      "timeout" : 0.3
      },
    
      "projectileType" : "whipcrackelectric",
      "projectileConfig" : {},
      "stances" : {
      "idle" : {
      "armRotation" : -90,
      "weaponRotation" : 0,
      "weaponRotationCenter" : [0.0, 0.0],
      "weaponOffset" : [-1.3, 0.625],
    
      "allowRotate" : true,
      "allowFlip" : true
      },
      "windup" : {
      "duration" : 0.25,
      "armRotation" : 100,
      "weaponRotation" : 0,
      "weaponRotationCenter" : [0.0, 0.0],
      "weaponOffset" : [-1.3, 0.625],
    
      "allowRotate" : true,
      "allowFlip" : true
      },
      "extend" : {
      "duration" : 0.1,
      "armRotation" : 0,
      "weaponRotation" : -90,
      "weaponRotationCenter" : [0.0, 0.0],
      "weaponOffset" : [-1.3, 0.875],
    
      "allowRotate" : false,
      "allowFlip" : false
      },
      "fire" : {
      "duration" : 0.1,
      "armRotation" : 0,
      "weaponRotation" : -90,
      "weaponRotationCenter" : [0.0, 0.0],
      "weaponOffset" : [-1.3, 0.875],
    
      "allowRotate" : false,
      "allowFlip" : false
      }
      }
      },
    
      "chain" : {
      "startOffset" : [0.625, 0],
      "length" : [3, 12],
      "segmentImage" : "/items/active/weapons/whip/energybeam.png",
      "endSegmentImage" : "/items/active/weapons/whip/energybeamend.png",
      "segmentSize" : 0.375,
      "fullbright" : true
      },
    
      "builder" : "/items/buildscripts/buildwhip.lua"
    }
    .animation
    Code:
    {
      "animatedParts" : {
      "stateTypes" : {
      "attack" : {
      "default" : "idle",
      "states" : {
      "idle" : {},
      "windup" : {
      "frames" : 3,
      "cycle" : 0.25,
      "mode" : "end"
      },
      "extend" : {
      "frames" : 1,
      "cycle" : 0.01,
      "mode" : "end"
      },
      "fire" : {}
      }
      }
      },
    
      "parts" : {
      "weapon" : {
      "properties" : {
      "transformationGroups" : ["weapon"],
      "centered" : true,
      "zLevel" : 0
      },
    
      "partStates" : {
      "attack" : {
      "idle" : {
      "properties" : {
      "image" : "<partImage>:idle"
      }
      },
      "windup" : {
      "properties" : {
      "image" : "<partImage>:windup.<frame>"
      }
      },
      "extend" : {
      "properties" : {
      "image" : "<partImage>:extend.<frame>"
      }
      },
      "fire" : {
      "properties" : {
      "image" : "<partImage>:fire"
      }
      }
      }
      }
      },
      "weaponFullbright" : {
      "properties" : {
      "transformationGroups" : ["weapon"],
      "centered" : true,
      "fullbright" : true,
      "zLevel" : 1
      },
    
      "partStates" : {
      "attack" : {
      "idle" : {
      "properties" : {
      "image" : "<partImage>:idle"
      }
      },
      "windup" : {
      "properties" : {
      "image" : "<partImage>:windup.<frame>"
      }
      },
      "extend" : {
      "properties" : {
      "image" : "<partImage>:extend.<frame>"
      }
      },
      "fire" : {
      "properties" : {
      "image" : "<partImage>:fire"
      }
      }
      }
      }
      }
      }
      },
    
      "transformationGroups" : {
      "weapon" : {},
      "endpoint" : {}
      },
    
      "particleEmitters" : {
      "crack" : {
      "transformationGroups" : ["endpoint"],
      "particles" : []
      }
      },
      "sounds" : {
      "swing" : [ ],
      "crack" : [ ]
      }
    }
     

Share This Page