Modding Help Weapon Alt Ability

Discussion in 'Starbound Modding' started by Tremerion, Jul 28, 2016.

  1. Tremerion

    Tremerion Existential Complex

    Hi. I need help with weapon alt ability. I've tried to create my own ability by renaming lines in grenagelauncher ability. With no sucess.
    grenedalauncher original:
    {
    "animationCustom" : {
    "animatedParts" : { "parts" : {
    "grenadelauncher" : {
    "properties" : {
    "zLevel" : -1,
    "centered" : true,
    "offset" : [-0.75, -0.375],
    "transformationGroups" : ["muzzle"],
    "firePosition" : [0.75, -0.125],
    "image" : "/items/active/weapons/ranged/abilities/grenadelauncher/grenadelauncher.png"
    }
    }
    }},
    "sounds" : {
    "altFire" : [ "/sfx/gun/grenade1.ogg" ]
    },
    "particleEmitters" : {
    "altMuzzleFlash" : {
    "active" : false,
    "emissionRate" : 8,
    "transformationGroups" : ["muzzle"],
    "offsetRegion" : [-0.25, -0.5, -0.25, -0.5],
    "particles" : [
    { "particle" : "rocketbarrelpuff", "offset" : [0.0, 0.0] },
    { "particle" : "rocketbarrelpuff", "offset" : [0.0, 0.0] },
    { "particle" : "rocketbarrelpuff", "offset" : [0.0, 0.0] }
    ]
    }
    }
    },

    "ability" : {
    "name" : "Grenade Launcher",
    "type" : "grenadelauncher",
    "scripts" : ["/items/active/weapons/ranged/abilities/altfire.lua"],
    "class" : "AltFireAttack",

    "elementalConfig" : {
    "physical" : { "projectileType" : "impactgrenade" },
    "fire" : { "projectileType" : "firecloudgrenade" },
    "electric" : { "projectileType" : "electriccloudgrenade" },
    "ice" : { "projectileType" : "icecloudgrenade" },
    "poison" : { "projectileType" : "poisoncloudgrenade" }
    },
    "projectileParameters" : {},
    "projectileCount" : 1,
    "inaccuracy" : 0,
    "baseDamage" : 9,
    "energyUsage" : 25,
    "fireTime" : 2.0,
    "fireType" : "auto",

    "firePositionPart" : "grenadelauncher",
    "hidePrimaryMuzzleFlash" : true,

    "stances" : {
    "fire" : {
    "duration" : 0,
    "armRotation" : 5,
    "weaponRotation" : 5,
    "twoHanded" : true,

    "allowRotate" : false,
    "allowFlip" : false
    },
    "cooldown" : {
    "duration" : 0.11,
    "armRotation" : 5,
    "weaponRotation" : 5,
    "twoHanded" : true,

    "allowRotate" : false,
    "allowFlip" : false
    }
    }
    }
    }

    mine hellgrenade:
    {
    "animationCustom" : {
    "animatedParts" : { "parts" : {
    "hellgrenade" : {
    "properties" : {
    "zLevel" : -1,
    "centered" : true,
    "offset" : [-0.75, -0.375],
    "transformationGroups" : ["muzzle"],
    "firePosition" : [0.75, -0.125],
    "image" : "/items/active/weapons/ranged/abilities/hellgrenade/hellgrenade.png"
    }
    }
    }},
    "sounds" : {
    "altFire" : [ "/sfx/gun/grenade1.ogg" ]
    },
    "particleEmitters" : {
    "altMuzzleFlash" : {
    "active" : false,
    "emissionRate" : 8,
    "transformationGroups" : ["muzzle"],
    "offsetRegion" : [-0.25, -0.5, -0.25, -0.5],
    "particles" : [
    { "particle" : "rocketbarrelpuff", "offset" : [0.0, 0.0] },
    { "particle" : "rocketbarrelpuff", "offset" : [0.0, 0.0] },
    { "particle" : "rocketbarrelpuff", "offset" : [0.0, 0.0] }
    ]
    }
    }
    },

    "ability" : {
    "name" : "Hell Grenade",
    "type" : "hellgrenade",
    "scripts" : ["/items/active/weapons/ranged/abilities/altfire.lua"],
    "class" : "AltFireAttack",

    "elementalType" : "fire",
    },
    "projectileParameters" : {},
    "projectileCount" : 1,
    "inaccuracy" : 0,
    "baseDamage" : 9,
    "energyUsage" : 25,
    "fireTime" : 2.0,
    "fireType" : "auto",

    "firePositionPart" : "hellgrenade",
    "hidePrimaryMuzzleFlash" : true,

    "stances" : {
    "fire" : {
    "duration" : 0,
    "armRotation" : 5,
    "weaponRotation" : 5,
    "twoHanded" : true,

    "allowRotate" : false,
    "allowFlip" : false
    },
    "cooldown" : {
    "duration" : 0.11,
    "armRotation" : 5,
    "weaponRotation" : 5,
    "twoHanded" : true,

    "allowRotate" : false,
    "allowFlip" : false
    }
    }
    }
    }

    Weapon is working with grenadelauncher, but is not seeing my ability.
    Can someone help me figure it out?
     
  2. Ulithium_Dragon

    Ulithium_Dragon Space Kumquat

    I'd like to know this too... I can find zero instances of mods that have successfully used *CUSTOM* alt abilities since the 1.0 update.

    Trouble is that before 1.0 we used to use the variable "altAbilitySource". So for my mod it was:
    Code:
    "altAbilitySource" : "/items/active/weapons/ranged/abilities/ShrapnelMissile/Shrapnelbomb",
    
    ...But now it has changed to "altAbilityType", and cannot be given a source name. Nevertheless, I tried:
    Code:
    "altAbilityType" : "ShrapnelMissile",
    
    ...Which obviously did not work. I then tried:
    Code:
    "altAbilityType" : "/items/active/weapons/ranged/altabilities/ShrapnelMissile/ShrapnelMissile",
    
    ...But that didn't work either.

    Then just to make sure there was nothing wrong with my ability itself, I first put on a vanilla ability (shrapnel bomb) and tested if it was working - it was.
    I then completely copied that .weaponability's code into my .weaponability, and it still did not work (tested with both of the above formats).

    Thus it seems that only "vanilla" altabilities can be used now. Unless there is some kind of "alt abilities list" that we need to patch or something now, I guess it's actually functionally impossible for modders to make their own alt abilities since the 1.0 update...
    Please someone prove me wrong... Y_Y

    (I'm getting REALLY FUCKING SICK of all these UNDOCUMENTED changes every MOTHERFUYCKING UPDATE Chucklefish! It's like you're legitimately TRYING to break every single mod every single update for the love of god!!!)
     
  3. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    I am having the same troubles. I renamed my files, and rechecked them to see that they looked right, but in game it doesn't appear in the weapon info on my crafting station, nor does the custom alt ability work on the weapon at all. Switching it to one of the vanilla alt abilities works properly however. Before 1.0 I had several customized alt abilities successfully, so I'm not sure what about 1.0's changes are preventing a custom one from working. My best guess was that there might be a file to patch somewhere that has a list compiled of "allowed" alt abilities? I dunno :/ It's distressing, and I really hope there's a fix
     
    Last edited: Jul 30, 2016
  4. Ulithium_Dragon

    Ulithium_Dragon Space Kumquat

    Would really be nice to hear from a dev on this matter - everything I can find out myself makes me belive custom alt abilities aren't possible anymore... :L
     
  5. vipmedy

    vipmedy Space Spelunker

    items\buildscripts\weaponabilities.config
     
  6. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    Now I've juuuuuuuuust gotta figure out how to patch that file >_<
     
    Celestial Dragon likes this.
  7. Ulithium_Dragon

    Ulithium_Dragon Space Kumquat

    I was wondering if there was some dumb master list file we had to amend.
    Ug, the old system worked perfectly fine ffs... =.=

    Thanks AmazonValkyrie!
     
  8. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    Yeah, that's how I feel >_< It's why I've taken so long to update my work 'cause they made these changes :/ If anybody figures out patching this file, please let me know. I'm kind of a novice when it comes to .patch files >_<
     
  9. Ulithium_Dragon

    Ulithium_Dragon Space Kumquat

    I'm no better - the few times I've tried I ended up having to ask for help.

    I'm not THAT adept at java to begin with (I think ti's a sucky language with obtuse rules that lead to syntax errors out the arse), and the rules for so much of Starbound's functions are variables are sooooo undocumented and vague... T_T

    Oh, and they change every single patch as well, leading to issues, say, JUST LIKE THIS ONE!!! >:[
     
  10. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    My bf figured out how to make it patch properly. Here's my code for an example:

    Code:
    [
      { "op" : "add", "path" : "/cyanslash", "value" : "/items/active/weapons/melee/abilities/broadsword/cyanslash/cyanslash.weaponability" },
      { "op" : "add", "path" : "/esspearspin", "value" : "/items/active/weapons/melee/abilities/spear/esspin/esspin.weaponability" }
    ]
     
    Celestial Dragon likes this.
  11. Ulithium_Dragon

    Ulithium_Dragon Space Kumquat

    Thanks. I was gonna look at how they did it for the Avali race mod, since they just fixed their alt abilities, but this is easier. :]
     
    Last edited: Jul 30, 2016
  12. Tremerion

    Tremerion Existential Complex

    Thank you all for contibution :) I've found(at least in my case) that adding:
    { "op" : "add", "path" : "/name", "value" : "/items/active/weapons/melee/abilities/weapontypename/name/name.weaponability" } to player.config.patch is not working.
    But when I add:
    "name" : "/items/active/weapons/ranged/abilities/name/name.weaponability", to weaponabilities.config, it works as intended. Question is, do more weapon mods with this file edited will conflict with each other.
    --- Post updated ---
    Tested. They do conflict. One weapon has Alt, from other mod, not.
    --- Post updated ---
    Dah, silly me. I needed to patch weaponabilities.config. Lesson learned: never code after whole day of work. But I cannot still make it work :)
    --- Post updated ---
    I've created weaponabilities.config.patch with entry:
    [{"op" : "add", "path" : "/hellgrenade", "value" : "/items/active/weapons/ranged/abilities/hellgrenade/hellgrenade.weaponability"}]
    And it is still not working.
     
  13. Ulithium_Dragon

    Ulithium_Dragon Space Kumquat

    I patched mine, but it's now causing instant CTD's when I try to wield the weapon. I know the patch worked though, cuz the tooltip says the name.

    The CTD may be unrelated, but I've gone over the code with a fine-toothed comb and I see no issues...
     
  14. Tremerion

    Tremerion Existential Complex

    Could you link your patch file? Maybe I am doing something wrong
     
  15. Magnusito

    Magnusito Subatomic Cosmonaut

    Go to [whatever]\steamapps\common\Starbound\storage\ and open starbound.log to see whats causing the CTD.
     
  16. Ulithium_Dragon

    Ulithium_Dragon Space Kumquat

    Yeah I was gonna try that. It may not help though with this kind of error. :/

    --- Post updated ---

    Yeah, as suspected, the log files tell me that there's a problem with the weapon...

    GEE, I HAD NO IDEA - THANKS!!! =.=

    --- Post updated ---

    Sorry, I don't know how I missed your message. I'll attach the patch I made, but it's exactly how it was said above.

    Note that this MUST be placed into the "items\buildscripts\" folder!
    Footnote: This forums is total poopy, I swear. It auto-merges posts no matter how much time was between the last one, auto-codes emoticons with no way to turn them off (even using the source editor), strips copy+pasted source formatting but keeps it when used inline, even for things that are not easily toggleable on the top-level editor, and allows almost ZERO file types to be uploaded, not even the JSON extensions created for their own damn game (and I mean, who the hell DOESN'T support .7z, the most efficient archival type there is!?!?)...

    --- Post updated ---

    EDIT: Ug, I fixed my custom alt ability - it's working correctly now. I overlooked the fact that the folder for abilities was renamed from "altabilities" to "abilities", and so my directory string was incorrect... /cry

    Oh right - VERY IMPORTANT: I just not found out that ability names are CASE SENSITIVE for some stupid reason - so make sure your capitalization is consistent or it won't work... Y_Y
     

    Attached Files:

    Last edited: Aug 2, 2016
    Celestial Dragon likes this.
  17. Tremerion

    Tremerion Existential Complex

    Thank you! :D Now it is working :D Finaly I can mod some crazy shit :)
     

Share This Page