Page 3 of 5

Re: [MOD] Tool ranks [toolranks]

Posted: Thu Sep 21, 2017 10:51
by einarromero
Im using MT 0.4.16

Re: [MOD] Tool ranks [toolranks]

Posted: Mon Oct 16, 2017 04:24
by ToyElf
Today I realised it's not compatible with the Engraving Table mod: viewtopic.php?f=11&t=17482
If you rename your tool, as soon as you break a node, the name will be replaced with the default name with number of nodes you destroyed. However, from what I've noticed, even if you rename the tool, it remembers number of nodes before it was renamed.

Re: [MOD] Tool ranks [toolranks]

Posted: Mon Oct 16, 2017 10:44
by lisacvuk
ToyElf wrote:Today I realised it's not compatible with the Engraving Table mod: viewtopic.php?f=11&t=17482
If you rename your tool, as soon as you break a node, the name will be replaced with the default name with number of nodes you destroyed. However, from what I've noticed, even if you rename the tool, it remembers number of nodes before it was renamed.
Nope, not compatible. We both use the description meta.

Re: [MOD] Tool ranks [toolranks]

Posted: Mon Oct 16, 2017 14:21
by ToyElf
lisacvuk wrote:I simply brute-forced the above code. No idea how it works, but it seems about right in-game.
Oh my God, I've just read that xD That's how I passed my Computer Science project, as you can see with the example of your amazing mod, brute force and 'idk how does that work, but it does so leave me alone', or more scientifically 'using heuristic approach' works the best.

Re: [MOD] Tool ranks [toolranks]

Posted: Mon Oct 16, 2017 16:14
by lisacvuk
ToyElf wrote:
lisacvuk wrote:I simply brute-forced the above code. No idea how it works, but it seems about right in-game.
Oh my God, I've just read that xD That's how I passed my Computer Science project, as you can see with the example of your amazing mod, brute force and 'idk how does that work, but it does so leave me alone', or more scientifically 'using heuristic approach' works the best.
I'm glad to be using professional methods, in that case. :)

Re: [MOD] Tool ranks [toolranks]

Posted: Mon Oct 16, 2017 16:31
by azekill_DIABLO
A hammer and a... What? Am I not a professionnal?

Re: [MOD] Tool ranks [toolranks]

Posted: Mon Oct 16, 2017 17:54
by lisacvuk
Image

Re: [MOD] Tool ranks [toolranks]

Posted: Mon Oct 16, 2017 18:14
by azekill_DIABLO
xD

Re: [MOD] Tool ranks [toolranks]

Posted: Fri Nov 17, 2017 21:07
by Sires
azekill_DIABLO wrote:xD
Expected "=" near "xD" in line 1

Re: [MOD] Tool ranks [toolranks]

Posted: Sat Nov 18, 2017 07:14
by Lone_Wolf
Added support for this mod!
My mod (lavastuff)

Re: [MOD] Tool ranks [toolranks]

Posted: Sat Nov 18, 2017 13:35
by lisacvuk
Lone_Wolf wrote:Added support for this mod!
My mod (lavastuff)
Yay! Thank you :)

Re: [MOD] Tool ranks [toolranks]

Posted: Thu Nov 30, 2017 15:29
by Akahyperion
This mod is great ! Simple and efficient, adds a lot to the gameplay in MTG !
Thanks a lot.

Do you plan to release an update for sword leveling (counting players and mobs killed) soon ?

Re: [MOD] Tool ranks [toolranks]

Posted: Thu Nov 30, 2017 16:29
by Chem871
Is there armor support?

Re: [MOD] Tool ranks [toolranks]

Posted: Thu Nov 30, 2017 18:22
by lisacvuk
Akahyperion wrote:This mod is great ! Simple and efficient, adds a lot to the gameplay in MTG !
Thanks a lot.

Do you plan to release an update for sword leveling (counting players and mobs killed) soon ?
Thanks for checking it out :)
Maybe. It probably isn't that hard. I'll add it to my wishlist. :D
Chem871 wrote:Is there armor support?
No. What should armor count?

Re: [MOD] Tool ranks [toolranks]

Posted: Thu Nov 30, 2017 19:34
by Chem871
Same as the tools, the more it gets damaged (used) the better it gets!

Re: [MOD] Tool ranks [toolranks]

Posted: Fri Dec 01, 2017 00:55
by lisacvuk
Chem871 wrote:Same as the tools, the more it gets damaged (used) the better it gets!
I don't think 3D armor has got support for after_use

Re: [MOD] Tool ranks [toolranks]

Posted: Thu Jan 25, 2018 22:44
by Drgnrdr
Love your mod, but last night ran into this error(game crash):

Code: Select all

2018-01-25 04:37:54: ACTION[Server]: singleplayer uses nyancats_plus:rainbow_hoe, pointing at [node under=-4,16,6 above=-4,17,6]
2018-01-25 04:37:54: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:13: bad argument #1 to 'find' (string expected, got nil)
2018-01-25 04:37:54: ERROR[Main]: stack traceback:
2018-01-25 04:37:54: ERROR[Main]: 	[C]: in function 'find'
2018-01-25 04:37:54: ERROR[Main]: 	C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:13: in function 'get_tool_type'
2018-01-25 04:37:54: ERROR[Main]: 	C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:28: in function 'create_description'
2018-01-25 04:37:54: ERROR[Main]: 	C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:100: in function 'new_afteruse'
2018-01-25 04:37:54: ERROR[Main]: 	C:\GAMES\MINETEST\bin\..\mods\farming/hoes.lua:116: in function <C:\GAMES\MINETEST\bin\..\mods\farming/hoes.lua:64>
2018-01-25 04:37:54: ERROR[Main]: 	(tail call): ?
This happened when using any hoe other than default hoes. The error stopped only when mod was disabled or removed.

Re: [MOD] Tool ranks [toolranks]

Posted: Fri Jan 26, 2018 00:04
by maikerumine
Drgnrdr wrote:Love your mod, but last night ran into this error(game crash):

Code: Select all

2018-01-25 04:37:54: ACTION[Server]: singleplayer uses nyancats_plus:rainbow_hoe, pointing at [node under=-4,16,6 above=-4,17,6]
2018-01-25 04:37:54: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:13: bad argument #1 to 'find' (string expected, got nil)
2018-01-25 04:37:54: ERROR[Main]: stack traceback:
2018-01-25 04:37:54: ERROR[Main]: 	[C]: in function 'find'
2018-01-25 04:37:54: ERROR[Main]: 	C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:13: in function 'get_tool_type'
2018-01-25 04:37:54: ERROR[Main]: 	C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:28: in function 'create_description'
2018-01-25 04:37:54: ERROR[Main]: 	C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:100: in function 'new_afteruse'
2018-01-25 04:37:54: ERROR[Main]: 	C:\GAMES\MINETEST\bin\..\mods\farming/hoes.lua:116: in function <C:\GAMES\MINETEST\bin\..\mods\farming/hoes.lua:64>
2018-01-25 04:37:54: ERROR[Main]: 	(tail call): ?
This happened when using any hoe other than default hoes. The error stopped only when mod was disabled or removed.
You wull need to add support for it manually, like I did here:

Code: Select all

if minetest.get_modpath("toolranks") then
--aikerum	
  minetest.override_item("es:pick_aikerum", {
    original_description = "Extreme Survival Aikerum Pickaxe",
    description = toolranks.create_description("Extreme Survival Aikerum Pickaxe", 0, 1),
    after_use = toolranks.new_afteruse})

  minetest.override_item("es:axe_aikerum", {
    original_description = "Extreme Survival Aikerum Axe",
    description = toolranks.create_description("Extreme Survival Aikerum Axe", 0, 1),
    after_use = toolranks.new_afteruse})

  minetest.override_item("es:shovel_aikerum", {
    original_description = "Extreme Survival Aikerum Shovel",
    description = toolranks.create_description("Extreme Survival Aikerum Shovel", 0, 1),
    after_use = toolranks.new_afteruse})
end
Add code like this in a new mod and do it for all the tools you want to add.

Re: [MOD] Tool ranks [toolranks]

Posted: Tue Jan 30, 2018 02:27
by Grizzly Adam
lisacvuk wrote:New feature: Will notify the player if tool is about to break.
What type of notification?

Re: [MOD] Tool ranks [toolranks]

Posted: Tue Jan 30, 2018 02:48
by SaKeL
Grizzly Adam wrote:
lisacvuk wrote:New feature: Will notify the player if tool is about to break.
What type of notification?
i guess chat notification ?

Code: Select all

minetest.chat_send_player(user:get_player_name(), "Your tool is about to break!")
https://github.com/lisacvuk/minetest-to ... 231edc4d0e

Re: [MOD] Tool ranks [toolranks]

Posted: Tue Jan 30, 2018 10:59
by the_raven_262
And you get a sound notification IIRC

Re: [MOD] Tool ranks [toolranks]

Posted: Tue Jan 30, 2018 15:59
by lisacvuk
Grizzly Adam wrote:
lisacvuk wrote:New feature: Will notify the player if tool is about to break.
What type of notification?
Yes, it also sends an email. /s

Re: [MOD] Tool ranks [toolranks]

Posted: Tue Jan 30, 2018 16:37
by SaKeL
lisacvuk wrote:
Grizzly Adam wrote:
lisacvuk wrote:New feature: Will notify the player if tool is about to break.
What type of notification?
Yes, it also sends an email. /s
and will order new pickaxe on amazon for you, before it breaks!

Re: [MOD] Tool ranks [toolranks]

Posted: Sun Feb 04, 2018 20:03
by ToyElf
Hold up, can't you make your item practically unbreakable by changing the multiplier to something like 0.00000000001 in the init.lua?

Re: [MOD] Tool ranks [toolranks]

Posted: Wed Feb 07, 2018 23:25
by lisacvuk
ToyElf wrote:Hold up, can't you make your item practically unbreakable by changing the multiplier to something like 0.00000000001 in the init.lua?
Yes, you could also make it rain diamonds by changing the code to give you fifty every time you dig a node.