init.lua 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981
  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. if not minetest.global_exists("tooldata") then tooldata = {} end
  64. if not minetest.global_exists("td_api") then td_api = {} end
  65. local modpath = minetest.get_modpath("tooldata")
  66. td_api.modpath = modpath
  67. local SCALE = 500
  68. --------------------------------------------------------------------------------
  69. -- MISC TOOLS
  70. --------------------------------------------------------------------------------
  71. -- Hammer (usually an anvil-repair tool).
  72. tooldata["hammer_hammer"] = {
  73. full_punch_interval = 3.5,
  74. max_drop_level = 0,
  75. groupcaps = {
  76. cracky = {times={[3]=3.00}, uses=500, maxlevel=1},
  77. },
  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. -- Note: bypassing sysdmg code due to use of 'minetest.register_item()' for
  98. -- the Hand.
  99. damage_groups = {fleshy=1*(SCALE/2), knockback=100},
  100. }
  101. --------------------------------------------------------------------------------
  102. -- WOOD TOOLS
  103. --------------------------------------------------------------------------------
  104. -- Player's starting pick.
  105. -- Start plan: find dry shrub, get sticks. Dig cobble underneath, get cobble.
  106. -- Upgrade to stone tools ASAP.
  107. tooldata["pick_wood"] = {
  108. full_punch_interval = 2.0,
  109. max_drop_level = 1, -- Must be 1 otherwise cobble unobtainable.
  110. groupcaps = {
  111. cracky = {times={[3]=6.00}, uses=50, maxlevel=1},
  112. },
  113. }
  114. --------------------------------------------------------------------------------
  115. -- STONE TOOLS: High punch interval, cracky mob damage.
  116. --------------------------------------------------------------------------------
  117. tooldata["pick_stone"] = {
  118. full_punch_interval = 3.0,
  119. max_drop_level = 2, -- Must be 2 otherwise stone unobtainable.
  120. groupcaps = {
  121. cracky = {times={[2]=2.00, [3]=1.90}, uses=50, maxlevel=2},
  122. },
  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. }
  132. tooldata["axe_stone"] = {
  133. full_punch_interval = 1.5,
  134. max_drop_level = 2, -- Must be 2 otherwise can't get tree drops.
  135. groupcaps = {
  136. choppy = {times={[2]=2.00, [3]=0.90}, uses=50, maxlevel=2},
  137. },
  138. }
  139. tooldata["sword_stone"] = {
  140. full_punch_interval = 1.5,
  141. max_drop_level = 0, -- Not good at getting drops from mobs.
  142. groupcaps = {
  143. -- Should be slightly faster at digging plants than the hand.
  144. snappy = {times={[2]=1.10, [3]=0.90}, uses=50, maxlevel=1},
  145. },
  146. }
  147. --------------------------------------------------------------------------------
  148. -- IRON TOOLS: Dig slightly faster than stone, last much longer. Get all drops.
  149. --------------------------------------------------------------------------------
  150. tooldata["pick_steel"] = {
  151. full_punch_interval = 3.0,
  152. max_drop_level = 2, -- Must be 2 otherwise stone unobtainable.
  153. groupcaps = {
  154. cracky = {times={[1]=4.00, [2]=1.20, [3]=1.10}, uses=150, maxlevel=2},
  155. },
  156. dig_exhaustion_modifier = 0.8,
  157. }
  158. tooldata["shovel_steel"] = {
  159. full_punch_interval = 1.5,
  160. max_drop_level = 2,
  161. groupcaps = {
  162. crumbly = {times={[1]=4.00, [2]=1.20, [3]=1.10}, uses=150, maxlevel=2},
  163. },
  164. dig_exhaustion_modifier = 0.8,
  165. }
  166. tooldata["axe_steel"] = {
  167. full_punch_interval = 1.0,
  168. max_drop_level = 2,
  169. groupcaps = {
  170. choppy = {times={[1]=2.20, [2]=1.20, [3]=0.80}, uses=150, maxlevel=2},
  171. },
  172. dig_exhaustion_modifier = 0.7,
  173. }
  174. tooldata["sword_steel"] = {
  175. full_punch_interval = 1.0,
  176. max_drop_level = 2,
  177. groupcaps = {
  178. snappy = {times={[1]=2.00, [2]=1.20, [3]=0.80}, uses=150, maxlevel=2},
  179. },
  180. dig_exhaustion_modifier = 0.5,
  181. }
  182. --------------------------------------------------------------------------------
  183. -- COPPER TOOLS: Dig faster than steel, very poor drops, poor wear handling.
  184. --------------------------------------------------------------------------------
  185. -- Early-obtainable pick with "magical" properties: fast dig, but poor drops.
  186. -- These tools are just copper tools, craftable from copper ingots.
  187. tooldata["pick_bronze"] = {
  188. full_punch_interval = 3.0,
  189. max_drop_level = 0,
  190. groupcaps = {
  191. -- Improved wear handling, otherwise players may not find it worth it.
  192. cracky = {times={[2]=0.40, [3]=0.40}, uses=250, maxlevel=2},
  193. },
  194. }
  195. tooldata["shovel_bronze"] = {
  196. full_punch_interval = 1.5,
  197. max_drop_level = 0,
  198. groupcaps = {
  199. crumbly = {times={[2]=0.40, [3]=0.40}, uses=150, maxlevel=2},
  200. },
  201. }
  202. tooldata["axe_bronze"] = {
  203. full_punch_interval = 0.8,
  204. max_drop_level = 0,
  205. groupcaps = {
  206. choppy = {times={[2]=0.30, [3]=0.30}, uses=150, maxlevel=2},
  207. },
  208. }
  209. tooldata["sword_bronze"] = {
  210. full_punch_interval = 0.9,
  211. max_drop_level = -1, -- No drops, so only worth it versus mobs.
  212. groupcaps = {
  213. -- Sword wears out rather quick, though.
  214. snappy = {times={[2]=0.60, [3]=0.60}, uses=120, maxlevel=2},
  215. },
  216. }
  217. --------------------------------------------------------------------------------
  218. -- BRONZE TOOLS: Dig faster than steel, very poor drops, poor wear handling.
  219. --------------------------------------------------------------------------------
  220. -- Early-obtainable pick with "magical" properties: fast dig, but poor drops.
  221. tooldata["pick_bronze2"] = {
  222. full_punch_interval = 3.0,
  223. max_drop_level = 1,
  224. groupcaps = {
  225. -- Improved wear handling, otherwise players may not find it worth it.
  226. cracky = {times={[2]=0.40, [3]=0.40}, uses=250, maxlevel=2},
  227. },
  228. }
  229. tooldata["shovel_bronze2"] = {
  230. full_punch_interval = 1.5,
  231. max_drop_level = 1,
  232. groupcaps = {
  233. crumbly = {times={[2]=0.40, [3]=0.40}, uses=150, maxlevel=2},
  234. },
  235. }
  236. tooldata["axe_bronze2"] = {
  237. full_punch_interval = 0.8,
  238. max_drop_level = 1,
  239. groupcaps = {
  240. choppy = {times={[2]=0.30, [3]=0.30}, uses=150, maxlevel=2},
  241. },
  242. }
  243. tooldata["sword_bronze2"] = {
  244. full_punch_interval = 0.9,
  245. max_drop_level = 0,
  246. groupcaps = {
  247. -- Sword wears out rather quick, though.
  248. snappy = {times={[2]=0.60, [3]=0.60}, uses=120, maxlevel=2},
  249. },
  250. }
  251. --------------------------------------------------------------------------------
  252. -- MESE TOOLS: perfect drops, faster than steel, slightly worse wear handling.
  253. --------------------------------------------------------------------------------
  254. tooldata["pick_mese"] = {
  255. full_punch_interval = 3.0,
  256. max_drop_level = 3,
  257. groupcaps = {
  258. cracky = {times={[1]=2.20, [2]=0.80, [3]=0.60}, uses=100, maxlevel=3},
  259. },
  260. direct_to_inventory = true,
  261. destroy_chance = 10,
  262. }
  263. tooldata["shovel_mese"] = {
  264. full_punch_interval = 1.5,
  265. max_drop_level = 3,
  266. groupcaps = {
  267. crumbly = {times={[1]=2.20, [2]=0.80, [3]=0.60}, uses=100, maxlevel=3},
  268. },
  269. direct_to_inventory = true,
  270. destroy_chance = 10,
  271. }
  272. tooldata["axe_mese"] = {
  273. full_punch_interval = 1.0,
  274. max_drop_level = 3,
  275. groupcaps = {
  276. choppy = {times={[1]=2.20, [2]=0.80, [3]=0.60}, uses=100, maxlevel=3},
  277. },
  278. direct_to_inventory = true,
  279. destroy_chance = 10,
  280. node_overrides = {
  281. ["rosestone:head"] = {
  282. max_drop_level = 3,
  283. destroy_chance = nil,
  284. direct_to_inventory = true,
  285. },
  286. ["rosestone:tail"] = {
  287. max_drop_level = 3,
  288. destroy_chance = nil,
  289. direct_to_inventory = true,
  290. },
  291. },
  292. }
  293. tooldata["sword_mese"] = {
  294. full_punch_interval = 0.9,
  295. max_drop_level = 3,
  296. groupcaps = {
  297. snappy = {times={[1]=2.20, [2]=0.80, [3]=0.60}, uses=100, maxlevel=3},
  298. },
  299. direct_to_inventory = true,
  300. destroy_chance = 10,
  301. }
  302. --------------------------------------------------------------------------------
  303. -- DIAMOND TOOLS: improved XP gain, poor drops, faster than mese.
  304. --------------------------------------------------------------------------------
  305. tooldata["pick_diamond"] = {
  306. full_punch_interval = 3.0,
  307. max_drop_level = 2,
  308. groupcaps = {
  309. cracky = {times={[1]=2.00, [2]=0.60, [3]=0.50}, uses=80, maxlevel=3},
  310. },
  311. xp_gain = 1.5,
  312. range_modifier = 1.5,
  313. }
  314. tooldata["shovel_diamond"] = {
  315. full_punch_interval = 1.5,
  316. max_drop_level = 2,
  317. groupcaps = {
  318. crumbly = {times={[1]=2.00, [2]=0.60, [3]=0.50}, uses=80, maxlevel=3},
  319. },
  320. xp_gain = 1.5,
  321. range_modifier = 1.5,
  322. }
  323. tooldata["axe_diamond"] = {
  324. full_punch_interval = 1.0,
  325. max_drop_level = 2,
  326. groupcaps = {
  327. choppy = {times={[1]=2.00, [2]=0.60, [3]=0.50}, uses=80, maxlevel=3},
  328. },
  329. xp_gain = 1.5,
  330. range_modifier = 1.5,
  331. node_overrides = {
  332. ["rosestone:head"] = {
  333. max_drop_level = 3,
  334. },
  335. ["rosestone:tail"] = {
  336. max_drop_level = 3,
  337. },
  338. },
  339. }
  340. -- Reasonably high-damage sword (until gem tools), but gives poor drops.
  341. tooldata["sword_diamond"] = {
  342. full_punch_interval = 0.8,
  343. max_drop_level = 2,
  344. groupcaps = {
  345. snappy = {times={[1]=2.00, [2]=0.60, [3]=0.50}, uses=80, maxlevel=3},
  346. },
  347. xp_gain = 1.5,
  348. range_modifier = 1.5,
  349. }
  350. --------------------------------------------------------------------------------
  351. -- MITHRIL TOOLS: improved XP gain, decent drops, faster than diamond.
  352. --------------------------------------------------------------------------------
  353. tooldata["pick_mithril"] = {
  354. full_punch_interval = 3.0,
  355. max_drop_level = 3, -- Strictly better than diamond.
  356. groupcaps = {
  357. cracky = {times={[1]=1.80, [2]=0.40, [3]=0.30}, uses=80, maxlevel=3},
  358. },
  359. xp_gain = 2.5,
  360. dig_exhaustion_modifier = 0.6,
  361. destroy_chance = 5,
  362. }
  363. tooldata["shovel_mithril"] = {
  364. full_punch_interval = 1.5,
  365. max_drop_level = 2,
  366. groupcaps = {
  367. crumbly = {times={[1]=1.80, [2]=0.40, [3]=0.30}, uses=80, maxlevel=3},
  368. },
  369. xp_gain = 1.5,
  370. dig_exhaustion_modifier = 0.7,
  371. }
  372. tooldata["axe_mithril"] = {
  373. full_punch_interval = 1.0,
  374. max_drop_level = 2,
  375. groupcaps = {
  376. choppy = {times={[1]=1.80, [2]=0.40, [3]=0.30}, uses=80, maxlevel=3},
  377. },
  378. xp_gain = 1.5,
  379. dig_exhaustion_modifier = 0.5,
  380. destroy_chance = 15,
  381. }
  382. -- Fast, high-damage sword VS mobs, but gives poor drops.
  383. tooldata["sword_mithril"] = {
  384. full_punch_interval = 0.7, -- Same as amethyst.
  385. max_drop_level = 2, -- But less than amethyst.
  386. groupcaps = {
  387. snappy = {times={[1]=1.80, [2]=0.40, [3]=0.30}, uses=80, maxlevel=3},
  388. },
  389. xp_gain = 1.5,
  390. dig_exhaustion_modifier = 0.5,
  391. }
  392. --------------------------------------------------------------------------------
  393. -- TITANIUM TOOLS
  394. --------------------------------------------------------------------------------
  395. tooldata["pick_titanium"] = {
  396. full_punch_interval = 3.0,
  397. max_drop_level = 1,
  398. groupcaps = {
  399. cracky = {times={[1]=3.60, [2]=1.00, [3]=0.80}, uses=350, maxlevel=2},
  400. },
  401. direct_to_inventory = true,
  402. -- Enable titanium pick to dig these nodes specially!
  403. -- Note: if one flag is overridden, then all must be specified, otherwise initial flags will be ignored.
  404. -- Only builtin engine parameters are exempt.
  405. node_overrides = {
  406. ["default:stone_with_coal"] = {
  407. max_drop_level = 2,
  408. direct_to_inventory = true,
  409. },
  410. ["default:stone_with_iron"] = {
  411. max_drop_level = 2,
  412. direct_to_inventory = true,
  413. },
  414. ["default:stone_with_copper"] = {
  415. max_drop_level = 2,
  416. direct_to_inventory = true,
  417. },
  418. ["kalite:ore"] = {
  419. max_drop_level = 2,
  420. direct_to_inventory = true,
  421. },
  422. ["moreores:mineral_tin"] = {
  423. max_drop_level = 2,
  424. direct_to_inventory = true,
  425. },
  426. },
  427. }
  428. tooldata["shovel_titanium"] = {
  429. full_punch_interval = 1.5,
  430. max_drop_level = 1,
  431. groupcaps = {
  432. crumbly = {times={[1]=3.50, [2]=1.00, [3]=0.80}, uses=350, maxlevel=2},
  433. },
  434. direct_to_inventory = true,
  435. }
  436. tooldata["axe_titanium"] = {
  437. full_punch_interval = 1.0,
  438. max_drop_level = 1,
  439. groupcaps = {
  440. choppy = {times={[1]=2.10, [2]=1.00, [3]=0.70}, uses=350, maxlevel=2},
  441. },
  442. direct_to_inventory = true,
  443. }
  444. tooldata["sword_titanium"] = {
  445. full_punch_interval = 1.0,
  446. max_drop_level = 1,
  447. groupcaps = {
  448. snappy = {times={[1]=1.90, [2]=1.00, [3]=0.70}, uses=350, maxlevel=2},
  449. },
  450. direct_to_inventory = true,
  451. }
  452. --------------------------------------------------------------------------------
  453. -- SILVER TOOLS: Excellent drops (+ special drop code elsewhere). Poor wear.
  454. --------------------------------------------------------------------------------
  455. -- Silver tools can be dual-purposed, but their secondary purpose isn't performed
  456. -- as well as it could be if the correct tool was used.
  457. -- Note: must be able to pick level 3 nodes, otherwise nodes at that level won't
  458. -- be able to work with special silverpick drops.
  459. tooldata["pick_silver"] = {
  460. full_punch_interval = 3.0,
  461. max_drop_level = 3,
  462. groupcaps = {
  463. cracky = {times={[1]=1.50, [2]=1.00, [3]=0.50}, uses=30, maxlevel=3},
  464. snappy = {times={[1]=2.00, [2]=1.50, [3]=1.00}, uses=20, maxlevel=1}, -- Secondary.
  465. },
  466. }
  467. tooldata["shovel_silver"] = {
  468. full_punch_interval = 1.5,
  469. max_drop_level = 3,
  470. groupcaps = {
  471. crumbly = {times={[1]=1.50, [2]=1.00, [3]=0.50}, uses=30, maxlevel=3},
  472. snappy = {times={[1]=2.00, [2]=1.50, [3]=1.00}, uses=20, maxlevel=1}, -- Secondary.
  473. },
  474. }
  475. tooldata["axe_silver"] = {
  476. full_punch_interval = 1.0,
  477. max_drop_level = 3,
  478. groupcaps = {
  479. -- The silver axe can do both choppy and snappy jobs equally well.
  480. choppy = {times={[1]=1.50, [2]=1.00, [3]=0.50}, uses=30, maxlevel=3},
  481. snappy = {times={[1]=2.00, [2]=1.50, [3]=1.00}, uses=20, maxlevel=2}, -- Secondary.
  482. },
  483. }
  484. tooldata["sword_silver"] = {
  485. full_punch_interval = 0.9,
  486. max_drop_level = 3,
  487. groupcaps = {
  488. snappy = {times={[1]=1.50, [2]=1.00, [3]=0.50}, uses=30, maxlevel=3},
  489. choppy = {times={[1]=2.00, [2]=1.50, [3]=1.00}, uses=20, maxlevel=1}, -- Secondary.
  490. },
  491. }
  492. --------------------------------------------------------------------------------
  493. -- RUBY TOOLS: Better wear handling than steel. Fast, perfect drops.
  494. --------------------------------------------------------------------------------
  495. tooldata["pick_ruby"] = {
  496. full_punch_interval = 3.0,
  497. max_drop_level = 3,
  498. groupcaps = {
  499. cracky = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=250, maxlevel=3},
  500. },
  501. direct_to_inventory = true, -- Item goes directly to player inventory, no dropping.
  502. xp_gain = 0.3,
  503. destroy_chance = 20, -- 50/1000
  504. --dig_exhaustion_modifier = 100.0, -- For testing! (Tested, works.)
  505. }
  506. tooldata["shovel_ruby"] = {
  507. full_punch_interval = 1.5,
  508. max_drop_level = 1,
  509. groupcaps = {
  510. crumbly = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  511. },
  512. direct_to_inventory = true,
  513. destroy_chance = 20,
  514. }
  515. tooldata["axe_ruby"] = {
  516. full_punch_interval = 1.0,
  517. max_drop_level = 3,
  518. groupcaps = {
  519. choppy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  520. },
  521. direct_to_inventory = true,
  522. destroy_chance = 20,
  523. }
  524. tooldata["sword_ruby"] = {
  525. full_punch_interval = 0.8,
  526. max_drop_level = 3,
  527. groupcaps = {
  528. snappy = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=200, maxlevel=3},
  529. },
  530. direct_to_inventory = true,
  531. destroy_chance = 20,
  532. }
  533. --------------------------------------------------------------------------------
  534. -- EMERALD TOOLS: Better wear handling than steel. Fast, perfect drops.
  535. --------------------------------------------------------------------------------
  536. tooldata["pick_emerald"] = {
  537. full_punch_interval = 3.0,
  538. max_drop_level = 1,
  539. groupcaps = {
  540. cracky = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  541. },
  542. direct_to_inventory = true,
  543. destroy_chance = 20,
  544. }
  545. tooldata["shovel_emerald"] = {
  546. full_punch_interval = 1.5,
  547. max_drop_level = 3,
  548. groupcaps = {
  549. crumbly = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=250, maxlevel=3},
  550. },
  551. direct_to_inventory = true,
  552. destroy_chance = 20,
  553. }
  554. tooldata["axe_emerald"] = {
  555. full_punch_interval = 1.0,
  556. max_drop_level = 3,
  557. groupcaps = {
  558. choppy = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=200, maxlevel=3},
  559. },
  560. direct_to_inventory = true,
  561. destroy_chance = 20,
  562. }
  563. tooldata["sword_emerald"] = {
  564. full_punch_interval = 0.8,
  565. max_drop_level = 3,
  566. groupcaps = {
  567. snappy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  568. },
  569. direct_to_inventory = true,
  570. destroy_chance = 20,
  571. }
  572. --------------------------------------------------------------------------------
  573. -- SAPPHIRE TOOLS: Better wear handling than steel. Fast, perfect drops.
  574. --------------------------------------------------------------------------------
  575. tooldata["pick_sapphire"] = {
  576. full_punch_interval = 3.0,
  577. max_drop_level = 3,
  578. groupcaps = {
  579. cracky = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=200, maxlevel=3},
  580. },
  581. direct_to_inventory = true,
  582. destroy_chance = 20,
  583. }
  584. tooldata["shovel_sapphire"] = {
  585. full_punch_interval = 1.5,
  586. max_drop_level = 1,
  587. groupcaps = {
  588. crumbly = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  589. },
  590. direct_to_inventory = true,
  591. destroy_chance = 20,
  592. }
  593. tooldata["axe_sapphire"] = {
  594. full_punch_interval = 1.0,
  595. max_drop_level = 3,
  596. groupcaps = {
  597. choppy = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=250, maxlevel=3},
  598. },
  599. direct_to_inventory = true,
  600. destroy_chance = 20,
  601. }
  602. tooldata["sword_sapphire"] = {
  603. full_punch_interval = 0.8,
  604. max_drop_level = 3,
  605. groupcaps = {
  606. snappy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  607. },
  608. direct_to_inventory = true,
  609. destroy_chance = 20,
  610. }
  611. --------------------------------------------------------------------------------
  612. -- AMETHYST TOOLS: Better wear handling than steel. Fast, perfect drops.
  613. --------------------------------------------------------------------------------
  614. tooldata["pick_amethyst"] = {
  615. full_punch_interval = 3.0,
  616. max_drop_level = 1,
  617. groupcaps = {
  618. cracky = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  619. },
  620. direct_to_inventory = true,
  621. destroy_chance = 20,
  622. }
  623. tooldata["shovel_amethyst"] = {
  624. full_punch_interval = 1.5,
  625. max_drop_level = 3,
  626. groupcaps = {
  627. crumbly = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=200, maxlevel=3},
  628. },
  629. direct_to_inventory = true,
  630. destroy_chance = 20,
  631. }
  632. tooldata["axe_amethyst"] = {
  633. full_punch_interval = 1.0,
  634. max_drop_level = 3,
  635. groupcaps = {
  636. choppy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=170, maxlevel=3},
  637. },
  638. direct_to_inventory = true,
  639. destroy_chance = 20,
  640. }
  641. tooldata["sword_amethyst"] = {
  642. full_punch_interval = 0.7,
  643. max_drop_level = 3,
  644. groupcaps = {
  645. snappy = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=250, maxlevel=3},
  646. },
  647. direct_to_inventory = true,
  648. destroy_chance = 20,
  649. range_modifier = 1.5,
  650. }
  651. --------------------------------------------------------------------------------
  652. -- REINFORCED RUBY TOOLS: Wear handling like titanium. Fast, perfect drops.
  653. --------------------------------------------------------------------------------
  654. tooldata["pick_ruby_rf"] = {
  655. full_punch_interval = 3.0,
  656. max_drop_level = 3,
  657. groupcaps = {
  658. cracky = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=300, maxlevel=3},
  659. },
  660. direct_to_inventory = true,
  661. xp_gain = 0.3,
  662. destroy_chance = 20,
  663. }
  664. tooldata["shovel_ruby_rf"] = {
  665. full_punch_interval = 1.5,
  666. max_drop_level = 1,
  667. groupcaps = {
  668. crumbly = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  669. },
  670. direct_to_inventory = true,
  671. destroy_chance = 20,
  672. }
  673. tooldata["axe_ruby_rf"] = {
  674. full_punch_interval = 1.0,
  675. max_drop_level = 3,
  676. groupcaps = {
  677. choppy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  678. },
  679. direct_to_inventory = true,
  680. destroy_chance = 20,
  681. }
  682. tooldata["sword_ruby_rf"] = {
  683. full_punch_interval = 0.8,
  684. max_drop_level = 3,
  685. groupcaps = {
  686. snappy = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=250, maxlevel=3},
  687. },
  688. direct_to_inventory = true,
  689. destroy_chance = 20,
  690. }
  691. --------------------------------------------------------------------------------
  692. -- REINFORCED EMERALD TOOLS: Wear handling like titanium. Fast, perfect drops.
  693. --------------------------------------------------------------------------------
  694. tooldata["pick_emerald_rf"] = {
  695. full_punch_interval = 3.0,
  696. max_drop_level = 1,
  697. groupcaps = {
  698. cracky = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  699. },
  700. direct_to_inventory = true,
  701. destroy_chance = 20,
  702. }
  703. tooldata["shovel_emerald_rf"] = {
  704. full_punch_interval = 1.5,
  705. max_drop_level = 3,
  706. groupcaps = {
  707. crumbly = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=300, maxlevel=3},
  708. },
  709. direct_to_inventory = true,
  710. destroy_chance = 20,
  711. }
  712. tooldata["axe_emerald_rf"] = {
  713. full_punch_interval = 1.0,
  714. max_drop_level = 3,
  715. groupcaps = {
  716. choppy = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=250, maxlevel=3},
  717. },
  718. direct_to_inventory = true,
  719. destroy_chance = 20,
  720. }
  721. tooldata["sword_emerald_rf"] = {
  722. full_punch_interval = 0.8,
  723. max_drop_level = 3,
  724. groupcaps = {
  725. snappy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  726. },
  727. direct_to_inventory = true,
  728. destroy_chance = 20,
  729. }
  730. --------------------------------------------------------------------------------
  731. -- REINFORCED SAPPHIRE TOOLS: Wear handling like titanium. Fast, perfect drops.
  732. --------------------------------------------------------------------------------
  733. tooldata["pick_sapphire_rf"] = {
  734. full_punch_interval = 3.0,
  735. max_drop_level = 3,
  736. groupcaps = {
  737. cracky = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=250, maxlevel=3},
  738. },
  739. direct_to_inventory = true,
  740. destroy_chance = 20,
  741. }
  742. tooldata["shovel_sapphire_rf"] = {
  743. full_punch_interval = 1.5,
  744. max_drop_level = 1,
  745. groupcaps = {
  746. crumbly = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  747. },
  748. direct_to_inventory = true,
  749. destroy_chance = 20,
  750. }
  751. tooldata["axe_sapphire_rf"] = {
  752. full_punch_interval = 1.0,
  753. max_drop_level = 3,
  754. groupcaps = {
  755. choppy = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=300, maxlevel=3},
  756. },
  757. direct_to_inventory = true,
  758. destroy_chance = 20,
  759. }
  760. tooldata["sword_sapphire_rf"] = {
  761. full_punch_interval = 0.8,
  762. max_drop_level = 3,
  763. groupcaps = {
  764. snappy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  765. },
  766. direct_to_inventory = true,
  767. destroy_chance = 20,
  768. }
  769. --------------------------------------------------------------------------------
  770. -- REINFORCED AMETHYST TOOLS: Wear handling like titanium. Fast, perfect drops.
  771. --------------------------------------------------------------------------------
  772. tooldata["pick_amethyst_rf"] = {
  773. full_punch_interval = 3.0,
  774. max_drop_level = 1,
  775. groupcaps = {
  776. cracky = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  777. },
  778. direct_to_inventory = true,
  779. destroy_chance = 20,
  780. }
  781. tooldata["shovel_amethyst_rf"] = {
  782. full_punch_interval = 1.5,
  783. max_drop_level = 3,
  784. groupcaps = {
  785. crumbly = {times={[1]=1.40, [2]=0.20, [3]=0.20}, uses=250, maxlevel=3},
  786. },
  787. direct_to_inventory = true,
  788. destroy_chance = 20,
  789. }
  790. tooldata["axe_amethyst_rf"] = {
  791. full_punch_interval = 1.0,
  792. max_drop_level = 3,
  793. groupcaps = {
  794. choppy = {times={[1]=1.50, [2]=0.30, [3]=0.30}, uses=230, maxlevel=3},
  795. },
  796. direct_to_inventory = true,
  797. destroy_chance = 20,
  798. }
  799. tooldata["sword_amethyst_rf"] = {
  800. full_punch_interval = 0.7,
  801. max_drop_level = 3,
  802. groupcaps = {
  803. snappy = {times={[1]=1.40, [2]=0.10, [3]=0.10}, uses=300, maxlevel=3},
  804. },
  805. direct_to_inventory = true,
  806. destroy_chance = 20,
  807. range_modifier = 1.5,
  808. }
  809. function td_api.arrow_toolcaps(name, damage)
  810. --minetest.log(name)
  811. local tc = {
  812. full_punch_interval = 1.0,
  813. max_drop_level = 3,
  814. damage_groups = {
  815. arrow = damage,
  816. from_arrow = 0,
  817. knockback = 400,
  818. },
  819. }
  820. -- This table gets sent through the engine, so only builtin parameters work.
  821. return tc
  822. end
  823. dofile(modpath .. "/technic.lua")