Jump to content

Food Expiration Date


abreu20011

Recommended Posts

Food Expiration Date  (fedora) 
 
Welcome to Food Expiration Date forum thread.
 
When I play with my girlfriend, we always have thousand of problems to administrate the food before they rotten, so I decide create a mod that help us in this scenario. I think not exists a mod with expiration date in food so I hope this mod will be useful for the community too. With this mod, the players in a single game now can knows the status about any food gets.
 
Also, the mod include a trait called "Eye to food" that increases the information about status rotten food, including the hours. I hope this helps in your days into the hell and safe your body one day more.
 
The mod is located to englishspanishpolish and german. Feel free to amplify and post the result. I'll add the new locations posted to the mod. Special Thanks to Svarog and Blindcoder with his translations!

The located files are in .../media/lua/shared/ (Remember rename folders and beginning of the file)
 
Any suggestion or report bugs, please use this tread.
 
How to Use:
Only that you need is move the mouse over the food and the new option in the Tooltip tells the status of a food and time left to expire if you have the new trait "Eye to Food"

 

DVeaVK.jpg

 

 

 

 
Current Download (v1.3.1) PZ Early Access v31.13
CLICK HERE
 
Screenshots:

 

UD4qDb.jpg

 

lOOLfF.jpg


 
Update History:

Update: Food Expiration Date v1.3.1
April 22, 2015: Food Expiration Date mod version 1.3.1 for Project Zomboid version 31.13.

  • Fixed "Status" word in polish. Thanks, one more time, to great Svarog. Thanks! :)
  • Fixed poster with correct traductions
  • Fixed color when food is completly ok

Update: Food Expiration Date v1.3.0
April 22, 2015: Food Expiration Date mod version 1.3.0 for Project Zomboid version 31.13.

  • Removed "View Expiration Date" from context menu
  • Removed show information betwen Say commands in player
  • Added rotten information into the tooltip of each food
  • Value adapted States
  • The trait "Eye to Food" shows also a progress bar in the Tooltip that tells time left to expire
  • According to the state of the food, the color varies in range colors to notify more clearly 

Update: Food Expiration Date v1.2.2
April 21, 2015: Food Expiration Date mod version 1.2.2 for Project Zomboid version 31.13.

  • Added German translation. Thanks to blindcoder!!  :-)  :-)
  • Added support to TinyAVC (link here)

Update: Food Expiration Date v1.2.1
April 20, 2015: Food Expiration Date mod version 1.2.1 for Project Zomboid version 31.13.

  • Now once the food is Completely Rotten, checking the expiration date returns "Rotten" 

Update: Food Expiration Date v1.2.0
April 16, 2015: Food Expiration Date mod version 1.2.0 for Project Zomboid version 31.13.

  • Improved the new texts added in v1.1.0 version in english and polish. One more time, thanks to great Svarog!  :mrgreen:
  • Only food items should shows the expiration date option now

Update: Food Expiration Date v1.1.0

April 15, 2015: Food Expiration Date mod version 1.1.0 for Project Zomboid version 31.13.

  • Added Polish location and improved the english version. Thanks to Svarog! :-)   :-)
  • Improved code
  • Support to many items at same time
  • Now can click in a container item or item itself

Update: Food Expiration Date v1.0.1
April 12, 2015: Food Expiration Date mod version 1.0.1 for Project Zomboid version 31.10.

  • Added forum url to the mod

Update: Food Expiration Date v1.0.0
April 12, 2015: Food Expiration Date mod version 1.0.0 for Project Zomboid version 31.10.

  • Initial release


 
Credit
Credit Where Credit Is Due

 
MODS_02.png

 

 

 

 

Please, don't download the attached files: it's a deprecated version. Use the link at first of post.

ExpirationFood_v1.0.0.zip

Link to comment
Share on other sites

Awesome sounding mod some now we just need a randomized Food Quality mod

Hahahaha, thanks, I pointed it!  (clyde)

quick question if you where to put it in a fridge would the expire date update to its conditions or would it still say the same as if in a fridge or not in one.

Yes, the amount of days increases more slowly if is in a fridge (this occurs in internal code of PZ), so, when the player says the status and time of food, the time is balanced.

 

Here is the assign sentences to calculate the time to rotten:

...DaysTotallyRotten = _item:getScriptItem():getDaysTotallyRotten();age = _item:getAge(); --increases more slowly if is into a fridgetimeToRotten = DaysTotallyRotten - age;...

I don't know if is more accuracy apply a percentage instead a life days and total days before rotten in the extra information when have the trait!   :???:

Link to comment
Share on other sites

You should probably make it so that "View Expiration Date" UI interaction only appears on items that have "Type = Food," in item script. Rotting does not seem to apply to any other type of item and being able to check an expiration date on things like shoes is somewhat silly.

PS: I PMed you updated translations for the new UI stuff.

Link to comment
Share on other sites

You should probably make it so that "View Expiration Date" UI interaction only appears on items that have "Type = Food," in item script. Rotting does not seem to apply to any other type of item and being able to check an expiration date on things like shoes is somewhat silly.

PS: I PMed you updated translations for the new UI stuff.

 
Svarog, I'm sorry for that... The last version, the v1.1.0, should be the v1.1.1. When I uploaded it, It's true that any type item can tell his expiration date, but, I uploaded a correct version with de same number build because only 1-2 minuts goes since I upload the bad version and I was aware of the error. If you download the last version again, this problem is solved. I don't repeat upload versions without notify correctly, Internet is very fast. Much more than I thought.  :geek:
 
Anyway, I'll upgrade the new translations that you sent me and go over the code again. But like I said, the problem of view expiration of shoes, should not will occur more.
 
If the problem persist, please, report the problem again.
 
Thanks for your help and contributios
Link to comment
Share on other sites

Another small thing, once the food is Completely Rotten, checking the expiration date yields the "Almost rotten" message. It should probably have it's own unique message (Even if it's obvious that it's rotten beyond any use).

Link to comment
Share on other sites

Another small thing, once the food is Completely Rotten, checking the expiration date yields the "Almost rotten" message. It should probably have it's own unique message (Even if it's obvious that it's rotten beyond any use).

I check this problem with some options, and the next update I'll fix it :)

Link to comment
Share on other sites

New version released: 1.3.0

  • Removed "View Expiration Date" from context menu
  • Removed show information betwen Say commands in player
  • Value adapted States
  • Added rotten information into the tooltip of each food
  • The trait "Eye to Food" shows also a progress bar in the Tooltip that tells time left to expire
  • According to the state of the food, the color varies in range colors to notify more clearly 

DVeaVK.jpg

Link to comment
Share on other sites

  • 4 weeks later...

Hi! I'd like to customize this so the Cooking Skill is used instead of the custom trait "Eye To Food". I'd like the Cooking Skill to be at least Level 2. I don't like using traits in my Sandbox game LOL

How would I go about doing so?

 

This mod is really useful (fedora)

 

/edit

@abreu20011

So I made my own Food Expiration Mod from scratch based on your mod and I got it working, yay! Still have to figure out how to retrieve the skill levels so I can use the Cooking skill for determining how much information a player should receive, ie. poor skill means you can see basic spoilage info while higher skilled means more detailed spoilage info. If someone could help me figure this out, it'd be great :)

Link to comment
Share on other sites

  • 3 weeks later...

here goes the french translation ;).

 

UI_FR =
{
UI_trait_foodexpiration = "Jauger la nourriture",
UI_trait_foodexpiration_des = "Permet de connaître la date d'expiration de la nourriture",
UI_tooltip = "Etat:",
UI_have_daysoff = "jours sur",
UI_status_VERYGOOD = "Très Frais",
UI_status_GOOD = "Frais",
UI_status_NORMAL = "Okay",
UI_status_LITTLEROTTEN = "Commence à pourrir",
UI_status_ROTTEN = "Pourri",
UI_status_NOROTTEN = "Pas de date d'expiration"
}

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...