datguy
Sorceror
Food System, XmlSpawner Required
Finding the cooking section quite boring and if the server required eating, players would still only
buy fruits or cakes & not work on their cooking skills I decided to give them incentive to become a great chef.
When players buy foods they get full & that is all, when they craft foods, they get a small bonus to either a particular skill or a stat or both, depending on what they are eating, the more difficult the item is to craft the better the boost to the foods.
Added a Speciality Section in the craft area, all of these require a recipe, there is a series of Quests that will give out these recipes However there is only a small chance the player will get the recipe each time they do the quest, they will however get a sample of the food they are trying to learn.
Once they do get the recipe the food itself is not hard to make skillwise, so this then would be their specialty. You can opt to give out the recipes some other way but you'd be missing out imo. Quests created by Ednyved mostly (used by permission)
internally what it does
-Modified the foods to have properties, each food can have of
1 skill boost, int/dex/str, 1 or 2 or 3 stat boosts
-each boost will last as long as the foods fillfactor, which is set for 15 minutes, so if the food has
a fillfactor of 4, the boost lasts 1 hour and so does the food till your at that hunger level again.
-The time can also be specified manually in the scripts per item but if nothing is specified it is
same as fillfactor
-each of the boosts are easily adjusted in the food scripts
Statboost time & skill boost time can be adjusted globaly in food.cs to be less than fillfactor, note:
If it is set longer than Fillfactor it does Not stack but just doesn't add the boost if you eat again (checks if there's already a boost applied)so the first Boost may run out before you can eat again because your full.
-
Only crafted foods have these boosts applied to them and the default is that nothing is applied so existing
foods that need no boost properties specified do not need to be altered in any way.
ANY purchasable foods have no boosts on them
example of a crafted food;
example of non-crafted food
Hopefully I got all the code out of my custom server correctly and hopefully I've made things clear enough to understand install info inside
*EDIT* Feb26
Added Jerky item/quest to give you idea's of what is possible, I'm sure you'll come up with many other idea once you get started. Lets not stick to just scripted foods, we can make them in xmlquests
Edit Feb 27
error in Food.cs that if you specify StatBoost duration instead of relying on Fillfactor the timer would break. Either redownload FoodSystem & use the new Food.cs or look a few posts down to see how to fix it.
Thanks Nockar
Finding the cooking section quite boring and if the server required eating, players would still only
buy fruits or cakes & not work on their cooking skills I decided to give them incentive to become a great chef.
When players buy foods they get full & that is all, when they craft foods, they get a small bonus to either a particular skill or a stat or both, depending on what they are eating, the more difficult the item is to craft the better the boost to the foods.
Added a Speciality Section in the craft area, all of these require a recipe, there is a series of Quests that will give out these recipes However there is only a small chance the player will get the recipe each time they do the quest, they will however get a sample of the food they are trying to learn.
Once they do get the recipe the food itself is not hard to make skillwise, so this then would be their specialty. You can opt to give out the recipes some other way but you'd be missing out imo. Quests created by Ednyved mostly (used by permission)
internally what it does
-Modified the foods to have properties, each food can have of
1 skill boost, int/dex/str, 1 or 2 or 3 stat boosts
-each boost will last as long as the foods fillfactor, which is set for 15 minutes, so if the food has
a fillfactor of 4, the boost lasts 1 hour and so does the food till your at that hunger level again.
-The time can also be specified manually in the scripts per item but if nothing is specified it is
same as fillfactor
-each of the boosts are easily adjusted in the food scripts
Statboost time & skill boost time can be adjusted globaly in food.cs to be less than fillfactor, note:
If it is set longer than Fillfactor it does Not stack but just doesn't add the boost if you eat again (checks if there's already a boost applied)so the first Boost may run out before you can eat again because your full.
-
Only crafted foods have these boosts applied to them and the default is that nothing is applied so existing
foods that need no boost properties specified do not need to be altered in any way.
ANY purchasable foods have no boosts on them
example of a crafted food;
Code:
[Constructable]
public DriedPeachSlice( int amount ) : base( amount, 0x172A )
{
Name = "Dried Peach Slice";
Stackable = true;
Hue = 435;
this.Weight = 0.2;
this.FillFactor = 1;//1 fillfactor = 15 minutes of time
this.IntBoost = 2;
this.DexBoost = 1;
//this.StrBoost = 2;
//this.StatBoostTime = 5;//can set it's time in MINUTES --default is fillfactor
this.Skill = "Lumberjacking";
this.SkillBoost = 2;
//this.SkillBoostTime = 10;//can set this time in MINUTES independantly from StatBoostTime --default is fillfactor
}
Code:
[Constructable]
public Peach( int amount ) : base( amount, 0x9D2 )
{
this.Weight = 1.0;
this.FillFactor = 1;
}
*EDIT* Feb26
Added Jerky item/quest to give you idea's of what is possible, I'm sure you'll come up with many other idea once you get started. Lets not stick to just scripted foods, we can make them in xmlquests
Edit Feb 27
error in Food.cs that if you specify StatBoost duration instead of relying on Fillfactor the timer would break. Either redownload FoodSystem & use the new Food.cs or look a few posts down to see how to fix it.
Thanks Nockar