The metabolic interchange CBM suddenly stopped producing constant power. I'm not hungry and eating to full do not restore old production, constant, production. Short bursts of production do occur with long gaps between each.
Alternative 1:
Alternative 2:
Eating almost 8000 calories in 3 hours did help, but production rate is hard to understand. It also seems power generation restarts when you go from sated to full and from full to normal. Then it stoppes after a while again.
Power generation from metabolic interchange is stable, and/or:
I'm not certain this is a bug.
I think the Metabolic Interchange CBM scales off remaining calories.
There was a guy who had a calorie deficit (38,000ish calories) and was not gaining any power from the CBM at all.
However, I have not verified this in the game files, so if someone has better info please correct me.
(Could test this pretty easily with the debug menu to show your calories, eating food and waiting for it to digest, then testing again.)
(Could test this pretty easily with the debug menu to show your calories, eating food and waiting for it to digest, then testing again.)
This will confirm or deny that it is a bug. The Metabolic Interchange CBM is disabled when under a certain threshold of stored kcal., which is less than 80% of your healthy kcal number. See https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/player.cpp#L577 for specific line
It is possible we want to adjust this so that it turns off when "underweight" rather than its current logic.
Can I suggest adding something like this:
const efftype_id effect_metabolic_interchange_protection( "metabolic_interchange_protection" );
And:
if( has_active_bionic( bio_metabolics ) && power_level < max_power_level && calendar::once_every( 3_turns ))
if( 0.8f < get_kcal_percent() {
// Efficiency is approximately 25%, power output is ~60W
mod_stored_kcal( -1 );
charge_power( 1 );
} else {
source->add_effect( effect_metabolic_interchange_protection, 3_turns );
}
}
And a status effect shown something like this:
"Metabolic interchange inactive"
The effect only need to show up in the effects list, and not do anything more than be informative with some descriptive text like:
"Metabolic interchange: Protection protocol activated, blood sugar level too low".
Its also possible to create several fault mode as well. An interesting is one is with the sensor installed the wrong way (for real), so that it only runs when you are low on energy or hungry.
I've had this happen a few times while using the CBM in the most recent builds.
After the CBM drains your calories too low it stops providing power and keeps pinging you with warnings that your stomach is empty. That's all good. What breaks is that the player's calorie counter seems to get stuck at 43127 calories and no amount of binge-eating will bring it back up. I've reproduced this multiple times by letting the CBM drain me to the point of starving, and then binge-eating my entire inventory of foodstuffs. Your hunger will stay at peckish and using the debug menu to check your needs will reveal that your calorie counter is fixed at 43127.
Most helpful comment
Can I suggest adding something like this:
const efftype_id effect_metabolic_interchange_protection( "metabolic_interchange_protection" );
And:
if( has_active_bionic( bio_metabolics ) && power_level < max_power_level && calendar::once_every( 3_turns ))
if( 0.8f < get_kcal_percent() {
// Efficiency is approximately 25%, power output is ~60W
mod_stored_kcal( -1 );
charge_power( 1 );
} else {
source->add_effect( effect_metabolic_interchange_protection, 3_turns );
}
}
And a status effect shown something like this:
"Metabolic interchange inactive"
The effect only need to show up in the effects list, and not do anything more than be informative with some descriptive text like:
"Metabolic interchange: Protection protocol activated, blood sugar level too low".
Its also possible to create several fault mode as well. An interesting is one is with the sensor installed the wrong way (for real), so that it only runs when you are low on energy or hungry.