[SOLVED] Production Scrap 2 - Issue with handcrafting

Place to get help with not working mods / modding interface.
Post Reply
Splicer9
Inserter
Inserter
Posts: 29
Joined: Sun May 06, 2018 6:28 pm
Contact:

[SOLVED] Production Scrap 2 - Issue with handcrafting

Post 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!
Last edited by Splicer9 on Tue May 22, 2018 11:05 pm, edited 2 times in total.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post by steinio »

Image

Transport Belt Repair Man

View unread Posts

Splicer9
Inserter
Inserter
Posts: 29
Joined: Sun May 06, 2018 6:28 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post 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

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post 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 

Splicer9
Inserter
Inserter
Posts: 29
Joined: Sun May 06, 2018 6:28 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post 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...

Splicer9
Inserter
Inserter
Posts: 29
Joined: Sun May 06, 2018 6:28 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post 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.
Last edited by Splicer9 on Mon May 21, 2018 9:18 pm, edited 1 time in total.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post 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.

User avatar
DellAquila
Inserter
Inserter
Posts: 48
Joined: Fri Mar 16, 2018 2:54 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post 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
screenshot.14.png (420.09 KiB) Viewed 3533 times
Instead of the number, it stays in blank, but we can make it

User avatar
DellAquila
Inserter
Inserter
Posts: 48
Joined: Fri Mar 16, 2018 2:54 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post by DellAquila »

i release the v0.0.5 to tests! Thanks!

Splicer9
Inserter
Inserter
Posts: 29
Joined: Sun May 06, 2018 6:28 pm
Contact:

Re: Production Scrap 2 - Issue with handcrafting

Post by Splicer9 »

I think you fixed it man ! :D excellent work, thanks!

Post Reply

Return to “Modding help”