[Mod] Hunger NG: A next generation hunger mod (hunger_ng)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Linuxdirk » Post

Ah great. Seems like I need to create an issue template ...

User avatar
Clyde
Member
Posts: 222
Joined: Sat Jul 30, 2016 14:23
GitHub: acmgit
In-game: clyde

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Clyde » Post

Hello,

is this a build-in function in lua?

Code: Select all

2020-03-09 01:55:50: WARNING[Main]: Undeclared global variable "file_exists" accessed at ...mes/Smalltech/mods/hunger_ng/system/interoperability.lua:26
2020-03-09 01:55:50: ACTION[Main]: Server: Shutting down
2020-03-09 01:55:50: ERROR[Main]: ModError: Failed to load and run script from /usr/local/share/minetest/games/Smalltech/mods/hunger_ng/init.lua:
2020-03-09 01:55:50: ERROR[Main]: ...mes/Smalltech/mods/hunger_ng/system/interoperability.lua:26: attempt to call global 'file_exists' (a nil value)
2020-03-09 01:55:50: ERROR[Main]: stack traceback:
2020-03-09 01:55:50: ERROR[Main]: 	...mes/Smalltech/mods/hunger_ng/system/interoperability.lua:26: in main chunk
2020-03-09 01:55:50: ERROR[Main]: 	[C]: in function 'dofile'
2020-03-09 01:55:50: ERROR[Main]: 	...l/share/minetest/games/Smalltech/mods/hunger_ng/init.lua:120: in main chunk

Greetings, Clyde.
My Server: Welcome to Zeitsprung - deadsoft.org:49152 Jungle The next Gundul - jungle-tng.deadsoft.org:49152

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Linuxdirk » Post

I cannot reproduce the issue.

Please use the latest Git version of hunger_ng by downloading the master ZIP oder running git clone or git pull. Then get the latest distributed version of Minetest and Minetest Game (dev versions are officially not supported ) and use a new configuration and create a new Minetest Game world with only hunger_ng and then please try to reproduce the issue.

… and please use the issue tracker for reporting issues. It’s easier to track and follow the issues there instead of in a forum :)

User avatar
Clyde
Member
Posts: 222
Joined: Sat Jul 30, 2016 14:23
GitHub: acmgit
In-game: clyde

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Clyde » Post

Thanks, then i will use the issue.
It is the latest git-version from your mod, but the latest dev-version of mt too. But maybe it's the dev-version,
what will cause this error.

Greetings, Clyde.
My Server: Welcome to Zeitsprung - deadsoft.org:49152 Jungle The next Gundul - jungle-tng.deadsoft.org:49152

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Linuxdirk » Post

Clyde wrote:… but the latest dev-version of mt too.
Mmmh, maybe they changed something? As stated before and on GitLab issue template: development versions of Minetest are not supported. It might work. But it also might not work.

User avatar
Clyde
Member
Posts: 222
Joined: Sat Jul 30, 2016 14:23
GitHub: acmgit
In-game: clyde

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Clyde » Post

A dirty solution for me was, i defined function file_exists() before to check the file.
Then it was working again, but i'm not sure, that this is the right way.

Code: Select all

-- Return true if file exists and is readable.
local function file_exists(path)
  local file = io.open(path, "rb")
  if file then file:close() end
  return file ~= nil
end

-- Check if interoperability file exists and load it
for modname in depends:gmatch('[0-9a-z_-]+') do
    if get_modpath(modname) then
        local inter_file = inter_path..modname..'.lua'

        if file_exists(inter_file) then
            dofile(inter_file)
            local message = 'Loaded built-in '..modname..' support'
            minetest.log('action', c.log_prefix..message)
        end
    end
end
My Server: Welcome to Zeitsprung - deadsoft.org:49152 Jungle The next Gundul - jungle-tng.deadsoft.org:49152

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Linuxdirk » Post

Ah. This is the issue. Another haphazardly merged pull request.

https://github.com/minetest/minetest/pull/9451

I’ll work around this because I have to deal with it anyways when a new version gets released.

Just pull the latest Git version.

https://gitlab.com/4w/hunger_ng/-/commi ... 4b5dc3ecfe

User avatar
Clyde
Member
Posts: 222
Joined: Sat Jul 30, 2016 14:23
GitHub: acmgit
In-game: clyde

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Clyde » Post

Now it works fine, thank you for fixing.

Greetings, Clyde.
My Server: Welcome to Zeitsprung - deadsoft.org:49152 Jungle The next Gundul - jungle-tng.deadsoft.org:49152

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Linuxdirk » Post

Sure, you’re welcome, thanks for reporting. Have fun :)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng

by Linuxdirk » Post

The mod was successfully tested for 5.2.x compatibility.
A new CDB version will be pushed soon.

There were also some internal changes regarding interoperability (it is now easier to add built-in support for other mods although it is advised to contact the mod’s author first and ask them if they want to support Hunger NG). The API got a non-breaking update: Interoperability files now have some additional functions to use. See API documentation on mod compatibility.

As larger new mod Ethereal NG is now supported (after request unfortunately only by a built-in interoperability file).

There was also a fix for food items cannot be eaten when having negative satiation values and the player is fully satiated. Thanks to orbea on GitLab eating food can now make you hungry :)

User avatar
TechnoWolfTV
Member
Posts: 64
Joined: Wed Jan 29, 2020 20:04
In-game: TechnoWolfTV
Location: Wisconsin, USA

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by TechnoWolfTV » Post

Thanks for hungerNG. It's great! I've made two interoperability files to support two specific third-party mods, "Your Dad's BBQ Mod" and "Fishing". Everything works fine so far in Minetest 5.2.0. You may or may not wish to tweak the satiation and healing effects. I went with reasonable-sounding settings from similar food mods:

"bbq.lua"

Code: Select all

-- Your Dad's BBQ Mod
--
-- Author  Grizzly Adam
-- Forums  https://forum.minetest.net/viewtopic.php?f=11&t=19324
-- VCS     https://github.com/Grizzly-Adam/BBQ

local add = hunger_ng.add_hunger_data

add('bbq:beef',         		{ satiates = 5.5 })
add('bbq:beef_raw',             { satiates = 2.5, heals = -1 })
add('bbq:rack_lamb',            { satiates = 6, heals = 1 })
add('bbq:rack_lamb_raw',        { satiates = 2, heals = -1 })
add('bbq:leg_lamb',       		{ satiates = 5, heals = 1 })
add('bbq:leg_lamb_raw',         { satiates = 2, heals = -1 })
add('bbq:ham',         			{ satiates = 4, heals = 1 })
add('bbq:ham_raw',            	{ satiates = 1 })
add('bbq:bbq_chicken',       	{ satiates = 5, heals = 1 })
add('bbq:bbq_chicken_raw',      { satiates = 2, heals = -2 })
add('bbq:bbq_beef_ribs',        { satiates = 5, heals = 1 })
add('bbq:bbq_beef_ribs_raw',    { satiates = 2, heals = -1 })
add('bbq:hot_wings',        	{ satiates = 4, heals = -1 })
add('bbq:hot_wings_raw',        { satiates = 1, heals = -1 })
add('bbq:hamburger',         	{ satiates = 5, heals = 1 })
add('bbq:hamburger_patty',      { satiates = 3 })
add('bbq:hamburger_patty_raw',  { satiates = 1, heals = -1 })
add('bbq:bacon_cheeseburger', 	{ satiates = 6, heals = 1 })
add('bbq:hotdog', 				{ satiates = 3, heals = 1 })
add('bbq:hotdog_cooked', 		{ satiates = 2 })
add('bbq:hotdog_raw', 			{ satiates = 1 })
add('bbq:pulled_pork',        	{ satiates = 5, heals = 1 })
add('bbq:london_broil',         { satiates = 6, heals = 1 })
add('bbq:london_broil_raw',     { satiates = 3, heals = -1 })
add('bbq:stuffed_chop',         { satiates = 6, heals = 1 })
add('bbq:stuffed_chop_raw',     { satiates = 3, heals = -2 })
add('bbq:beef_jerky', 			{ satiates = 2 })
add('bbq:beef_jerky_raw',  		{ satiates = 1, heals = -1 })
add('bbq:pepper_steak',         { satiates = 6, heals = 1 })
add('bbq:pepper_steak_raw',     { satiates = 3, heals = -1 })
add('bbq:bacon', 				{ satiates = 2 })
add('bbq:bacon_raw',  			{ satiates = 1, heals = -2 })
add('bbq:stuffed_pepper', 		{ satiates = 3 })
add('bbq:stuffed_pepper_raw', 	{ satiates = 2 })
add('bbq:beer', 				{ satiates = 7, heals = -3 })
add('bbq:cheese_steak',       	{ satiates = 5, heals = 1 })
add('bbq:grilled_pizza',        { satiates = 5, heals = 1 })
add('bbq:grilled_pizza_raw',    { satiates = 2.5 })
add('bbq:grilled_tomato',       { satiates = 3.5 })
add('bbq:brisket',         		{ satiates = 6, heals = 1 })
add('bbq:brisket_raw',     		{ satiates = 3, heals = -1 })
add('bbq:corned_beef',         	{ satiates = 5.5, heals = 1 })
add('bbq:corned_beef_raw',      { satiates = 2.5, heals = -1 })
add('bbq:veggie_kebab',       	{ satiates = 3.5 })
add('bbq:veggie_kebab_raw',     { satiates = 3 })
add('bbq:lamb_kebab',       	{ satiates = 4, heals = 1 })
add('bbq:lamb_kebab_raw',       { satiates = 3, heals = -1 })
add('bbq:smoked_pepper',       	{ satiates = 3.5 })
add('bbq:grilled_corn',     	{ satiates = 3 })
add('bbq:grilled_corn_raw',     { satiates = 2 })
add('bbq:stuffed_mushroom',     { satiates = 2 })
add('bbq:stuffed_mushroom_raw', { satiates = 1.5 })
add('bbq:portebello_steak',     { satiates = 3 })
add('bbq:portebello_steak_raw', { satiates = 2 })
add('bbq:pickled_peppers',     	{ satiates = 1.5 })
add('bbq:veggie_packet',     	{ satiates = 3 })
add('bbq:veggie_packet_raw',    { satiates = 2 })
"fishing.lua"

Code: Select all

-- Fishing
--
-- Author  Minetestforfun
-- Forums  https://forum.minetest.net/viewtopic.php?t=13659
-- VCS     https://github.com/MinetestForFun/fishing

local add = hunger_ng.add_hunger_data

add('fishing:fish_raw',         { satiates = 2, heals = -1 })
add('fishing:fish_cooked',      { satiates = 5, heals = 1 })
add('fishing:sushi',            { satiates = 3, heals = 1 })
add('fishing:clownfish_raw',    { satiates = 2, heals = -1 })
add('fishing:bluewhite_raw',    { satiates = 2, heals = -1 })
add('fishing:exoticfish_raw',   { satiates = 2, heals = -1 })
add('fishing:carp_raw',    		{ satiates = 2, heals = -1 })
add('fishing:perch_raw',    	{ satiates = 2, heals = -1 })
add('fishing:catfish_raw',    	{ satiates = 2, heals = -1 })
add('fishing:clownfish_raw',    { satiates = 2, heals = -1 })
add('fishing:shark_raw',        { satiates = 3, heals = -1 })
add('fishing:shark_cooked',    	{ satiates = 6, heals = 2 })
add('fishing:pike_raw',        	{ satiates = 2, heals = -1 })
add('fishing:pike_cooked',      { satiates = 5, heals = 1 })
In addition to \mods\hunger_ng\interoperability\fishing.lua, if you're using the "mobs_animal" mod from TenPlus1, change the following:
Modify the file at \mods\mobs_animal\kitten.lua at line 55:
FROM:

Code: Select all

follow = {"mobs_animal:rat", "ethereal:fish_raw", "mobs_fish:clownfish", "mobs_fish:tropical"},
TO:

Code: Select all

follow = {"mobs_animal:rat", "ethereal:fish_raw", "mobs_fish:clownfish", "mobs_fish:tropical", "fishing:fish_raw", "fishing:fish_cooked", "fishing:sushi", "fishing:clownfish_raw", "fishing:bluewhite_raw", "fishing:exoticfish_raw", "fishing:carp_raw", "fishing:perch_raw", "fishing:catfish_raw", "fishing:clownfish_raw", "fishing:shark_raw", "fishing:shark_cooked", "fishing:pike_raw", "fishing:pike_cooked"},

This edit allows kittens from the mobs_animal mod to be tamed with "Fishing" fish of all types.

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by Linuxdirk » Post

TechnoWolf wrote:
Sun May 10, 2020 16:42
Thanks for hungerNG. It's great! I've made two interoperability files to support two specific third-party mods,
Thanks! I am glad you like it.

I'll use this code if you follow the steps described here, so you don't need to rewrite it in a PR or GitLab issue :)

I'm a bit reserved with adding interoperability files to Hunger NG because I see it more like an API or library.

sfan5
Moderator
Posts: 4093
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by sfan5 » Post

Healing doesn't work at all here, running 5.3.0-dev-9ba24f89f.
Spoiler
Image
Attachments
Bildschirmfoto_2020-05-12_00-17-00.jpg
Bildschirmfoto_2020-05-12_00-17-00.jpg (202.84 KiB) Viewed 1335 times
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by Linuxdirk » Post

You’re automatically healed when your hunger value is above a certain level (by default 16). You can get the status from effects.healing. To heal with food you need to eat something that has a healing value and not a satiation value only (or where the mod does not support Hunger NG and there is no interoperability file added).

If this does nos work please try with the latest official release of Minetest and Minetest Game. Dev versions (and older versions) are officially not supported (I just clarified that in the first post and the information is also available for people who create an issue on GitLab).

User avatar
acidzebra
Member
Posts: 75
Joined: Sun Sep 10, 2017 09:11

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by acidzebra » Post

The mod's great - I have this weird thing that doesn't happen when not running the mod but I can't track down what's going on exactly.

It happens specifically when ran in conjunction with areas https://github.com/minetest-mods/areas
and anvil https://github.com/minetest-mods/anvil

the anvil repair bar gets overwritten with bread icons and the area name with farming_bread.png (literal text)

see: https://imgur.com/a/5krPmUp

Any idea what's going on there? It happens on both the latest and the previous version of the mod, on 5.2.0

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by Linuxdirk » Post

acidzebra wrote:
Tue May 12, 2020 10:05
the anvil repair bar gets overwritten with bread icons and the area name with farming_bread.png (literal text)
I was not able to reproduce the issue. I was able to repair tools on the anvil inside and outside an area just fine (i.e. the green/red anvil repair status bar appeared and the hunger bar and the area information were not weirdly changed.)

Code: Select all

$ minetest --version | grep Minetest
Minetest 5.2.0 (Linux)

~/.minetest/mods/anvil $ git rev-parse HEAD
885ea6ea1dbf8131de48ff1b8a7e682f67f642d3

~/.minetest/mods/hunger_ng $ git rev-parse HEAD
9cc4de7ba8208c463be745baa1bfafc8152b501f
Please try a new Minetest Game world with just the three mods in addition and make sure you’re using the latest officially released Minetest and Minetest Game versions.

User avatar
acidzebra
Member
Posts: 75
Joined: Sun Sep 10, 2017 09:11

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by acidzebra » Post

Linuxdirk wrote:
Tue May 12, 2020 11:06
I was able to repair tools on the anvil inside and outside an area just fine (i.e. the green/red anvil repair status bar appeared and the hunger bar and the area information were not weirdly changed.
It's not consistent in when this 'overwrite' happens (and the functionality of any of the three mods is not impaired). I'll do some more tests as you suggest.

sfan5
Moderator
Posts: 4093
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by sfan5 » Post

Figured out the issue myself: Since this engine commit the maximum breath value is no longer 11 but 10. timers.lua assumes that the maximum breath value is 11, causing automatic healing to never take place.
Replacing the value with 10 works, but the correct and portable solution would be to read breath_max from the object properties.
Linuxdirk wrote:
Tue May 12, 2020 08:26
Dev versions (and older versions) are officially not supported
I don't think this is a good policy if you consequently enforce it.
By fixing bugs reported in dev versions you get the advantage that your mod already works when 5.3.0 comes out, otherwise people are going to download it on that day and wonder why core functionality is broken. (You can still reject bug reports that you suspect are caused by engine bugs/will not be present in the release.)
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by Linuxdirk » Post

sfan5 wrote:
Tue May 12, 2020 19:15
Linuxdirk wrote:
Tue May 12, 2020 08:26
Dev versions (and older versions) are officially not supported
I don't think this is a good policy if you consequently enforce it.
I don’t think the Minetest dev cycle is a good policy either, so that evens out, I guess :) I also disagree with that statement, it IS a good policy BECAUSE I consequently enforce it. It would be a bad one (or useless one) if I wouldn’t.

But you’re right with breath_max. I have no idea why I had hardcoded 11 in there. I use breath_max in other locations already. Just fixed that and pushed a new version to CDB.
sfan5 wrote:
Tue May 12, 2020 19:15
By fixing bugs reported in dev versions you get the advantage that your mod already works when 5.3.0 comes out,
… or do not work when not using the dev version, or cause extra work to make it work in both versions. Basically I release the mods because I have them anyways because I use them in my everyday gameplay. Since I do not use the dev versions for that I do not develop mods to work with dev versions.
sfan5 wrote:
Tue May 12, 2020 19:15
otherwise people are going to download it on that day and wonder why core functionality is broken.
I usually fix mods on release if anything breaks because I use them everyday.

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by Linuxdirk » Post

Quick update: Hunger NG no longer depends on Minetest Game’s default mod and can be used with every Game.

The mod automatically checks if there are food items registered using the hunger_ng.add_hunger_data() API function for doing so and disables the hunger functions and the hunger bar if there are no satiating food items registered. (Modders: See here for more details on that.)

Just wait for the CDB to update or get the latest Git version.

User avatar
daret
Member
Posts: 136
Joined: Tue Nov 12, 2019 20:36
GitHub: daretmavi
In-game: Daretmavi

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by daret » Post

Hi, is it possible to disable healing from other mod for a player?

Or how can I get the effects information (like healing amount) from for another mod?

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by Linuxdirk » Post

daret wrote:
Mon Nov 23, 2020 17:06
Hi, is it possible to disable healing from other mod for a player?
By using hunger_ng.configure_hunger('PlayerName', 'disable') (or enable) you can disable (or enable) all hunger functionality for the player. If you want to disable healing only this can be done server-wide using Hunger NG’s configuration.

Code: Select all

hunger_ng_heal_above = 20
With this setting players will heal only if their hunger value is above 20 (by default it is 20 so above 20 is not possible so players won’t heal).

The mod’s configuration is read on load-time only and can’t be changed on-the-fly.
daret wrote:
Mon Nov 23, 2020 17:06
Or how can I get the effects information (like healing amount) from for another mod?
You can get a lot of information using hunger_ng.get_hunger_information('PlayerName'), see documentation for details on the table that is returned.

Also check for the hunger_ng.interoperability table. It provides some information and functions.

User avatar
daret
Member
Posts: 136
Joined: Tue Nov 12, 2019 20:36
GitHub: daretmavi
In-game: Daretmavi

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by daret » Post

Thanx for the answer.

I'm looking for function if player is poisoned, or sick, I want to stop the healing effect for him (or make a bigger damage then healing), till he is cured.

I found this definition:

Code: Select all

hunger_ng = {
    effects = {
        heal = {
            above = tonumber(get('heal_above', 16)),
            amount = tonumber(get('heal_amount', 1))
        },
but I can't find how to get it through api_functions.
Information about "effects.heal.amount" would be helpful. (Switch to stop healing even better.)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by Linuxdirk » Post

daret wrote:
Mon Nov 23, 2020 21:47
I'm looking for function if player is poisoned, or sick, I want to stop the healing effect for him (or make a bigger damage then healing), till he is cured.
Currently there is no way to disable healing for individual players. I can look into this but not before weekend.

https://gitlab.com/4w/hunger_ng/-/issues/31

For dealing damage you can use hunger_ng.alter_hunger('PlayerName', -5) where -5 can be any value you like. In the API documentation there is an example on how to use it within a globalstep.
daret wrote:
Mon Nov 23, 2020 21:47
I found this definition:
It is entirely internal. You can't use it.
daret wrote:
Mon Nov 23, 2020 21:47
but I can't find how to get it through api_functions.
You can access it via the interoperability table. But as said: It can't be changed. The table is informational only.

Code: Select all

hunger_ng.interoperability.settings.effects.heal.amount
But same here: It is just an information. changing it does nothing.

User avatar
daret
Member
Posts: 136
Joined: Tue Nov 12, 2019 20:36
GitHub: daretmavi
In-game: Daretmavi

Re: [Mod] Hunger NG: A next generation hunger mod (hunger_ng)

by daret » Post

Linuxdirk wrote:
Tue Nov 24, 2020 10:05
daret wrote:
Mon Nov 23, 2020 21:47
I'm looking for function if player is poisoned, or sick, I want to stop the healing effect for him (or make a bigger damage then healing), till he is cured.
Currently there is no way to disable healing for individual players. I can look into this but not before weekend.

https://gitlab.com/4w/hunger_ng/-/issues/31
Thats ok, no rush :)
Thanx
Linuxdirk wrote:
Tue Nov 24, 2020 10:05
You can access it via the interoperability table. But as said: It can't be changed. The table is informational only.

Code: Select all

hunger_ng.interoperability.settings.effects.heal.amount
But same here: It is just an information. changing it does nothing.
I tried it before, but I'm afraid "effects" are not part of "settings"
If I dump "hunger_ng.interoperability.settings", then I get

Code: Select all

{
	timers = {
		starve = 10,
		basal_metabolism = 60,
		movement = 0.5,
		heal = 5
	},
	hunger_bar = {
		image = "petz_roasted_chicken_legs.png",
		use = false
	},
	hunger = {
		start_with = 20,
		persistent = true,
		timeout = 0,
		maximum = 20
	}
}
I would say, it should be something like

Code: Select all

hunger_ng.interoperability.effects
, but this is not available.

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 9 guests