[MOD] Tool ranks [toolranks]

Mineminer
Member
 
Posts: 58
Joined: Mon Mar 05, 2018 04:05

Re: [MOD] Tool ranks [toolranks]

by Mineminer » Wed Mar 07, 2018 23:40

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?
 

User avatar
lisacvuk
Member
 
Posts: 274
Joined: Sat Jul 19, 2014 11:52
Location: Serbia, Užice
GitHub: lisacvuk
IRC: lisac
In-game: lisacvuk

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Thu Mar 08, 2018 08:59

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.
It's lisac, not lisa.
400 character limit? Am I writing a book?
Administrator on Craig's server. Minetest player.
"The enemy pales when they see the face of Dazzle!" ~ Dazzle obviously.
I live in Serbia.
Steam | OpenDOTA
My mods:
Tool ranks
I appreciate donations in TF2 items. :)
 

EdShouldBeInBed
Member
 
Posts: 47
Joined: Sun Feb 22, 2015 16:03
In-game: EdShdBInBed

Re: [MOD] Tool ranks [toolranks]

by EdShouldBeInBed » Thu Mar 15, 2018 18:54

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.
I'm a writer who tinkers with code on occasion. I play minetest when insomnia makes the writing hard.
 

User avatar
Hamlet
Member
 
Posts: 463
Joined: Sat Jul 29, 2017 21:09
Location: Italia
IRC: H4mlet

Re: [MOD] Tool ranks [toolranks]

by Hamlet » Thu Apr 05, 2018 19:24

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?
 

User avatar
lisacvuk
Member
 
Posts: 274
Joined: Sat Jul 19, 2014 11:52
Location: Serbia, Užice
GitHub: lisacvuk
IRC: lisac
In-game: lisacvuk

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Thu Apr 05, 2018 20:41

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.
It's lisac, not lisa.
400 character limit? Am I writing a book?
Administrator on Craig's server. Minetest player.
"The enemy pales when they see the face of Dazzle!" ~ Dazzle obviously.
I live in Serbia.
Steam | OpenDOTA
My mods:
Tool ranks
I appreciate donations in TF2 items. :)
 

User avatar
Hamlet
Member
 
Posts: 463
Joined: Sat Jul 29, 2017 21:09
Location: Italia
IRC: H4mlet

Re: [MOD] Tool ranks [toolranks]

by Hamlet » Fri Apr 06, 2018 19:39

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.
 

User avatar
bosapara
Member
 
Posts: 379
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara
In-game: Jozet

Re: [MOD] Tool ranks [toolranks]

by bosapara » Tue Jul 17, 2018 12:11

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

Will be too much useful with anvil mod

ImageImage
 

User avatar
GamingAssociation39
Member
 
Posts: 735
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: [MOD] Tool ranks [toolranks]

by GamingAssociation39 » Wed Jul 18, 2018 03:28

This resembles a mod out there for MC that has similar functionality
Jesus Is Lord and Savior!!!
 

User avatar
TenPlus1
Member
 
Posts: 2422
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [MOD] Tool ranks [toolranks]

by TenPlus1 » Wed Jul 18, 2018 08:39

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

User avatar
bosapara
Member
 
Posts: 379
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara
In-game: Jozet

Re: [MOD] Tool ranks [toolranks]

by bosapara » Wed Jul 18, 2018 09:27

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
 

User avatar
TenPlus1
Member
 
Posts: 2422
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [MOD] Tool ranks [toolranks]

by TenPlus1 » Thu Jul 19, 2018 06:51

Toolrank swords will still count it's uses when hitting mobs redo mobs :) not just digging leaves etc.
 

User avatar
Lord_Vlad
Member
 
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [MOD] Tool ranks [toolranks]

by Lord_Vlad » Wed Dec 05, 2018 00:11

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...
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 3 guests