Increase assembling machine productivity with infinite technology

Place to get help with not working mods / modding interface.
Post Reply
solmyr
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Dec 29, 2020 9:00 pm
Contact:

Increase assembling machine productivity with infinite technology

Post by solmyr »

Is it possible to increment the base productivity of assembling machines with an infinite technology?

My current understanding is that this is not possible because it can only be changed through read-only prototypes.

Thank you

User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 769
Joined: Sun May 07, 2017 10:16 am
Contact:

Re: Increase assembling machine productivity with infinite technology

Post by ickputzdirwech »

solmyr wrote:
Tue Dec 29, 2020 9:05 pm
Is it possible to increment the base productivity of assembling machines with an infinite technology?
It is, as you said, not possible, because the prototype definitions are read only. You could try the following workaround however:

Create several copies of the assembling machine prototypes with increasing base_productivity in the data stage. Also create matching technologies. Then you can create a script in control lua, that on_research_finished replaces every assembling machine with the next tier. This doesn’t work infinitely of course, but depending on the research cost it pretty much will be.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write

solmyr
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Dec 29, 2020 9:00 pm
Contact:

Re: Increase assembling machine productivity with infinite technology

Post by solmyr »

Could you provide an example or reference for how I would "replaces every assembling machine with the next tier"?

Thank you

solmyr
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Dec 29, 2020 9:00 pm
Contact:

Re: Increase assembling machine productivity with infinite technology

Post by solmyr »

ickputzdirwech wrote:
Wed Dec 30, 2020 8:16 am
Then you can create a script in control lua, that on_research_finished replaces every assembling machine with the next tier.
Could you provide an example or reference for how I would "replaces every assembling machine with the next tier"?

Thank you

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Increase assembling machine productivity with infinite technology

Post by ptx0 »

solmyr wrote:
Fri Jan 01, 2021 3:03 pm
Could you provide an example or reference for how I would "replaces every assembling machine with the next tier"?

Thank you
see the code for Alien Loot Economy mod that does this with hypermodules.

Post Reply

Return to “Modding help”