somewhat terraria-ish Tool Modifiers [tool_modifiers] [v 0.3]
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: somewhat terraria-ish Crafted Tool Modifiers [c_t_m] [v
Ok, so a buggy start. Thanks for all the feedback, debugging, testing, and all the rest. This is such a great community.
Now for the details.
I've updated this mod, so the above mentioned issue becomes moot. Now, the mod uses on_mods_loaded to essentially override all items with a registered tool_capabilities, ie, all tools, but also, armor.
The tool ranks are applied to everything. The c-t-m modifiers currently are only applied to tools with a tool_cap of cracky, choppy, crumbly, or snappy. This can probably be expanded.
Essentially, no mod needs to modify code or even depend on this mod.
The links above work, the support mod is no longer relevant, necessary or even desired, so please just disregard it.
lib_trm stands on it's own, thanks to the fine coding of lisacvuk and davidthecreator. Thanks and credits to you both.
Shad
Now for the details.
I've updated this mod, so the above mentioned issue becomes moot. Now, the mod uses on_mods_loaded to essentially override all items with a registered tool_capabilities, ie, all tools, but also, armor.
The tool ranks are applied to everything. The c-t-m modifiers currently are only applied to tools with a tool_cap of cracky, choppy, crumbly, or snappy. This can probably be expanded.
Essentially, no mod needs to modify code or even depend on this mod.
The links above work, the support mod is no longer relevant, necessary or even desired, so please just disregard it.
lib_trm stands on it's own, thanks to the fine coding of lisacvuk and davidthecreator. Thanks and credits to you both.
Shad
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: somewhat terraria-ish Crafted Tool Modifiers [c_t_m] [v
I felt that lib_trm deserved it's own thread, for what it does. It is no longer WIP, but ready for release.
Please visit the lib_trm thread to report issues regarding that mod, preserving this thread for its original mod, c-t-m.
Shad
Please visit the lib_trm thread to report issues regarding that mod, preserving this thread for its original mod, c-t-m.
Shad
- FreeGamers
- Member
- Posts: 650
- Joined: Sat May 25, 2019 00:15
- GitHub: is proprietary I use NotABug
- Location: United States
- Contact:
Re: somewhat terraria-ish Crafted Tool Modifiers [c_t_m] [v
I just tried the latest version of lib_trm.
I don't see any effect modifier/title description being applied to the tools or stats.
Also, it says "nodes dug" for each tool including swords, armor, and axes. Not all of these use digging. Didn't toolranks use something like "times used" or something more general for this?
This is the first version of this mod that didn't disable every other mod on my server for some reason.
EDIT: https://notabug.org/TenPlus1/toolranks
This version just uses "Used" and has some updates from the original that might be useful. Check it out?
I don't see any effect modifier/title description being applied to the tools or stats.
Also, it says "nodes dug" for each tool including swords, armor, and axes. Not all of these use digging. Didn't toolranks use something like "times used" or something more general for this?
This is the first version of this mod that didn't disable every other mod on my server for some reason.
EDIT: https://notabug.org/TenPlus1/toolranks
This version just uses "Used" and has some updates from the original that might be useful. Check it out?
Last edited by FreeGamers on Sat Sep 07, 2019 05:04, edited 1 time in total.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft
- FreeGamers
- Member
- Posts: 650
- Joined: Sat May 25, 2019 00:15
- GitHub: is proprietary I use NotABug
- Location: United States
- Contact:
Re: somewhat terraria-ish Crafted Tool Modifiers [c_t_m] [v
Another issue I've had since trying lib_trm is I can't disable trm and just use standard toolranks anymore without all my mods getting disabled through a large dependency check failure that cascades to other mods that have optional tool ranks dependencies?
SOLVED
Apparently I'm hitting this bug: https://github.com/minetest-mods/moreores/issues/33
When using the master/original version of toolranks which suffers from a dependency loop when used with moreores and farming.
Switching to 10+1's version resolved this:https://notabug.org/TenPlus1/toolranks
SOLVED
Apparently I'm hitting this bug: https://github.com/minetest-mods/moreores/issues/33
When using the master/original version of toolranks which suffers from a dependency loop when used with moreores and farming.
Switching to 10+1's version resolved this:https://notabug.org/TenPlus1/toolranks
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: somewhat terraria-ish Crafted Tool Modifiers [c_t_m] [v
FreeGamers,
I can't see why this latest version would cause dependency issues, it has none, nor requires any.
If you are running into that bug, chances are, you have both toolranks and lib_trm installed. Effects and modifiers do get applied to tools. The toolranks ranks are applied to all registered tools, while only tools with a tool_cap of cracky, crumbly, choppy, or snappy will get the c-t-m modifiers. The tool must be crafted, and the craft must trigger the on_crafted callback.
Swords have always been a member of one of the standard tool_caps groups. I agree that the message should change.
For the record, the toolranks code contained herein was lifted directly from Hamlet's Quest subgame, so I am not sure of which version was used.
Please provide either screenshots or debug messages, and if you type /mods in MT, it'll list all the loaded mods. If you take a screenshot while the loaded mods are shown in chat, this can also help.
I should also note, do not run toolranks, c-t-m, and lib_trm simultaneously. lib_trm is a drop in replacement for both of those mods. If you choose to use lib_trm, you should completely remove the other two mods.
Shad
I can't see why this latest version would cause dependency issues, it has none, nor requires any.
If you are running into that bug, chances are, you have both toolranks and lib_trm installed. Effects and modifiers do get applied to tools. The toolranks ranks are applied to all registered tools, while only tools with a tool_cap of cracky, crumbly, choppy, or snappy will get the c-t-m modifiers. The tool must be crafted, and the craft must trigger the on_crafted callback.
Swords have always been a member of one of the standard tool_caps groups. I agree that the message should change.
For the record, the toolranks code contained herein was lifted directly from Hamlet's Quest subgame, so I am not sure of which version was used.
Please provide either screenshots or debug messages, and if you type /mods in MT, it'll list all the loaded mods. If you take a screenshot while the loaded mods are shown in chat, this can also help.
I should also note, do not run toolranks, c-t-m, and lib_trm simultaneously. lib_trm is a drop in replacement for both of those mods. If you choose to use lib_trm, you should completely remove the other two mods.
Shad
- davidthecreator
- Member
- Posts: 452
- Joined: Mon Aug 18, 2014 19:48
- GitHub: daviddoesminetest
- In-game: DavidDoesMinetest
- Location: Lithuania
Re: somewhat terraria-ish Tool Modifiers [tool_modifiers] [v 0.2]
v 0.2 - huge rework
*Now modifiers could be given to tools in more ways, than just by crafting (But for now, this mod by itself, still only provides a 50% chance to get a modifier on a tool when you craft it... but from now on, there IS a way to add modifiers from other sources, if any modder wants to use this feature)
*Now all modifiers are placed inside a table and could be easily edited if needed.
*The mod now propperly changes tool's attributes and will now support any node and damage group, even special node groups modded tools might have.
*2 new default modifiers: "Advanced" and "Degraded". One increases tool's digging maxlevel by 1, the other one decreases it by 1.
*Now modifiers could be given to tools in more ways, than just by crafting (But for now, this mod by itself, still only provides a 50% chance to get a modifier on a tool when you craft it... but from now on, there IS a way to add modifiers from other sources, if any modder wants to use this feature)
*Now all modifiers are placed inside a table and could be easily edited if needed.
*The mod now propperly changes tool's attributes and will now support any node and damage group, even special node groups modded tools might have.
*2 new default modifiers: "Advanced" and "Degraded". One increases tool's digging maxlevel by 1, the other one decreases it by 1.
Code: Select all
--- modifier adding function
---1 - itemstack >> the item a player has, that you want to add a modifier to
---2 - tool_modifiers >> the modifier table you want to use (you can leave default one or create your own)
---3 - math.random(#tool_modifiers) >> leave it as is if you are using the default table, replace "tool_modifiers
--- with your own table name if you made a custom one or put a number inside if you want to add a modifier
--- under a specific ID in the table
ApplyToolMod(itemstack,tool_modifiers,math.random(#tool_modifiers))
return itemstack
---
---Default Modifier IDs
---
1>>"Sharp"
2>>"Dull"
3>>"Efficient"
4>>"Lazy"
5>>"Heavy"
6>>"Light"
7>>"Durable"
8>>"Fragile"
9>>"Demonic"
10>>"Broken"
11>>"Legendary"
12>>"Terrible"
13>>"Advanced"
14>>"Degraded"
---
--- And this is what the default modifier table looks like
---
tool_modifiers = {
{"Sharp","","#00eaff",25,0,0,0,0},
{"Dull","","#aaaaaa",-20,0,0,0,0},
{"Efficient","","#00eaff",0,0,50,0,0},
{"Lazy","","#aaaaaa",0,0,-35,0,0},
{"Heavy","","#ffffff",25,25,0,0,0},
{"Light","","#ffffff",-20,-25,0,0,0},
{"Durable","","#00eaff",0,0,0,50,0},
{"Fragile","","#aaaaaa",0,0,0,-40,0},
{"Demonic","","#00ffa2",18,-10,16,25,0},
{"Broken","","#666666",-17,10,-17,-25,0},
{"Legendary","","#ff954e",40,-25,80,75,0},
{"Terrible","","#161616",-35,30,-45,-60,0},
{"Advanced","","#ff954e",0,0,0,0,1},
{"Degraded","","#161616",0,0,0,0,-1},
},
--
-- elements >> (First name, Last name, Color, Damage+%, Attack Cooldown+%, Digging speed +%, Durability +%, Digging MaxLevel+)
--
---
--- You could also make your own table with your own way to apply modifiers, if you want to make a modifier mod that depends on this mod
---
-------
-------
my_totally_not_op_tool_mods = {
{"Destructive","Of Death","#0018ff",1000,-90,1000,1000,3},
{"","Is Unbreakable","#aaaaaa",0,0,0,69420,0},
{"Hasty","","#aaaaaa",0,-95,2000,0,0},
{"Useless","Of Suckage","#00eaff",-99,1000,-99,-99,-2},
},
ApplyToolMod(itemstack,my_totally_not_op_tool_mods,math.random(#my_totally_not_op_tool_mods))
return itemstack
-------
-------
-- (Don't forget that you need to "return itemstack" after using the code for applying tool modifiers in your own way)
-
- Member
- Posts: 78
- Joined: Fri Sep 04, 2020 21:23
- GitHub: ignaramico
Re: somewhat terraria-ish Tool Modifiers [tool_modifiers] [v 0.2]
Is this rework on the same github that was provided some post ago, or you made a new one? (since i dont see a link)davidthecreator wrote: ↑Sat Jan 16, 2021 22:12v 0.2 - huge rework
*Now modifiers could be given to tools in more ways, than just by crafting (But for now, this mod by itself, still only provides a 50% chance to get a modifier on a tool when you craft it... but from now on, there IS a way to add modifiers from other sources, if any modder wants to use this feature)
*Now all modifiers are placed inside a table and could be easily edited if needed.
*The mod now propperly changes tool's attributes and will now support any node and damage group, even special node groups modded tools might have.
*2 new default modifiers: "Advanced" and "Degraded". One increases tool's digging maxlevel by 1, the other one decreases it by 1.
Code: Select all
--- modifier adding function ---1 - itemstack >> the item a player has, that you want to add a modifier to ---2 - tool_modifiers >> the modifier table you want to use (you can leave default one or create your own) ---3 - math.random(#tool_modifiers) >> leave it as is if you are using the default table, replace "tool_modifiers --- with your own table name if you made a custom one or put a number inside if you want to add a modifier --- under a specific ID in the table ApplyToolMod(itemstack,tool_modifiers,math.random(#tool_modifiers)) return itemstack --- ---Default Modifier IDs --- 1>>"Sharp" 2>>"Dull" 3>>"Efficient" 4>>"Lazy" 5>>"Heavy" 6>>"Light" 7>>"Durable" 8>>"Fragile" 9>>"Demonic" 10>>"Broken" 11>>"Legendary" 12>>"Terrible" 13>>"Advanced" 14>>"Degraded" --- --- And this is what the default modifier table looks like --- tool_modifiers = { {"Sharp","","#00eaff",25,0,0,0,0}, {"Dull","","#aaaaaa",-20,0,0,0,0}, {"Efficient","","#00eaff",0,0,50,0,0}, {"Lazy","","#aaaaaa",0,0,-35,0,0}, {"Heavy","","#ffffff",25,25,0,0,0}, {"Light","","#ffffff",-20,-25,0,0,0}, {"Durable","","#00eaff",0,0,0,50,0}, {"Fragile","","#aaaaaa",0,0,0,-40,0}, {"Demonic","","#00ffa2",18,-10,16,25,0}, {"Broken","","#666666",-17,10,-17,-25,0}, {"Legendary","","#ff954e",40,-25,80,75,0}, {"Terrible","","#161616",-35,30,-45,-60,0}, {"Advanced","","#ff954e",0,0,0,0,1}, {"Degraded","","#161616",0,0,0,0,-1}, }, -- -- elements >> (First name, Last name, Color, Damage+%, Attack Cooldown+%, Digging speed +%, Durability +%, Digging MaxLevel+) -- --- --- You could also make your own table with your own way to apply modifiers, if you want to make a modifier mod that depends on this mod --- ------- ------- my_totally_not_op_tool_mods = { {"Destructive","Of Death","#0018ff",1000,-90,1000,1000,3}, {"","Is Unbreakable","#aaaaaa",0,0,0,69420,0}, {"Hasty","","#aaaaaa",0,-95,2000,0,0}, {"Useless","Of Suckage","#00eaff",-99,1000,-99,-99,-2}, }, ApplyToolMod(itemstack,my_totally_not_op_tool_mods,math.random(#my_totally_not_op_tool_mods)) return itemstack ------- ------- -- (Don't forget that you need to "return itemstack" after using the code for applying tool modifiers in your own way)
- davidthecreator
- Member
- Posts: 452
- Joined: Mon Aug 18, 2014 19:48
- GitHub: daviddoesminetest
- In-game: DavidDoesMinetest
- Location: Lithuania
Re: somewhat terraria-ish Tool Modifiers [tool_modifiers] [v 0.2]
As for old rework... I think it was just someone trying to make the old version of this mod compatible with Toolranks...Ignaramico wrote: ↑Sat Jan 16, 2021 23:01Is this rework on the same github that was provided some post ago, or you made a new one? (since i dont see a link)davidthecreator wrote: ↑Sat Jan 16, 2021 22:12v 0.2 - huge rework
*Now modifiers could be given to tools in more ways, than just by crafting (But for now, this mod by itself, still only provides a 50% chance to get a modifier on a tool when you craft it... but from now on, there IS a way to add modifiers from other sources, if any modder wants to use this feature)
*Now all modifiers are placed inside a table and could be easily edited if needed.
*The mod now propperly changes tool's attributes and will now support any node and damage group, even special node groups modded tools might have.
*2 new default modifiers: "Advanced" and "Degraded". One increases tool's digging maxlevel by 1, the other one decreases it by 1.
Code: Select all
--- modifier adding function ---1 - itemstack >> the item a player has, that you want to add a modifier to ---2 - tool_modifiers >> the modifier table you want to use (you can leave default one or create your own) ---3 - math.random(#tool_modifiers) >> leave it as is if you are using the default table, replace "tool_modifiers --- with your own table name if you made a custom one or put a number inside if you want to add a modifier --- under a specific ID in the table ApplyToolMod(itemstack,tool_modifiers,math.random(#tool_modifiers)) return itemstack --- ---Default Modifier IDs --- 1>>"Sharp" 2>>"Dull" 3>>"Efficient" 4>>"Lazy" 5>>"Heavy" 6>>"Light" 7>>"Durable" 8>>"Fragile" 9>>"Demonic" 10>>"Broken" 11>>"Legendary" 12>>"Terrible" 13>>"Advanced" 14>>"Degraded" --- --- And this is what the default modifier table looks like --- tool_modifiers = { {"Sharp","","#00eaff",25,0,0,0,0}, {"Dull","","#aaaaaa",-20,0,0,0,0}, {"Efficient","","#00eaff",0,0,50,0,0}, {"Lazy","","#aaaaaa",0,0,-35,0,0}, {"Heavy","","#ffffff",25,25,0,0,0}, {"Light","","#ffffff",-20,-25,0,0,0}, {"Durable","","#00eaff",0,0,0,50,0}, {"Fragile","","#aaaaaa",0,0,0,-40,0}, {"Demonic","","#00ffa2",18,-10,16,25,0}, {"Broken","","#666666",-17,10,-17,-25,0}, {"Legendary","","#ff954e",40,-25,80,75,0}, {"Terrible","","#161616",-35,30,-45,-60,0}, {"Advanced","","#ff954e",0,0,0,0,1}, {"Degraded","","#161616",0,0,0,0,-1}, }, -- -- elements >> (First name, Last name, Color, Damage+%, Attack Cooldown+%, Digging speed +%, Durability +%, Digging MaxLevel+) -- --- --- You could also make your own table with your own way to apply modifiers, if you want to make a modifier mod that depends on this mod --- ------- ------- my_totally_not_op_tool_mods = { {"Destructive","Of Death","#0018ff",1000,-90,1000,1000,3}, {"","Is Unbreakable","#aaaaaa",0,0,0,69420,0}, {"Hasty","","#aaaaaa",0,-95,2000,0,0}, {"Useless","Of Suckage","#00eaff",-99,1000,-99,-99,-2}, }, ApplyToolMod(itemstack,my_totally_not_op_tool_mods,math.random(#my_totally_not_op_tool_mods)) return itemstack ------- ------- -- (Don't forget that you need to "return itemstack" after using the code for applying tool modifiers in your own way)
As for v0.2, I just improved the code of Tool Modifiers and added some new features... But nothing related to toolranks support...
Download for v0.2 is in the 1st page.
- davidthecreator
- Member
- Posts: 452
- Joined: Mon Aug 18, 2014 19:48
- GitHub: daviddoesminetest
- In-game: DavidDoesMinetest
- Location: Lithuania
Re: somewhat terraria-ish Tool Modifiers [tool_modifiers] [v 0.3]
--- update v0.3
*added support for equippable_accessories mod
(the mod can be found here: viewtopic.php?f=9&t=26203&p=389594#p389594)
*added chat commands for applying modifiers to tools or accessories (requires "ban" priv to use)
/apply_rand_toolmod
(Applies a random modifier to your wielded tool or accessory)
/apply_toolmod <modifier ID>
(Applies modifier to your wielded tool or accessory, under the ID you enter)
modifier IDs:
tools:
1 - Sharp
2 - Dull
3 - Efficient
4 - Lazy
5 - Heavy
6 - Light
7 - Durable
8 - Fragile
9 - Demonic
10 - Broken
11 - Legendary
12 - Terrible
13 - Advanced
14 - Degraded
accessories:
1 - Hard
2 - Guarding
3 - Armored
4 - Warding
5 - Jagged
6 - Spiked
7 - Angry
8 - Menacing
9 - Bandaged
10 - Healing
11 - Salvaging
12 - Recovering
13 - Caffeinated
14 - Hyperactive
15 - Hard-working
16 - Destructive
17 - Brisk
18 - Fleeting
19 - Hasty
20 - Quick
21 - Healthy
22 - Immortal
23 - Cold
24 - Fireproof
*added support for equippable_accessories mod
(the mod can be found here: viewtopic.php?f=9&t=26203&p=389594#p389594)
*added chat commands for applying modifiers to tools or accessories (requires "ban" priv to use)
/apply_rand_toolmod
(Applies a random modifier to your wielded tool or accessory)
/apply_toolmod <modifier ID>
(Applies modifier to your wielded tool or accessory, under the ID you enter)
modifier IDs:
tools:
1 - Sharp
2 - Dull
3 - Efficient
4 - Lazy
5 - Heavy
6 - Light
7 - Durable
8 - Fragile
9 - Demonic
10 - Broken
11 - Legendary
12 - Terrible
13 - Advanced
14 - Degraded
accessories:
1 - Hard
2 - Guarding
3 - Armored
4 - Warding
5 - Jagged
6 - Spiked
7 - Angry
8 - Menacing
9 - Bandaged
10 - Healing
11 - Salvaging
12 - Recovering
13 - Caffeinated
14 - Hyperactive
15 - Hard-working
16 - Destructive
17 - Brisk
18 - Fleeting
19 - Hasty
20 - Quick
21 - Healthy
22 - Immortal
23 - Cold
24 - Fireproof
Who is online
Users browsing this forum: No registered users and 32 guests