Hello, everyone, I am a newbie in qbcore. I would like to ask you how to modify it? I always feel that 100 is too little for the maximum hunger and thirst values of qbcore, and I need to modify it. What is a good way? Thanks, I need help please tell me, what should I do. I think 100 is not enough, I will be full after eating a few foods. If you know how to do it, please tell me, thank you very much
Iâm not sure thatâs even possible. Approach it from the other direction - change the amount of âhungerâ gained by eating food etc
You canât increase the maximum amount, but you can slow the decay rate inside the main config file for qb-core.
NOTE: Server has to be restarted after changes to apply these settings.
1 Go to âresources/[qb]/qb-core/config.luaâ
2. Look for these 2 lines
âQBConfig.Player.HungerRateâ
âQBConfig.Player.ThirstRateâ
3. Adjust the Rates to your likingâŚ
example:
my thirst is set to â1.0â and it takes 1hour40minutes to pass out
my hunger is set to â0.5â and it takes over 3 hours to pass out
I dont knwo you must try it.
in qb-core/server/player.lua
you can try to edit this
PlayerData.metadata[âhungerâ] = PlayerData.metadata[âhungerâ] or 100
PlayerData.metadata[âthirstâ] = PlayerData.metadata[âthirstâ] or 100
maybe you can change it
These two lines are meant for the SQL Database when loading your character, I wouldnât change these variables.
it is essentially saying that âplayer hunger is equal to the stored hunger data in the SQL, and if there is no data stored, it should equal 100â
I think the hunger value can be changed. Itâs not like he doesnât have a place, he must have it, but he just hasnât found it.
does anyone know how to change the eating speed ??
Eating speed is dictated by the âprogressbarâ function
how to turn it off at all?
you can find it in âresources/[qb]/qb-core/config.luaâ
change the variables to 0.0 as shown belowâŚ
QBConfig.Player.HungerRate = 0.0 -- Rate at which hunger goes down.
QBConfig.Player.ThirstRate = 0.0 -- Rate at which thirst goes down.
server will need to restart for the changes to take effect.
once it is changed, just eat some food and drink some water until your are at maximum for both, and then the hunger and thirst will not increase.