View Single Post
  #8  
Old 07-20-2008, 09:09 AM
CodeMephit
Fire Beetle
 
Join Date: Oct 2006
Posts: 18
Default

/shrug

Maybe I am missing something, but all I can find in the rules is:

Character:ConsumpionMultiplier = 200

There is no comment or description. How is one to know what to set the value at to achieve a live-like consumption rate without trial and error? I understand that some folks want characters to eat more. This is perfectly fine. However, not everybody has that same desire. I believe that 'fast' or 'slow' eating should be the exception to the rule, and 'regular' eating should be the default.

The change I am proposing will not stop a custom server from doing what the Admin wants it to do. They can still set the rule, and it will still take effect. Character will eat slower or faster.

But for all the other folks, who simply want a like-like server, to me, this is a viable offering to the code-base.

Another issue: I don't see how the Character:ConsumptionMultiplier handles the issues of small or large characters needing less or more food respectively. I also do not see it handling a mount's hunger. I know the code I have posted so far does not do these things either, but I am currently witting code that does. I am still learning C++ (teaching myself) so I can't churn a whole block of code out over night. It takes a little while.

Here is the psuedo-code of what I am trying to accomplish:

Code:
NutritionValue = 10
If Race = Small, Then NutritionValue = (NutritionValue + 2.5)
If Race = Large, Then NutritionValue = (NutritionValue - 2.5)
For Each SpellIcon
 If SpellIcon = Mount, Then NutritionValue = (NutritionValue - 2.5)
Next SpellIcon
m_pp.hunger_level += eat_item->CastTime*cons_mod*NutritionValue;
m_pp.thirst_level += eat_item->CastTime*cons_mod*NutritionValue;
This will set a 'base' rate for a medium sized character, and make each food item worth more to a small character, worth less to a large character and worth less if you have a mount summoned. I am currently working on what variables are available to me to test for a character's race, and then I can write out the actual if/thens or cases. Then I will tackle figuring out which spells are active on a character. But the code above gives a quick idea of my goals.

-Codemephit
Reply With Quote