Modding Help Applying status effects: allies instead of enemies

Discussion in 'Starbound Modding' started by NullBrainer, Sep 4, 2017.

  1. NullBrainer

    NullBrainer Aquatic Astronaut

    I have this mod that uses the Chain.lua file, I made another lua file that acts similar to the beamfire.lua but it locks onto entities with the type friendly, or passive. It does not do damage but uses applyStatus damage and applies a healing status. I want to figure out how to apply the healing status to friendly or passive entities. Since it's damage, it only affects hostile entities, healing the enemy instead.

    Since it's a beam and not a projectile, how do I apply the functionality similar to healingzone or a healing gas projectiles?

    I don't know how to apply the information into the right json objects. Documentation hasn't had much help on the structure of the objects and how they work with eachother.

    It uses a weaponability instead of a weaponability type unlike the erchius eye.
    //I'll use this to indicate comments
    JSON:
    "primaryAbility" : {
    "scripts" : ["/items/active/weapons/ranged/abilities/medibeamfire/medibeamfire.lua"],
    "class" : "MediBeamFire",

    "fireTime" : 0.2,
    "baseDps" : 0,
    "energyUsage": 0,
    "piercing" : true,
    "damageConfig": {
    "statusEffects": [
    {
    "effect": "regeneration4",
    "duration": 5
    }
    ],
    "damageKind" : "hidden", //This region with comments is what I added, I know this allows it but where
    "damageType" : "ignoresdef", //does it go?
    "damageTeam" : "indiscriminate", //still no effect, probably because it's not a projectile?
    "damageSourceKind": "applystatus", //damage config already does it but only heals hostile enemies
    "knockback": 0
    }


    Is there some method or function that sets the status on a certain entity type that I'm missing?
    Here is a healing status projectile from the game.(vanilla) It's what I used for reference.
    JSON:
    {
    "projectileName" : "healingstatusprojectile",
    "physics" : "statuspod",
    "bounces" : -1,
    "timeToLive" : 0.25,
    "speed" : 0,
    "damageKindImage" : "icon.png",
    "image" : "healingstatusprojectile.png",
    "animationCycle" : 0.5,
    "frameNumber" : 4,
    "actionOnReap" : [
    {
    "action" : "loop",
    "count" : 25,
    "body" : [
    {
    "action" : "particle",
    "specification" : "pinkgas"
    }
    ]
    }
    ],
    "power" : 0,
    "piercing" : true,
    "damageKind" : "hidden",
    "damageType" : "ignoresdef", //So how can I fit this into the weapon ability that is a beam?
    "damagePoly" : [ [-80, -80], [-80, 80], [80, 80], [80, -80] ],
    "flippable" : true,
    "damageTeam" : { "type" : "indiscriminate" },
    "statusEffects" : [
    {"effect" : "regeneration4", "duration" : 120}
    ]
    }


    It targets non-hostile entities but does not heal them. It only heals enemies that get caught by the beam
    Is there a json object to reverse the logic of the applystatus on a beam?
    lua function call to set the status on certain entitie types?
     

Share This Page