Modding Help Are there any vanilla objects that provide a passive health regen by standing nearby?

Discussion in 'Starbound Modding' started by AmazonValkyrie, Jan 11, 2017.

Tags:
  1. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    I'm looking for an example of this so that I can create another object that would do the same thing: provide a health regen buff only when standing near it, like the campfires of Terraria. I don't play SB much, so I was wondering if anyone knew if something like this existed in game already or not, or if it were a simple thing to implement for an object? As always thank you in advance for any advice or information on the subject ^_^
     
    ManicRykker likes this.
  2. ManicRykker

    ManicRykker Phantasmal Quasar

    Can't really help much here, but definitely an interesting question.

    I do not particularly come across any objects with behavior like this, but it "might" be possible.

    I found a thread on here a long time ago finding out whether items can give status effects while held, which had a lua script that did the job perfectly. (A mod I created a few days back utilizes just that)


    So this would probably be a similar case. The object would probably need to run a lua script to perform this kind of thing.. Of course I'm not really an expert on the subject, and wouldn't really be able to create such a thing... Though this would definitely be useful.
     
    AmazonValkyrie likes this.
  3. lazarus78

    lazarus78 The Waste of Time

    Look at the avian boulder trap. It spawns a projectile, so you can swap the projectile (With some tweaking) to instead use a projectile like those staves that have the AOE fields with various effects, such as healing.

    I did this to make an AOE oxygen generator while messing with airless environments.
     
    AmazonValkyrie and ManicRykker like this.
  4. bk3k

    bk3k Oxygen Tank

    I can give you that.
    Code:
      "statusEffects" : [
        {
          "stat" : "nanowrapheal",
          "amount" : 100,
          "range" : 2
        }
      ],
    Replace "nanowrapheal" with your preferred stat. I believe you could have multiple by adding another set in {} so either multiple effects, or you could use the same sort of effect with different strengths that get stronger as you get closer.

    This BTW is part of how the old temperature system functioned. Objects could provide "warmth" when nearby and that worked well. "warmth" isn't currently a stat that exists in vanilla.

    If you want an easy visual representation of this working, try the "nude" stat :D as you can clearly see when it takes and looses effect.

    edit:
    BTW I recently stumbled upon this when reviving an old ship mod. It added "warmth" as a status. So I played with it. The old way
    Code:
    "kind" : "nanowrapheal"
    gave me a log error about no "stat" in map something something. So I added "stat" instead and it works :D perfectly.
    @Iris Blanche may want to take a look at this for the Enhanced Temperature mod. This would probably be easier and more efficient(C++ engine side) as a way to add heat sources(or cooling) with varying degrees of effect.

    Also to answer your question... no current vanilla objects do this. A shame that they don't though. You will find this commonly though
    Code:
    "statusEffects" : [ ], 
    That's on objects that once provided "warmth". They just stripped it from all of them. So me finding this was a matter of luck(as I say, reviving an old mod) then seeing if I could fix the errors the old code provided.
     
    Last edited: Jan 12, 2017
    ManicRykker and AmazonValkyrie like this.

Share This Page