Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Cooking mod request. No more food poisoning?

  1. #1
    Survivor Winterhart's Avatar
    Join Date
    Dec 2015
    Posts
    69
    Rep Power
    0

    Cooking mod request. No more food poisoning?

    I want to make a mod that uses the canned food from the game and cook it to remove the food poisoning risk. So I don't try and reinvent the wheel, is there a mod out there that does this already? Next question is it possible? Any input on this will be much appreciated.

    Thank you for your time.

  2. #2
    Colony Founder Clockwork Orange's Avatar
    Join Date
    Nov 2015
    Posts
    2,798
    Rep Power
    1
    Quote Originally Posted by Winterhart View Post
    I want to make a mod that uses the canned food from the game and cook it to remove the food poisoning risk. So I don't try and reinvent the wheel, is there a mod out there that does this already? Next question is it possible? Any input on this will be much appreciated.

    Thank you for your time.
    it is definitely possible and its a great way to start modding since it is fairly simple and easy to do.

    You will have to create the new cooked items, you can make custom icons or you can use the current icons in game and apply a tint to them or something if you wish.

    Once you create the new cooked items go ahead and add the recipes for them.

    Use the vanilla file examples to guide you.

    That will give you the functionality of the items, after that you can go ahead and add the localization for them so they display the item names and descriptions as you want the players to see them.

    If you have any specific issues just make a detailed post about the issue and you will get the help you need.

    Happy modding!

  3. #3
    Hunter
    Join Date
    Jul 2015
    Posts
    127
    Rep Power
    0
    There was one, it was made by Ryuuds but I can't seem to find it now by searching. It was called something like Amazing Cooked Can Foods or something like that. I still have it but haven't used it in a while because the food was too powerful and I hadn't gotten around to modding it myself yet.

    I can't find the thread anywhere so it may have been deleted by the author or someone.

  4. #4
    Community Moderator OzHawkeye's Avatar
    Join Date
    Sep 2014
    Location
    Australia
    Posts
    4,310
    Rep Power
    1
    Winterhart,

    Just a note, I've amended your thread title to be clearer that this isn't a mod, but a mod request/discussion.

  5. #5
    Survivor Winterhart's Avatar
    Join Date
    Dec 2015
    Posts
    69
    Rep Power
    0
    Quote Originally Posted by LionsDen View Post
    There was one, it was made by Ryuuds but I can't seem to find it now by searching. It was called something like Amazing Cooked Can Foods or something like that. I still have it but haven't used it in a while because the food was too powerful and I hadn't gotten around to modding it myself yet.

    I can't find the thread anywhere so it may have been deleted by the author or someone.
    Could I get a copy of it from you? It would give me a better idea of what I'm doing.

  6. #6
    Tracker Necrodemus's Avatar
    Join Date
    Mar 2014
    Posts
    247
    Rep Power
    0
    Hey Winterhart,

    If I had more time, I would give you a hand with this, but unfortunately I don't. Below are a few pointers that you might find useful... or not. Perhaps someone with more experience could clarify some things that I may have missed.

    I would take a look at the following recipe, and try to use it as a template.

    <recipe name="drinkCanBoiledWater" count="1" craft_area="campfire">
    <ingredient name="drinkCanRiverWater" count="1"/>
    </recipe>

    drinkCanBoiledWater is the result of the recipe. drinkCanRiverWater is the ingredient.

    In the items.xml we have this item:

    <item name="foodCanBeef">
    <property name="HoldType" value="31"/>
    <property name="DisplayType" value="food"/>
    <property name="Meshfile" value="Items/Misc/parcelPrefab"/>
    <property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>
    <property name="Material" value="Mmetal"/>
    <property name="Weight" value="5"/>
    <property name="EconomicValue" value="60"/>
    <property name="Stacknumber" value="50"/> <!-- STK food -->
    <property class="Action0">
    <property name="Class" value="Eat"/>
    <property name="Delay" value="1.0"/>
    <property name="Use_time" value="..."/>
    <property name="Sound_start" value="player_eating"/>
    <property name="Create_item" value="drinkCanEmpty"/>
    </property>
    <property name="Group" value="Food/Cooking"/>

    <effect_group tiered="false">
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="15"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="add" value="7"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffIllFoodPoisoning0">
    <requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="5"/>
    </triggered_effect>
    <display_value name="FoodPoisoningRisk" value=".05" />
    </effect_group>
    </item>

    All the other "solid" food can items use the "Extends" function which is governed by this first item in the can catagory. "Extends" inherits the information from this.

    Take a look at the can just below it.

    item name="foodCanChicken">
    <property name="Extends" value="foodCanBeef"/>

    <effect_group tiered="false">
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="15"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="add" value="7"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffIllFoodPoisoning0">
    <requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="5"/>
    </triggered_effect>
    <display_value name="FoodPoisoningRisk" value=".05" />
    </effect_group>
    </item>

    See where it says <property name="Extends" value="foodCanBeef"/>.

    Your new "solid" food cooked can items, would copy item name="foodCanChicken"> because it "Extends" the governing one which is <item name="foodCanBeef">

    Liquid based cans are governed by <item name="foodCanMiso"> which itself, extends <item name="foodCanBeef">

    The other cans that need to extend from this are all liquid based such as "foodCanPears", "foodCanSoup", "foodCanStock" and so on.

    Again, "foodCanMiso" is the governing item to "liquid" can items, in the same way the other "solid" food cans, are governed by <item name="foodCanBeef">

    Now look at the buffs associated with these cans. The following Buff is the section that governs the possibility of food poisoning. There is a 1 - 100 chance. You need to omit this from your new "cooked" cans ( solid and liquid ). Or give it a 0 chance. I'd omit it personally.

    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffIllFoodPoisoning0">
    <requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="5"/>
    </triggered_effect>
    <display_value name="FoodPoisoningRisk" value=".05" />

    So, an example of a new "solid" cooked can item, without the possibility of poisoning, because it is cooked, might be the following.

    item name="foodCanChickenCooked">
    <property name="Extends" value="foodCanBeef"/>

    <effect_group tiered="false">
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="15"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="add" value="7"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
    </effect_group>
    </item>

    An example of a new "liquid" cooked can item, without the possibility of poisoning, because it is cooked, might be the following.

    <item name="foodCanPeasCooked">
    <property name="Extends" value="foodCanMiso"/>
    <property name="EconomicValue" value="20"/>
    <effect_group tiered="false">
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$waterAmountAdd" operation="add" value="5"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="10"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="add" value="5"/>
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
    </effect_group>
    </item>

    Lets go back to the "drinkCanBoiledWater" recipe and change it to:

    <recipe name="foodCanPeasCooked" count="1" craft_area="campfire">
    <ingredient name="foodCanPeas" count="1"/>
    </recipe>

    This is all just off the cuff, so to speak. I've never done it. Someone with much more experience than I may be able to help you further. Or fix any errors in my logic. But it may get you moving. And remember, not all cans give food poisoning.

    As mentioned above by the other gentlemen, you will need to make custom icons and add the localization. I can't help you with either. However regarding the icons, I would copy the originals and put a little flame motif in one corner to signify that it has been cooked.

    Peace out and happy modding.

  7. #7
    Survivor Winterhart's Avatar
    Join Date
    Dec 2015
    Posts
    69
    Rep Power
    0
    Quote Originally Posted by Necrodemus View Post
    Hey Winterhart,

    This is all just off the cuff, so to speak. I've never done it. Someone with much more experience than I may be able to help you further. Or fix any errors in my logic. But it may get you moving. And remember, not all cans give food poisoning.

    As mentioned above by the other gentlemen, you will need to make custom icons and add the localization. I can't help you with either. However regarding the icons, I would copy the originals and put a little flame motif in one corner to signify that it has been cooked.

    Peace out and happy modding.
    Thank you so much, this gives me a good starting place. I will have to figure out the icons, but I have no idea what localization is LOL. I'm sure I'll figure it out eventually. Thanks again.

  8. #8
    Tracker Necrodemus's Avatar
    Join Date
    Mar 2014
    Posts
    247
    Rep Power
    0
    Hello Winterhart,

    In a nutshell, localization contains all the text descriptions for items and perks and such for the game. I believe there are several languages included in it. If you add things to the game through a mod, and want people to know what it is, or how to use it, even for yourself, you will have to add it to the localisation file. If not, no description for your newly added item will show up.

    I have no experience with it, in that, I cannot guide you on how to add proper descriptions.

    Have a good one

  9. #9
    Reconstructionist
    Join Date
    Jun 2016
    Posts
    737
    Rep Power
    1
    I've played peoples mods that added bowls to the game and a bowl + 2 cans of food = good food with no poisoning. so it's possible for sure.

  10. #10
    Tracker Necrodemus's Avatar
    Join Date
    Mar 2014
    Posts
    247
    Rep Power
    0
    Quote Originally Posted by Winterhart View Post
    Thank you so much, this gives me a good starting place. I will have to figure out the icons, but I have no idea what localization is LOL. I'm sure I'll figure it out eventually. Thanks again.
    I've been thinking about your mod and I have some balance advice, so that you may find it more rewarding in your next early game playthrough.

    Food poisoning from cans, is only a 1 in 100 chance. I pop these suckers down early game and rarely get sick. And when I do, the effects don't last long. I don't really feel like I'm taking a risk. Have you ever had food poisoning? I have gotten it from hot dogs, and then sushi. I'll never forget it and never eat them again because of it.

    Lets say you are out in the wild, not long after spawning; you're feeling all snazzy in your freshly made grass pants and shirt, campfire blazing, cooking off these cans. You are generating heat. Heat that may be the tipping point for the screaming witch to come find you. That's trouble right? Or worse, you are doing this at night! The very act of removing a slight risk from poisoning by cooking, might serve to put you in real danger.

    The following suggestion may seem counter intuitive, but I believe to make this worth your modding time, and enhance your in game risk to reward ratio, so that sweet Dopamine can course through your veins, I'd increase the chance of poisoning to 1 in 25. Also, I'd find the buff that controls poisioning and make it much, much more virulent.

    Now, you have to cook them. Now you have to run the risk of either, attracting attention, or getting seriously sick. Otherwise, all your efforts may be kind of pointless, right? Anyways, just my thoughts on it. Make it the way you feel will give you the most fun. I'm just an old masochist

    All the best to you, and I wish you luck in your modding endeavors.
    Last edited by Necrodemus; 02-09-2019 at 05:28 PM.

  11. #11
    Survivor Winterhart's Avatar
    Join Date
    Dec 2015
    Posts
    69
    Rep Power
    0
    Quote Originally Posted by Necrodemus View Post

    The following suggestion may seem counter intuitive, but I believe to make this worth your modding time, and enhance your in game risk to reward ratio, so that sweet Dopamine can course through your veins, I'd increase the chance of poisoning to 1 in 25. Also, I'd find the buff that controls poisioning and make it much, much more virulent.

    Now, you have to cook them. Now you have to run the risk of either, attracting attention, or getting seriously sick. Otherwise, all your efforts may be kind of pointless, right? Anyways, just my thoughts on it. Make it the way you feel will give you the most fun. I'm just an old masochist

    All the best to you, and I wish you luck in your modding endeavors.
    I will definitely consider that once I actually get the mod to work LOL Note: I got it working, just need to fix localization.
    Last edited by Winterhart; 02-10-2019 at 12:04 AM. Reason: Add note

  12. #12
    Tracker Necrodemus's Avatar
    Join Date
    Mar 2014
    Posts
    247
    Rep Power
    0
    Quote Originally Posted by Winterhart View Post
    I will definitely consider that once I actually get the mod to work LOL Note: I got it working, just need to fix localization.
    Well done!

  13. #13
    Survivor Winterhart's Avatar
    Join Date
    Dec 2015
    Posts
    69
    Rep Power
    0
    Quote Originally Posted by Necrodemus View Post
    Well done!
    Here's the first copy.
    http://www.mediafire.com/file/wda597..._Food.zip/file

    I'm still trying to increase the food poisoning risk. I made another mode that made the recipes learnable and I want to unlock them at the first level, but I haven't been able to do that yet either.

    I made another modlet that adds Freeze Dried Cheese, Pasta, Powdered Eggs, Powdered Milk and Rice. They are added to the Air Drops. I haven't made the recipes yet though.

  14. #14
    Tracker Necrodemus's Avatar
    Join Date
    Mar 2014
    Posts
    247
    Rep Power
    0
    Hello Winterhart,

    I don't currently have 7 days installed. I've decided to leave it be until random gen goes through a few more cycles in development. However, * tin foil hat on * I've a bad feeling it is getting butchered to make way for a future merge with consoles * tin foil hat off. * In the meantime, I'm going back to a project I was planning for X Foundations.

    I took a look inside the zip. Very neat my friend, and the icons are really good. Really good.

    When you say you are still trying to increase the food poisoning risk, are you saying that you are playtesting with differant risk percentages, or that you cannot find the actual value that controls it? I'm going to go with the latter, just to make sure we are on the right track. I believe it is this section below: (copied from my post above).

    The following is the section that governs the possibility of food poisoning.

    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffIllFoodPoisoning0">
    <requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="5"/>
    </triggered_effect>
    <display_value name="FoodPoisoningRisk" value=".05" />

    I believe what this is telling us, is that, when a can of food, which has the potential to poison, is consumed, the possibility of the negative buff, "buffIllFoodPoisoning0" is called by a random roll out of a possible pool of 1 in 100. From that pool, there is a 5% chance you will be poisioned. This is how I understand it. Now lets change it to 75% (Or whatever suits you).

    <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffIllFoodPoisoning0">
    <requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="75"/>
    </triggered_effect>
    <display_value name="FoodPoisoningRisk" value=".75" />

    The last part should have it appear as 75% under each can and obviously replace the display of 5%. You could play around with it and give differant cans, greater or lesser values if you wanted. You could even add the buff to regular cooked meals, to simulate food spoilage I would think.

    And if you really wanted to go granular, duplicate the buff several times, and number them based on severity. Then say, add a chance that peas or pears might give mild food poisoning by keeping the original buff "buffIllFoodPoisoning0." And something like chicken might have a greater chance of really messing you up with a
    stronger version you created called for arguments sake, "buffIllFoodPoisoning2" now you really have to have a reason for honey or antibiotics in case you eat one of these by accident lol. But all this is more work of course.

    I haven't even looked inside Alpha 17 buffs.xml, but I hear it can be very versatile. Those other dry foods sound great also. I'm guessing water will play a large role there, ( Captain obvious here ). And perhaps, have a think about adding plates or bowls; it would be great for deeper roleplay.

    Keep at it, and good luck to you. I may pop in from time to time to see how things are progressing and try and help as best I can.

  15. #15
    Survivor Winterhart's Avatar
    Join Date
    Dec 2015
    Posts
    69
    Rep Power
    0
    Quote Originally Posted by Necrodemus View Post
    Hello Winterhart,
    Keep at it, and good luck to you. I may pop in from time to time to see how things are progressing and try and help as best I can.
    I'm not crazy about the current random gen either. It took me several days to find a seed that has decent water which is needed for FarmLifeMod.

    I did figure out that section. Now I'm trying to get the right xpath to modify it. Being dyslexic is a real handicap there. lol I did find an online xpath generator that I think is going to be a big help.

    I just completed another mod taking the can food recipes and making the learnable and unlocking them at the first level. Don't want to make it too easy.

    Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •