Modding Help Gun level at creation.

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

Tags:
  1. xxCygnus13xx

    xxCygnus13xx Scruffy Nerf-Herder

    Hello, I am working on a mod that adds some craftable guns, and I was wondering if there is a way to pass in an item level from the recipe or do I have to create an activeItem for each level/tier?
     
  2. xxCygnus13xx

    xxCygnus13xx Scruffy Nerf-Herder

    On a side note, how does level contribute to the gun's damage? does it impact any other characteristics of the gun?
     
  3. bk3k

    bk3k Oxygen Tank

    Yes you can set custom parameters in recipes.

    Code:
    "output" : {
      "item" : "aegisaltbow",
      "count" : 1,
      "parameters" : {
        "level" : 10
      }
    },
    
    Those parameters can be any JSON attribute you would add or replace to the existing object, therefore you can completely remake the object into something radically different if you where so inclined.

    In that way, you don't need to create a million different items and can just edit an existing one. You can also do much the same in a treasurepool too.

    At some point I was going to test if recipe output can use treasurepools rather than just static items(by trading "item" for "pool" and pointing to a valid treasurepool). My guts says it may work, and may be interesting. You could have an unstable upgrade or production system that relies upon luck. Otherwise I guess I could do this in LUA.

    edit:
    Let me show you another useful example though.
    Code:
    "output" : {
      "item" : "aegisaltbow",
      "count" : 1,
      "parameters" : {
        "level" : 10,
        "primaryAbilityType" : "zenshot",
        "shortdescription" : "Not the aegisalt bow",
        "radioMessagesOnPickup" : null
      }
    },
    
    Now your weapon has a different primary ability, a different description, and probably shouldn't trigger any radio messages. Note I haven't tested this. I just sort of picked that item at random as it where.
     
    Last edited: Apr 21, 2017
    xxCygnus13xx likes this.
  4. xxCygnus13xx

    xxCygnus13xx Scruffy Nerf-Herder

    Thank you for the clear and descriptive answer!
     

Share This Page