Page 1 of 1

[Mod] Potions [heal_potions]

PostPosted: Sat Jul 19, 2014 11:39
by AnFiadhChu
A small mod that might be useful. It adds a fullheal potion and a halfheal potion to the game.

License: WTFPL

Dependencies:
default
flowers
farming
vessels

Download:
heal_potions.zip
(72 KiB) Downloaded 463 times


crafting:
Image

Image

The fullheal potion heals 10 hearts, and the halfheal heals 5 hearts.

The textures are from http://icons.webtoolhub.com/icon-p0s2281-set.aspx
(From what I could decipher from the licenses and stuff I'm allowed to use them.)

Opinions please, second release.

Re: [Mod]Potions[potions]

PostPosted: Sat Jul 19, 2014 11:57
by Evergreen
Interesting idea, but where did you get the textures from? Also, it's better to use 16x16 textures.

Re: [Mod]Potions[potions]

PostPosted: Sat Jul 19, 2014 14:03
by Wuzzy
Please use a different short name than “potions”; This name is already used here: https://forum.minetest.net/viewtopic.php?id=5549.

I think both potions are overpowered, because they heal you immediately. This can be very frustrating in combat, as it goes basically this way:
get hit
use full-heal potion
get hit
use full-heal potion

etc.
Unless you have a weapon which kills immediately I suppose it would be extremely hard, if not impossible, to kill a player with a lot of full-heal potions. You just have to use them faster than you are hit. I suppose you could even survive swimming in a lava lake if you just have enough full-heal potions. Since you are only hurt every second, but you can consume healing potions as fast as you can click.
I also think the current healing system in Minetest is just utterly flawed. It is obviously not optimized for gameplay. minetest.item_eat is overpowered. So it is not entirely your fault, after all. The sad thing is, currently all healing items I know are overpowered immediate healing items and it is just a matter of whoever runs out of healing items first. This is not true for very low healing items, like 1 half heart. This is because you may not click 19 times fast enough against a weapon which damages you by 4 hearts per hit.

By the way, do you plan to add more potions? You may be interested in my Player Effects mod.

I also planned to create potions. I think I will release such a mod maybe in 1 or 2 weeks.

Re: [Mod] Potions [heal_potions]

PostPosted: Sat Jul 19, 2014 20:10
by AnFiadhChu
@Evergreen the textures are from http://icons.webtoolhub.com/icon-p0s2281-set.aspx, I forgot to add that info, thank you for reminding me.

@Wuzzy I have fixed the name, and will probe the idea of a more balanced heal. please send me a link to your mod when it is done :)

Re: [Mod] Potions [heal_potions]

PostPosted: Tue Nov 11, 2014 05:29
by Fredrick01
Nice mod. I was hoping to find something like this. Though I do agree with Wuzzy as to the strength of the potions, I also must say that it is a GREAT mod, and I am excited to try it. P.S. Excellent textures!!

Re: [Mod] Potions [heal_potions]

PostPosted: Tue Nov 11, 2014 18:57
by HeroOfTheWinds
Possible idea: How about a Regen Potion? That is, a potion that continually heals you over a small period of time, say, 3-5 seconds. Then you could keep fighting while still being healed.

Re: [Mod] Potions [heal_potions]

PostPosted: Sat Nov 29, 2014 15:37
by AnFiadhChu
I'll do that... as soon as I figure out how

Re: [Mod] Potions [heal_potions]

PostPosted: Sat Dec 06, 2014 00:40
by fireuser
Good mod, but I wholly agree with HeroOfTheWinds. It would be good if you healed after a 3 or 5 seconds. If you could have a delayed healing, that would be great. I've tried the same thing and failed. So, keep trying! ;D

PS The textures are awesome!

Re: [Mod] Potions [heal_potions]

PostPosted: Sun Nov 22, 2015 13:27
by tbillion
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2015-11-22 07:26:28: ERROR[Main]: ModError: Failed to load and run script from /home/tjohnson/Downloads/minetest-master/bin/../mods/healpotions/init.lua:
2015-11-22 07:26:28: ERROR[Main]: ...ads/minetest-master/bin/../builtin/game/register.lua:60: Name heal_potions:fullheal_potion does not follow naming conventions: "modname:" or ":" prefix required
2015-11-22 07:26:28: ERROR[Main]: stack traceback:
2015-11-22 07:26:28: ERROR[Main]:       [C]: in function 'error'
2015-11-22 07:26:28: ERROR[Main]:       ...ads/minetest-master/bin/../builtin/game/register.lua:60: in function 'check_modname_prefix'
2015-11-22 07:26:28: ERROR[Main]:       ...ads/minetest-master/bin/../builtin/game/register.lua:98: in function 'register_item'
2015-11-22 07:26:28: ERROR[Main]:       ...ads/minetest-master/bin/../builtin/game/register.lua:177: in function 'really_register_craftitem'
2015-11-22 07:26:28: ERROR[Main]:       ...n/../mods/technic-master/technic_worldgen/crafts.lua:157: in function 'register_craftitem'
2015-11-22 07:26:28: ERROR[Main]:       ...ads/minetest-master/bin/../mods/healpotions/init.lua:2: in main chunk
2015-11-22 07:26:28: ERROR[Main]: Check debug.txt for details.

Re: [Mod] Potions [heal_potions]

PostPosted: Sun Nov 22, 2015 13:30
by tbillion
FIXED:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--Fullheal Potion, returns 10 hearts.
minetest.register_craftitem('healpotions:fullhealpotion', {
   description = 'Fullheal potion',
   inventory_image = 'PotionsFullhealpotion.png',
   on_use = minetest.item_eat(20)
})

minetest.register_craft({
   output = 'healpotions:fullhealpotion 3',
   recipe = {
                {'default:apple', 'default:cactus', 'default:apple'},
                {'default:apple', 'farming:seed_wheat', 'default:apple'},
                {'vessels:glass_bottle', 'vessels:glass_bottle', 'vessels:glass_bottle'},
        }
})

--Halfheal Potion, returns 5 hearts.
minetest.register_craftitem('healpotions:halfhealpotion', {
   description = 'Halfheal potion',
   inventory_image = 'PotionsHalfhealpotion.png',
   on_use = minetest.item_eat(10)
})

minetest.register_craft({
   output = 'healpotions:halfhealpotion 3',
   recipe = {
                {'default:apple', 'flowers:geranium', 'default:apple'},
                {'default:papyrus', 'default:papyrus', 'default:papyrus'},
                {'vessels:glass_bottle', 'vessels:glass_bottle ','vessels:glass_bottle'},
        }
})