Suggestion: Cooking.
Suggestion: Cooking.
I have another thought/request. Hope I'm not bothering you guys or taking you away from more important UOx3 upgrades, but I had another script idea that sounds relatively feasible.
I was thinking of a way of implimenting cooking on my LAN server to increase roleplay opprotunites. Here is one idea that my fellow players and I have come up with:
1- start all PCs with a "hunger" variable of 10 (from 1 to 10)
2- Every 10 minutes the server rolls a 1d4 and drops all players hunger by that amount. (Just one dice roll to save lag time) Print a message to the screen informing you of your status if below 5. ( *you are starting to feel hungry* )
3-If the players hunger is zero (or below set to zero), then set the character to 1/4 health (if above), 1 stanima, and 1 manna point with a message *you are starving*
4-allow the player to heal and/or use potions during this time (to simulate eating grass, whatever), but every 10 minute server check, drop the health to 1/4 again unless the player has eaten.
5- allow small fruits and veggies and stuff to increase 1 hunger, while ribs/bread/etc does 2. (set the max at 10 and say *you are too full to eat right now*).
Anyway, this would force my players to carry a few apples etc. in there pack as well as stop off in taverns or bakerys. (buildings which now are useless on my server).
While such a system might be frusterating on large shards, on our 5 man max LAN shard, it owuld make for great RPing.
What are your thoughts? and how would you begin? Thanks.
I was thinking of a way of implimenting cooking on my LAN server to increase roleplay opprotunites. Here is one idea that my fellow players and I have come up with:
1- start all PCs with a "hunger" variable of 10 (from 1 to 10)
2- Every 10 minutes the server rolls a 1d4 and drops all players hunger by that amount. (Just one dice roll to save lag time) Print a message to the screen informing you of your status if below 5. ( *you are starting to feel hungry* )
3-If the players hunger is zero (or below set to zero), then set the character to 1/4 health (if above), 1 stanima, and 1 manna point with a message *you are starving*
4-allow the player to heal and/or use potions during this time (to simulate eating grass, whatever), but every 10 minute server check, drop the health to 1/4 again unless the player has eaten.
5- allow small fruits and veggies and stuff to increase 1 hunger, while ribs/bread/etc does 2. (set the max at 10 and say *you are too full to eat right now*).
Anyway, this would force my players to carry a few apples etc. in there pack as well as stop off in taverns or bakerys. (buildings which now are useless on my server).
While such a system might be frusterating on large shards, on our 5 man max LAN shard, it owuld make for great RPing.
What are your thoughts? and how would you begin? Thanks.
-
giwo
- Developer
- Posts: 1780
- Joined: Fri Jun 18, 2004 4:17 pm
- Location: California
- Has thanked: 0
- Been thanked: 0
The hunger system is hardcoded, currently.
I believe the scale goes from 0-5, with everyone starting at 5, and when reaching 0 the user starts to loose HP. Eating food increases the hunger up to the maximum level (5).
As Xuri mentioned, this can be enabled in the uox.ini. I don't recall the exact setting, but just look for hunger settings.
I believe the scale goes from 0-5, with everyone starting at 5, and when reaching 0 the user starts to loose HP. Eating food increases the hunger up to the maximum level (5).
As Xuri mentioned, this can be enabled in the uox.ini. I don't recall the exact setting, but just look for hunger settings.
Scott
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
The hunger system is by default disabled for any character with GM privileges (such as any character on the admin account), but it should be working for normal players.
HUNGERRATE is the amount of time (in seconds, I think) that passes between each time a character's hunger level (0-6, 0 being extremely hungry and 6 being fully fed) decreases.
HUNGERDMGVAL is the amount of damage taken when hungry.
Originally there were two additional settings, and I'm not sure why they're no longer used, seing as they seem to be rather crucial for controlling the hunger system. Without them, I don't know how often the hunger damage is applied, for instance - and it also seems like hunger damage is now applied to ANY hunger level below fully fed. Hrm. The missing settings:
HUNGERTHRESHOLD - what hunger level that functions as the threshold for when a character is so hungry that he/she starts taking damage.
HUNGER_DAMAGE_RATE - how often hunger damage is applied
Perhaps giwo/Maarc have further insight into whatever happened to those values.
HUNGERRATE is the amount of time (in seconds, I think) that passes between each time a character's hunger level (0-6, 0 being extremely hungry and 6 being fully fed) decreases.
HUNGERDMGVAL is the amount of damage taken when hungry.
Originally there were two additional settings, and I'm not sure why they're no longer used, seing as they seem to be rather crucial for controlling the hunger system. Without them, I don't know how often the hunger damage is applied, for instance - and it also seems like hunger damage is now applied to ANY hunger level below fully fed. Hrm. The missing settings:
HUNGERTHRESHOLD - what hunger level that functions as the threshold for when a character is so hungry that he/she starts taking damage.
HUNGER_DAMAGE_RATE - how often hunger damage is applied
Perhaps giwo/Maarc have further insight into whatever happened to those values.
-= Ho Eyo He Hum =-
I switched the " 'add " command (for temporarily populating the world) and the 'tele command (to get out of tight spots) to zero.
as I understood it, the accounts were still PC,
but the Add and Tele commands were lowered to PC level, and not GM.
So basically if you set the 'add script to zero, then your PCs will no longer hunger?
That's interesting. I could drop the add back to 3, but I kind of need the 'tele incase we fall through the floor. Would that be sufficent?
as I understood it, the accounts were still PC,
but the Add and Tele commands were lowered to PC level, and not GM.
So basically if you set the 'add script to zero, then your PCs will no longer hunger?
That's interesting. I could drop the add back to 3, but I kind of need the 'tele incase we fall through the floor. Would that be sufficent?
-
Grimson
- Developer
- Posts: 802
- Joined: Sat Jun 04, 2005 1:52 am
- Location: Germany
- Has thanked: 0
- Been thanked: 0
No, that has nothing to do with making a player a GM. I guess your games where simply too short for hunger to take effect. With the default settings it takes about 1 hour and 40 minutes till you drop one hunger level, with 6 levels it should take about 10 hours till you actually start loosing health because of hunger.stranf wrote:So basically if you set the 'add script to zero, then your PCs will no longer hunger?
I think you nailed it.
Yeah, all of us are college kids, we get on for 2 to 3 hour bouts at the most.
So I assume (my UOx computer is at home so I can't see the .ini) that HUNGERRATE is in the uo.ini file? If that's the case, I'll just edit that value to find a satisfactory hunger rate for our shorter adventures.
Sweet. If it's not, and it wouldn't be too difficult, I'd like it in the .ini for the next release. Thanks for the support as always.
Yeah, all of us are college kids, we get on for 2 to 3 hour bouts at the most.
So I assume (my UOx computer is at home so I can't see the .ini) that HUNGERRATE is in the uo.ini file? If that's the case, I'll just edit that value to find a satisfactory hunger rate for our shorter adventures.
Sweet. If it's not, and it wouldn't be too difficult, I'd like it in the .ini for the next release. Thanks for the support as always.
Well Grimson, my hungerrate is at 75 (A LOT less then the default 6000) and I still as of yet have not eaten an apple on UO. Had the server running for 2 hours.
But if you log out and log back in, does it re-set the hunger? During that span I was using multiple characters.
here is the players account info, I don't think they are gm account:
Maybe I should leave the server on over night and see if when I wake up my char is dead of starvation? 
But if you log out and log back in, does it re-set the hunger? During that span I was using multiple characters.
here is the players account info, I don't think they are gm account:
Code: Select all
SECTION ACCOUNT 3
{
NAME stranf
PASS stranf
FLAGS 0x0
PATH ./accounts/stranf/
TIMEBAN 0x0
CONTACT unknown
CHARACTER-1 0x19e4a [Stranf]
CHARACTER-2 0xd106 [Hans]
CHARACTER-3 0xe3d5 [William]
CHARACTER-4 0x2949d [Thrain]
CHARACTER-5 0xffffffff [UNKNOWN]
CHARACTER-6 0xffffffff [UNKNOWN]
}
-
Grimson
- Developer
- Posts: 802
- Joined: Sat Jun 04, 2005 1:52 am
- Location: Germany
- Has thanked: 0
- Been thanked: 0
Ah, found a little bug. In uox3.cpp at line 1345 it says:stranf wrote:Well Grimson, my hungerrate is at 75 (A LOT less then the default 6000) and I still as of yet have not eaten an apple on UO. Had the server running for 2 hours.
Code: Select all
if( mChar.GetCommandLevel() > PLAYER_CMDLEVEL && !mChar.IsDead() && !mChar.IsInvulnerable() )
Code: Select all
if( mChar.GetCommandLevel() == PLAYER_CMDLEVEL && !mChar.IsDead() && !mChar.IsInvulnerable() )
It doesn't reset it, but it also doesn't decrease it while you're logged out.stranf wrote:But if you log out and log back in, does it re-set the hunger? During that span I was using multiple characters.
Thanks for spotting the bug and correcting it. Good work. I'll test it as soon as I have some free time.
Hmm...so if I read the boolean logic correctly it would only lower the hunger of a living character that is greater than a PC but is also not invulnerable. That's why not even my GMs were getting hungry. hehe.
-----------------------------
ok, I went and extracted only the new uox.exe from your zip and your hunger fix works!
The only problem I see now with the experimental version is the stacking problem, and my comerades over the internet get kicked off.
when they do, I get this error:
or something like that. Usually every 1-5 min. or so it just disconnects you (even me playing on the same server). So if you wouldn't mind, Grimson, keep posting those ZIPs in the other thread. Pretty soon I'll get a stable one. In the mean time I'll enjoy what I got!
Hmm...so if I read the boolean logic correctly it would only lower the hunger of a living character that is greater than a PC but is also not invulnerable. That's why not even my GMs were getting hungry. hehe.
-----------------------------
ok, I went and extracted only the new uox.exe from your zip and your hunger fix works!
The only problem I see now with the experimental version is the stacking problem, and my comerades over the internet get kicked off.
when they do, I get this error:
Code: Select all
Packed 0xBF --unhandled 0xC