[Mod] Magic Potions [magic_potions]

Post Reply
User avatar
LMD
Member
Posts: 915
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

[Mod] Magic Potions [magic_potions]

by LMD » Post

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.
Last edited by LMD on Wed Jun 03, 2020 12:13, edited 7 times in total.
My stuff: Projects - Mods - Website

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

Re: [Mod] Magic Potions [magic_potions]

by pampogokiraly » Post

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.
My mod (a bit old) request: Better enchant. My second mod: Old Broken Castle nodes. Search for aab01 to find my mods!

User avatar
LMD
Member
Posts: 915
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Magic Potions [magic_potions]

by LMD » Post

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.
My stuff: Projects - Mods - Website

User avatar
Miniontoby
Member
Posts: 426
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Magic Potions [magic_potions]

by Miniontoby » Post

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
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

User avatar
Hume2
Member
Posts: 564
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [Mod] Magic Potions [magic_potions]

by Hume2 » Post

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
If you lack the reality, go on a trip or find a job.

User avatar
BlockStar
Member
Posts: 23
Joined: Thu Jun 11, 2020 22:14
Location: The Dirty South

Re: [Mod] Magic Potions [magic_potions]

by BlockStar » Post

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.

User avatar
LMD
Member
Posts: 915
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Magic Potions [magic_potions]

by LMD » Post

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.
My stuff: Projects - Mods - Website

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], eyekay and 8 guests