EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Food Consumption question (https://www.eqemulator.org/forums/showthread.php?t=41676)

ChaosSlayerZ 01-06-2018 04:56 PM

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!

Kingly_Krab 01-07-2018 09:07 PM

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.

demonstar55 01-07-2018 10:08 PM

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)

ChaosSlayerZ 01-07-2018 10:27 PM

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 (Post 256895)
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


All times are GMT -4. The time now is 04:02 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.