[Mod] Enchantments [enchantment]

Post Reply
User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

[Mod] Enchantments [enchantment]

by jordan4ibanez » Post

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.
hello, am program. do language in rust. make computer do. okay i go now.

Rui
Member
Posts: 261
Joined: Wed Oct 01, 2014 12:59

[DELETED]

by Rui » Post

[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
GitHub: HeroOfTheWinds
IRC: WindHero
Location: Hawaii

Re: [Mod] Enchantments

by HeroOfTheWinds » Post

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
GitHub: cdqwertz
In-game: cd cd2
Location: Linux
Contact:

Re: [Mod] Enchantments

by cd2 » Post

wow, this mod is really cool!

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

Re: [Mod] Enchantments

by Krock » Post

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: 653
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Enchantments

by cx384 » Post

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: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Enchantments

by Sokomine » Post

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: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Enchantments

by jordan4ibanez » Post

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.
hello, am program. do language in rust. make computer do. okay i go now.

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

Re: [Mod] Enchantments

by 4aiman » Post

Nice!

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

*time-to-brag-all-about-it mode set to ON*
Spoiler
Also, mod with mc-like enchantments was created around 1.5 years or so ago by me.
It is still available within current release of magichet (which is licensed under GPLv3, so it's entirely possible to get at least ideas from that)

It had 10 working enchantments, featured several levels of enchantment (1-5) and it was possible to have multiple effects to stack. The way enchantments were applied was mimicked from Minecraft (although the info on in-game mechanics seems to had been removed from the MC official wiki).

Here's the list:

Code: Select all

      Speed up      (Efectivity)      - shortens digging times (up to lvl5)
      Casualty      (Sharpness)       - increase fleshy damage (up to lvl5)
      Everlast      (Unbreaking)      - your tool doesn't get worn occasionally (up to lvl4)
      Aqualung      (Respiration)     - grants you extra time underwater -- with a probability of lv/50 give +1 air/dtime (up to lvl5)
      Treasurer     (Luck)            - multiply drop by random(1,LV) (up to lvl4)
      Tenderness    (Silk Touch)      - WYSIWYDig  -- lvl*20% is a prob of dig the node itself (up to lvl4)
      Arson         (Smite)           - cooks dug nodes right away w/o furnace (up to lvl3)
      Antigravity   (Feather Falling) - decreases gravitation  -- decreases gravity by 0.1 per level (up to lvl5)
      Fire Affinity (-)               - heals player when it's really hot -- with a probability of lv/50 gives +1 hp  (up to lvl5)
      Gut           (-)               - macerates some inferior nodes (up to lvl2)
Have a screenie or two ;)
Image
Image

It was also possible to hold down RMB and distribute the effect of enchantment to a nearby players (this one depended on the enchantment lvl and the tool itself was getting worn-out ).
Thus, it was possible to use one well-enchanted tool to create a "brigade" of diggers with their own "man-in-charge" (whose work was to NOT release RMB ;)
*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 » Post

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

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

Re: [Mod] Enchantments

by jakab » Post

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: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Enchantments [enchantment]

by jordan4ibanez » Post

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
hello, am program. do language in rust. make computer do. okay i go now.

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

Re: [Mod] Enchantments [enchantment]

by Kosmos » Post

Can you make that we enchant swords??? :)

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [Mod] Enchantments [enchantment]

by TechNolaByte » Post

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
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

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

Re: [Mod] Enchantments [enchantment]

by Chem871 » Post

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

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

Re: [Mod] Enchantments [enchantment]

by Lord_Vlad » Post

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

Re: [Mod] Enchantments [enchantment]

by SodixGamer » Post

I have a question...
How can I create it?

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

Re: [Mod] Enchantments [enchantment]

by pampogokiraly » Post

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?
All praise the Bacon God! The one and only god in MineTest

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

Re: [Mod] Enchantments [enchantment]

by Skamiz Kazzarch » Post

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: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod] Enchantments [enchantment]

by pampogokiraly » Post

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.
All praise the Bacon God! The one and only god in MineTest

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

Re: [Mod] Enchantments [enchantment]

by Skamiz Kazzarch » Post

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?

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

Re: [Mod] Enchantments [enchantment]

by Skamiz Kazzarch » Post

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)

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

Re: [Mod] Enchantments [enchantment]

by Skamiz Kazzarch » Post

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 197 times

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

Re: [Mod] Enchantments [enchantment]

by pampogokiraly » Post

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
All praise the Bacon God! The one and only god in MineTest

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests