Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potion effect still work after death #78

Closed
amadin opened this issue Nov 4, 2016 · 4 comments
Closed

Potion effect still work after death #78

amadin opened this issue Nov 4, 2016 · 4 comments

Comments

@amadin
Copy link

amadin commented Nov 4, 2016

Is normal if potions effects still work after death?
Effects of the same potion are summarizes if use more than 1 the same potion.

@Wuzzy2
Copy link

Wuzzy2 commented Nov 11, 2016

Confirmed. I am very sure this is not normal. :D

In fact, potion effects seem to be completely broken in LOTT. Just drink many different potions in quick succession and wait for the effects to wear off. The effects will just go totally WTF. So the death fuckup is probably just a symptom of a much bigger underlying issue.

Oh, well. This is probably already the 3rd time modders have had this EXACT problem.

I know this problem very well from other mods. The reason is a design flaw: LOTT has not any mechanism or system to properly handle status effects, especially conflicts. I assume LOTT just blindly overwrites the raw player speed/jump/gravity/etc. whenever a potion effect starts or ends. If this is the case, it is very, very wrong. Even just two contradictionary potions in quick succession can cause chaos quickly.

I have identified this problem a very long time ago, motivated by a potion mod which had the exact same problem. I then created a mod for managing status effects. It is called playereffects. This mod allows you to register status effects to any player, and start and stop them. The most important part in this mod is that it prevents any conflicting effects by cancelling the contradictionary effect(s), if neccessary. This mod also has the option to automatically cancel effects on death.

As a proof-of-concept, I wrote a mod called pep which adds some example potions. This mod is mostly just to show that playereffects works. You can drink potions in pep totally random and like crazy, the game will never mess up.

Opinions about my mod seem to be mixed. Some players do miss the functionality for additive effects, that is, multiple effects stacking. If LOTT needs fancy functionality like this, sorry. playereffect does not provide that.

There is a similar mod to mine out there somewhere, but I haven't tested it so far. It was something about “monoids” or something and I didn't really understand it. :D

In other words, if you would make use of playereffects, that other mod, or even write your own framework, you will fix the big issue (not just the death issue).

@Amaz1 Amaz1 added the bug label Nov 11, 2016
@Amaz1
Copy link
Member

Amaz1 commented Nov 11, 2016

I don't really know how the potion system works, @fishyWET coded and designed it.
I know he was planning on rewriting it, don't know if anything ever came of that.

@neinwhal
Copy link
Member

I have a working version of the new potion mod since 6 months ago, which supports both addictive effects, conflicts and stopping effects.
The reason why this is not yet pushed in is because I'm still constantly rewriting the api just so it supports a wide variety of effects and usage, rather than being limited to potions. (Blame my OCD :P)

The current potion mod uses minetest.after mainly which means that it is not possible to "fix" such issues, for now till the new version comes out, the only way is to be caution when playing with potions :/

However, if anyone want to provide a temporary solution, you are more than welcomed to.

Amaz1 added a commit that referenced this issue Dec 16, 2016
This acts as a sort of temp-fix for #78, but I couldn't really do much to fix the more underlying problems, without rewritting the whole potion system, which I don't feel like doing...
We need the new potion api from @fishyWET!!
@neinwhal neinwhal added the WIP label Mar 4, 2017
@neinwhal
Copy link
Member

I will close this, the issue is somewhat fixed and it will take while for the new potions due to my busy schedule.
Feel free to reopen if the issue still somehow occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants