Modding Help Giving the Electric Baton the Violium Treatment

Discussion in 'Starbound Modding' started by TheHeroForGaming, May 11, 2021.

  1. TheHeroForGaming

    TheHeroForGaming Big Damn Hero

    I really love the feel of the Electric Baton as a weapon, the way it grants you a thrust-overhead-swing combo, rather than two small stabs from a typical shortsword. My only issue with it is that I prefer the look of the violium shortsword. Who doesn't love a lightsaber? As such, I'm trying my best to try and mix the animation and swing arcs of the Baton with the sprites, swooshes, sounds, etc of the Violium Shortsword. I might swap the order later, doing overhead-swing/stab rather than stab/overhead-swing, but that's small potatoes for now.

    Unfortunately, I kind of like to make things work in vanilla as best as I can, so I can show friends regardless of mods, and so I don't want to make this into a mod if I can help it. While I know how to make a mod for a separate weapon that works how I'd like this to, I'd rather achieve this within vanilla, by spawning it in with commands. So there's the issue of taking all the data, as complicated as it is, and putting it into my character's metadata file in a format it can read, so that I can just spawn the weapon using /admin as if it were in my chat history, since Starbound doesn't support Copy/Pasting straight into the game's chat. Grr.

    Figuring out how to do this is one of the most complicated things I've tried in my short time messing with Starbound Modding, trying to get the right pieces from both weapons' .activeitem files. But it's really the last thing I'd like to do for myself before I'll be satisfied putting the game down for a good long while (after almost 1,000 hours!) If anyone is willing to help make this sword a reality, I'd really appreciate the help - I've been fiddling around with this for the better part of a week or two and I feel no closer than when I started. Thanks!
     
  2. TheHeroForGaming

    TheHeroForGaming Big Damn Hero

    Here's the relevant data that I'd want to put into the metadata somehow. I can fiddle with it from there, if something doesn't look right, but I have no idea how to get this into the game except meticulously entering it character by character:



    "inventoryIcon" : "violiumshortswordicon.png",

    "animation" : "/items/active/weapons/melee/shortsword/energyshortsword.animation",
    "animationParts" : {
    "handle": "/items/active/weapons/protectorate/violiumshortsword/handle.png",
    "handleFullbright" : "/items/active/weapons/protectorate/violiumshortsword/handlefullbright.png",
    "blade" : "/items/active/weapons/protectorate/violiumshortsword/blade.png"
    },
    "animationCustom" : {
    "animatedParts" : {
    "stateTypes" : {
    "blade" : { "states" : {
    "extend" : {
    "frames" : 1,
    "cycle" : 0.1,
    "properties" : {
    "immediateSound" : "/sfx/tools/energypickaxe_start.ogg"
    }
    },
    "active" : {
    "frames" : 6,
    "cycle" : 0.3,
    "properties" : {
    "persistentSound" : "/sfx/melee/violiumshortsword_idle1.ogg"
    }
    },
    "retract" : {
    "frames" : 1,
    "cycle" : 0.1,
    "properties" : {
    "immediateSound" : "/sfx/tools/energypickaxe_stop2.ogg"
    }
    }
    }},
    "swoosh" : { "states" : { "fire2" : {
    "cycle" : 0.15
    }}}
    },
    "parts" : {
    "blade" : { "properties" : {
    "zLevel" : 2
    }},
    "swoosh" : { "partStates" : { "swoosh" : {
    "fire" : { "properties" : {
    "image" : "/items/active/weapons/melee/shortsword/swoosh/energyswoosh.png:<frame>"
    }},
    "fire2" : { "properties" : {
    "image" : "/items/active/weapons/melee/broadsword/swoosh/energyswoosh.png:<frame>",
    "offset" : [-3.625, 2.25],
    "damageArea" : [[1, 3], [4, 1.75], [5, -0.25], [5, -2.25], [4, -3.25], [0, -2.5]]
    }}
    }}}
    }
    },
    "particleEmitters" : {
    "energyswoosh" : {
    "active" : false,
    "transformationGroups" : ["swoosh"],
    "burstCount" : 4,
    "particles" : [
    { "particle" : "energyswoosh1"},
    { "particle" : "energyswoosh2"},
    { "particle" : "energyswoosh2"}
    ]
    },
    "blade" : {
    "active" : false,
    "transformationGroups" : ["weapon"],
    "offsetRegion" : [-0.5, -0.75, 0.5, 1.5],
    "emissionRate" : 5,
    "particles" : [
    { "particle" : "energyswoosh1"},
    { "particle" : "energyswoosh2"},
    { "particle" : "energyswoosh2"}
    ]
    }
    },
    "sounds" : {
    "fire" : ["/sfx/melee/laser_weapon_swing1.ogg", "/sfx/melee/laser_weapon_swing2.ogg", "/sfx/melee/laser_weapon_swing3.ogg"],
    "fire2" : ["/sfx/melee/laser_weapon_swing1.ogg", "/sfx/melee/laser_weapon_swing2.ogg", "/sfx/melee/laser_weapon_swing3.ogg"]
    }
    },

    "scripts" : ["/items/active/weapons/melee/energymeleeweapon.lua"],

    "activeTime" : 2.0,

    "elementalType" : "physical",

    "primaryAbilityType" : "shortswordcombo",
    "primaryAbility" : {
    "fireTime" : 0.625,
    "baseDps" : 7.5,

    "stances" : {
    "idle" : {
    "armRotation" : -90,
    "weaponRotation" : -10,
    "weaponOffset" : [0, 2.75]
    },
    "windup1" : {
    "duration" : 0.15,
    "armRotation" : 30,
    "weaponRotation" : 0,
    "weaponOffset" : [0, 2.75]
    },
    "fire1" : {
    "duration" : 0.3,
    "armRotation" : -40,
    "weaponRotation" : -70,
    "weaponOffset" : [0, 2.75]
    },
    "wait1" : {
    "duration" : 0.3,
    "armRotation" : -90,
    "weaponRotation" : -10,
    "weaponOffset" : [0, 2.75]
    },
    "windup2" : {
    "duration" : 0.15,
    "armRotation" : 30,
    "weaponRotation" : 0,
    "weaponOffset" : [0, 2.75]
    },
    "fire2" : {
    "duration" : 0.3,
    "armRotation" : -40,
    "weaponRotation" : -70,
    "weaponOffset" : [0, 2.75]
    }
    }
    }
     

Share This Page