Idea on changing the hunger system

Want to discuss changes to the UOX3 source code? Got a code-snippet you'd like to post? Anything related to coding/programming goes here!
Post Reply
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Idea on changing the hunger system

Post by Grimson »

I got an idea about changing the hunger system:

1. Move HUNGERRATE and HUNGERDMGVAL from the ini to races.dfn to make it more variable.
2. Make NPCs hunger again (if the race they belong to is set to be able to hunger).
3. Create a new AI for some animals (like bears and wolfes), if they are full up they will be harmless, if they become hungry they attack another animal and "eat" it if they kill it, and if they are starving they will also go after humans (players and NPCs).

This would increase the possibilities for more different player races, give the animals a bit more "life" and make them a bit unpredictable. As you'll never know if the next bear just walks by or starts to hunt you because he is starving.

If no one sees any problems with this I'll start to implement this in the next few days.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Sounds like a very good idea to me! :) How about implementing pet-hunger while you're at it? Currently pets never go hungry and thus once tamed they're tamed for ever unless released :P At least, I think that's how it's currently setup, if no one has changed it in recent times.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:Sounds like a very good idea to me! :) How about implementing pet-hunger while you're at it? Currently pets never go hungry and thus once tamed they're tamed for ever unless released :P At least, I think that's how it's currently setup, if no one has changed it in recent times.
If you can give me some points how it should work I'll see what I can do.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

I'm not sure :oops: I think it's something like this though; Once a tamed pet reaches a certain level of hunger (the lowest?) it will either go wild (untamed) or have a chance of going wild, not entirely sure =P You feed the pet by dragging & dropping fruit/vegetables for horses/etc, or raw meat for bears, wolves, alligators, and similar.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:I'm not sure :oops: I think it's something like this though; Once a tamed pet reaches a certain level of hunger (the lowest?) it will either go wild (untamed) or have a chance of going wild, not entirely sure =P
Well, then I'll make the chance configurable so you can set it the way you want.
Xuri wrote:You feed the pet by dragging & dropping fruit/vegetables for horses/etc, or raw meat for bears, wolves, alligators, and similar.
I think at least a part of the feeding code is already (or still) present.

I have a free day tomorrow so I'll start working on it then.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

I'd like to suggest a small change to the system. Allow ITEMLIST= tags in the foodlist sections, that way we can setup seperate itemlists (and avoid repeated lists of the same stuff in different parts of UOX3) for meat, fruit, vegetables etc, and then we could setup foodlists like...

[FOODLIST BEAR]
{
ITEMLIST=72 //vegetables
ITEMLIST=73 //fruit
ITEMLIST=74 //meat
ITEMLIST=75 //crops
}


...instead of repeating item-ids throughout the various foodlists.
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Hmmm on second thought, scratch my original idea, and instead allow linking from one FOODLIST to another, and we'll set up
[FOODLIST FRUIT]
{
<fruit-ids>
}

[FOODLIST MEAT]
{
<meat-ids>
}


and

[FOODLIST BEAR]
{
food=fruit
food=meat
}


or something similar :P
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:Hmmm on second thought, scratch my original idea, and instead allow linking from one FOODLIST to another, and we'll set up
[FOODLIST FRUIT]
{
<fruit-ids>
}

[FOODLIST MEAT]
{
<meat-ids>
}


and

[FOODLIST BEAR]
{
food=fruit
food=meat
}


or something similar :P
About to be done.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Great =) I'll fix up some proper foodlists for all animals then for the next release, according to their "Favorite Foods" mentioned in the bestiary on uo.com =P
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:Great =) I'll fix up some proper foodlists for all animals then for the next release, according to their "Favorite Foods" mentioned in the bestiary on uo.com =P
It's now up on the CVS.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Nice nice. I'll have updated DFNs up on the CVS in no time (hopefully). :P
-= Ho Eyo He Hum =-
Post Reply