Page 1 of 1

[Mod] Magic Potions [magic_potions]

Posted: Wed Feb 12, 2020 21:15
by LMD

Magic Potions (magic_potions)

Magic potions which grant the player temporary effects.

About

Depends on the latest modlib and hud_timers.
Code licensed under the MIT license. Media license is CC0. Written by Lars Mueller alias LMD or appguru(eu).

Links
  • GitHub - sources, issue tracking, contributing
  • Discord - discussion, chatting
  • Minetest Forum - (more organized) discussion
  • ContentDB - releases (cloning from GitHub is recommended)
Screenshots

Image


Setup

Install the mod like any other, using git clone https://github.com/appgurueu/magic_potions.git or installing via ContentDB & the in-game content manager. Enable it, modlib & hud_timers and you're ready to enjoy some potions!

Features

There are 3 levels of strength, from minor (weak) over ordinary (medium) to strong (best).
5 different potion types provide flying (antigravity), jumping (higher), (running) speed, healing (regeneration) and air (breathing, breath regen).
This makes for a total of 15 colorful potions. All effects are lost on death, and you can only use 3 at a time. They all have limited durations.

Configuration


Locations

JSON Configuration: /config/magic_potions.json
Text Logs (none): /logs/magic_potions/.json
Readme (this): /magic_potions/Readme.md

Default Configuration

Located under /magic_potions/default_config.json

Code: Select all

{
  "tiers": {
    "minor": 3,
    "ordinary": 5,
    "strong": 7
  },
  "max_in_use": 3
}
Settings


tiers

Key-value lookup, keys are tier names ("minor", "ordinary" and "strong") and values are strength (number > 0 and <= 7)

max_in_use

How many potions can be used at a time. Number > 0 and < 10.

API

Mostly self-documenting code. Mod namespace is magic_potions, containing all variables & functions.

Re: [Mod] Magic Potions [magic_potions]

Posted: Fri Feb 14, 2020 08:52
by pampogokiraly
I really like this mod and the idea itself :D
And also i have some ideas to share them with you:
  • Miner potion: With the miner effect you can mine all blocks a little bit faster (or maybe only just stone)
  • Upgrades: That would be cool if you can upgrade your big potion to last for minutes. I you do that then we also need a method to easily remove all the effects from yourself (maybe "antimagic bread"?)
  • Fire resistance potion: Everyone wants to swim in lava :D
  • Crafting recipes: Of course we also need some way to get these potions (crafting, brewing or maybe just some random machines)
  • Fix fly potion: The fly potion should work in water too
All in all, this is a cool mod.

Re: [Mod] Magic Potions [magic_potions]

Posted: Fri Feb 14, 2020 16:35
by LMD
Thanks! I will consider your suggestions.

Regarding
The fly potion should work in water too
I don't know whether it's possible. Currently I'm setting player physics and decreasing gravity.

Re: [Mod] Magic Potions [magic_potions]

Posted: Wed Feb 26, 2020 07:58
by Miniontoby
Please also add an frostwalker (if you are nearly in the water the water will turn in ice and you can walk over it and 6 secs later it will turn back into water

Re: [Mod] Magic Potions [magic_potions]

Posted: Thu Feb 27, 2020 11:45
by Hume2
LMD wrote:Thanks! I will consider your suggestions.

Regarding
The fly potion should work in water too
I don't know whether it's possible. Currently I'm setting player physics and decreasing gravity.
It's not possible. The water physics works regardless of gravity, it has been discussed here: https://github.com/minetest/minetest/issues/6123

Re: [Mod] Magic Potions [magic_potions]

Posted: Tue Jun 16, 2020 06:35
by BlockStar
Hey, VERY cool mod, I'm surprised this isn't already a longer thread.

That said, it seems that the air potion stays in effect indefinitely, for me anyway. Once I use it, I am immune from drowning until I quit the game and then start again. This is with only this mod, modlib, and hud_timers enabled, plus the mods that come with the basic Minetest game.

Re: [Mod] Magic Potions [magic_potions]

Posted: Tue Jun 16, 2020 11:30
by LMD
BlockStar wrote:
Tue Jun 16, 2020 06:35
Hey, VERY cool mod, I'm surprised this isn't already a longer thread.

That said, it seems that the air potion stays in effect indefinitely, for me anyway. Once I use it, I am immune from drowning until I quit the game and then start again. This is with only this mod, modlib, and hud_timers enabled, plus the mods that come with the basic Minetest game.
Thanks! I will investigate your bug report. Edit: confirmed, will fix. 2nd edit: fixed.

Re: [Mod] Magic Potions [magic_potions]

Posted: Wed Jan 20, 2021 00:01
by 0siribix
1. I'm not sure if I'm doing something wrong but it seems like the fly potion is only letting me jump higher, not even as high as the jump potion yet they do stack. I've modified some global game settings so maybe it's something in there? Beacons redo temporarily grants fly priv and it seems to work that way.

2. The air potion seems (to me) underpowered. I think maybe it would be more useful to set air at max and then have minor duration at 0, ordinary at 10s, and strong at 20s

3. I can only have 3 potions in an inventory stack. Is this intentional?

4. Shouldn't creative allow to use potions without removing from inventory? This is trivial and more of a principle issue than functional

Re: [Mod] Magic Potions [magic_potions]

Posted: Wed Jan 20, 2021 00:44
by LMD
0siribix wrote:
Wed Jan 20, 2021 00:01
1. I'm not sure if I'm doing something wrong but it seems like the fly potion is only letting me jump higher, not even as high as the jump potion yet they do stack. I've modified some global game settings so maybe it's something in there? Beacons redo temporarily grants fly priv and it seems to work that way.

2. The air potion seems (to me) underpowered. I think maybe it would be more useful to set air at max and then have minor duration at 0, ordinary at 10s, and strong at 20s

3. I can only have 3 potions in an inventory stack. Is this intentional?

4. Shouldn't creative allow to use potions without removing from inventory? This is trivial and more of a principle issue than functional
1. gravity vs. jump. Play with it some more and you'll notice the differences.

2. That's possible

3. Yes, and configurable (max_in_use)

4. I don't think so

Re: [Mod] Magic Potions [magic_potions]

Posted: Wed Jan 20, 2021 00:50
by 0siribix
1. I'm sorry, I don't understand. The description says fly but it doesn't let me fly, I only jump a little higher, like crystal boots from ethereal

3. What I mean is inventory stack, not the total number "in use". So if I craft 7 of the same potion, I will have 3 spaces in my inventory: 3, 3, and 1

Re: [Mod] Magic Potions [magic_potions]

Posted: Sat Jan 23, 2021 18:58
by Miniontoby
[deleted] Because i not read fully