Modding Help "fixedLevel" : false

Discussion in 'Starbound Modding' started by projectmayhem, Jun 21, 2017.

  1. projectmayhem

    projectmayhem Spaceman Spiff

    What does this tag on shields do exactly? I'm trying to make some tiered shields, I saw the named vanilla shields have this tag. Should I use it, or stick to the "level" : # tag?
     
  2. Cyel

    Cyel Scruffy Nerf-Herder

    from /items/buildscripts/buildshield.lua (and any other buildscript it seems
    Code:
    function build(directory, config, parameters, level, seed)
      [...]
      if level and not configParameter("fixedLevel", false) then
      parameters.level = level
      end
    I believe the build() function's level and seed parameters are generated regarding the planet's threat type and randomly respectively, so if the shield config sets "fixedLevel" to true or if there's no level parameter, then it'll use that level over the build()'s level
     
  3. projectmayhem

    projectmayhem Spaceman Spiff

    so if I set it to false, when the item is crafted, the level would vary depending on the planet? Or does it only work on looted stuff?
     
  4. Cyel

    Cyel Scruffy Nerf-Herder

    The level would vary depending on whatever builds the weapon, I don't exactly know how it's done depending on context but I'd expect the planet's threatLevel being the main source
     

Share This Page