[Mod] Sounds [sounds]

Post Reply
User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

[Mod] Sounds [sounds]

by AntumDeluge » Post

Description:

This mod is intended to provide a set of free sounds & reduce dependencies on default & MTG.

As of right now, only sounds from default mod have been added.

Licensing:
Usage:

If your mod depends on default for node sounds only, then you can easily switch to sounds. Simply add default & sounds as optional dependencies in your mod.conf. sounds aliases or overrides methods used by default to its own. For example default.node_sound_dirt_defaults.

Example of code:

Code: Select all

function sounds.node_dirt(tbl)
	tbl = tbl or {}

	tbl.footstep = tbl.footstep or {name="sounds_step_dirt", gain=0.4}
	tbl.dug = tbl.dug or {name="sounds_step_dirt", gain=1.0}
	tbl.place = tbl.place or {name="sounds_place_node_soft", gain=1.0}

	sounds.node(tbl)
	return tbl
end

default.node_sound_dirt_defaults = sounds.node_dirt
Links:
Last edited by AntumDeluge on Tue Jun 15, 2021 19:51, edited 2 times in total.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Sounds [sounds]

by sirrobzeroone » Post

Very nice :) - I did something sort of like this recently although left it bundled in with my base game. Not sure if you want to add:

-- Grass---------node_sound_grass()
-- Grass Dry---node_sound_grass_dry()
-- Kelp-----------node_sound_kelp()
-- Coral----------node_sound_coral()

I found those have semi-custom levels etc, they were set directly against the nodes as sort of overrides to base sounds, I pulled them out as I wanted a sort of generic base sound set I could use easily. Hopefully my settings below make sense more than happy if you want to add them or not also a link to my git version of sounds \/:
(https://github.com/sirrobzeroone/minete ... sic_sounds)

note - mtg_basic_sounds.node_dug_place_sound = sounds.node

Code: Select all

function mtg_basic_sounds.node_sound_grass(tbl_sounds)
	tbl_sounds = tbl_sounds or {}
	tbl_sounds.footstep = tbl_sounds.footstep or
							   {name = "default_grass_footstep", gain = 0.25}
	tbl_sounds.dug = tbl_sounds.dug or
							   {name = "default_dirt_footstep", gain = 1.0}
	tbl_sounds.place = tbl_sounds.place or
							   {name = "default_place_node", gain = 1.0}
	mtg_basic_sounds.node_dug_place_sound(tbl_sounds)
	return tbl_sounds
end

function mtg_basic_sounds.node_sound_grass_dry(tbl_sounds)
	tbl_sounds = tbl_sounds or {}
	tbl_sounds.footstep = tbl_sounds.footstep or
							   {name = "default_grass_footstep", gain = 0.4}
	tbl_sounds.dug = tbl_sounds.dug or
							   {name = "default_dirt_footstep", gain = 1.0}
	tbl_sounds.place = tbl_sounds.place or
							   {name = "default_place_node", gain = 1.0}
	mtg_basic_sounds.node_dug_place_sound(tbl_sounds)
	return tbl_sounds
end

function mtg_basic_sounds.node_sound_kelp(tbl_sounds)
	tbl_sounds = tbl_sounds or {}
	tbl_sounds.footstep = tbl_sounds.footstep or
							   {name = "default_sand_footstep", gain = 0.05}
	tbl_sounds.dig = tbl_sounds.dig or
							   {name = "default_dig_snappy", gain = 0.2}							   
	tbl_sounds.dug = tbl_sounds.dug or
							   {name = "default_grass_footstep", gain = 0.25}
	tbl_sounds.place = tbl_sounds.place or
							   {name = "default_place_node", gain = 1.0}
	return tbl_sounds
end

function mtg_basic_sounds.node_sound_coral(tbl_sounds)
	tbl_sounds = tbl_sounds or {}
	tbl_sounds.footstep = tbl_sounds.footstep or
							   {name = "default_hard_footstep", gain = 0.3}
	tbl_sounds.dig = tbl_sounds.dig or
							   {name = "default_dig_snappy", gain = 0.2}							   							   
	tbl_sounds.dug = tbl_sounds.dug or
							   {name = "default_grass_footstep", gain = 0.25}							   
	tbl_sounds.place = tbl_sounds.place or
							   {name = "default_place_node_hard", gain = 1.0}
	return tbl_sounds
end
Also did you get Paramats changes here? https://github.com/minetest/minetest_ga ... f12a06266c

Thanks for pulling these out as its the sounds I am finding the most useful from MTG :).

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Sounds [sounds]

by AntumDeluge » Post

sirrobzeroone wrote:
Tue Jun 15, 2021 05:42
Not sure if you want to add
Thanks. I appreciate your suggestion. I'm a bit burnt out at the moment. But I will check it out more closely when I get some more energy.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Sounds [sounds]

by sirrobzeroone » Post

AntumDeluge wrote:
Tue Jun 15, 2021 18:53
sirrobzeroone wrote:
Tue Jun 15, 2021 05:42
Not sure if you want to add
Thanks. I appreciate your suggestion. I'm a bit burnt out at the moment. But I will check it out more closely when I get some more energy.
Understand that feeling completely, if your open to it and once I finish up what I'm working on I'm happy to do a pull request across with the changes?

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests