Modding Help help with my weapons mod

Discussion in 'Starbound Modding' started by saccomano, May 22, 2020.

  1. saccomano

    saccomano Void-Bound Voyager

    So I was doing a mod that adds a weapon, I have practically no programming experience so I just took the folder for one of the weapons in the game and changed a couple of things like the sprite and the id, the weapon is a sword and what I want to do is change the special attack to be that of the Drill Spear. try just putting the spear attack in the altAbility part but it didn't work, I think it has to do with something missing from the weapon's ".animation" script but I don't know how to solve it. I could just change the texture and go to the drill spear but I couldn't keep the sword combo.
     
  2. bugbiome

    bugbiome Void-Bound Voyager

    may i ask, how exactly doesnt it work? like does it not show up ingame or does it crash? and have you checked the startup log for errors?
     
  3. saccomano

    saccomano Void-Bound Voyager

    just stop having animation, it only stays in the hand static and I cannot use it


    I also tried adding the sword combo to the drill spear instead of adding the special sword attack but it became a generically perfect item.
     
    Last edited: May 22, 2020
  4. bugbiome

    bugbiome Void-Bound Voyager

    yeegh ive been trying to see how id do it to see if i could make it work but alas, unsuccessful till now. if i do find something ill get back to you tho!!!!
     
  5. saccomano

    saccomano Void-Bound Voyager

    [QUOTE = "bugbiome, post: 3363898, member: 1170648"] ya ha intentado ver cómo lo hago para ver si puedo hacerlo, pero por desgracia, no he tenido éxito hasta ahora. si encuentro algo malo, ¡te respondo! [/ CITA]

    my idea really was that the weapon was in addition to a sword a method of transport, I was thinking of putting the attack of the drill spear increase the boost force and boost speed and use it to fly on any planet without the need for low gravity, I had also thought that the special attack was something like a grappling hook but I think that would be even more complicated.
     
  6. bugbiome

    bugbiome Void-Bound Voyager

    i Think ive found a way to add the Drill ability to the sword!!!!!!
    1) tried to make a drillsword myself to see how id do it, so used some terms like "drillsword" as the itemName and descriptions, and made a VERY simple edit to the asuterosaberu and used that png as placeholder "drillsword.png". furthermore most of this code is just copied from the asuterosaberu as well.
    2) got rid of custom animations, just simplicity for myself
    3) copied "drillspear.animation" and renamed it, replaced some "image"'s to reflect "drillsword" instead of spear, to get the right png working
    4) Something went wrong in primaryAbilityType but i got the altAbility working! basically i just added in the code from "drillspear.activeitem"s altAbility, "DrillCharge", and changed the script location to reflect where i stored the file "drillcharge.lua", which i copied to the mod file, But i dont think copying it was necessary, i was just playing around hehe. also changed "damageSourceKind" to "broadsword".​
    hope this explains anything x)


    {
    "itemName" : "drillsword",
    "level" : 6,
    "price" : 1500,
    "maxStack" : 1,
    "rarity" : "Legendary",
    "description" : "Drill Sword",
    "shortdescription" : "Drill Sword",
    "tooltipKind" : "sword",
    "category" : "broadsword",
    "twoHanded" : true,
    "itemTags" : ["weapon","melee","broadsword"],

    "inventoryIcon" : "drillsword.png",

    "animation" : "drillsword.animation",
    "animationCustom" : { },

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

    "elementalType" : "physical",

    "primaryAbilityType" : "broadswordcombo",


    "altAbility" : {
    "scripts" : ["/items/active/weapons/melee/broadsword/drillcharge.lua"],
    "class" : "DrillCharge",

    "energyUsage" : 45,

    "boostSpeed" : 25,
    "boostForce" : 150,

    "damageTimeout" : 0.25,
    "damageConfig" : {
    "damageSourceKind" : "broadsword",
    "statusEffects" : [ ],
    "knockbackMode" : "aim",
    "knockback" : 25,
    "baseDamage" : 3.5
    },

    "tileDamage" : 0.5,
    "tileDamageRate" : 0.15,
    "damageTileDepth" : 3,

    "stances" : {
    "windup" : {
    "duration" : 0.5,
    "armRotation" : -100,
    "weaponRotation" : 10,
    "twoHanded" : true,
    "weaponOffset" : [0, 0.5],

    "allowRotate" : true,
    "allowFlip" : true
    },
    "fire" : {
    "armRotation" : -15,
    "weaponRotation" : -75,
    "twoHanded" : true,
    "weaponOffset" : [0.0, 0.75],

    "allowRotate" : true,
    "allowFlip" : true
    },
    "winddown" : {
    "duration" : 0.5,
    "armRotation" : -85,
    "weaponRotation" : -5,
    "twoHanded" : true,
    "weaponOffset" : [0, 0.5],

    "allowRotate" : true,
    "allowFlip" : true
    }
    }
    },

    "builder" : "/items/buildscripts/buildunrandweapon.lua"
    }

     
  7. saccomano

    saccomano Void-Bound Voyager

    oh thanks, I'll try to add the skill to the sword.
    do you have the sword folder to download?

    only if it's not too much trouble
     

Share This Page