init.lua 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974
  1. -- ToolData mod by MustTest.
  2. --
  3. -- The goal is to get all tool information into a single file to make comparison
  4. -- and adjustment much easier.
  5. --
  6. -- All tools should dig nodes taking not more than 2 seconds per node, a fairly
  7. -- reasonable rate. The early-game toolsets should distinguish mainly based on
  8. -- max drop level and amount of wear taken.
  9. --
  10. -- Starting toolset: wood. Not craftable, and very slow digging is ok.
  11. --
  12. -- Early-game toolsets: stone, iron, copper. These should perform similarly,
  13. -- especially stone since player might get bored if stone digs too slowly and
  14. -- they don't soon find iron or copper. Note: copper should have better
  15. -- dig-times than diamond, but not better than gem tools. However copper makes
  16. -- NO drops.
  17. --
  18. -- Mid-level (pro) toolsets: mese, diamond & mithril. Mese, diamond, & mithril
  19. -- gradually improve their dig-times in the order listed. Average dig times are
  20. -- between iron and gem tools. Copper tools should have the best dig-times
  21. -- (except for gem tools), but neither do copper tools produce drops.
  22. --
  23. -- Drops from mese tools go directly to player's inventory. Diamond & mithril
  24. -- tools both increase the player's XP gain. These are the ONLY tools to do
  25. -- this.
  26. --
  27. -- Expert-level toolsets: gem tools + reinforced gem tools.
  28. --
  29. -- 1) Gem Tools (inc. Reinforced Gem Tools): these dig faster than any other
  30. -- tools in the game, while having perfect drops. Worse wear handling than
  31. -- titanium but better than steel. The reinforced versions' dig-times are nearly
  32. -- the same as the regular gem tools, but their wear handling is as good as
  33. -- titanium.
  34. --
  35. -- Note that gem tools specialize: ruby makes best picks, emerald makes best
  36. -- shovels, sapphire makes best axes, and amethyst makes best swords. These
  37. -- tools are better than their gem peers in terms of slightly better wear
  38. -- handling and slightly faster dig-times.
  39. --
  40. -- Except for fast digging and perfect drops, gem tools don't have any special
  41. -- or unusual properties.
  42. --
  43. -- Silver tools: a special toolset that changes node drop behavior. Otherwise,
  44. -- these tools should have iron dig-times, but wear out quickly like copper.
  45. -- Silver tools max out at level 2, so nodes with levels 3/4 won't be able to
  46. -- make use of special silver-tool drops.
  47. --
  48. -- Titanium tools: another special toolset. Slightly faster dig times than iron
  49. -- (but not nearly as fast as copper), last MUCH longer, but have poorer drops.
  50. --
  51. -- Notes on level difference divider: the division is simple (though not
  52. -- explained at all in the Lua API document). So for instance, if a node has
  53. -- `level = 2` and a tool has `maxlevel = 4` in one of its dig groups, then
  54. -- that simply means that all dig-times for that dig group are divided in half.
  55. -- `4 - 2 = 2`, so all dig-times are `dig-time / 2`. If the level difference is
  56. -- 1 (node is level 3, tool is maxlevel 4), then the level difference divider
  57. -- still "kicks in", but since the difference is just 1 there is no effect on
  58. -- actual digging times.
  59. --
  60. -- Further note: all picks do excellent damage (better than swords), but have
  61. -- long swing time, so they're only good as first-strike weapons, then switching
  62. -- to a sword is better.
  63. tooldata = tooldata or {}
  64. td_api = td_api or {}
  65. local modpath = minetest.get_modpath("tooldata")
  66. td_api.modpath = modpath
  67. --------------------------------------------------------------------------------
  68. -- MISC TOOLS
  69. --------------------------------------------------------------------------------
  70. -- Hammer (usually an anvil-repair tool).
  71. tooldata["hammer_hammer"] = {
  72. full_punch_interval = 1.5,
  73. max_drop_level = 0,
  74. groupcaps = {
  75. cracky = {times={[3]=3.00}, uses=500, maxlevel=1},
  76. },
  77. damage_groups = {fleshy=6, cracky=10},
  78. }
  79. -- Excellent for crops/leaves, worthless for anything else.
  80. tooldata["shears_shears"] = {
  81. full_punch_interval = 1.0,
  82. max_drop_level = 1,
  83. groupcaps = {
  84. snappy = {times={[3]=0.10}, uses=300, maxlevel=1},
  85. },
  86. }
  87. -- The hand. Slow to dig, but dig plants/crops in 1 second.
  88. tooldata["hand_hand"] = {
  89. full_punch_interval = 0.8,
  90. max_drop_level = 0,
  91. groupcaps = {
  92. crumbly = {times={[3]=5.00}, uses=0, maxlevel=0},
  93. snappy = {times={[3]=1.00}, uses=0, maxlevel=0}, -- Dig plants in 1 second.
  94. cracky = {times={[3]=6.00}, uses=0, maxlevel=0}, -- Can dig very weak, soft stone, if long time enough.
  95. oddly_breakable_by_hand = {times={[1]=5.00, [2]=4.00, [3]=3.00}, uses=0},
  96. },
  97. damage_groups = {fleshy=1},
  98. }
  99. --------------------------------------------------------------------------------
  100. -- WOOD TOOLS
  101. --------------------------------------------------------------------------------
  102. -- Player's starting pick.
  103. -- Start plan: find dry shrub, get sticks. Dig cobble underneath, get cobble.
  104. -- Upgrade to stone tools ASAP.
  105. tooldata["pick_wood"] = {
  106. full_punch_interval = 2.0,
  107. max_drop_level = 1, -- Must be 1 otherwise cobble unobtainable.
  108. groupcaps = {
  109. cracky = {times={[3]=6.00}, uses=50, maxlevel=1},
  110. },
  111. damage_groups = {fleshy=2, cracky=1, crumbly=1},
  112. }
  113. --------------------------------------------------------------------------------
  114. -- STONE TOOLS: High punch interval, cracky mob damage.
  115. --------------------------------------------------------------------------------
  116. tooldata["pick_stone"] = {
  117. full_punch_interval = 3.0,
  118. max_drop_level = 2, -- Must be 2 otherwise stone unobtainable.
  119. groupcaps = {
  120. cracky = {times={[2]=2.00, [3]=1.90}, uses=50, maxlevel=2},
  121. },
  122. damage_groups = {fleshy=1, cracky=12, crumbly=1, knockback=16},
  123. dig_exhaustion_modifier = 1.5,
  124. }
  125. tooldata["shovel_stone"] = {
  126. full_punch_interval = 2.0,
  127. max_drop_level = 1,
  128. groupcaps = {
  129. crumbly = {times={[2]=2.00, [3]=1.90}, uses=50, maxlevel=2},
  130. },
  131. damage_groups = {fleshy=1, cracky=5, crumbly=1},
  132. }
  133. tooldata["axe_stone"] = {
  134. full_punch_interval = 1.5,
  135. max_drop_level = 2, -- Must be 2 otherwise can't get tree drops.
  136. groupcaps = {
  137. choppy = {times={[2]=2.00, [3]=0.90}, uses=50, maxlevel=2},
  138. },
  139. damage_groups = {fleshy=1, cracky=5, crumbly=1},
  140. }
  141. tooldata["sword_stone"] = {
  142. full_punch_interval = 1.5,
  143. max_drop_level = 0, -- Not good at getting drops from mobs.
  144. groupcaps = {
  145. -- Should be slightly faster at digging plants than the hand.
  146. snappy = {times={[2]=1.10, [3]=0.90}, uses=50, maxlevel=1},
  147. },
  148. damage_groups = {fleshy=4, cracky=6, crumbly=1},
  149. }
  150. --------------------------------------------------------------------------------
  151. -- IRON TOOLS: Dig slightly faster than stone, last much longer. Get all drops.
  152. --------------------------------------------------------------------------------
  153. tooldata["pick_steel"] = {
  154. full_punch_interval = 3.0,
  155. max_drop_level = 2, -- Must be 2 otherwise stone unobtainable.
  156. groupcaps = {
  157. cracky = {times={[1]=4.00, [2]=1.20, [3]=1.10}, uses=150, maxlevel=2},
  158. },
  159. damage_groups = {fleshy=13, cracky=1, crumbly=1, knockback=6},
  160. dig_exhaustion_modifier = 0.8,
  161. }
  162. tooldata["shovel_steel"] = {
  163. full_punch_interval = 1.5,
  164. max_drop_level = 2,
  165. groupcaps = {
  166. crumbly = {times={[1]=4.00, [2]=1.20, [3]=1.10}, uses=150, maxlevel=2},
  167. },
  168. damage_groups = {fleshy=2, cracky=1, crumbly=6},
  169. dig_exhaustion_modifier = 0.8,
  170. }
  171. tooldata["axe_steel"] = {
  172. full_punch_interval = 1.0,
  173. max_drop_level = 2,
  174. groupcaps = {
  175. choppy = {times={[1]=2.20, [2]=1.20, [3]=0.80}, uses=150, maxlevel=2},
  176. },
  177. damage_groups = {fleshy=5, cracky=1, crumbly=1},
  178. dig_exhaustion_modifier = 0.7,
  179. }
  180. tooldata["sword_steel"] = {
  181. full_punch_interval = 1.0,
  182. max_drop_level = 2,
  183. groupcaps = {
  184. snappy = {times={[1]=2.00, [2]=1.20, [3]=0.80}, uses=150, maxlevel=2},
  185. },
  186. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  187. dig_exhaustion_modifier = 0.5,
  188. }
  189. --------------------------------------------------------------------------------
  190. -- COPPER TOOLS: Dig faster than steel, very poor drops, poor wear handling.
  191. --------------------------------------------------------------------------------
  192. -- Early-obtainable pick with "magical" properties: fast dig, but poor drops.
  193. -- These tools are just copper tools, craftable from copper ingots.
  194. tooldata["pick_bronze"] = {
  195. full_punch_interval = 3.0,
  196. max_drop_level = 0,
  197. groupcaps = {
  198. -- Improved wear handling, otherwise players may not find it worth it.
  199. cracky = {times={[2]=0.40, [3]=0.40}, uses=250, maxlevel=2},
  200. },
  201. damage_groups = {fleshy=13, cracky=1, crumbly=1, knockback=6},
  202. }
  203. tooldata["shovel_bronze"] = {
  204. full_punch_interval = 1.5,
  205. max_drop_level = 0,
  206. groupcaps = {
  207. crumbly = {times={[2]=0.40, [3]=0.40}, uses=150, maxlevel=2},
  208. },
  209. damage_groups = {fleshy=2, cracky=1, crumbly=1},
  210. }
  211. tooldata["axe_bronze"] = {
  212. full_punch_interval = 0.8,
  213. max_drop_level = 0,
  214. groupcaps = {
  215. choppy = {times={[2]=0.30, [3]=0.30}, uses=150, maxlevel=2},
  216. },
  217. damage_groups = {fleshy=4, cracky=1, crumbly=1},
  218. }
  219. tooldata["sword_bronze"] = {
  220. full_punch_interval = 0.9,
  221. max_drop_level = -1, -- No drops, so only worth it versus mobs.
  222. groupcaps = {
  223. -- Sword wears out rather quick, though.
  224. snappy = {times={[2]=0.60, [3]=0.60}, uses=120, maxlevel=2},
  225. },
  226. damage_groups = {fleshy=10, cracky=1, crumbly=1}, -- Better damage than steel.
  227. }
  228. --------------------------------------------------------------------------------
  229. -- BRONZE TOOLS: Dig faster than steel, very poor drops, poor wear handling.
  230. --------------------------------------------------------------------------------
  231. -- Early-obtainable pick with "magical" properties: fast dig, but poor drops.
  232. tooldata["pick_bronze2"] = {
  233. full_punch_interval = 3.0,
  234. max_drop_level = 1,
  235. groupcaps = {
  236. -- Improved wear handling, otherwise players may not find it worth it.
  237. cracky = {times={[2]=0.40, [3]=0.40}, uses=250, maxlevel=2},
  238. },
  239. damage_groups = {fleshy=13, cracky=1, crumbly=1, knockback=6},
  240. }
  241. tooldata["shovel_bronze2"] = {
  242. full_punch_interval = 1.5,
  243. max_drop_level = 1,
  244. groupcaps = {
  245. crumbly = {times={[2]=0.40, [3]=0.40}, uses=150, maxlevel=2},
  246. },
  247. damage_groups = {fleshy=2, cracky=1, crumbly=1},
  248. }
  249. tooldata["axe_bronze2"] = {
  250. full_punch_interval = 0.8,
  251. max_drop_level = 1,
  252. groupcaps = {
  253. choppy = {times={[2]=0.30, [3]=0.30}, uses=150, maxlevel=2},
  254. },
  255. damage_groups = {fleshy=4, cracky=1, crumbly=1},
  256. }
  257. tooldata["sword_bronze2"] = {
  258. full_punch_interval = 0.9,
  259. max_drop_level = 0,
  260. groupcaps = {
  261. -- Sword wears out rather quick, though.
  262. snappy = {times={[2]=0.60, [3]=0.60}, uses=120, maxlevel=2},
  263. },
  264. damage_groups = {fleshy=10, cracky=1, crumbly=1}, -- Better damage than steel.
  265. }
  266. --------------------------------------------------------------------------------
  267. -- MESE TOOLS: perfect drops, faster than steel, slightly worse wear handling.
  268. --------------------------------------------------------------------------------
  269. tooldata["pick_mese"] = {
  270. full_punch_interval = 3.0,
  271. max_drop_level = 3,
  272. groupcaps = {
  273. cracky = {times={[1]=2.20, [2]=0.80, [3]=0.60}, uses=100, maxlevel=3},
  274. },
  275. damage_groups = {fleshy=16, cracky=1, crumbly=1, knockback=6},
  276. direct_to_inventory = true,
  277. destroy_chance = 10,
  278. }
  279. tooldata["shovel_mese"] = {
  280. full_punch_interval = 1.5,
  281. max_drop_level = 3,
  282. groupcaps = {
  283. crumbly = {times={[1]=2.20, [2]=0.80, [3]=0.60}, uses=100, maxlevel=3},
  284. },
  285. damage_groups = {fleshy=5, cracky=1, crumbly=1},
  286. direct_to_inventory = true,
  287. destroy_chance = 10,
  288. }
  289. tooldata["axe_mese"] = {
  290. full_punch_interval = 1.0,
  291. max_drop_level = 3,
  292. groupcaps = {
  293. choppy = {times={[1]=2.20, [2]=0.80, [3]=0.60}, uses=100, maxlevel=3},
  294. },
  295. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  296. direct_to_inventory = true,
  297. destroy_chance = 10,
  298. node_overrides = {
  299. ["rosestone:head"] = {
  300. max_drop_level = 3,
  301. destroy_chance = nil,
  302. direct_to_inventory = true,
  303. },
  304. ["rosestone:tail"] = {
  305. max_drop_level = 3,
  306. destroy_chance = nil,
  307. direct_to_inventory = true,
  308. },
  309. },
  310. }
  311. tooldata["sword_mese"] = {
  312. full_punch_interval = 0.9,
  313. max_drop_level = 3,
  314. groupcaps = {
  315. snappy = {times={[1]=2.20, [2]=0.80, [3]=0.60}, uses=100, maxlevel=3},
  316. },
  317. damage_groups = {fleshy=8, cracky=1, crumbly=1},
  318. direct_to_inventory = true,
  319. destroy_chance = 10,
  320. }
  321. --------------------------------------------------------------------------------
  322. -- DIAMOND TOOLS: improved XP gain, poor drops, faster than mese.
  323. --------------------------------------------------------------------------------
  324. tooldata["pick_diamond"] = {
  325. full_punch_interval = 3.0,
  326. max_drop_level = 2,
  327. groupcaps = {
  328. cracky = {times={[1]=2.00, [2]=0.60, [3]=0.50}, uses=80, maxlevel=3},
  329. },
  330. damage_groups = {fleshy=17, cracky=1, crumbly=1, knockback=6},
  331. xp_gain = 1.5,
  332. range_modifier = 1.5,
  333. }
  334. tooldata["shovel_diamond"] = {
  335. full_punch_interval = 1.5,
  336. max_drop_level = 2,
  337. groupcaps = {
  338. crumbly = {times={[1]=2.00, [2]=0.60, [3]=0.50}, uses=80, maxlevel=3},
  339. },
  340. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  341. xp_gain = 1.5,
  342. range_modifier = 1.5,
  343. }
  344. tooldata["axe_diamond"] = {
  345. full_punch_interval = 1.0,
  346. max_drop_level = 2,
  347. groupcaps = {
  348. choppy = {times={[1]=2.00, [2]=0.60, [3]=0.50}, uses=80, maxlevel=3},
  349. },
  350. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  351. xp_gain = 1.5,
  352. range_modifier = 1.5,
  353. node_overrides = {
  354. ["rosestone:head"] = {
  355. max_drop_level = 3,
  356. },
  357. ["rosestone:tail"] = {
  358. max_drop_level = 3,
  359. },
  360. },
  361. }
  362. -- Reasonably high-damage sword (until gem tools), but gives poor drops.
  363. tooldata["sword_diamond"] = {
  364. full_punch_interval = 0.8,
  365. max_drop_level = 2,
  366. groupcaps = {
  367. snappy = {times={[1]=2.00, [2]=0.60, [3]=0.50}, uses=80, maxlevel=3},
  368. },
  369. damage_groups = {fleshy=8, cracky=1, crumbly=1},
  370. xp_gain = 1.5,
  371. range_modifier = 1.5,
  372. }
  373. --------------------------------------------------------------------------------
  374. -- MITHRIL TOOLS: improved XP gain, decent drops, faster than diamond.
  375. --------------------------------------------------------------------------------
  376. tooldata["pick_mithril"] = {
  377. full_punch_interval = 3.0,
  378. max_drop_level = 3, -- Strictly better than diamond.
  379. groupcaps = {
  380. cracky = {times={[1]=1.80, [2]=0.40, [3]=0.30}, uses=80, maxlevel=3},
  381. },
  382. damage_groups = {fleshy=19, cracky=1, crumbly=1, knockback=6},
  383. xp_gain = 2.5,
  384. dig_exhaustion_modifier = 0.6,
  385. destroy_chance = 5,
  386. }
  387. tooldata["shovel_mithril"] = {
  388. full_punch_interval = 1.5,
  389. max_drop_level = 2,
  390. groupcaps = {
  391. crumbly = {times={[1]=1.80, [2]=0.40, [3]=0.30}, uses=80, maxlevel=3},
  392. },
  393. damage_groups = {fleshy=8, cracky=1, crumbly=1},
  394. xp_gain = 1.5,
  395. dig_exhaustion_modifier = 0.7,
  396. }
  397. tooldata["axe_mithril"] = {
  398. full_punch_interval = 1.0,
  399. max_drop_level = 2,
  400. groupcaps = {
  401. choppy = {times={[1]=1.80, [2]=0.40, [3]=0.30}, uses=80, maxlevel=3},
  402. },
  403. damage_groups = {fleshy=9, cracky=1, crumbly=1},
  404. xp_gain = 1.5,
  405. dig_exhaustion_modifier = 0.5,
  406. destroy_chance = 15,
  407. }
  408. -- Fast, high-damage sword VS mobs, but gives poor drops.
  409. tooldata["sword_mithril"] = {
  410. full_punch_interval = 0.7, -- Same as amethyst.
  411. max_drop_level = 2, -- But less than amethyst.
  412. groupcaps = {
  413. snappy = {times={[1]=1.80, [2]=0.40, [3]=0.30}, uses=80, maxlevel=3},
  414. },
  415. damage_groups = {fleshy=10, cracky=1, crumbly=1}, -- Just slightly more damage than amethyst.
  416. xp_gain = 1.5,
  417. dig_exhaustion_modifier = 0.5,
  418. }
  419. --------------------------------------------------------------------------------
  420. -- TITANIUM TOOLS
  421. --------------------------------------------------------------------------------
  422. tooldata["pick_titanium"] = {
  423. full_punch_interval = 3.0,
  424. max_drop_level = 1,
  425. groupcaps = {
  426. cracky = {times={[1]=3.60, [2]=1.00, [3]=0.80}, uses=350, maxlevel=2},
  427. },
  428. damage_groups = {fleshy=15, cracky=1, crumbly=1, knockback=6},
  429. direct_to_inventory = true,
  430. -- Enable titanium pick to dig these nodes specially!
  431. -- Note: if one flag is overridden, then all must be specified, otherwise initial flags will be ignored.
  432. -- Only builtin engine parameters are exempt.
  433. node_overrides = {
  434. ["default:stone_with_coal"] = {
  435. max_drop_level = 2,
  436. direct_to_inventory = true,
  437. },
  438. ["default:stone_with_iron"] = {
  439. max_drop_level = 2,
  440. direct_to_inventory = true,
  441. },
  442. ["default:stone_with_copper"] = {
  443. max_drop_level = 2,
  444. direct_to_inventory = true,
  445. },
  446. ["kalite:ore"] = {
  447. max_drop_level = 2,
  448. direct_to_inventory = true,
  449. },
  450. ["moreores:mineral_tin"] = {
  451. max_drop_level = 2,
  452. direct_to_inventory = true,
  453. },
  454. },
  455. }
  456. tooldata["shovel_titanium"] = {
  457. full_punch_interval = 1.5,
  458. max_drop_level = 1,
  459. groupcaps = {
  460. crumbly = {times={[1]=3.50, [2]=1.00, [3]=0.80}, uses=350, maxlevel=2},
  461. },
  462. damage_groups = {fleshy=2, cracky=1, crumbly=6},
  463. direct_to_inventory = true,
  464. }
  465. tooldata["axe_titanium"] = {
  466. full_punch_interval = 1.0,
  467. max_drop_level = 1,
  468. groupcaps = {
  469. choppy = {times={[1]=2.10, [2]=1.00, [3]=0.70}, uses=350, maxlevel=2},
  470. },
  471. damage_groups = {fleshy=5, cracky=1, crumbly=1},
  472. direct_to_inventory = true,
  473. }
  474. tooldata["sword_titanium"] = {
  475. full_punch_interval = 1.0,
  476. max_drop_level = 1,
  477. groupcaps = {
  478. snappy = {times={[1]=1.90, [2]=1.00, [3]=0.70}, uses=350, maxlevel=2},
  479. },
  480. -- Do a bit more damage than steel, but drops are worse.
  481. damage_groups = {fleshy=8, cracky=1, crumbly=1},
  482. direct_to_inventory = true,
  483. }
  484. --------------------------------------------------------------------------------
  485. -- SILVER TOOLS: Excellent drops (+ special drop code elsewhere). Poor wear.
  486. --------------------------------------------------------------------------------
  487. -- Silver tools can be dual-purposed, but their secondary purpose isn't performed
  488. -- as well as it could be if the correct tool was used.
  489. -- Note: must be able to pick level 3 nodes, otherwise nodes at that level won't
  490. -- be able to work with special silverpick drops.
  491. tooldata["pick_silver"] = {
  492. full_punch_interval = 3.0,
  493. max_drop_level = 3,
  494. groupcaps = {
  495. cracky = {times={[1]=1.50, [2]=1.00, [3]=0.50}, uses=30, maxlevel=3},
  496. snappy = {times={[1]=2.00, [2]=1.50, [3]=1.00}, uses=20, maxlevel=1}, -- Secondary.
  497. },
  498. damage_groups = {fleshy=12, cracky=1, crumbly=1, knockback=6},
  499. }
  500. tooldata["shovel_silver"] = {
  501. full_punch_interval = 1.5,
  502. max_drop_level = 3,
  503. groupcaps = {
  504. crumbly = {times={[1]=1.50, [2]=1.00, [3]=0.50}, uses=30, maxlevel=3},
  505. snappy = {times={[1]=2.00, [2]=1.50, [3]=1.00}, uses=20, maxlevel=1}, -- Secondary.
  506. },
  507. damage_groups = {fleshy=2, cracky=1, crumbly=1},
  508. }
  509. tooldata["axe_silver"] = {
  510. full_punch_interval = 1.0,
  511. max_drop_level = 3,
  512. groupcaps = {
  513. -- The silver axe can do both choppy and snappy jobs equally well.
  514. choppy = {times={[1]=1.50, [2]=1.00, [3]=0.50}, uses=30, maxlevel=3},
  515. snappy = {times={[1]=2.00, [2]=1.50, [3]=1.00}, uses=20, maxlevel=2}, -- Secondary.
  516. },
  517. damage_groups = {fleshy=2, cracky=1, crumbly=1},
  518. }
  519. tooldata["sword_silver"] = {
  520. full_punch_interval = 0.9,
  521. max_drop_level = 3,
  522. groupcaps = {
  523. snappy = {times={[1]=1.50, [2]=1.00, [3]=0.50}, uses=30, maxlevel=3},
  524. choppy = {times={[1]=2.00, [2]=1.50, [3]=1.00}, uses=20, maxlevel=1}, -- Secondary.
  525. },
  526. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  527. }
  528. --------------------------------------------------------------------------------
  529. -- RUBY TOOLS: Better wear handling than steel. Fast, perfect drops.
  530. --------------------------------------------------------------------------------
  531. tooldata["pick_ruby"] = {
  532. full_punch_interval = 3.0,
  533. max_drop_level = 3,
  534. groupcaps = {
  535. cracky = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=250, maxlevel=3},
  536. },
  537. damage_groups = {fleshy=17, cracky=1, crumbly=1, knockback=10},
  538. direct_to_inventory = true, -- Item goes directly to player inventory, no dropping.
  539. xp_gain = 0.3,
  540. destroy_chance = 20, -- 50/1000
  541. --dig_exhaustion_modifier = 100.0, -- For testing! (Tested, works.)
  542. }
  543. tooldata["shovel_ruby"] = {
  544. full_punch_interval = 1.5,
  545. max_drop_level = 1,
  546. groupcaps = {
  547. crumbly = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  548. },
  549. damage_groups = {fleshy=5, cracky=1, crumbly=1},
  550. direct_to_inventory = true,
  551. destroy_chance = 20,
  552. }
  553. tooldata["axe_ruby"] = {
  554. full_punch_interval = 1.0,
  555. max_drop_level = 3,
  556. groupcaps = {
  557. choppy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  558. },
  559. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  560. direct_to_inventory = true,
  561. destroy_chance = 20,
  562. }
  563. tooldata["sword_ruby"] = {
  564. full_punch_interval = 0.8,
  565. max_drop_level = 3,
  566. groupcaps = {
  567. snappy = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=200, maxlevel=3},
  568. },
  569. damage_groups = {fleshy=8, cracky=1, crumbly=1},
  570. direct_to_inventory = true,
  571. destroy_chance = 20,
  572. }
  573. --------------------------------------------------------------------------------
  574. -- EMERALD TOOLS: Better wear handling than steel. Fast, perfect drops.
  575. --------------------------------------------------------------------------------
  576. tooldata["pick_emerald"] = {
  577. full_punch_interval = 3.0,
  578. max_drop_level = 1,
  579. groupcaps = {
  580. cracky = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  581. },
  582. damage_groups = {fleshy=16, cracky=1, crumbly=1, knockback=10},
  583. direct_to_inventory = true,
  584. destroy_chance = 20,
  585. }
  586. tooldata["shovel_emerald"] = {
  587. full_punch_interval = 1.5,
  588. max_drop_level = 3,
  589. groupcaps = {
  590. crumbly = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=250, maxlevel=3},
  591. },
  592. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  593. direct_to_inventory = true,
  594. destroy_chance = 20,
  595. }
  596. tooldata["axe_emerald"] = {
  597. full_punch_interval = 1.0,
  598. max_drop_level = 3,
  599. groupcaps = {
  600. choppy = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=200, maxlevel=3},
  601. },
  602. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  603. direct_to_inventory = true,
  604. destroy_chance = 20,
  605. }
  606. tooldata["sword_emerald"] = {
  607. full_punch_interval = 0.8,
  608. max_drop_level = 3,
  609. groupcaps = {
  610. snappy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  611. },
  612. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  613. direct_to_inventory = true,
  614. destroy_chance = 20,
  615. }
  616. --------------------------------------------------------------------------------
  617. -- SAPPHIRE TOOLS: Better wear handling than steel. Fast, perfect drops.
  618. --------------------------------------------------------------------------------
  619. tooldata["pick_sapphire"] = {
  620. full_punch_interval = 3.0,
  621. max_drop_level = 3,
  622. groupcaps = {
  623. cracky = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=200, maxlevel=3},
  624. },
  625. damage_groups = {fleshy=17, cracky=1, crumbly=1, knockback=10},
  626. direct_to_inventory = true,
  627. destroy_chance = 20,
  628. }
  629. tooldata["shovel_sapphire"] = {
  630. full_punch_interval = 1.5,
  631. max_drop_level = 1,
  632. groupcaps = {
  633. crumbly = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  634. },
  635. damage_groups = {fleshy=5, cracky=1, crumbly=1},
  636. direct_to_inventory = true,
  637. destroy_chance = 20,
  638. }
  639. tooldata["axe_sapphire"] = {
  640. full_punch_interval = 1.0,
  641. max_drop_level = 3,
  642. groupcaps = {
  643. choppy = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=250, maxlevel=3},
  644. },
  645. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  646. direct_to_inventory = true,
  647. destroy_chance = 20,
  648. }
  649. tooldata["sword_sapphire"] = {
  650. full_punch_interval = 0.8,
  651. max_drop_level = 3,
  652. groupcaps = {
  653. snappy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  654. },
  655. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  656. direct_to_inventory = true,
  657. destroy_chance = 20,
  658. }
  659. --------------------------------------------------------------------------------
  660. -- AMETHYST TOOLS: Better wear handling than steel. Fast, perfect drops.
  661. --------------------------------------------------------------------------------
  662. tooldata["pick_amethyst"] = {
  663. full_punch_interval = 3.0,
  664. max_drop_level = 1,
  665. groupcaps = {
  666. cracky = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  667. },
  668. damage_groups = {fleshy=16, cracky=1, crumbly=1, knockback=10},
  669. direct_to_inventory = true,
  670. destroy_chance = 20,
  671. }
  672. tooldata["shovel_amethyst"] = {
  673. full_punch_interval = 1.5,
  674. max_drop_level = 3,
  675. groupcaps = {
  676. crumbly = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=200, maxlevel=3},
  677. },
  678. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  679. direct_to_inventory = true,
  680. destroy_chance = 20,
  681. }
  682. tooldata["axe_amethyst"] = {
  683. full_punch_interval = 1.0,
  684. max_drop_level = 3,
  685. groupcaps = {
  686. choppy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  687. },
  688. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  689. direct_to_inventory = true,
  690. destroy_chance = 20,
  691. }
  692. tooldata["sword_amethyst"] = {
  693. full_punch_interval = 0.7,
  694. max_drop_level = 3,
  695. groupcaps = {
  696. snappy = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=250, maxlevel=3},
  697. },
  698. damage_groups = {fleshy=9, cracky=1, crumbly=1},
  699. direct_to_inventory = true,
  700. destroy_chance = 20,
  701. range_modifier = 1.5,
  702. }
  703. --------------------------------------------------------------------------------
  704. -- REINFORCED RUBY TOOLS: Wear handling like titanium. Fast, perfect drops.
  705. --------------------------------------------------------------------------------
  706. tooldata["pick_ruby_rf"] = {
  707. full_punch_interval = 3.0,
  708. max_drop_level = 3,
  709. groupcaps = {
  710. cracky = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=300, maxlevel=3},
  711. },
  712. damage_groups = {fleshy=17, cracky=1, crumbly=1, knockback=10},
  713. direct_to_inventory = true,
  714. xp_gain = 0.3,
  715. destroy_chance = 20,
  716. }
  717. tooldata["shovel_ruby_rf"] = {
  718. full_punch_interval = 1.5,
  719. max_drop_level = 1,
  720. groupcaps = {
  721. crumbly = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  722. },
  723. damage_groups = {fleshy=5, cracky=1, crumbly=1},
  724. direct_to_inventory = true,
  725. destroy_chance = 20,
  726. }
  727. tooldata["axe_ruby_rf"] = {
  728. full_punch_interval = 1.0,
  729. max_drop_level = 3,
  730. groupcaps = {
  731. choppy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  732. },
  733. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  734. direct_to_inventory = true,
  735. destroy_chance = 20,
  736. }
  737. tooldata["sword_ruby_rf"] = {
  738. full_punch_interval = 0.8,
  739. max_drop_level = 3,
  740. groupcaps = {
  741. snappy = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=250, maxlevel=3},
  742. },
  743. damage_groups = {fleshy=8, cracky=1, crumbly=1},
  744. direct_to_inventory = true,
  745. destroy_chance = 20,
  746. }
  747. --------------------------------------------------------------------------------
  748. -- REINFORCED EMERALD TOOLS: Wear handling like titanium. Fast, perfect drops.
  749. --------------------------------------------------------------------------------
  750. tooldata["pick_emerald_rf"] = {
  751. full_punch_interval = 3.0,
  752. max_drop_level = 1,
  753. groupcaps = {
  754. cracky = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  755. },
  756. damage_groups = {fleshy=16, cracky=1, crumbly=1, knockback=10},
  757. direct_to_inventory = true,
  758. destroy_chance = 20,
  759. }
  760. tooldata["shovel_emerald_rf"] = {
  761. full_punch_interval = 1.5,
  762. max_drop_level = 3,
  763. groupcaps = {
  764. crumbly = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=300, maxlevel=3},
  765. },
  766. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  767. direct_to_inventory = true,
  768. destroy_chance = 20,
  769. }
  770. tooldata["axe_emerald_rf"] = {
  771. full_punch_interval = 1.0,
  772. max_drop_level = 3,
  773. groupcaps = {
  774. choppy = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=250, maxlevel=3},
  775. },
  776. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  777. direct_to_inventory = true,
  778. destroy_chance = 20,
  779. }
  780. tooldata["sword_emerald_rf"] = {
  781. full_punch_interval = 0.8,
  782. max_drop_level = 3,
  783. groupcaps = {
  784. snappy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  785. },
  786. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  787. direct_to_inventory = true,
  788. destroy_chance = 20,
  789. }
  790. --------------------------------------------------------------------------------
  791. -- REINFORCED SAPPHIRE TOOLS: Wear handling like titanium. Fast, perfect drops.
  792. --------------------------------------------------------------------------------
  793. tooldata["pick_sapphire_rf"] = {
  794. full_punch_interval = 3.0,
  795. max_drop_level = 3,
  796. groupcaps = {
  797. cracky = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=250, maxlevel=3},
  798. },
  799. damage_groups = {fleshy=17, cracky=1, crumbly=1, knockback=10},
  800. direct_to_inventory = true,
  801. destroy_chance = 20,
  802. }
  803. tooldata["shovel_sapphire_rf"] = {
  804. full_punch_interval = 1.5,
  805. max_drop_level = 1,
  806. groupcaps = {
  807. crumbly = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  808. },
  809. damage_groups = {fleshy=5, cracky=1, crumbly=1},
  810. direct_to_inventory = true,
  811. destroy_chance = 20,
  812. }
  813. tooldata["axe_sapphire_rf"] = {
  814. full_punch_interval = 1.0,
  815. max_drop_level = 3,
  816. groupcaps = {
  817. choppy = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=300, maxlevel=3},
  818. },
  819. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  820. direct_to_inventory = true,
  821. destroy_chance = 20,
  822. }
  823. tooldata["sword_sapphire_rf"] = {
  824. full_punch_interval = 0.8,
  825. max_drop_level = 3,
  826. groupcaps = {
  827. snappy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  828. },
  829. damage_groups = {fleshy=7, cracky=1, crumbly=1},
  830. direct_to_inventory = true,
  831. destroy_chance = 20,
  832. }
  833. --------------------------------------------------------------------------------
  834. -- REINFORCED AMETHYST TOOLS: Wear handling like titanium. Fast, perfect drops.
  835. --------------------------------------------------------------------------------
  836. tooldata["pick_amethyst_rf"] = {
  837. full_punch_interval = 3.0,
  838. max_drop_level = 1,
  839. groupcaps = {
  840. cracky = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  841. },
  842. damage_groups = {fleshy=16, cracky=1, crumbly=1, knockback=10},
  843. direct_to_inventory = true,
  844. destroy_chance = 20,
  845. }
  846. tooldata["shovel_amethyst_rf"] = {
  847. full_punch_interval = 1.5,
  848. max_drop_level = 3,
  849. groupcaps = {
  850. crumbly = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=250, maxlevel=3},
  851. },
  852. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  853. direct_to_inventory = true,
  854. destroy_chance = 20,
  855. }
  856. tooldata["axe_amethyst_rf"] = {
  857. full_punch_interval = 1.0,
  858. max_drop_level = 3,
  859. groupcaps = {
  860. choppy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  861. },
  862. damage_groups = {fleshy=6, cracky=1, crumbly=1},
  863. direct_to_inventory = true,
  864. destroy_chance = 20,
  865. }
  866. tooldata["sword_amethyst_rf"] = {
  867. full_punch_interval = 0.7,
  868. max_drop_level = 3,
  869. groupcaps = {
  870. snappy = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=300, maxlevel=3},
  871. },
  872. damage_groups = {fleshy=9, cracky=1, crumbly=1},
  873. direct_to_inventory = true,
  874. destroy_chance = 20,
  875. range_modifier = 1.5,
  876. }
  877. function td_api.arrow_toolcaps(name, damage)
  878. --minetest.log(name)
  879. local tc = {
  880. full_punch_interval = 1.0,
  881. max_drop_level = 3,
  882. damage_groups = {fleshy = damage},
  883. }
  884. -- This table gets sent through the engine, so only builtin parameters work.
  885. return tc
  886. end
  887. dofile(modpath .. "/technic.lua")