Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2018, 04:56 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default Food Consumption question

Food Consumption question:

I know we can set in rules how much food duration I can get from food, but my question is can I make characters ALWAYS FED - so I can perma-drop food req from the game?

Also a question about this rule:
FoodLossPerUpdate 35 How much food/water you lose per stamina update

I am not sure what Stamina Update is? What is happening here?

Thank You!
Reply With Quote
  #2  
Old 01-07-2018, 09:07 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Okay so there's a timer for consuming food, it looks like this.
Code:
if (consume_food_timer.Check())
    DoStaminaHungerUpdate();
DoStaminaHungerUpdate checks first that you're not in zone 151 (Bazaar) and that you don't have a GM flag active, then it goes to work updating your thirst and hunger level based on the rule value you mentioned.
Code:
void Client::DoStaminaHungerUpdate()
{
    auto outapp = new EQApplicationPacket(OP_Stamina, sizeof(Stamina_Struct));
    Stamina_Struct *sta = (Stamina_Struct *)outapp->pBuffer;

    Log(Logs::General, Logs::Food, "Client::DoStaminaHungerUpdate() hunger_level: %i thirst_level: %i before loss",
        m_pp.hunger_level, m_pp.thirst_level);

    if (zone->GetZoneID() != 151 && !GetGM()) {
        int loss = RuleI(Character, FoodLossPerUpdate);
        if (GetHorseId() != 0)
            loss *= 3;

        m_pp.hunger_level = EQEmu::Clamp(m_pp.hunger_level - loss, 0, 6000);
        m_pp.thirst_level = EQEmu::Clamp(m_pp.thirst_level - loss, 0, 6000);
        if (spellbonuses.hunger) {
            m_pp.hunger_level = EQEmu::ClampLower(m_pp.hunger_level, 3500);
            m_pp.thirst_level = EQEmu::ClampLower(m_pp.thirst_level, 3500);
        }
        sta->food = m_pp.hunger_level;
        sta->water = m_pp.thirst_level;
    } else {
        // No auto food/drink consumption in the Bazaar
        sta->food = 6000;
        sta->water = 6000;
    }

    Log(Logs::General, Logs::Food,
        "Client::DoStaminaHungerUpdate() Current hunger_level: %i = (%i minutes left) thirst_level: %i = (%i "
        "minutes left) - after loss",
        m_pp.hunger_level, m_pp.hunger_level, m_pp.thirst_level, m_pp.thirst_level);

    FastQueuePacket(&outapp);
}
If you wanted to remove the need to even eat food, I'd think you could just remove the food consumption timer check. Thought I'd throw my input on an otherwise unanswered question.
Reply With Quote
  #3  
Old 01-07-2018, 10:08 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

All food/water does is prevent the spam about being hungry/thirsty. If your hungry/thirsty the client's combat regen will lie.

Food and drink doesn't really do much.

(The lying was even there on live)
Reply With Quote
  #4  
Old 01-07-2018, 10:27 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Hey, thank you so much for your reply Kingly_Krab!
Yeah I did notice as as GM my food never used up.

So, if I set the FoodLossPerUpdate to 0 - won't that effectively make me digest 0 food and remain fed?

Quote:
Originally Posted by demonstar55 View Post
All food/water does is prevent the spam about being hungry/thirsty. If your hungry/thirsty the client's combat regen will lie.

Food and drink doesn't really do much.

(The lying was even there on live)


Oh I agree - that specially ridiculous for stat food - you get bonus from food in the BAG but not from food you actually ate.
That's why I want to remove permanent food consumption, and instead implement foods as potions that grant long term benefit - like in EQ2
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:17 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3