Helfima / helmod

Factorio Mod
149 stars 64 forks source link

Linked block with multiple product might not get right ratio ? #537

Open Paraplegix opened 2 weeks ago

Paraplegix commented 2 weeks ago

Tested using Helmod 1.0.11 (pulled from repo) With 10 Steel plate requested from Parent Block (PB) and the following setup of the linked Sub Block (SB): image (Note: the block IS linked, but the button doesn't show as "on" in SB no matter where I toggle it, but still show in "parent view", another bug ?) In there, only the steel in PB is set.

1) If I set the iron to any amount in SB, the steel becomes 0 both in PB and SB. For example I set 5 Iron : image image

2) If I set iron to any amount in PB (from start so no iron in SB), the steel stay at 10 and iron stay at 0: image

3) If I set iron in both PB and SB, steel becomes 0 and iron changes in both parent and sb as requested. For example 10 iron in PB and 5 in SB image

4) If I set iron in PB, and steel and iron in SB, iron will be shown correctly in PB but will also show steel. For example 10 iron in PB, 10 steel and 5 iron in SB will show 20 steel and 10 iron in SB: image

5) Similarly, if I set iron in both PB and SB, and Steel in both PB and SB, then all products can be requested from parent, but on the exact ratio set in SB. For example, with 40 steel and 10 iron in PB, 10 steel and 5 iron in SB, it will show correct value in SB, but 40 steel and 20 iron ins PB : image

Imho linked block should completely override values inside blocks.

Helfima commented 1 week ago

you must see a sub-block same as recipe for the parent block if you not set something the solver take a value if you set a value you must set other value if necessary

Paraplegix commented 1 week ago

Yes but sometimes the "requests" are not set by me but by other recipes.

For example if I have a line dedicated to belt crafting. You have yellow belt which is iron plate and gear, and yellow underground belt is yellow belt + iron plate.

If I want to keep iron plates and gears in a linked sub block because that's "base material", that oblige me to manually maintain the correct input in the sub block. I honestly don't think that's user-friendly.

Something that could look like this : image image (Screenshot taken with the dev branch)

I've tried adding another iron plate recipe in the sub block at the top, switching to matrix solver etc.. But the sublock only provided the electronic circuits and the gears. Never the iron plate.

If I want the sub block to provide iron plate I currently have to go inside the block, and manually set a value to all 3 of those elements for them to be "requested" by the parent block 😢