Disable sprint mod while using speed boots
Disable sprint mod while using speed boots
Hello, I created a mod including speed boots but the problem is that when a player sprint while wearing these boots, the effect of the speed boots stops. Is there a way to fix that please ?
- joe7575
- Member
- Posts: 851
- Joined: Mon Apr 24, 2017 20:38
- GitHub: joe7575
- In-game: JoSto wuffi
- Location: Germany, in the deep south
Re: Disable sprint mod while using speed boots
This sounds like my problem with the autobahn mod (some kind of speed boots) and stamina (some kind of sprint mod).
What you need is an exclusive control over player physics and privs.
My approach for this is: https://github.com/joe7575/techage_mode ... pattern.md
It is currently implemented in the following GitHub mods:
- joe7575/ta4_paraglider
- joe7575/ta4_jetpack
- joe7575/autobahn
- joe7575/stamina
- minetest-mods/3d_armor
- minetest-mods/towercrane
All this mods use the following locking pattern:
What you need is an exclusive control over player physics and privs.
My approach for this is: https://github.com/joe7575/techage_mode ... pattern.md
It is currently implemented in the following GitHub mods:
- joe7575/ta4_paraglider
- joe7575/ta4_jetpack
- joe7575/autobahn
- joe7575/stamina
- minetest-mods/3d_armor
- minetest-mods/towercrane
All this mods use the following locking pattern:
Code: Select all
local meta = player:get_meta()
-- Check access conflicts with other mods
if meta:get_int("player_physics_locked") == 0 then
meta:set_int("player_physics_locked", 1)
. . .
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.
Re: Disable sprint mod while using speed boots
This is the reason for this PR is important:
Add physics modifier API
What we have now is a hijacking of mod functionality for player physics. Because to be honest, who can stop any modder with any mod from making an override. And you do not avenge me with the honesty of the people. Besides there are a lot of old mods who do whatever they want.
Either that PR or that a game can VET certain ContentDB mods, a black list.
Add physics modifier API
What we have now is a hijacking of mod functionality for player physics. Because to be honest, who can stop any modder with any mod from making an override. And you do not avenge me with the honesty of the people. Besides there are a lot of old mods who do whatever they want.
Either that PR or that a game can VET certain ContentDB mods, a black list.
- joe7575
- Member
- Posts: 851
- Joined: Mon Apr 24, 2017 20:38
- GitHub: joe7575
- In-game: JoSto wuffi
- Location: Germany, in the deep south
Re: Disable sprint mod while using speed boots
But this is about an additive feature and it only covers player physics, right?runs wrote: ↑Sat Apr 17, 2021 10:05This is the reason for this PR is important:
Add physics modifier API
But what I need is something exclusive. If a player wears special boots or uses special tools, these mod should have exclusive access to the player attributes. A combination of such attributes is not helpful.
And even more, if a player e.g. uses the towercrane mod (controlled fly privs), it makes no sense to try to use speed boots, the autobahn mod, or any other flying tool at the same time.
If you do not protect one against the other, you will see sometimes funny, but sometimes annoying effects.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.
Re: Disable sprint mod while using speed boots
Negative values too. So you can counteract previous effects, even nullify.joe7575 wrote: ↑Sat Apr 17, 2021 12:18But this is about an additive feature and it only covers player physics, right?runs wrote: ↑Sat Apr 17, 2021 10:05This is the reason for this PR is important:
Add physics modifier API
But what I need is something exclusive. If a player wears special boots or uses special tools, these mod should have exclusive access to the player attributes. A combination of such attributes is not helpful.
And even more, if a player e.g. uses the towercrane mod (controlled fly privs), it makes no sense to try to use speed boots, the autobahn mod, or any other flying tool at the same time.
If you do not protect one against the other, you will see sometimes funny, but sometimes annoying effects.
Of course, it will be more difficult to implement, much more difficult than taking full control. But it would be the right thing to do. Disabling other mods is acting like a virus.
For example, imagine if I made my Petz attack all the other mobs from other mods and kill them. Or even override them, could I do that if I felt like it? Yes (nothing would prevent me from doing so, I suppose so hahaha). Would it be ethical? No.
Modders make the mods they feel like. In the end the user decides what mods to install and what not to install. But modders should work as if it were an ecosystem. This would be ideal.
IMO.
Who is online
Users browsing this forum: No registered users and 2 guests