how to increase player's max hp?
- davidthecreator
- Member
- Posts: 452
- Joined: Mon Aug 18, 2014 19:48
- GitHub: daviddoesminetest
- In-game: DavidDoesMinetest
- Location: Lithuania
how to increase player's max hp?
I want the player to have 100hp instead of 20
So how could I increase players maxhp to 100?
So how could I increase players maxhp to 100?
Re: how to increase player's max hp?
Afaik it is not possible because it is hard coded in the core. But maybe I am wrong. I also would like to change the hp
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: how to increase player's max hp?
Yes, it's hardcoded.
https://github.com/minetest/minetest/bl ... ants.h#L91
Problem bypass idea: Use armor to protect you against damage.
https://github.com/minetest/minetest/bl ... ants.h#L91
Problem bypass idea: Use armor to protect you against damage.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: how to increase player's max hp?
Well, than you can modify it in the source code and compile it. But this would only work on your server, so I wouldn't recommend it
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: how to increase player's max hp?
There is an old feature request for this:
viewtopic.php?f=5&t=10347
Here's an issue on GitHub:
https://github.com/minetest/minetest/issues/2246
For some reason, it is labelled “Low priority”. :-(
viewtopic.php?f=5&t=10347
Here's an issue on GitHub:
https://github.com/minetest/minetest/issues/2246
For some reason, it is labelled “Low priority”. :-(
- emperor_genshin
- Member
- Posts: 83
- Joined: Tue Dec 22, 2015 05:04
- GitHub: GenshinMT
- IRC: Genshin
- In-game: Genshin
- Location: [REDACTED]
- Contact:
Re: how to increase player's max hp?
hmm, there should simply be a way to replace the default health with another type of health system to extend HP (3D-Armors is a good example)...
It's possible to create something like that with the existing minetest modding API, however you may need to add few variables and integrate it together to work with the max health variable if the additional health value reaches less than or equal to the default max HP value.
It's possible to create something like that with the existing minetest modding API, however you may need to add few variables and integrate it together to work with the max health variable if the additional health value reaches less than or equal to the default max HP value.
I'm just a individual who likes to make impressive things. | Current Mod: Dungeon Crawl Maker https://www.youtube.com/watch?v=c6g6H2kLBpg
-
- Member
- Posts: 999
- Joined: Sat Aug 19, 2017 21:49
- GitHub: Chemguy99
- In-game: Chem Nyx
- Location: My Basement's Attic
Re: how to increase player's max hp?
Someone needs to figure this out, I'd like to have a higher health.
What is SCP-055?
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: how to increase player's max hp?
The situation changed. Since this PR was merged, it's possible to use the "hp_max" object property on players. (same with breath, was added later)
As you can see in the date - it requires a 0.5.0-dev build newer than August. Because it is a feature, 0.4.17 (-dev) will not contain that change.
As you can see in the date - it requires a 0.5.0-dev build newer than August. Because it is a feature, 0.4.17 (-dev) will not contain that change.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: how to increase player's max hp?
Using a 5.0.0-dev server and client, I cannot get this to work...Krock wrote:The situation changed. Since this PR was merged, it's possible to use the "hp_max" object property on players. (same with breath, was added later)
As you can see in the date - it requires a 0.5.0-dev build newer than August. Because it is a feature, 0.4.17 (-dev) will not contain that change.
Code: Select all
local max_hp = 50
minetest.register_on_joinplayer(function(player)
player:set_properties({hp_max = max_hp})
player:set_hp(max_hp)
end)
Re: how to increase player's max hp?
Disregard, the hpregen mod was overriding my hp_max. Works now.
- SuperStarSonic
- Member
- Posts: 160
- Joined: Fri Oct 14, 2022 20:30
- GitHub: Python-Sargent
- In-game: SuperStarSonic
- Location: Earth (may be out of date)
Re: how to increase player's max hp?
Is there a way to make the engine display more than 20 hitpoints?
- Blockhead
- Member
- Posts: 1684
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: how to increase player's max hp?
hudbars mod. You can configure it in the settings menu to show hearts instead of a bar if you want.SuperStarSonic wrote: ↑Fri Jan 19, 2024 16:16Is there a way to make the engine display more than 20 hitpoints?
Next time, post a new thread instead of replying to a thread that's been dead for years with a question that's only tangentially related.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Re: how to increase player's max hp?
The mod HUD bars cannot change max health, I think it's hard coded so I don't know if we can change that value. If I'm wrong please correct me as I'm interested too.
Re: how to increase player's max hp?
You have to change hp_max in the player's properties first, and then you can set hp to whatever.
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile
- SuperStarSonic
- Member
- Posts: 160
- Joined: Fri Oct 14, 2022 20:30
- GitHub: Python-Sargent
- In-game: SuperStarSonic
- Location: Earth (may be out of date)
Re: how to increase player's max hp?
I'm sorry but none of this has answered how to make it so changing max health actually changes anything visually when its above 20 HP.
I assume this is hard coded. (Especially from what Mint said)
I assume this is hard coded. (Especially from what Mint said)
- Festus1965
- Member
- Posts: 4181
- Joined: Sun Jan 03, 2016 11:58
- GitHub: Festus1965
- In-game: Festus1965 Thomas Thailand Explorer
- Location: Thailand ChiangMai
- Contact:
Re: how to increase player's max hp?
as it was NOT part of the question = yes! there was no need to answer that !SuperStarSonic wrote: ↑Sat Jan 20, 2024 23:57I'm sorry but none of this has answered how to make it so changing max health actually changes anything visually when its above 20 HP.
And to go further:how to increase player's max hp?
you have to find the settings that are now 10 bread ? = 20 hp
that should be somewhere inside
and change this to 10 bread are 50 hp
and also change the formular so that now 1 bread represents 5 hp,
so depending on the hp the 'lever' highlighted is also de- and increasing to this new 10 represents 50 formula.
Have fun
At a fast overlook onto the lua coade I didn't see it, but there are some settings at begin that could have it.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)
If urgend, you find me in Roblox (as CNXThomas)
- SuperStarSonic
- Member
- Posts: 160
- Joined: Fri Oct 14, 2022 20:30
- GitHub: Python-Sargent
- In-game: SuperStarSonic
- Location: Earth (may be out of date)
Re: how to increase player's max hp?
Not to be rude, but it seems you have not even read my question. Don't just right me off because you don't understand my question.Festus1965 wrote: ↑Sun Jan 21, 2024 01:08as it was NOT part of the question = yes! there was no need to answer that !SuperStarSonic wrote: ↑Sat Jan 20, 2024 23:57I'm sorry but none of this has answered how to make it so changing max health actually changes anything visually when its above 20 HP.
- Blockhead
- Member
- Posts: 1684
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: how to increase player's max hp?
Help us help you. First you need to let us know what game you're on, and what mods you intend to use that will change the player's maximum health. If it's your own game and/or your own mod, that's still valid answer, but please share the code if you can. You also need to let us know if you want specifically to use hearts as the visual indicator of health, or if you are okay with a solid filled bar like hudbars uses. Then we can help you make sure all of that works together.SuperStarSonic wrote: ↑Sat Jan 20, 2024 23:57I'm sorry but none of this has answered how to make it so changing max health actually changes anything visually when its above 20 HP.
I assume this is hard coded. (Especially from what Mint said)
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Festus1965
- Member
- Posts: 4181
- Joined: Sun Jan 03, 2016 11:58
- GitHub: Festus1965
- In-game: Festus1965 Thomas Thailand Explorer
- Location: Thailand ChiangMai
- Contact:
Re: how to increase player's max hp?
SuperStarSonic wrote: ↑Sun Jan 21, 2024 01:36Not to be rude, but it seems you have not even read my question. Don't just right me off because you don't understand my question.
hehe, sure there is a problem :SuperStarSonic wrote: ↑Fri Jan 19, 2024 16:16Is there a way to make the engine display more than 20 hitpoints?
did you mean :
* use that existing 10 hearts ? to show over 50 points = then 1 heart is instead before 1 then 5 health
* or is meant to have instead of 10 hearts now 50 of them ? (= longer or make them smaller ?)
"display more 20 hitpoints" is sure not clear enough - as there are two solutions in my understanding
have fun to specify tour meant solution !
So I didn't understand your written question ! or as I have 2 solutions I am not sure which you want.
* 50 hearts ?
* or using this 10 hearts for 50 hp ?
Last edited by Festus1965 on Sun Jan 21, 2024 10:04, edited 1 time in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)
If urgend, you find me in Roblox (as CNXThomas)
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: how to increase player's max hp?
Hardcoded to 10 hearts maximum. The statbar HUD type allows steps of 0.5. Max HP = 10 hearts, actual HP are scaled based on that. Relevant code: https://github.com/minetest/minetest/bl ... ua#L31-L37SuperStarSonic wrote: ↑Sat Jan 20, 2024 23:57how to make it so changing max health actually changes anything visually when its above 20 HP.
To overcome this limitation, use minetest.hud_replace_builtin (see lua_api.md for details) with a HUD type that support finer-grained control about the shown value.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- SuperStarSonic
- Member
- Posts: 160
- Joined: Fri Oct 14, 2022 20:30
- GitHub: Python-Sargent
- In-game: SuperStarSonic
- Location: Earth (may be out of date)
Re: how to increase player's max hp?
Thank you this answers my question.Krock wrote: ↑Sun Jan 21, 2024 08:16Hardcoded to 10 hearts maximum. The statbar HUD type allows steps of 0.5. Max HP = 10 hearts, actual HP are scaled based on that. Relevant code: https://github.com/minetest/minetest/bl ... ua#L31-L37SuperStarSonic wrote: ↑Sat Jan 20, 2024 23:57how to make it so changing max health actually changes anything visually when its above 20 HP.
To overcome this limitation, use minetest.hud_replace_builtin (see lua_api.md for details) with a HUD type that support finer-grained control about the shown value.
Who is online
Users browsing this forum: No registered users and 12 guests