vonVile Posted August 16, 2013 Share Posted August 16, 2013 I'm working on a simple mod called Greatest Invention, where you can slice the bread. Before I release it I want to have the slice to be able to become rotten. What I need to know is what LUA file has the code for causing food items to become rotten to use as an example. Thanx! Link to comment Share on other sites More sharing options...
RobertJohnson Posted August 16, 2013 Share Posted August 16, 2013 It's not Lua related, check the item.txt in media/script/ You have a dayTotallyFresh and dayTotallyRotten IIRC. After the fresh date, the food become less nutritive, but no risk of disease.And rotten, it's less nutritive AND a risk of become sick Link to comment Share on other sites More sharing options...
Suomiboi Posted August 16, 2013 Share Posted August 16, 2013 You can add the change the daystotallyrotten = 3 for example to your bread slice script (it will get rotten in 3 days, unless in a fridge then longer). I don't know if it is handled in lua at the moment... you can see this used in other food items in the items.txt and newitems.txt. also there's something like daysfresh = x EDIT: sneaky ninja RJ Link to comment Share on other sites More sharing options...
RobertJohnson Posted August 16, 2013 Share Posted August 16, 2013 Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiya. (that's the Ninja sound.... ) Suomiboi 1 Link to comment Share on other sites More sharing options...
vonVile Posted August 16, 2013 Author Share Posted August 16, 2013 Okay, then how does the graphic for food change to rotten? I don't see anything in the item or recipes about rotten food. Is this just something the game does automatically? How can I make the mod switch the food graphic to the rotten version, like I see happen in the game? Link to comment Share on other sites More sharing options...
Suomiboi Posted August 16, 2013 Share Posted August 16, 2013 It does it automatically. I don't think you can do the rotten textures atm due to lua limitations (adding textures is done by lua...) or no one has yet figured it out in my knoledge... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now