Modding Help Parameters sent in recipe are ignored?

Discussion in 'Starbound Modding' started by xxCygnus13xx, Apr 28, 2017.

  1. xxCygnus13xx

    xxCygnus13xx Scruffy Nerf-Herder

    Hello, I am working on a gun mod, and I am noticing that my parameters sent in the recipe, such as level and altAbilities, are ignored and what is defined in the activeItem is used instead. Am I doing something wrong here?
    Here is a recipe that I am using.
    Code:
    {
        "input" : [
            { "item" : "Bronzeassaultriflemmn", "count" : 1 },
            { "item" : "plasmaweavearmmn", "count" : 1 }
        ],
        "output" : {
            "item" : "plasmaWeaveAssaultRifle",
            "count" : 1,
            "parameters" : {
                "level" : 1,
                "altAbilities" : [ "flashlight" ]
            }
        },
        "groups" : [ "gunassemblymmn" ]
    }
    Here is the activeItem
    Code:
      "itemName" : "plasmaWeaveAssaultRifle",
      "price" : 900,
      "maxStack" : 1,
      "rarity" : "rare",
      "description" : "A fully automatic, military grade rifle.",
      "shortdescription" : "Common Assault Rifle",
      "tooltipKind" : "gun",
      "category" : "Plasma Rifle",
      "twoHanded" : true,
      "itemTags" : ["weapon","ranged","assaultrifle"],
      "level" : 1,
    
      "animation" : "/items/active/weapons/ranged/gun.animation",
      "animationParts" : { },
      "animationCustom" : { },
      "baseOffset" : [-1.0, 0.25],
      "muzzleOffset" : [0.0, 0.3125],
    
      "scripts" : ["/items/active/weapons/ranged/gun.lua"],
    
      "elementalType" : "physical",
    
      "primaryAbility" : {
        "scripts" : ["/items/active/weapons/ranged/gunfire.lua"],
        "class" : "GunFire",
    
        "fireTime" : [0.11, 0.18],
        "baseDps" : [8.7, 8.7],
        "energyUsage" : [27, 30],
        "inaccuracy" : 0.02,
    
        "burstTime" : 0.075,
        "burstCount" : [2,4],
        "fireType" : ["auto", "burst"],
    
        "projectileType" : "plasmaweave",
        "projectileParameters" : {
          "knockbackRange" : [4,8]
        },
    
        "stances" : {
          "idle" : {
            "armRotation" : 0,
            "weaponRotation" : 0,
            "twoHanded" : true,
    
            "allowRotate" : true,
            "allowFlip" : true
          },
          "fire" : {
            "duration" : 0,
            "armRotation" : 3,
            "weaponRotation" : 3,
            "twoHanded" : true,
    
            "allowRotate" : false,
            "allowFlip" : false
          },
          "cooldown" : {
            "duration" : 0.11,
            "armRotation" : 3,
            "weaponRotation" : 3,
            "twoHanded" : true,
    
            "allowRotate" : false,
            "allowFlip" : false
          }
        }
      },
      "fireSounds" : [ "/sfx/gun/ar1.ogg", "/sfx/gun/ar2.ogg", "/sfx/gun/ar3.ogg", "/sfx/gun/ar4.ogg", "/sfx/gun/ar5.ogg", "/sfx/gun/ar6.ogg" ],
    
      "builder" : "/items/buildscripts/buildweapon.lua",
      "builderConfig" : [{
        "nameGenerator" : "assaultnames.config:nameGen",
        "animationParts" : {
          "butt" : {
            "path" : "/items/active/weapons/ranged/assaultrifle/butt/<variant>.png",
            "variants" : 20,
            "paletteSwap" : true
          },
          "middle" : {
            "path" : "/items/active/weapons/ranged/assaultrifle/middle/<variant>.png",
            "variants" : 20,
            "paletteSwap" : true
          },
          "barrel" : {
            "path" : "/items/active/weapons/ranged/assaultrifle/barrel/<variant>.png",
            "variants" : 20,
            "paletteSwap" : true
          },
          "muzzleFlash" : "/items/active/weapons/ranged/muzzleflash.png"
        },
        "gunParts" : ["butt", "middle", "barrel"],
        "altAbilities" : [
          "explosiveshot",
          "bouncingshot",
          "flashlight",
          "grenadelauncher",
          "spray"
        ],
        "palette" : "/items/active/weapons/colors/ranged.weaponcolors",
        "iconDrawables" : ["butt", "middle", "barrel"]
      }]
    }
    
     
  2. bk3k

    bk3k Oxygen Tank

    You know I thought you could do this and would almost swear I've seen it... but a string search in /recipes/ proves at the very least this isn't a vanilla thing. Maybe we're both mistaken. But that's clearly an oversight if so. You should be able to do (yet perhaps not in reality) anything with a recipe which you could do with a spawn command. It seems silly if you cannot.

    I still mean to see if it would take treasurepools as outputs by swapping "item" for "pool". I haven't tried yet.

    edit:
    I have to wonder why they didn't make the inputs and outputs in the form of itemDescriptor. It doesn't make any sense especially considering what they went with is very close already.

    I've been weighing a system to replace the recipe system (with a combination of LUA and large .config files) - this might just be the final nail in that coffin. The recipe system is unsatisfying in many regards, but the lack of proper custom parameter support is a serious oversight.
     
    Last edited: Apr 28, 2017
  3. Cyel

    Cyel Scruffy Nerf-Herder

  4. xxCygnus13xx

    xxCygnus13xx Scruffy Nerf-Herder

    So I took another look and it seems that the level parameter correctly gets applied, but not the altAbilites. Perhaps it is a bug?? Either way, at least I shouldn't need to create a bunch of leveled recipes.
     

Share This Page