Modding Help Having fun learning JSON with Starbound...

Discussion in 'Starbound Modding' started by lamcraig, Jul 16, 2017.

  1. lamcraig

    lamcraig Scruffy Nerf-Herder

    ...but I have a few questions regarding particular elements. Most of the guides and tutorials I see deal specifically with creating weapons from scratch and giving them special abilities and projectile types, modifying the projectiles and status effects ect. I've got some general knowledge like "don't put specials on one-handers" and "no melee on ranged or vice-versa." So, I'm still a very beginner and basic coder, but I already feel like I've outgrown simple weapon tweaks. I'm looking to do overhauls now. For example, I'm currently working with magnorbs because I'm trying to create a wrist launcher.

    When I use magnorbs and try to change parameters, it says cannot load magnorbs.

    When I use another weapon and filepath to magnorbs for the body, the placement is hilariously off.

    Another example with magnorbs:

    trying to /spawnitem magnorbs then setting the ability or projectile ends in an error message.

    What am I missing?

    Some other issues I'm having are -

    Charge Gun and Dragon Pistol charge mechanic. Cannot place them on other weapons.

    Creating Combos for melee weapons. No Idea where to start.

    Can we inflict status effects on ourselves with a weapon? (Also, is there a self harm parameter? Like, molotovs do damage to you but launched rockets and stuff don't.)

    Is there a parameter to modify launched grenades? I can't seem to make my grenades inflict status based on projectileParameters.

    Where can I find onContact parameters? I see some projectiles explode, some roll around on the ground, some stick, some disappear.

    Is there a projectile life parameter? Like, I got speed and stuff, but I can't figure out how to shorten the flight time.

    I've unpacked the files, downloaded N++ and use a JSON viewer to check and format everything. ANY help or links to newer and updated tutorials would be greatly appreciated. I've been looking at the activeitem files and whatnot to get a better understanding of how the weapons are put together. I also viewed the reddit contests and some individual submissions but, there is only so much I can learn by looking at other people's copy/paste.
    IHart likes this.
  2. cpeosphoros

    cpeosphoros Orbital Explorer

    @lamcraig I don't have (at least yet) the information you are looking for, but I'm working in a centralized "tutorial" on lua and json templates, here. If you have something already and want to contribute there, feel free to do so.

    As I am more of a coder and way less of a spriter, I started my modding with objects and quests, as those graphics are quite simple. I thin I will eventually come by to items, activeitems, weather, etc. My idea with that tutorial is to document things I'll be discovering while I do my modding, annd to share it with the community. I'd be very glad if other people did the same.
  3. projectmayhem

    projectmayhem Spaceman Spiff

    Use the projectile for impactgrenade.

      "projectileName" : "impactgrenade",
      "physics" : "grenade",
      "bounces" : 0,
      "timeToLive" : 3,
      "damageKindImage" : "icon.png",
      "image" : "impactgrenade.png",
      "animationCycle" : 0.5,
      "frameNumber" : 4,
      "actionOnReap" : [
          "action" : "config",
          "file" : "/projectiles/explosions/regularexplosion2/regularexplosionknockback.config"
      "power" : 50,
      "damageType" : "NoDamage",
      "damageKind" : "default"
    As you can see, there is a timeToLive variable. That determines the life span of the projectile. I do believe the bounce determines if it explodes on contact.
    Hope this helps!
  4. IHart

    IHart Scruffy Nerf-Herder

    You are trying to get it to fire something other than magnorbs? Start with something that already fires normal projectiles and edit the way it looks.

    Pay attention to the scripts each of these uses. Until you get into Lua you are basically stuck using those scripts as intended. This is THE reason melee and ranged abilities can't just be swapped, melee weapons use melee.lua while ranged use gun.lua.

    Positioning is determined by the image file combined with the offset defined in the item file and any offsets defined in the animation file.

    Start by looking at a combo that is similar to one you want.


    "statusEffects" : [ <desired effect> ] should work.

    This is a combination of things. "physics" "bounces" "timeToLive" and "piercing". np++ has a directory search feature you can use to find every example of usage in your unpacked files!
    Cyel likes this.

Share This Page