Modding Help Adding status effect to armor

Discussion in 'Starbound Modding' started by ThePumpkinLad, Aug 22, 2016.

  1. ThePumpkinLad

    ThePumpkinLad Subatomic Cosmonaut

    Guys how to add effects to armors e.g (speed, regen etc)?
     
  2. Blackwood

    Blackwood Phantasmal Quasar

    Add "statusEffects" : [ "statusEffectName" ], to the top level of the armor file.

    To add a run boost - "statusEffects" : ["runboost"],
    To add constant, slow regen - "statusEffects" : ["salveheal"],

    Status effects are located in assets/stats/effects/*/*.statuseffect
     
  3. ThePumpkinLad

    ThePumpkinLad Subatomic Cosmonaut

  4. ThePumpkinLad

    ThePumpkinLad Subatomic Cosmonaut

    but how do you adjust the power of each status effect? Or do you need to make your own stats? Like in the older versions. Also how to add multiple stats?
     
  5. ThePumpkinLad

    ThePumpkinLad Subatomic Cosmonaut

    Can you also elaborate where to put it?
     
  6. Blackwood

    Blackwood Phantasmal Quasar

    It should be possible to adjust the power level. I'd need to test whether it is possible.

    For now you can check this test mod I made for you: http://www.mediafire.com/?kidc2d8k50pn4 It contains a chestpiece that give regeneration via the healingwater status effect and it contain legs that give runboost + jumboost.

    The items to spawn are testchest and testlegs. However, do note an interesting part of the UI design. Basically armor has 4 slots for effects and the max health, max energy, energy regen, and armor increases are also effects. So if you take a normal piece of non-costume armor (my test armor is tier6), add a status effect then 5 or more effects are displayed, then look at the UI. You'll see the status effects are pushed outside of their normal spots and begin to intersect with the armor description. If you want to make a mod to release you'll need to resolve the UI problem too.


    Edit: Okay, so if you want a scalable runboost, regen, jumpboost, etc then you'd need to make a custom status effect that can be scaled.
     
    Last edited: Aug 22, 2016
  7. ThePumpkinLad

    ThePumpkinLad Subatomic Cosmonaut

    Thanks I just got confused where to place it, testing if it works.
     
  8. ThePumpkinLad

    ThePumpkinLad Subatomic Cosmonaut

    Sick it works! Thanks a lot I'll put credits to you when I add my mod in.
     
  9. ThePumpkinLad

    ThePumpkinLad Subatomic Cosmonaut

    Err something went wrong with this coding. I did the same thing as you but it still doesn't work. Can you please find the mistake?


    {
    "itemName" : "stigmachest",
    "price" : 6400,
    "inventoryIcon" : "icons.png:chest",
    "maxStack" : 1,
    "rarity" : "Legendary",
    "category" : "chestarmour",
    "description" : "Travel through the cosmos with Stigma's Paralax Suit.",
    "shortdescription" : "Stigma's Paralax Suit",
    "tooltipKind" : "armor",

    "statusEffects" : ["healingwater"],

    "maleFrames" : {
    "body" : "chestm.png",
    "backSleeve" : "bsleeve.png",
    "frontSleeve" : "fsleeve.png"
    },

    "femaleFrames" : {
    "body" : "chestm.png",
    "backSleeve" : "bsleeve.png",
    "frontSleeve" : "fsleeve.png"
    },

    "level" : 6,
    "statusEffects" : [
    {
    "stat" : "powerMultiplier",
    "baseMultiplier" : 1
    },
    {
    "stat" : "protection",
    "amount" : 100
    },
    {
    "stat" : "maxEnergy",
    "amount" : 100
    },
    {
    "stat" : "runboost20",
    "amount" : 10
    },
    {
    "stat" : "maxHealth",
    "amount" : 100
    }
    ],

    "itemTags" : [ "tier6armour" ],

    "colorOptions" : [
    // BLACK
    { "ffca8a" : "838383", "e0975c" : "555555", "a85636" : "383838", "6f2919" : "151515" },
    // BLACK
    { "ffca8a" : "838383", "e0975c" : "555555", "a85636" : "383838", "6f2919" : "151515" },
    // GREY
    { "ffca8a" : "b5b5b5", "e0975c" : "808080", "a85636" : "555555", "6f2919" : "303030" },
    // WHITE
    { "ffca8a" : "e6e6e6", "e0975c" : "b6b6b6", "a85636" : "7b7b7b", "6f2919" : "373737" },
    // RED
    { "ffca8a" : "f4988c", "e0975c" : "d93a3a", "a85636" : "932625", "6f2919" : "601119" },
    // ORANGE
    { "ffca8a" : "ffd495", "e0975c" : "ea9931", "a85636" : "af4e00", "6f2919" : "6e2900" },
    // YELLOW
    { "ffca8a" : "ffffa7", "e0975c" : "e2c344", "a85636" : "a46e06", "6f2919" : "642f00" },
    // GREEN
    { "ffca8a" : "b2e89d", "e0975c" : "51bd3b", "a85636" : "247824", "6f2919" : "144216" },
    // BLUE
    { "ffca8a" : "96cbe7", "e0975c" : "5588d4", "a85636" : "344495", "6f2919" : "1a1c51" },
    // PURPLE
    { "ffca8a" : "d29ce7", "e0975c" : "a451c4", "a85636" : "6a2284", "6f2919" : "320c40" },
    // PINK
    { "ffca8a" : "eab3db", "e0975c" : "d35eae", "a85636" : "97276d", "6f2919" : "59163f" },
    // BROWN
    { "ffca8a" : "ccae7c", "e0975c" : "a47844", "a85636" : "754c23", "6f2919" : "472b13" }
    ],

    "effectSources" : [ "frozenfiretrail" ]
    }
     
  10. Blackwood

    Blackwood Phantasmal Quasar

    Where it says

    Code:
    "level" : 6,
       "statusEffects" : [
    
    It should say "leveledStatusEffects". Secondly, those leveledStatusEffects for health, protectin, energy? That's the old system. Doesn't work w/ the new system.

    Also, are you certain that "stat" : "runboost20" scales with level? If it doesn't you will crash on launch.

    Edit:
    Okay, I do not see any mention of runboost in levelingmultipliers.functions, so I suspect that is does not scale and is what is crashing. Along w/ the typo I mentioned.


    Edit2:
    Argh, too late a night so I missed something. When you picked runboost20 and gave it a multiplier of 10 did you intend to boost the player to twice normal run speed (20 x 10)? Or did you just want the +50% (1.5x normal run speed) like you see with green stims?

    Right now the easiest thing for a set of armor w/o having to fiddle with leveled status effects is to just do the following:
    1. Make a copy of runboost.statuseffect. Rename it to runboost100.statuseffect
    2. Edit runboost100.statuseffect to point to the script runboost100.lua
    3. Make a copy of runboost.lua. Name that copy runboost100.lua
    4. Edit runboost100.lua to change the speedModifier to 2 (so +100% or 2x normal run speed). Or make it whatever multiplier.
    5. Edit your armor file so that it shows "statusEffects" : ["healingwater", "runboost100"],

    Might as well leave the leveled status effects alone until it is better documented. I'm having trouble tracing all of the connections, but what I just gave does work. Hopefully running too fast though won't cause trouble with loading chunks or rendering.

    Here is a changed version for comparison assuming you make that runboost100 status effect I mentioned.
    Code:
    {
      "itemName" : "stigmachest",
      "price" : 6400,
      "inventoryIcon" : "icons.png:chest",
      "maxStack" : 1,
      "rarity" : "Legendary",
      "category" : "chestarmour",
      "description" : "Travel through the cosmos with Stigma's Paralax Suit.",
      "shortdescription" : "Stigma's Paralax Suit",
      "tooltipKind" : "armor",
    
      "statusEffects" : ["healingwater", "runboost100"],
    
      "maleFrames" : {
      "body" : "chestm.png",
      "backSleeve" : "bsleeve.png",
      "frontSleeve" : "fsleeve.png"
      },
    
      "femaleFrames" : {
      "body" : "chestm.png",
      "backSleeve" : "bsleeve.png",
      "frontSleeve" : "fsleeve.png"
      },
    
      "level" : 6,
      "leveledStatusEffects" : [
      {
      "levelFunction" : "standardArmorLevelPowerMultiplierMultiplier",
      "stat" : "powerMultiplier",
      "baseMultiplier" : 1.25
      },
      {
      "levelFunction" : "standardArmorLevelProtectionMultiplier",
      "stat" : "protection",
      "amount" : 0.5
      },
      {
      "levelFunction" : "standardArmorLevelMaxEnergyMultiplier",
      "stat" : "maxEnergy",
      "amount" : 5
      },
      {
      "levelFunction" : "standardArmorLevelMaxHealthMultiplier",
      "stat" : "maxHealth",
      "amount" : 5
      }
      ],
    
      "itemTags" : [ "tier6armour" ],
    
      "colorOptions" : [
      // BLACK
      { "ffca8a" : "838383", "e0975c" : "555555", "a85636" : "383838", "6f2919" : "151515" },
      // BLACK
      { "ffca8a" : "838383", "e0975c" : "555555", "a85636" : "383838", "6f2919" : "151515" },
      // GREY
      { "ffca8a" : "b5b5b5", "e0975c" : "808080", "a85636" : "555555", "6f2919" : "303030" },
      // WHITE
      { "ffca8a" : "e6e6e6", "e0975c" : "b6b6b6", "a85636" : "7b7b7b", "6f2919" : "373737" },
      // RED
      { "ffca8a" : "f4988c", "e0975c" : "d93a3a", "a85636" : "932625", "6f2919" : "601119" },
      // ORANGE
      { "ffca8a" : "ffd495", "e0975c" : "ea9931", "a85636" : "af4e00", "6f2919" : "6e2900" },
      // YELLOW
      { "ffca8a" : "ffffa7", "e0975c" : "e2c344", "a85636" : "a46e06", "6f2919" : "642f00" },
      // GREEN
      { "ffca8a" : "b2e89d", "e0975c" : "51bd3b", "a85636" : "247824", "6f2919" : "144216" },
      // BLUE
      { "ffca8a" : "96cbe7", "e0975c" : "5588d4", "a85636" : "344495", "6f2919" : "1a1c51" },
      // PURPLE
      { "ffca8a" : "d29ce7", "e0975c" : "a451c4", "a85636" : "6a2284", "6f2919" : "320c40" },
      // PINK
      { "ffca8a" : "eab3db", "e0975c" : "d35eae", "a85636" : "97276d", "6f2919" : "59163f" },
      // BROWN
      { "ffca8a" : "ccae7c", "e0975c" : "a47844", "a85636" : "754c23", "6f2919" : "472b13" }
      ],
    
      "effectSources" : [ "frozenfiretrail" ]
    }
    
     
    Last edited: Aug 23, 2016
  11. ThePumpkinLad

    ThePumpkinLad Subatomic Cosmonaut

    Thanks I think I figured what the problem was. I clashed 2 codings together! Thanks for the explanation anyways:

    Coding error:
    "statusEffects" : ["healingwater"],

    "maleFrames" : {
    "body" : "chestm.png",
    "backSleeve" : "bsleeve.png",
    "frontSleeve" : "fsleeve.png"
    },

    "femaleFrames" : {
    "body" : "chestm.png",
    "backSleeve" : "bsleeve.png",
    "frontSleeve" : "fsleeve.png"
    },

    "level" : 6,
    "statusEffects" : [
    {
    "stat" : "powerMultiplier",
    "baseMultiplier" : 1
    },
    {
    "stat" : "protection",
    "amount" : 100
     
  12. Blackwood

    Blackwood Phantasmal Quasar

    Oh, I edited the post to also show the error in the leveledStatusEffects. Might want to check that out.
     
  13. Shadox2.0

    Shadox2.0 Spaceman Spiff

    If you check here you can may have some info (and a tuto made by Yokoca ) if you want.
     
  14. Joseph K

    Joseph K Giant Laser Beams

    ID for spooked debuff? anyone???
     
  15. MarauderKnight3

    MarauderKnight3 Void-Bound Voyager

    I had to sign up and all sorts of unforgiving stuff to bring you this answer: The ID for the spooked debuff is 'erchiussickness'. Enjoy
     
    Kowgan likes this.

Share This Page