[Mod] Enchantments [enchantment]

User avatar
jordan4ibanez
Member
 
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

[Mod] Enchantments [enchantment]

by jordan4ibanez » Thu Jun 18, 2015 03:00

This mod creates enchantments for tools, standard ones, but you can add more to the tables as you wish, externally, or directly in the init.lua.

The enchantments are as follows:

Picks, Shovels, Axes
  • Quickmine - makes tool faster based on it's level
  • Luck - Mine 1 to 4 more items
  • Furnace - Tool auto smelts items
  • Delicate - pick up the node you mined



todo:
  • Tree Feller - You cut down the whole tree (will be balanced out soon, and made to use voxel api)
  • Vein Miner - you mine all ores connected to eachother
  • Durable - Doubles the uses of the tool


Throw a tool onto the crucible and it'll start enchanting it!
Image



Github

Download [Github - Latest]

License: WTFPL
Code: Select all
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.
Last edited by jordan4ibanez on Thu Dec 01, 2016 06:01, edited 7 times in total.
I've been gone for a long time
 

Rui
Member
 
Posts: 260
Joined: Wed Oct 01, 2014 12:59
Location: Japan

[DELETED]

by Rui » Thu Jun 18, 2015 04:21

[DELETED]
Last edited by Rui on Fri Nov 04, 2016 13:05, edited 3 times in total.
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: [Mod] Enchantments

by HeroOfTheWinds » Thu Jun 18, 2015 06:32

I believe that is some sort of string of unicode characters, though I couldn't say which ones they are. I could search through the thousands of special characters, but I really don't feel like it.

Otherwise, neat mod! Now we need a version that incorporates Wuzzy's [mana] mod.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

User avatar
cd2
Member
 
Posts: 562
Joined: Mon Jun 01, 2015 06:30
Location: Linux
GitHub: cdqwertz
In-game: cd cd2
 

User avatar
Krock
Developer
 
Posts: 4478
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Mod] Enchantments

by Krock » Thu Jun 18, 2015 17:56

Public domain is not a valid license (maybe I already said that in an other mod topic and forgot to check for answers),
however, this mod looks way better than the other enchanting mod.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
cx384
Member
 
Posts: 498
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Enchantments

by cx384 » Thu Jun 18, 2015 17:58

nice mod :)
but I know some other mods with a "Tree Feller", "Luck", "Speed+", "Durable+" or "Cherry Pick"
viewtopic.php?t=7354
viewtopic.php?f=11&t=9574
(viewtopic.php?t=8970 (only the Lumber axe))
and one other that I cant find




the crucible to cheap :/ you should ad obsidian and diamonds/mese to the craft recipe
Can your read this?
 

Sokomine
Member
 
Posts: 3976
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Enchantments

by Sokomine » Thu Jun 18, 2015 18:25

I personally don't like enchantments much, but this crucible certainly looks nice! Don't make it's receipe more expensive. The node would do very well as decoration.
A list of my mods can be found here.
 

User avatar
jordan4ibanez
Member
 
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Enchantments

by jordan4ibanez » Fri Jun 19, 2015 19:23

Krock wrote:Public domain is not a valid license (maybe I already said that in an other mod topic and forgot to check for answers),
however, this mod looks way better than the other enchanting mod.

Hmmm you're right.
I've been gone for a long time
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Enchantments

by 4aiman » Tue Jun 23, 2015 12:27

Nice!

Although there are not so many enchantments. Could you do more? ;)

*time-to-brag-all-about-it mode set to ON*
+ Spoiler
*time-to-brag-all-about-it mode set to OFF*


The real problem is that we can't register stuff on_the_fly (or, for that matter, can't affect mining speed or strength via physics_override). Should any of those happen within official Minetest (please, DO vote for the additional physics override fields) it would be much more easier to create almost ANY kind of enchantment.
 

PiPerson
New member
 
Posts: 1
Joined: Tue Aug 23, 2016 01:13
In-game: PiPerson

Re: [Mod] Enchantments

by PiPerson » Tue Aug 23, 2016 01:17

Can you put luck on a diamond pick, if not is it because of the infinite diamonds trick?
 

jakab
Member
 
Posts: 87
Joined: Mon Aug 15, 2016 17:19
IRC: jakab
In-game: jakab

Re: [Mod] Enchantments

by jakab » Mon Oct 17, 2016 11:34

i like this mod :)
it hase nice enchantments, but not too mutch inventory work :P
can you somehow smash together theese two ? :
viewtopic.php?f=11&t=14087
 

User avatar
jordan4ibanez
Member
 
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Enchantments [enchantment]

by jordan4ibanez » Thu Dec 01, 2016 06:06

I've updated the mod. Changes:
  • Enchanting is modular, any mod that adds in picks, axes, shovels, can be enchanted.
  • You throw the item into the crucible and it'll be enchanted
  • Enchanted items are now tinted
  • Enchantments play nice with default item handling and item drop
A video of it https://youtu.be/uctj7lbumS8
I've been gone for a long time
 

Kosmos
Member
 
Posts: 131
Joined: Sun Sep 11, 2016 12:42
In-game: KosmosHD
 

User avatar
RSLRedstonier
Member
 
Posts: 451
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [Mod] Enchantments [enchantment]

by RSLRedstonier » Thu Jan 04, 2018 22:03

um adding loot or any combination with it will dupe blocks you can place any block mine it and dupe it that way

also happens with furnace and delicate
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 

Chem871
Member
 
Posts: 945
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Enchantments [enchantment]

by Chem871 » Fri Jan 05, 2018 00:12

Maybe it should only work with the ore module then.
What is SCP-055 again? I forgot.
 

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

Re: [Mod] Enchantments [enchantment]

by Lord_Vlad » Mon Apr 02, 2018 21:23

The mod is a mess. It destroys tools it doesn't recognise, puts way too many enchantments on each tool and conflicting ones all the time... And since enchants are free, it's way too overpowered.

At most it's good as decoration.
 

SodixGamer
New member
 
Posts: 9
Joined: Thu Jul 12, 2018 08:18
 

User avatar
pampogokiraly
Member
 
Posts: 95
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod] Enchantments [enchantment]

by pampogokiraly » Sat Jan 11, 2020 21:50

This mod is realy cool!
But i have a problem. How can i remove the luck enchant from the mod?
Because it is too overpowered and we can duplicate all of our stuff. |: /
Can anyone help me pls?
My mod (a bit old) request: Better enchant. My second mod: Old Broken Castle nodes. Search for aab01 to find my mods!
 

Skamiz Kazzarch
Member
 
Posts: 125
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
GitHub: Skamiz
In-game: Skamiz

Re: [Mod] Enchantments [enchantment]

by Skamiz Kazzarch » Sun Jan 12, 2020 09:04

In the init file go to line 439 and change this:
Code: Select all
local luck = math.random(0,1)
to this:
Code: Select all
local luck = 0

Now no newly enchented item should get the luck enchantment.

Alternatively you can go to the lines 216 and 169 which look like this:
Code: Select all
drop_count = math.random(1,4)

and change the four to a lower number, which will make the luck enchantment less powerfull.
 

User avatar
pampogokiraly
Member
 
Posts: 95
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod] Enchantments [enchantment]

by pampogokiraly » Mon Jan 13, 2020 10:10

Skamiz Kazzarch wrote:In the init file go to line 439 and change this:
Code: Select all
local luck = math.random(0,1)
to this:
Code: Select all
local luck = 0

Now no newly enchented item should get the luck enchantment.

Thank you for help, but i still have one problem. If i break a block with an enchanted stuff and i dont have the output already in my inventory, then i get two of the block |: /
Skamit Kazzarch wrote:Alternatively you can go to the lines 216 and 169 which look like this:
Code: Select all
drop_count = math.random(1,4)

and change the four to a lower number, which will make the luck enchantment less powerfull.

I changed it to 1, and i have the same problem as above.
My mod (a bit old) request: Better enchant. My second mod: Old Broken Castle nodes. Search for aab01 to find my mods!
 

Skamiz Kazzarch
Member
 
Posts: 125
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
GitHub: Skamiz
In-game: Skamiz

Re: [Mod] Enchantments [enchantment]

by Skamiz Kazzarch » Mon Jan 13, 2020 15:56

I looked into it, there is a fundamental issue with how this mod works in that it doesn't intercept the original drops, it just adds it's own ones as extra. Which of course results in the exess you observe.
Give me a day or two and I will try to get out a fixed version.

It's kind of funny that you are the first person to encounter the problem.

Edit: actualy the original drops are beiing intercepted, it just doesn't work in some situations?

Edit: Am I seeing that right? Digging through the code, it seems that the crucible has no recipe. I gues I will just... add back the old recipe?
 

Skamiz Kazzarch
Member
 
Posts: 125
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
GitHub: Skamiz
In-game: Skamiz

Re: [Mod] Enchantments [enchantment]

by Skamiz Kazzarch » Tue Jan 14, 2020 09:48

Fixing the issue in a reliable way is turning out to be more involved than I expected, but for now you can do this:
In the init file find the lines 245-249, which look like this:
Code: Select all
            if cook == true or delicate == true then
               if drop ~= minetest.get_node_drops(oldnode.name, name)[1] then
                  inv:remove_item("main", minetest.get_node_drops(oldnode.name, name)[1])
               end
            end

and replace them with this:
Code: Select all
            if string.match(name, "Furnace") or delicate == true then
               -- if drop ~= minetest.get_node_drops(oldnode.name, name)[1] then
                  inv:remove_item("main", minetest.get_node_drops(oldnode.name, name)[1])
               -- end
            end

It isn't a waterproof solution, but it should fix the issue in most cases. (unless you are using item_drop, in which case you will have to wait for the propper solution)
 

Skamiz Kazzarch
Member
 
Posts: 125
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
GitHub: Skamiz
In-game: Skamiz

Re: [Mod] Enchantments [enchantment]

by Skamiz Kazzarch » Tue Jan 14, 2020 16:50

Attached is a fixed version of the mod, which fixes all unintentional node duplications.
Other changes are:
1) All enchantments now should play nice together, instead of overwriting each other.
a) The first one evaluated is `delicate`, if it is on the tool, the drop table will be populated with the diged node instead of it's usual drops.
b) Then comes `furnace`. Each item in the drop table is smelted if possible.
c) At last comes `luck` with the most significant changes. For one, the default was changed such that it adds 0 ,1 or 2 items instead of the previous 1 through 4. And secondly, it works only on items in the drop table, wich aren't nodes. As such you can't just place and dig one node over and over again to multiply it. I hope nobody minds that it isn't so stupidly op as before. Beware though that that means it will not activate if it is on the same tool as `delicate`, unless the dug node can be smelted into an item.
2) The rewrite made it so that this mod should now also be more compatible with other mods which deal with node drops.
3) I added back the recipe for the crucible from an older version of this mod, sine I couldn't find one in the current code.
Attachments
enchantment.zip
(121.73 KiB) Downloaded 133 times
 

User avatar
pampogokiraly
Member
 
Posts: 95
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod] Enchantments [enchantment]

by pampogokiraly » Mon Jan 20, 2020 09:25

Skamiz Kazzarch wrote:Attached is a fixed version of the mod, which fixes all unintentional node duplications.
Other changes are:
1) All enchantments now should play nice together, instead of overwriting each other.
a) The first one evaluated is `delicate`, if it is on the tool, the drop table will be populated with the diged node instead of it's usual drops.
b) Then comes `furnace`. Each item in the drop table is smelted if possible.
c) At last comes `luck` with the most significant changes. For one, the default was changed such that it adds 0 ,1 or 2 items instead of the previous 1 through 4. And secondly, it works only on items in the drop table, wich aren't nodes. As such you can't just place and dig one node over and over again to multiply it. I hope nobody minds that it isn't so stupidly op as before. Beware though that that means it will not activate if it is on the same tool as `delicate`, unless the dug node can be smelted into an item.
2) The rewrite made it so that this mod should now also be more compatible with other mods which deal with node drops.
3) I added back the recipe for the crucible from an older version of this mod, sine I couldn't find one in the current code.


WOW! Thank you so much for this! I have to quickly change the crafting recipe because its too cheap but everything works perfectly. Thank you again. :D
My mod (a bit old) request: Better enchant. My second mod: Old Broken Castle nodes. Search for aab01 to find my mods!
 


Return to WIP Mods



Who is online

Users browsing this forum: Google [Bot] and 7 guests