1. Hey Guest! Our new game Wargroove has released! Check out the forums or wiki for more information!
    Dismiss Notice

Modding Help [Solved]Scripts on Armor?

Discussion in 'Starbound Modding' started by Dakrhunter30, Jan 11, 2018.

  1. Dakrhunter30

    Dakrhunter30 Void-Bound Voyager

    I had the Idea of creating somesort of Wingback item (Cosmicwings) which once equiped would allow the player to use the old forgotten Butterflyboost tech (still got the old files of it).

    My question:
    Is it possible to call scripts from the armor itself?
    I only want the ability to be avaible while wearing the back item.

    Backitem:

    {
    "itemName" : "cosmicwings",
    "price" : 0,
    "inventoryIcon" : "icon.png",
    "rarity" : "legendary",
    "category" : "backwear",
    "description" : "Todo.",
    "shortdescription" : "Cosmicwings",
    "tooltipKind" : "back",
    "maleFrames" : "back.png",
    "femaleFrames" : "back.png",
    "maxStack" : 1,
    "script" : "/items/armor/backitems/cosmicwings/cosmicwings.lua"
    }
     
  2. An Old Knight

    An Old Knight Pangalactic Porcupine

    From experience, no it isn't, but you can call effects. So if you can manage to call the script indirectly through an effect then the answer becomes yes. I could give an example here in a minute on how to call effects.

    EDIT:
    One way is custom leveled stats, much the way I added momentum and called it in the player_primary.
    Code:
    "level" : 6,
      "leveledStatusEffects" : [
        {
          "levelFunction" : "manipulatorArmorLevelPowerMultiplierMultiplier",
          "stat" : "powerMultiplier",
          "baseMultiplier" : 1.5    },
        {
          "levelFunction" : "standardArmorLevelProtectionMultiplier",
          "stat" : "protection",
          "amount" : 0.5    },
        {
          "levelFunction" : "acceleratorArmorLevelMaxEnergyMultiplier",
          "stat" : "maxEnergy",
          "amount" : 10
        },
        {
          "levelFunction" : "separatorArmorLevelMaxHealthMultiplier",
          "stat" : "maxHealth",
          "amount" : 30   
        },
        {
          "levelFunction" : "baseArmorLevelenergyInhibitMultiplier",
          "stat" : "energyInhibit",
          "amount" : 0.080
        },
        {
          "levelFunction" : "baseArmorLevelgravityMultiplier",
          "stat" : "knockbackThreshold",
          "amount" : 35.0
        },
        {
          "levelFunction" : "baseArmorLevelgravityMultiplier",
          "stat" : "weight",
          "amount" : 0.25
        }
      ]
    The unique stats being energyInhibit and weight..

    The other way is to make your own status effect that calls your script then indirectly call it by putting
    Code:
    "statusEffects" : [ "statuseffectname" ],
    Status effects being found in assets/unpacked/stats/effects/
    There you can see examples of how to set one up.

    Sorry for the rant, I'm terrible at explaining this stuff on the spot.
     
    Last edited: Jan 11, 2018
    Dakrhunter30 likes this.
  3. Dakrhunter30

    Dakrhunter30 Void-Bound Voyager

    Damn i forgot about effects.
    Thank you very much for bringing it up.
    As for calling effects, i can just take a look at the lanternstick.
     

Share This Page