Go to file
root ac5d18e68f fixes 2020-08-07 11:55:24 +02:00
sounds first commit 2020-07-31 23:36:01 +02:00
textures first commit 2020-07-31 23:36:01 +02:00
.luacheckrc fixes 2020-08-07 11:55:24 +02:00
LICENSE.md first commit 2020-07-31 23:36:01 +02:00
README.md first commit 2020-08-01 00:01:39 +02:00
init.lua first commit 2020-07-31 23:50:50 +02:00
mod.conf first commit 2020-07-31 23:36:01 +02:00

README.md

RCTHROW

function rcbows.THROW_bow(name, def)

Example:

rcthrow.register_throw("throw_weapons:steel_hatchet", {
	description = S("Steel Hatchet"),
	inventory_image = "throw_weapons_hatchet_inv.png",
	wield_image = "throw_weapons_hatchet.png", --optional
	throw_image = "throw_weapons_hatchet.png", --optional
	strength = 10,
	throw_damage = 10,
	throw_uses = 30,
	throw_sounds = {
		max_hear_distance = 10,
		gain = 0.6,
	},
	recipe = {
		{"", "default:steel_ingot", "default:steel_ingot"},
		{"", "group:wood", "default:steel_ingot"},
		{"group:wood", "", ""},
	},
	primary_use = {
		tool_capabilities = {
			full_punch_interval = 1.0,
			max_drop_level=1,
			groupcaps={
				choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=15, maxlevel=2},
			},
		damage_groups = {fleshy=5},
			},
		sound = {breaks = "default_tool_breaks"},
		groups = {axe = 1}
	},
})

Strength

  • The strength definition is maximum value.
  • The real throwing strength will depend on the player health.

primary_use Definition

You can use the tool as a regular tool plus throw it.

  1. If you do not define a "primary_use", then the throwing item is launched by using it.

  2. If you define a "primary_use":

  • It is the regular definition of the "minetest.register_tool": tool_capabilities, damage_groups, aound and groups.

  • When you use the item (left-click), this "primary_use" definition applies.

  • When you right-click, the item is thrown.

Audio

  1. If you define sounds={}, you get the default sounds.

For no sound at all do not declare 'sounds'.

Also you can set the sound parameters 'max_hear_distance' and 'gain'.

In example:

sounds = {
	max_hear_distance = 10,
	gain = 0.4,
}
  1. You also can define your own soundfiles.

You can set "soundfile_throw" and/or "soundfile_hit".

In example:

sounds = {
	soundfile_throw = "my_throw_sound"
	soundfile_hit = "my_hit_sound"
	max_hear_distance = 5,
	--set the gain by default (0.5)
}

Drop

By default it is dropped the self throwing item when reachs a solid node.

If you want not any drop at all, add:

drop = "",