The_Real_Al Posted September 2, 2013 Share Posted September 2, 2013 US field rations. Healthy, lasting and self-heating. Includes custom icons and (sparse) distribution.The heated version sports the slightest possible stress reduction due to fond memories. Idea and specs are based on a forum request by doomblood66 at:http://theindiestone.com/forums/index.php/topic/1285-mre-meals-ready-to-eat/ Installation:Extract to root directory. You know the drill. Changelog: 0.2- fixed heated MRE being rotten after two days regardless Known Issues:- Stress reduction is maximized because of buggy calculation in java. Look over here for info:http://www.theindiestone.com/community/viewtopic.php%3Ff=27&t=16574.html - Icons based on real photographs (and not too beautiful either). The first one was public domain, but i don't know for the second. If somebody asks whether this is his picture of MRE Tortillas then tell him it's chicken. Future Plans:When distribution is more varied.MealReadytoEat.zip Kaptain Kallum 1 Link to comment Share on other sites More sharing options...
Tweek Posted September 2, 2013 Share Posted September 2, 2013 nice mod! more of these! maybe even camping mre's instead of the military Link to comment Share on other sites More sharing options...
doomblood66 Posted September 2, 2013 Share Posted September 2, 2013 I went to the Police station and i found them MRE's it worked perfectly unfortunately, the sprite/icon was a "?", so i must have placed the icons in the wrong place, i put it in the media folder, if this is wrong please direct me to the right directory! (See what i did there) Regards,Alex Edit: Also is it permanently non-perishable if it hasnt been cooked? If so great if not please tell me what to edit Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 2, 2013 Author Share Posted September 2, 2013 The sealed bag is non-perishable and the heated one rots after two days. Your call. Just change 'DaysTotallyRotten' and 'DaysFresh' in mre.txt. Icons should be in the root-folder where the exe is. Link to comment Share on other sites More sharing options...
doomblood66 Posted September 3, 2013 Share Posted September 3, 2013 Ah thx for the info, but yeah i checked the code and its really similar to what i asked!! Thx bro! Edit: Also i would like the rarity to be a definite 3 for every metal shelf in the police station how would i go about changing that? Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 3, 2013 Author Share Posted September 3, 2013 I'm not quite sure if i understand what you mean with 'rarity to be a definite 3'. AFAIK it's always a propability. Well, the following will be deduction rather than knowledge: The number is a percentage. If you increase it, you increase the chance of getting the item. But that's not the whole story. There is a number of rolls assigned to each container which - based upon a pure lack of further information - i believed to be simply the number of times each item is checked. However the formula behind this is much more complicated, involves density and distance of surrounding Zombies and allegedly some hardcoded features. So far it's only babyluanian gibberish for me. You can check it out in /media/lua/items/ItemPicker.lua. Search and ask around the forum for more information. Now, the problem with the other shelves can be helped, but i'd advise against. If you look into /media/lua/Items/SuburbsDistribution.lua then you'll find the list of items which can be spawned in every container. You can then simply add more lines in mre.lua corresponding to the ones already in there. E.g. if you want to spawn them in every metal shelf then simply add:table.insert(SuburbsDistributions["all"]["metal_shelves"].items, "MRE.mrecold");table.insert(SuburbsDistributions["all"]["metal_shelves"].items, 0.5);The problem is that these shelves where you found the MREs are the only containers specifically assigned to the police station. So if you add them to ["all"]["metal_shelves"] they will spawn in literally every metal shelf since containers from the "all" table are found all over the place. Also, i already included them in ["all"]["crate"] with a chance of 0.5. Not much, but i'm pretty sure you'll find some in the lumber yard. Link to comment Share on other sites More sharing options...
doomblood66 Posted September 3, 2013 Share Posted September 3, 2013 Thx for the reply, sorry for not being clear but I get it now. Why can't you change ["All"] to police? (Sorry if my response does make sense) Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 4, 2013 Author Share Posted September 4, 2013 No worries. That's because the tables in suburbsdistribution.lua are merely accessed by the game when it fills the container you open. Which table a container uses is set by the game and can't be changed until a map-editor is available. The point is that you can add those lines above to the mre.lua and then you will find the items in the other shelves as well. Alas, you can also find them in every metal shelf outside the police station because those access the same table. I wouldn't do it for balancing reasons, but that's just me. If you want to have more MREs ingame then go ahead. Adding them to the kitchen counters will do. Or try a higher spawn-chance. Link to comment Share on other sites More sharing options...
doomblood66 Posted September 4, 2013 Share Posted September 4, 2013 No worries. That's because the tables in suburbsdistribution.lua are merely accessed by the game when it fills the container you open. Which table a container uses is set by the game and can't be changed until a map-editor is available. The point is that you can add those lines above to the mre.lua and then you will find the items in the other shelves as well. Alas, you can also find them in every metal shelf outside the police station because those access the same table. I wouldn't do it for balancing reasons, but that's just me. If you want to have more MREs ingame then go ahead. Adding them to the kitchen counters will do. Or try a higher spawn-chance. Sorry to be a pest, but ive just got 2 quick questions: 1. If i use the code you posted every single metal shelf will spawn 3 mre's?2. Can you please add code for a 20% chance of mre's spawning in kitchen cabinets Again sorry to be a pain, and if you cant i understand Regards,Alex Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 4, 2013 Author Share Posted September 4, 2013 Relax. No need to be sorry except for excusing yourself in every other sentence. 1. Well... they may spawn in every single metal shelf. You see the 0.5 there? That is a percentage that represents the spawn chance. It's only a slim chance. But as mentioned above, the mathematics are a bit more complicated. Just increase the 0.5 until you find a value you're happy with. 2. Might as well:table.insert(SuburbsDistributions["kitchen"]["counter"].items, "MRE.mrecold");table.insert(SuburbsDistributions["kitchen"]["counter"].items, 0.5); Link to comment Share on other sites More sharing options...
doomblood66 Posted September 5, 2013 Share Posted September 5, 2013 I've changed the policestorage probability to 20 but this time none spawned!! Again sorry but is there probability/code to make it 100% definite that there will be at least 1 per shelf? Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 6, 2013 Author Share Posted September 6, 2013 Try raising it to 100. That should give you at least one or two of them per container. Beats me if there is a way to directly address a specific container. Then again, i strongly believe that you could program a script in lua that does this. You would need some sort of id for the container and an event that fires when you open it. Interesting question actually, this would give you the possibility to distribute unique items anywhere on the map. I'm thinking story-mode here. Why don't you start a new thread on this topic in the Modding Help forum? Others might have the expertise i lack. Link to comment Share on other sites More sharing options...
doomblood66 Posted September 9, 2013 Share Posted September 9, 2013 That worked!! Thx bud Link to comment Share on other sites More sharing options...
doomblood66 Posted September 13, 2013 Share Posted September 13, 2013 Hello again, ive found now that if you decide to prepare the MRE even just one day into the apocalypse it goes rotten!! I also feel the need to make the prep time 30secs, any help? Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 16, 2013 Author Share Posted September 16, 2013 Ain't that a bird. Sounds like 'DaysTotallyRotten' and 'DaysFresh' count the number of ingame-days instead of the actual date. Can you confirm this for other foods as well? Edit:Well, it gets even more quirky than that: I tested this with Tuna and Watermelon and both behave normal. Fresh after preparation even if 'DaysTotallyRotten' exceeded the ingame-days. (The former beeing a 'Normal' and the latter a 'Food' item) Putting items and recipes in the items.txt file or changing the module doesn't work.A 'destroy item' line in the recipe doesn't help either. The only thing that helped so far was to include something else in the recipe, e.g. a 'keep KitchenKnife' line.Then the item is still fresh when you prepare it a couple of days into the game. However - and that's where i'm completely out of ideas - the aforementioned does not apply to vanilla items. If i just delete the line 'keep CanOpener' from the OpenTunaTin-recipe then the opened tin is still fresh after weeks. No clue, still searching. Link to comment Share on other sites More sharing options...
doomblood66 Posted September 16, 2013 Share Posted September 16, 2013 Well shit, thank you for your effort tho I really appreciate you trying Link to comment Share on other sites More sharing options...
doomblood66 Posted September 19, 2013 Share Posted September 19, 2013 How's it going? Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 21, 2013 Author Share Posted September 21, 2013 So that's how they came about. And i firmly believed it was intelligent design. Link to comment Share on other sites More sharing options...
harakka Posted September 21, 2013 Share Posted September 21, 2013 The idea of there being "in-between" forms is rather amusing, imagine the faces of a bunch of hungry soldiers who open up a ration pack only to find a bunch of metally, wibbly-wobbly cans that are still too steely to open by hand or knife, but flappy enough that you can't get the can opener to bite. "In 20 generations, we'll actually be able to eat these!" Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 21, 2013 Author Share Posted September 21, 2013 lol. Reporting back to their superiors: "The fifth generation MREs were too tender for operation." But on serious note, genetics is dangerous business. Leave that can alone with a sieve for just a moment and you'll spend generations breeding out the holes. harakka 1 Link to comment Share on other sites More sharing options...
The_Real_Al Posted September 24, 2013 Author Share Posted September 24, 2013 if you decide to prepare the MRE even just one day into the apocalypse it goes rotten fixed. file is up. Link to comment Share on other sites More sharing options...
doomblood66 Posted October 22, 2013 Share Posted October 22, 2013 Will this work when West Point is out or when they get the new engine working? Link to comment Share on other sites More sharing options...
The_Real_Al Posted October 22, 2013 Author Share Posted October 22, 2013 I asked the crystal ball but it remained silent. Believe it should though. Link to comment Share on other sites More sharing options...
doomblood66 Posted November 9, 2013 Share Posted November 9, 2013 How do i install for .17? I went into C:\Users\******\Zomboid\mods and unzipped the mod file, restarted PZ and it wasnt in the mod section ingame Link to comment Share on other sites More sharing options...
kinsem Posted November 12, 2013 Share Posted November 12, 2013 I plan on changing out the images that currently being used with something that is more inline with the graphical feel of PZ, and once I am happy with them and know that they are usable in game, if you like I can post them here for you to see and use if you would like. Love the mod BTW, and would it be possable to have different MRE's such as Meatloaf, Chili-mac, Pork Riblet, or Maple Sausage? 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