Page 1 of 1

[mod] Torch Sounds [wip]

PostPosted: Sun May 08, 2016 12:18
by burli
This mod adds new sounds to torches.
if placing/removing a torch a "swush" sound is played.

Continuos sound is removed because of some engine issues

Github: https://github.com/MarkuBu/torch_sounds

For Minetest Version: 0.4.14 (uses LBM)
Depends: default
Optional: torches
Version: 0.0.1
License: DWYWPL


Feel free to try and report bugs

View Video for demo

https://youtu.be/2OkIe0j3ZzA

Re: [mod] Torch Sounds [wip]

PostPosted: Sun May 08, 2016 13:40
by TumeniNodes
A nice mod that adds some ambience, thanks. These are the sort of subtle features which continue to make Minetest better all the time :)

Re: [mod] Torch Sounds [wip]

PostPosted: Sun May 08, 2016 16:37
by azekill_DIABLO
+1

i love the header of your game, who did it?? XD

Re: [mod] Torch Sounds [wip]

PostPosted: Sun May 08, 2016 18:02
by burli
azekill_DIABLO wrote:i love the header of your game, who did it?? XD

Don't know. It was just there ;-)

TumeniNodes wrote:These are the sort of subtle features which continue to make Minetest better all the time :)


I have some more ideas like this.

Re: [mod] Torch Sounds [wip]

PostPosted: Sun May 08, 2016 19:18
by sofar
what is the license of this "mod"?

Edit: same for the audio files, I can't find any license info.?

Re: [mod] Torch Sounds [wip]

PostPosted: Sun May 08, 2016 19:24
by burli
sofar wrote:what is the license of this "mod"?


Will be DWYWPL or something similar. Will add more informations soon

Re: [mod] Torch Sounds [wip]

PostPosted: Mon May 09, 2016 08:44
by burli
Add some more informations and reduced the length of the burning sound to 20 seconds. Attached the new file to the first post

Re: [mod] Torch Sounds [wip]

PostPosted: Sat May 14, 2016 15:39
by burli
I tried my mod with the Karsthafen map. There are lots of default torches. There is a bug if the 3d torches mod has to convert the torches first. And if there are many torches I get an out of memory warning.

I also add a random delay in the lbm becaus it sounds strange if many torches are "ignited" at nearly the same time

Re: [mod] Torch Sounds [wip]

PostPosted: Sat May 14, 2016 15:51
by burli
Is there a limit of playable sounds in mintest?

Re: [mod] Torch Sounds [wip]

PostPosted: Sat May 14, 2016 17:03
by azekill_DIABLO
yes.

exemple: in old MT version (4.6 i think) i started a fire in a forest (IMMA PIXEL ARSONIST!!) and, after a while i got some error about sounds, huge and strange noises and then silence....

add a range for listening sounds (15 nodes is perfect) and you will not have problems ;)

Re: [mod] Torch Sounds [wip]

PostPosted: Sat May 14, 2016 17:27
by burli
azekill_DIABLO wrote:add a range for listening sounds (15 nodes is perfect) and you will not have problems ;)

Well, that does not work with my solution. If I set eg max_hear_distance=5, then only torches near to the player will play a sound. The other torches remain silent.

I guess I have to find another solution. Maybe I try "find_nodes_in_area" to turn the sound on and the node timer to turn the sound off. As long as the node is near the player the timer will reset every few seconds

Re: [mod] Torch Sounds [wip]

PostPosted: Sun May 15, 2016 10:23
by azekill_DIABLO
burli wrote:Well, that does not work with my solution. If I set eg max_hear_distance=5, then only torches near to the player will play a sound. The other torches remain silent.


what's the problem? only players can hear sounds, so it's useful to play them when torches are near you, no?

Re: [mod] Torch Sounds [wip]

PostPosted: Sun May 15, 2016 11:57
by burli
azekill_DIABLO wrote:what's the problem? only players can hear sounds, so it's useful to play them when torches are near you, no?

You make the same mistake as I did. max_hear_distance is the distance between sound and player, where you can hear the sound when you execute sound_play. So if the player is within the radius, when sound_play is executed, he can hear the sound, otherwise not.

Try yourself. Set all max_hear_distance to 2. Then place a torch inside the radius. You can hear the sound, even if you walk away. Then place a torch outside the radius. You don't hear a sound, even if you get closer to the torch

max_hear_distance is not the distance you can hear a sound or not. It is the distance where sounds are added to the node or not.

Hope you understand what I mean. My english is not so good

Re: [mod] Torch Sounds [wip]

PostPosted: Mon May 16, 2016 10:25
by azekill_DIABLO
ok i totally understand

Re: [mod] Torch Sounds [wip]

PostPosted: Mon May 16, 2016 15:54
by Kevin Tee
This mod conflicted with the torches (3d torches) mod.

2016-05-16 22:52:53: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2016-05-16 22:52:53: WARNING[Main]: Field "tile_images": Deprecated; new name is "tiles".
2016-05-16 22:52:53: WARNING[Main]: Field "light_propagates": Deprecated; determined from paramtype
2016-05-16 22:52:53: ERROR[Main]: ModError: Failed to load and run script from /home/user/.minetest/mods/torches_sounds/init.lua:
2016-05-16 22:52:53: ERROR[Main]: /home/user/.minetest/mods/torches_sounds/init.lua:33: Attempt to override non-existent item default:torch_wall
2016-05-16 22:52:53: ERROR[Main]: stack traceback:
2016-05-16 22:52:53: ERROR[Main]: [C]: in function 'error'
2016-05-16 22:52:53: ERROR[Main]: /usr/share/minetest/builtin/game/register.lua:338: in function 'override_item'
2016-05-16 22:52:53: ERROR[Main]: /home/user/minetest/mods/torches_sounds/init.lua:33: in main chunk
2016-05-16 22:52:53: ERROR[Main]: Check debug.txt for details.

Re: [mod] Torch Sounds [wip]

PostPosted: Mon May 16, 2016 16:19
by burli
I only tested it with the latest version of sofars mod (see first post). There is a known issue if the torches mod has to convert default torches to 3d torches.

Because of other issues I will rewrite the code.

Re: [mod] Torch Sounds [wip]

PostPosted: Mon Mar 13, 2017 12:03
by burli
My torch sound mod is back, but a little bit simpler for now. I removed the continuous sound because of some engine issues.

I just replace the dig and replace sound for now

Re: [mod] Torch Sounds [wip]

PostPosted: Mon Mar 13, 2017 12:05
by azekill_DIABLO
it's a bit sad. AFAIK minetest always got problem with looping sounds