How to add more then one effect to an object?

basicly as the title says.
i tried it like:

“stonehearth:lamp”: {
“light_policy”: “manual”,
“light_effect”: “stonehearth:effects:brazier_effect”,
“light_effect”: “/nordlingmod/data/effects/fireplace/fireplace_effect.json”,
“light_origin”: { “x”: 0, “y”: 1, “z”: 0 }
},

but kind of like half expected: it only takes the last one making a very-unsatisfactory smoking effect (i want basicly a brazier…that also trails smoke so smoke can come out of chimnees)

how do i get it to do -both- of them?

I think this reply on a different thread might have your solution! It worked for me as well :slight_smile:

possibly, but that answer is algabra to me, can you translate it to “not THAT great with effects yet”?

preferably with an example. i do good with examples and retrofitting XD

I think that the best thing - for your case, which is a lamp - would be to merge the brazier effect and the fireplace effect into a single effect.

You seem to be using the brazier effect from Stonehearth + adding a custom effect of yours (I suppose it is the smoke?)

Just “copy” the brazier effect and add it on your custom effect

lets give that a spin… lemme see… mind taking a look at my handywork in a sec :P?

1 Like

Sure!

Here’s an example of mine, used by the Annealing Forge in the Glassworks. I combined several effects (I think I used the kiln + the forge effects, plus minor edits) into a single effect that does a lot:
It has burning coals, it has a smoke, it emits light, has sound, etc.

{
   "type" : "effect",
   "tracks": {
      "animation": {
         "type": "animation_effect",
         "start_time": 0,
         "animation": "idle.json",
         "loop": true
       },
	   "coals": {
         "type": "cubemitter",
         "cubemitter": "/glassworks/data/horde/particles/fire/annealing_forge_coals.cubemitter.json",
         "loop": true,
         "transforms": {
            "x":0,
            "y":0.5,
            "z":0,
            "rx":90,
            "ry":0,
            "rz":0
         }
      },      
      "fire_light": {
         "type": "light",
         "light": "/glassworks/data/horde/animatedlights/annealing_forge_light.animatedlight.json",
         "transforms": {
            "x":0,
            "y":0.8,
            "z":0,
            "rx":90,
            "ry":0,
            "rz":0
        }
      },  
      "smoke": {
         "type": "cubemitter",
         "loop" : true,
         "cubemitter": "/glassworks/data/horde/particles/fire/annealing_forge_smoke.cubemitter.json",
         "transforms": {
            "x":0,
            "y":0.9,
            "z":0,
            "rx":90,
            "ry":0,
            "rz":0
         }
      },
      "sound": {
         "type": "sound_effect",
         "loop" : true,
         "start_time":  0,
         "min_distance": 20,
         "falloff" : 7,
         "volume": 3,
         "track" : "stonehearth:sounds:kiln_work"
      }
   }
}

So I’d suggest using the brazier effect as base, adding your fireplace things (smoke, I suppose) and making it all a single effect :slight_smile:

1 Like

so it should be something like this?

{
   "type" : "effect",
   "tracks": {
      "smoke": {
         "type": "cubemitter",
         "cubemitter": "/nordlingmod/data/horde/particles/fireplace/smoke.cubemitter.json",
         "loop": true,
         "transforms": {
         "scale": 1,
            "x":0,
            "y":1.4,
            "z":0,
            "rx":90,
            "ry":0,
            "rz":0
         }
      },
	  "fire": {
         "type": "cubemitter",
         "cubemitter": "/stonehearth/data/horde/particles/fire/small_fire.cubemitter.json",
         "loop": true,
         "transforms": {
            "x":0,
            "y":0.5,
            "z":0,
            "rx":90,
            "ry":0,
            "rz":0
         }
      },
	  "sound": {
         "type": "sound_effect",
         "loop" : true,
         "start_time": 0,
         "min_distance": 20,
         "falloff" : 2.5,
         "volume": 8,
         "track" : "stonehearth:sounds:brazier_loop"        
      },
      "light": {
         "type": "light",
         "light": "/stonehearth/data/horde/animatedlights/fire/small_fire.animatedlight.json",
         "transforms": {
            "x":0,
            "y":1.50,
            "z":0
         },
         "shadows": true
      }
   }
}
1 Like

Yes, I think that should probably work :smiley:

got the offset wrong but MUAHAHAHAHAHAHA
its something relatively easilly fixable.
thanks man you are an absolute hero :smiley:

3 Likes

You’re welcome!

And no worries, I’m always around asking stuff and the community is always helpful and generous, glad to be of help for a change :merry:

3 Likes

and this is why i love this community and its modders :smiley:let me at least give you some payoff then:

and

yes that house has two fireplaces and i like spoiling my nordlings :stuck_out_tongue:

also @max99x hearthlings dont understand chairs near fireplaces/the hearth could that be changed somehow?

2 Likes

The fireplace creates its own invisible entities that act as chairs (where the hearthlings sit on the ground).
Changing this would take some time, and we’re currently working hard on getting rid of all the bugs and improving performance (plus adding more content).

New AI actions could be modded in for this, though :slightly_smiling_face:
Or a different firepit component.

2 Likes

which i take it would be lua.
bah. ill leave that for later then. fur rugs will have to do.

-shakes fist at lua- i still suck at even reading it lol, currenlty staring at light_firepit.lua because only barbarians throw an entire chunk of tree in their fireplace… so i was seeing if i could make the civilised version of that that only accepts firewood.
firewood
firewood. im making it a thing :stuck_out_tongue:

3 Likes

@DaniAngione do you also happen to know what the values for sound do? (at work currently and fiddling with my stuff on breaks,)

"sound": {
         "type": "sound_effect",
         "loop": true,
         "start_time": 400,
         "min_distance": 40,
         "falloff": 2.5,
         "volume": 70,
         "track": "stonehearth:sounds:firepit_loop_sound"       
},

is my current setup for the fireplaces but id like it to gets less loud quicker if i go further away, its probably something to do with falloff but i cant trial-and-error from here :stuck_out_tongue:

1 Like

Yes, falloff is like a ratio in which the volume goes from zero/lowest (min distance to hear it) to maximum (on the source) - from what I understand at least.

However I think that for your case it would be more interesting to play with the distance instead of falloff. Because the fireplaces (on several houses) would possibly become an uninteresting background noise if you could still hear them from an average distance where you normally play - this kind of sound feels more fitting if louder but enclosed to interior “scenarios” while distant overviews of village and nature benefit more with natural soundscapes and ambience sound - that’s just my opinion of course.

So what I would do is actually increase the falloff ratio but reduce the distance drastically in a way that the sound doesn’t really fade away smoothly the further away from it you go but just starts to be heard only when you go down near the houses to admire their interiors and such.

Try reducing the distance to something like 20~30 (I think that 20 is the value used by talismans and other stuff that you really have to get close to hear properly due to also having a high falloff) and then falloff to… Hmm… Well, if you’d still want some background noise, go with like 10 or so but if you want it to be more like a local thing when you zoom in, you should probably go with 20~30

1 Like