[MOD] Tool ranks [toolranks]

einarromero
New member
Posts: 5
Joined: Wed Sep 20, 2017 02:04

Re: [MOD] Tool ranks [toolranks]

by einarromero » Post

Im using MT 0.4.16

User avatar
ToyElf
Member
Posts: 13
Joined: Fri Apr 21, 2017 19:23
In-game: ToyElf Toy_Elf
Location: Carboard Box
Contact:

Re: [MOD] Tool ranks [toolranks]

by ToyElf » Post

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.

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

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Post

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.
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
ToyElf
Member
Posts: 13
Joined: Fri Apr 21, 2017 19:23
In-game: ToyElf Toy_Elf
Location: Carboard Box
Contact:

Re: [MOD] Tool ranks [toolranks]

by ToyElf » Post

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.

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

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Post

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. :)
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
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [MOD] Tool ranks [toolranks]

by azekill_DIABLO » Post

A hammer and a... What? Am I not a professionnal?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Post

Image
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
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [MOD] Tool ranks [toolranks]

by azekill_DIABLO » Post

xD
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: [MOD] Tool ranks [toolranks]

by Sires » Post

azekill_DIABLO wrote:xD
Expected "=" near "xD" in line 1
I don't have anything important to say.

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [MOD] Tool ranks [toolranks]

by Lone_Wolf » Post

Added support for this mod!
My mod (lavastuff)
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

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

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Post

Lone_Wolf wrote:Added support for this mod!
My mod (lavastuff)
Yay! Thank you :)
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
Akahyperion
Member
Posts: 17
Joined: Mon Dec 12, 2016 18:57
IRC: Akahyperion
In-game: Akahyperion
Location: France

Re: [MOD] Tool ranks [toolranks]

by Akahyperion » Post

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 ?

Chem871
Member
Posts: 999
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [MOD] Tool ranks [toolranks]

by Chem871 » Post

Is there armor support?
What is SCP-055?

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

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Post

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?
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. :)

Chem871
Member
Posts: 999
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [MOD] Tool ranks [toolranks]

by Chem871 » Post

Same as the tools, the more it gets damaged (used) the better it gets!
What is SCP-055?

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

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Post

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

Drgnrdr
Member
Posts: 34
Joined: Tue Jul 11, 2017 08:57

Re: [MOD] Tool ranks [toolranks]

by Drgnrdr » Post

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.

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [MOD] Tool ranks [toolranks]

by maikerumine » Post

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.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Grizzly Adam
Member
Posts: 252
Joined: Sat Aug 05, 2017 01:28
GitHub: Grizzly-Adam
Location: Lost in America
Contact:

Re: [MOD] Tool ranks [toolranks]

by Grizzly Adam » Post

lisacvuk wrote:New feature: Will notify the player if tool is about to break.
What type of notification?
Check out my Mods: BBQ Mod Crops Plus

User avatar
SaKeL
Member
Posts: 743
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [MOD] Tool ranks [toolranks]

by SaKeL » Post

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

User avatar
the_raven_262
Member
Posts: 343
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: [Discord unfortunately] corvus262

Re: [MOD] Tool ranks [toolranks]

by the_raven_262 » Post

And you get a sound notification IIRC

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

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Post

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
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
SaKeL
Member
Posts: 743
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [MOD] Tool ranks [toolranks]

by SaKeL » Post

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!

User avatar
ToyElf
Member
Posts: 13
Joined: Fri Apr 21, 2017 19:23
In-game: ToyElf Toy_Elf
Location: Carboard Box
Contact:

Re: [MOD] Tool ranks [toolranks]

by ToyElf » Post

Hold up, can't you make your item practically unbreakable by changing the multiplier to something like 0.00000000001 in the init.lua?

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

Re: [MOD] Tool ranks [toolranks]

by lisacvuk » Post

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

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests