Page 1 of 1
[SOLVED] Production Scrap 2 - Issue with handcrafting
Posted: Sun May 13, 2018 2:08 pm
by Splicer9
Hello all. I enjoy this mod that DellAquila made but it seems that a side effect of having it enabled is that it seemingly "disables" handcrafting from creating the intermediates needed for an item automatically. For example, to make a steam engine, I just need to have enough iron plates usually but now I'm required to craft all of the intermediates needed first instead of just having the raw plates and the game automatically making the pipes and gears needed to make the steam engine. I take it this behavior is caused because of the scrap some of the items create obviously. Any insight would be appreciated, the author is aware of this but isn't sure how to fix this and is busy with many many other mods. Thanks!
Re: Production Scrap 2 - Issue with handcrafting
Posted: Sun May 13, 2018 5:30 pm
by steinio
Re: Production Scrap 2 - Issue with handcrafting
Posted: Sun May 13, 2018 6:46 pm
by Splicer9
Thank you for that, I think thats the right direction to look at. I dont know much about programming, but this is how he has his recipe changing setup for all of the items his mod covers:
data.raw["recipe"]["iron-plate"].results = {{name = "iron-plate",probability = 0.94,amount = 1},{name = "iron-plate-scrap",probability = 0.06,amount = 1}}
I tried to add that parameter you pointed out like this:
data.raw["recipe"]["iron-plate"].results = {{name = "iron-plate",probability = 0.94,amount = 1, allow_as_intermediate = true, allow_intermediates = true},{name = "iron-plate-scrap",probability = 0.06,amount = 1 }}
I didnt crash my game at all but it also didnt have any effect lol, Im a total noob. I think my problem is I shouldnt put it in the .results part
Re: Production Scrap 2 - Issue with handcrafting
Posted: Sun May 13, 2018 7:28 pm
by darkfrei
Splicer9 wrote:Thank you for that, I think thats the right direction to look at. I dont know much about programming, but this is how he has his recipe changing setup for all of the items his mod covers:
data.raw["recipe"]["iron-plate"].results = {{name = "iron-plate",probability = 0.94,amount = 1},{name = "iron-plate-scrap",probability = 0.06,amount = 1}}
I tried to add that parameter you pointed out like this:
data.raw["recipe"]["iron-plate"].results = {{name = "iron-plate",probability = 0.94,amount = 1, allow_as_intermediate = true, allow_intermediates = true},{name = "iron-plate-scrap",probability = 0.06,amount = 1 }}
I didnt crash my game at all but it also didnt have any effect lol, Im a total noob. I think my problem is I shouldnt put it in the .results part
Code: Select all
data.raw["recipe"]["iron-plate"].results = {{name = "iron-plate", probability = 0.94, amount = 1}, {name = "iron-plate-scrap", probability = 0.06, amount = 1 }}
data.raw["recipe"]["iron-plate"].allow_as_intermediate = true
data.raw["recipe"]["iron-plate"].allow_intermediates = true
Re: Production Scrap 2 - Issue with handcrafting
Posted: Sun May 13, 2018 7:34 pm
by Splicer9
Ha, so funny, I just tried it that way (finally figured out it needed its own line):
Code: Select all
data.raw["recipe"]["iron-plate"].allow_intermediates=true
data.raw["recipe"]["pipe"].allow_intermediates=true
data.raw["recipe"]["pipe-to-ground"].allow_intermediates=true
data.raw["recipe"]["iron-plate"].allow_as_intermediate=true
data.raw["recipe"]["pipe"].allow_as_intermediate=true
data.raw["recipe"]["pipe-to-ground"].allow_as_intermediate=true
This is my test code so when I do a new game to test I cheat in just the plates and hope that will illuminate the pipe to ground recipe (meaning it will make the pipes for me). Unfortunately this code didnt work either for some reason. Must be more going on but this mod is written really straight forward and this seems like the right code...
Re: Production Scrap 2 - Issue with handcrafting
Posted: Sat May 19, 2018 4:13 pm
by Splicer9
*Bump* Sorry but I havent been able to remedy this issue and I think its beyond my understanding. I fear that handcrafting will not be possible with this mod when items like iron plates for example having a 6% chance of dropping scrap instead of the plate itself upon crafting.
Re: Production Scrap 2 - Issue with handcrafting
Posted: Sat May 19, 2018 4:40 pm
by darkfrei
I think that here must be some parallel recipes: You can craft some items fast and have ca. 6% scrap OR craft this item with 100% probability but much slower, 20 times must be enough.
Re: Production Scrap 2 - Issue with handcrafting
Posted: Tue May 22, 2018 9:00 pm
by DellAquila
I'm trying to solve it like this...
Im using the code you give me : allow_intermediates=true ; and creating a hidden recipe only available for hand crafting for every intermediate item:
{
type = "recipe",
name = "copper-cable-hidden",
enabled = true,
ingredients = {{"copper-plate", 1}},
category = "hand-crafting",
result = "copper-cable",
result_count = 2,
hidden = true,
allow_as_intermediate = true,
allow_intermediates = true,
},
all the items can be made now by handcrafting if you have the materials, but the icon when we go to produce in handcrafting shows like we cant:

- screenshot.14.png (420.09 KiB) Viewed 4292 times
Instead of the number, it stays in blank, but we can make it
Re: Production Scrap 2 - Issue with handcrafting
Posted: Tue May 22, 2018 9:02 pm
by DellAquila
i release the v0.0.5 to tests! Thanks!
Re: Production Scrap 2 - Issue with handcrafting
Posted: Tue May 22, 2018 11:04 pm
by Splicer9
I think you fixed it man !

excellent work, thanks!