Prison Architect

Prison Architect

Which side do you sit on?
Brutal Punishment or noble attempts to reform? From the Panopticon to the Supermax, this is your chance to publish or subscribe to the best prisons from the Architect community.
Stop auto-dumping cooked food!
Is there a mod or could there be a mod that prevents cooked ingredients from getting "Dump Stack" order every time a meal ends? I just hate seeing it go to waste...
< >
Showing 1-12 of 12 comments
murgh 141 29 Nov, 2019 @ 9:55am 
hmmm sounds fun, a mod which turns cooked food into cold old food which gets reused lateron. However the problem is that there is no way to tell when this cooked food turns into garbage...
The Queen Salis 1 29 Nov, 2019 @ 10:10am 
Originally posted by murgh:
hmmm sounds fun, a mod which turns cooked food into cold old food which gets reused lateron. However the problem is that there is no way to tell when this cooked food turns into garbage...
well what i see happen is that 5-10 minutes after Eat regime ends, all food stacks in the canteen are given the "dump" order, I'd just want a mod that stops that. mostly so I can reduce cook staff by having prisoner-cooked food last longer but without having to have Work regimes specifically before each meal.

I personally wouldn't mind ever-lasting food since the mechanics do allow it if I just cancel the orders in time. I'd just like something to cancel them for me or prevent them from being dumped in the first place as pausing after each meal to select all the food stacks and un-dump them is pretty tedious.
Last edited by The Queen Salis; 29 Nov, 2019 @ 11:01pm
edumacacion 11 29 Nov, 2019 @ 7:20pm 
I made a mistake you do not need to modify the main.dat in the prison architect folder to fix this. also modifying main.dat directly should not be done if you want to play online because its possible the game doesn't realize a mod is running. I was able to develop a mod that does what the original poster wanted without modifying the main.dat in the prison architect folder. you can download that mod from my profile. If you modified main.dat using these instructions. you can use the instructions in my last post to restore them to their default settings.

BEGIN ProductionRule
Rule Storage
Material Ingredients
Container Fridge
Room Kitchen
Distribution Kitchens
MaxSlotId 1
END

BEGIN ProductionRule
Rule Storage
Material Ingredients
Container Fridge
Distribution Random
MaxSlotId 1
END


BEGIN ProductionRule
Rule Storage
Material IngredientsCooked
Room Kitchen
Distribution Random
Condition NotLoaded
END

BEGIN ProductionRule
Rule Storage
Material IngredientsCooked
Container ServingTable
Distribution Nearest
MinSlotId 1
MaxSlotId 4
Properties HighPriority
END

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container ServingTable
Distribution Linked
END

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container ServingTable
Distribution OutOfStock
END

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container ServingTable
Distribution Nearest
Condition NotInFoodSystem
END

BEGIN ProductionRule
Rule Storage
Material FoodTrayDirty
Container Sink
Distribution Linked
Condition NotDuringMealService
StackInRoom Canteen
StackInRoom Staffroom
END

BEGIN ProductionRule
Rule Storage
Material FoodTrayDirty
Container Table
Room Canteen
Distribution Nearest
Condition NotInFoodSystem
StackInRoom Canteen
StackInRoom Staffroom
END

BEGIN ProductionRule
Rule Storage
Material FoodTrayDirty
Room Canteen
Container Table
Distribution Linked
Condition NotInKitchenOrCanteen
StackInRoom Canteen
StackInRoom Staffroom
MaxSlotId 3
END

I played around with changing Ingredients to IngredientsCooked in the productions mod but it didn't do anything. however the fridge's only purpose is to store food so whatever object you assign as the fridge will store food. I couldn't find any properties for the cooker though.
Last edited by edumacacion; 2 Dec, 2019 @ 10:13pm
The Queen Salis 1 29 Nov, 2019 @ 11:06pm 
Well what about the serving table? it happens to food in the serving table after meal time. it just orders dumping all the food :steamsad:
edumacacion 11 30 Nov, 2019 @ 12:47am 
I made a mistake you do not need to modify the main.dat in the prison architect folder to fix this. also modifying main.dat directly should not be done if you want to play online because its possible the game doesn't realize a mod is running.







If I can code this without using lua. Ill make a mod for this. I think any object listed in the production.txt file is fairgame. actually I might be wrong on this but one way of doing this would be to remove this production rule or maybe modifying it. Ill look into it. the only problem is you can't really delete rules in prison architect at least not with mods.

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container ServingTable
Distribution Nearest
Condition NotInFoodSystem
END

Replace with

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container ServingTable
Distribution Nearest
END

Keep in mind production mods overwrite each other. Only one production mod works at once. they aren't additive.

food is converted into foodtrays. all foodtrays are automatically eaten. I'm looking into a way of preventing food from leaving the serving table but im not sure this is going to work.

Last edited by edumacacion; 2 Dec, 2019 @ 10:06pm
The Queen Salis 1 30 Nov, 2019 @ 1:04am 
could it be caused by the nearest trash can actually? - I noticed I can cancel all the dump orders (that are issued :05 minutes after Eat regime on the dot) just by cancelling actions on the can in the canteen...

but if there is no trashcan, a temporary spot is created under one of the foods that is exactly like a trash can so I'm not so sure anymore
Last edited by The Queen Salis; 30 Nov, 2019 @ 1:11am
The Queen Salis 1 30 Nov, 2019 @ 1:33am 
if I could have a modded item that just cancels all tasks in a room it's in from 0:00 to 0:50 minutes after specific hour of the day?
Last edited by The Queen Salis; 30 Nov, 2019 @ 2:56am
edumacacion 11 30 Nov, 2019 @ 3:20am 
I finished the mod. the mod causes food trays to stay on the table. theyre still labeled food tray dirty but inmates will eat from them.
Last edited by edumacacion; 30 Nov, 2019 @ 3:21am
edumacacion 11 30 Nov, 2019 @ 3:33am 
I made a mistake you do not need to modify the main.dat in the prison architect folder to fix this. also modifying main.dat directly should not be done if you want to play online because its possible the game doesn't realize a mod is running.






this was done with a large canteen and one kitchen.
*mod allows one kitchen with two cookers and two fridges to constantly stockpile food. one kitchen can serve 106 people as long as the canteens benches aren't full. if the benches become full noone can eat but serving tables can definetly serve more people. the number of serving tables that can be used increases as the number of benches is filled with foodtrays. Its as if the foodtrays are reused but you can't eat anywhere a foodtray is placed.


this applies to the standard kitchen and canteen prefab.
I've tested this mod and it doesn't seem to work well. after three rounds of prisoners 71 percent of 48 prisoners are fed. only 15 new trays are available to serve at this point. one kitchen and one canteen can fully serve people. However late into the game when the benches become full. you are unable to dump the dirty food trays because the game thinks theyre the normal food trays. if you use this mod either build one large canteen early on or use the vanilla mod to switch the mod off temporairly so you can dump food trays. however it doesn't work perfectly some trays are still undumpable.



how to install
1. copy main.dat
1.backup main.dat by pasting it to the desktop or wherever you want to back it up to.
2. open main.dat with winzip,powerarchiver,or windows built in zip program (this mod is highly unstable and you'll want a backup)move the data folder to another folder on your computer.
3. open up production.dat
4. modify production.dat sections where it says foodTrayDirty to FoodTray. Do not modify any other part of production.dat.



BEGIN ProductionRule
Rule Storage
Material FoodTray
Container Sink
Distribution Linked
Condition NotDuringMealService
StackInRoom Canteen
StackInRoom Staffroom
END

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container Table
Room Canteen
Distribution Nearest
Condition NotInFoodSystem
StackInRoom Canteen
StackInRoom Staffroom
END

BEGIN ProductionRule
Rule Storage
Material FoodTray
Room Canteen
Container Table
Distribution Linked
Condition NotInKitchenOrCanteen
StackInRoom Canteen
StackInRoom Staffroom
MaxSlotId 3
END



4a. copy the modified production.bat into the main.dat zip

5. download vanilla mod

6. when you don't want to use this mod or want to use other mods. Download my vanilla mod and apply it before you apply your other mods or if not using mods whenever you want to play without this mod. Although it is probably better to copy the main.dat you backed up with in the beginning of the instructions or better yet delete main.dat and verify the steam file cache to restore the original games main.dat.

If you think that applying this settings will work without changing main.dat directly you can try it but I couldn't get it to work. The game's original rules still apply when using mods your'e only adding new rules when you modify with mods. the games original rules still exist. If someone can do this more nondestructively I think that would be awesome.

known bugs

If you don't build an entrance to your prison workers will permanently be unable to build buildings even after removing all buildings that were in process of failing
prisoners do not eat all meals. the number of meals that isn't eaten that is left on the table increases as the number of days the meals has been left on the table increases. if a meal is left over from breakfast prisoners will still eat it provided the table isn't filled with trays. trays rarely disappear in this mod.
it is possible the infinite stacking of trays causing a riot at which point the trays are collected.


Last edited by edumacacion; 2 Dec, 2019 @ 10:06pm
edumacacion 11 1 Dec, 2019 @ 9:27pm 
The autodumping of food is actually a serious problem with the game. food trays have a limited amount that can be stacked at once. Whenever you don't have food trays or your not meeting the demand in your cafeteria food is thrown out. you can't really prevent this from happening but you can make the stack size for ingredients spoiled less to prevent it from happening. this is an updated version of the never go hungry mod.
Last edited by edumacacion; 1 Dec, 2019 @ 9:41pm
edumacacion 11 1 Dec, 2019 @ 9:37pm 
I made a mistake you do not need to modify the main.dat in the prison architect folder to fix this. also modifying main.dat directly should not be done if you want to play online because its possible the game doesn't realize a mod is running.





this was done with a large canteen and one kitchen.
*mod allows one kitchen with two cookers and two fridges to constantly stockpile food. one kitchen can serve 106 people as long as the canteens benches aren't full. if the benches become full noone can eat but serving tables can definetly serve more people. the number of serving tables that can be used increases as the number of benches is filled with foodtrays. Its as if the foodtrays are reused but you can't eat anywhere a foodtray is placed.


this applies to the standard kitchen and canteen prefab.
I've tested this mod and it doesn't seem to work well. after three rounds of prisoners 71 percent of 48 prisoners are fed. only 15 new trays are available to serve at this point. one kitchen and one canteen can fully serve people. However late into the game when the benches become full. you are unable to dump the dirty food trays because the game thinks theyre the normal food trays. if you use this mod either build one large canteen early on or use the vanilla mod to switch the mod off temporairly so you can dump food trays. however it doesn't work perfectly some trays are still undumpable.


this mod requires deleting rules from the main.dat file in the main prison architect folder. this could prevent your game from starting. this also means this mod is essentially permanent until you copy the original main.dat back to the prison architect folder. my vanilla mod essentially allows you to switch between the original games main.dat and the modified main.dat your making in this tutorial.

how to install
1. copy main.dat
1.backup main.dat by pasting it to the desktop or wherever you want to back it up to.
2. open main.dat with winzip,powerarchiver,or windows built in zip program (this mod is highly unstable and you'll want a backup)move the data folder to another folder on your computer.
3. open up production.dat
4. modify production.dat sections where it says foodTrayDirty to FoodTray. Do not modify any other part of production.dat.



BEGIN ProductionRule
Rule Storage
Material FoodTray
Container Sink
Distribution Linked
Condition NotDuringMealService
StackInRoom Canteen
StackInRoom Staffroom
END

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container Table
Room Canteen
Distribution Nearest
Condition NotInFoodSystem
StackInRoom Canteen
StackInRoom Staffroom
END

BEGIN ProductionRule
Rule Storage
Material FoodTray
Room Canteen
Container Table
Distribution Linked
Condition NotInKitchenOrCanteen
StackInRoom Canteen
StackInRoom Staffroom
MaxSlotId 3
END

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container ServingTable
Distribution Nearest
END

Delete this rule (delete rules outright could prevent the game from starting.

BEGIN ProductionRule
Rule Storage
Material FoodTray
Container ServingTable
Distribution OutofStock
END
Modify Materials.dat

Materials

BEGIN Object
Name IngredientsSpoiled
MaxStackSize 1
RenderDepth 1
Sprite Ingredient1
StackSprite StackIngredients1
Properties Material
Properties SlowDelivery
END


BEGIN Object
Name Meal
MaxStackSize 1000
Price -15
RenderDepth 1
Sprite FoodTray
Properties Material
END

BEGIN Object
Name FoodTray
MaxStackSize 1000
Price -1
RenderDepth 1
Sprite FoodTray
StackSprite StackFoodTrays
Properties Material
Properties SlowDelivery
END

BEGIN Object
Name FoodTrayDirty
MaxStackSize 1000
Price -1
RenderDepth 1
Sprite FoodTrayDirty
StackSprite StackFoodTraysDirty
Properties Material
END



4a. copy the modified production.bat into the main.dat zip
4b copy the modified materials.bat into the main.dat zip

5. download vanilla mod

6. when you don't want to use this mod or want to use other mods. Download my vanilla mod and apply it before you apply your other mods or if not using mods whenever you want to play without this mod. Although it is probably better to copy the main.dat you backed up with in the beginning of the instructions or better yet delete main.dat and verify the steam file cache to restore the original games main.dat.

If you think that applying this settings will work without changing main.dat directly you can try it but I couldn't get it to work. The game's original rules still apply when using mods your'e only adding new rules when you modify with mods. the games original rules still exist. If someone can do this more nondestructively I think that would be awesome.

if you already experienced this problem in one of your prisons. apply vanilla mod and wait for the next meal time. if trays show up in the serving tables. apply the mod. the next time meal time occurs. there may be 1000 food trays.

known bugs

If you don't build an entrance to your prison workers will permanently be unable to build buildings even after removing all buildings that were in process of failing
prisoners do not eat all meals. the number of meals that isn't eaten that is left on the table increases as the number of days the meals has been left on the table increases. if a meal is left over from breakfast prisoners will still eat it provided the table isn't filled with trays. trays rarely disappear in this mod.
it is possible the infinite stacking of trays causing a riot at which point the trays are collected.
Last edited by edumacacion; 2 Dec, 2019 @ 10:06pm
edumacacion 11 1 Dec, 2019 @ 11:41pm 
I was wrong about how to fix this problem but I've made a mod to fix it. here are the instructions. keep in mind though even with no dumping of food and no trays cluttering tables. I was only able to get a maximum of 37 percent of 640 people fed with 5 small kitchens and 3 large canteens.

if you want to use this mod its most useful if you unlock micromanagement early and never have a holding cell built unless you already have the capacity to hold those prisoners. you can close the prison for accepting new prisoners in the bureaucracy tab in the top left corner of the screen. I think I had one canteen with 540 ready meals except the canteen wasn't large enough to serve that many people and 540 people weren't assigned to it. a hundred people assigned to one canteen seems to work.


to reduce the dumping of food that was not eaten you can download my don't throw away food mod or never go hungry mod. the only difference between the two is the never go hungry mod increases the number of ingredients a cooker can cook which incidentally also increases the number of ingredients a serving table can hold,

1. if you previously modified main.dat by using the instructions in this thread and your game works. download my vanilla mod. If not delete main.dat from the prison architect folder and verify the games steam file cache.

1aa. if you have a backup of main.dat from when you followed these instructions you can use that. this means you can ignore step 1a.

1a. if you want an easy way of reverting your changes. you can type in windows r
the run menu will appear type in %localappdata% into that and press enter

1b open up introversion mods.

1c locate my vanilla mod

1d copy all the files in data

1e open up the main.dat in the prison architect folder

1f paste the vanilla files into prison architect main.dat data folder.

2. subscribe to never go hungry (decreases the amount of times food gets dumped and increases the amount of cooked food can be cooked by one cooker) or

2a. subscribe to don't throw away food (decreases the amount of food times food gets dumped.)


2b apply the mod as your predominant mod and everything should work. to test to see if it works. start a new prison. go to prefabs. you should see a series of prefabs that say orig on them. the other prefabs are from the free power mod but you don't have to use them.

2ba.
*ths isn't exactly true but if a modder were to copy and paste the games original materials.txt it would overwrite this mod. if the mod adds anything new it won't conflict with this mod.
if you use the orig prefabs in this mod you only need to make sure that any other mods used with this mod do not use materials in their data folder. If you use a mod with materials and theyre the predominant mod. It will overwrite the rules. however, new item mods which just add new rules to allow a new item to be added are probably fine. it's only if the same rule is in two different material mods that it gets overwritten. you can see this from the fact if you modify a material name in a mod. you don't modify the name of the original material. you create a new material with a different name from the original. Although I may be wrong on that apparently it's additive. the only reason I thought it wasn't is because when I was creating a separate prefab mod that used items created in my prefab mod. the items would not show up in the mod. this is because if you create a prefab with the name of the games original prefabs the game still uses its own. its just easier to copy the quickbuilds the game uses in base language and rename them then add your own quickbuild mods then to have your quickbuilds replace the games.

in a new prison
with 34 cooks and multiple guards(if people don't get into the canteen they don't eat it also decreases build time)

81 percent of 111 inmates. 89 inmates were fed. my previous prison didn't have the sink turned on. with this mod you shouldn't need a sink but it is worth noting.
Last edited by edumacacion; 2 Dec, 2019 @ 10:10pm
< >
Showing 1-12 of 12 comments
Per page: 1530 50