[MOD] Tool ranks [toolranks]

Re: [MOD] Tool ranks [toolranks]

Postby Mineminer » Wed Mar 07, 2018 11:40 pm

maikerumine wrote:
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.


So you means for the more ores tools ( viewtopic.php?id=549 ) a new mod would has to be created just to prevent them from cashing the server?
Mineminer
Member
 
Posts: 75
Joined: Mon Mar 05, 2018 4:05 am

Re: [MOD] Tool ranks [toolranks]

Postby lisacvuk » Thu Mar 08, 2018 8:59 am

No, it means the more ores mod needs to support this if it is to work correctly.
The server admin can add the support manually.
lisacvuk
Member
 
Posts: 274
Joined: Sat Jul 19, 2014 11:52 am
GitHub: lisacvuk
In-game: lisacvuk

Re: [MOD] Tool ranks [toolranks]

Postby EdShouldBeInBed » Thu Mar 15, 2018 6:54 pm

So, partly as practice in coding and partly just to expand support, I made a little mod.
It's here. It extends the coverage of toolranks to:
bacon
glooptest
magma and ice mp
technic aluminum

Seems to work on my local game, but if you have any of these mods installed do try it.
EdShouldBeInBed
Member
 
Posts: 48
Joined: Sun Feb 22, 2015 4:03 pm
In-game: EdShdBInBed

Re: [MOD] Tool ranks [toolranks]

Postby Hamlet » Thu Apr 05, 2018 7:24 pm

lisacvuk wrote:[...]
What this does is add levels to tools depending on number of nodes you've dug with that tool.
Higher level tools take longer to wear out.
[...]


I'm using your mod since a long time and I find it very useful, thanks for your work.
Earlier I was repairing a sword and I thought if it could be possible to apply the same principle to weapons, it would be nice to have them record the number of killed mobs!
Another feature I would like to see is localized messages, is there any chance that you add Intllib support?
Hamlet
Member
 
Posts: 465
Joined: Sat Jul 29, 2017 9:09 pm
GitHub: MicroSoft is not OpenSource

Re: [MOD] Tool ranks [toolranks]

Postby lisacvuk » Thu Apr 05, 2018 8:41 pm

Hamlet wrote:I'm using your mod since a long time and I find it very useful, thanks for your work.
Earlier I was repairing a sword and I thought if it could be possible to apply the same principle to weapons, it would be nice to have them record the number of killed mobs!
Another feature I would like to see is localized messages, is there any chance that you add Intllib support?

Thanks for trying it out :)
There are a few mobs mods out there, with pretty much different APIs, so it would be hard to support all of them. Might just support mobs_redo once.
IIRC there is another way to do translations in .5, I'm waiting for that one.
lisacvuk
Member
 
Posts: 274
Joined: Sat Jul 19, 2014 11:52 am
GitHub: lisacvuk
In-game: lisacvuk

Re: [MOD] Tool ranks [toolranks]

Postby Hamlet » Fri Apr 06, 2018 7:39 pm

lisacvuk wrote:[..]There are a few mobs mods out there, with pretty much different APIs, so it would be hard to support all of them. Might just support mobs_redo once.


That would be cool :)

lisacvuk wrote:IIRC there is another way to do translations in .5, I'm waiting for that one.


Good to know, I'll stay tuned.
Hamlet
Member
 
Posts: 465
Joined: Sat Jul 29, 2017 9:09 pm
GitHub: MicroSoft is not OpenSource

Re: [MOD] Tool ranks [toolranks]

Postby bosapara » Tue Jul 17, 2018 12:11 pm

How about to add sword and hoe to mod of tool rank?

Will be too much useful with anvil mod

ImageImage
bosapara
Member
 
Posts: 415
Joined: Fri Apr 07, 2017 8:49 am
GitHub: bosapara
In-game: Jozet

Re: [MOD] Tool ranks [toolranks]

Postby GamingAssociation39 » Wed Jul 18, 2018 3:28 am

This resembles a mod out there for MC that has similar functionality
GamingAssociation39
Member
 
Posts: 803
Joined: Mon Apr 25, 2016 4:09 pm
GitHub: Gerold55
In-game: Gerold55

Re: [MOD] Tool ranks [toolranks]

Postby TenPlus1 » Wed Jul 18, 2018 8:39 am

bosapara: swords were just added a few weeks ago and if you use farming redo then hoe's use toolranks also.
TenPlus1
Member
 
Posts: 2531
Joined: Mon Jul 29, 2013 1:38 pm
GitHub: tenplus1

Re: [MOD] Tool ranks [toolranks]

Postby bosapara » Wed Jul 18, 2018 9:27 am

TenPlus1 wrote:bosapara: swords were just added a few weeks ago and if you use farming redo then hoe's use toolranks also.


good news, thats awesome!

__________________________

Sword is easy to add (only for dig, not for punch), but hoe a few hard
bosapara
Member
 
Posts: 415
Joined: Fri Apr 07, 2017 8:49 am
GitHub: bosapara
In-game: Jozet

Re: [MOD] Tool ranks [toolranks]

Postby TenPlus1 » Thu Jul 19, 2018 6:51 am

Toolrank swords will still count it's uses when hitting mobs redo mobs :) not just digging leaves etc.
TenPlus1
Member
 
Posts: 2531
Joined: Mon Jul 29, 2013 1:38 pm
GitHub: tenplus1

Re: [MOD] Tool ranks [toolranks]

Postby Lord_Vlad » Wed Dec 05, 2018 12:11 am

Swords is kinda unbalanced in the fact that if you hold hit, you will hit fast for a few damages, but it will count as a ton of uses according to tool ranks.
Add to that that they last forever to start with, in my opinion...
Lord_Vlad
Member
 
Posts: 112
Joined: Thu Jul 20, 2017 7:58 am

Re: [MOD] Tool ranks [toolranks]

Postby Tikilou » Mon Apr 01, 2019 1:35 pm

Thanks for this mod, unfortunatly, it's not working anymore with 5.0 server update from 4.17.1 (server can't load others mods when toolranks is activated)
Tikilou
New member
 
Posts: 8
Joined: Mon Mar 25, 2019 11:33 am



Return to Mod Releases



Who is online

Users browsing this forum: Bing Bot [Bot] and 0 guests