[MOD 0.13.0+|v0.12]Recycling Machines
Re: [MOD 0.12.33+]Recycling Machines
Well, what chemical reaction can't be reversed with a little finagling?
Take Water, for example. You can split it into hydrogen and oxygen through application of electricity, or you can put them back together through application of heat.
Plastics are often melted down for recycling, often to form new items that are made of plastic as well, but sometimes are broken down into the composite hydrogen and carbon (and oxygen, sometimes), to be shaped into other forms of plastic or rubber, or sometimes other chemicals entirely. Sure, it takes a lot more energy to reverse a reaction such as plastics-making, but it's been done. Now, I'm not sure about getting the carbon back in COAL form, but certainly in a burnable form; perhaps if a recipe requires coal to make it, such as plastic, you could have your script which automatically makes the recycling-recipe output solid-fuel instead.
I'm not saying everything should have a recycler - the oil refinery, for example, should not. Heh, imagine mixing the light and heavy oils with petrol to get crude oil and water back. No, that would be a bad idea. But the chemical plant does seem like a likely candidate to me.
Take Water, for example. You can split it into hydrogen and oxygen through application of electricity, or you can put them back together through application of heat.
Plastics are often melted down for recycling, often to form new items that are made of plastic as well, but sometimes are broken down into the composite hydrogen and carbon (and oxygen, sometimes), to be shaped into other forms of plastic or rubber, or sometimes other chemicals entirely. Sure, it takes a lot more energy to reverse a reaction such as plastics-making, but it's been done. Now, I'm not sure about getting the carbon back in COAL form, but certainly in a burnable form; perhaps if a recipe requires coal to make it, such as plastic, you could have your script which automatically makes the recycling-recipe output solid-fuel instead.
I'm not saying everything should have a recycler - the oil refinery, for example, should not. Heh, imagine mixing the light and heavy oils with petrol to get crude oil and water back. No, that would be a bad idea. But the chemical plant does seem like a likely candidate to me.
Re: [MOD 0.12.33+]Recycling Machines
Just to confirm that I've now checked that this mod is compatible with the Marathon Mod.
Re: [MOD 0.12.33+]Recycling Machines
Thanks for the idea!
Appreciate the mod, really like the thought in it. I feel a 100% return is too grateful though. I really would rather a configurable amount/percent.
I just enabled it in 0.12.35 64-bit and found an existing world doesn't allow you to craft the recycling machines. I expect completing the research would enable it as it should. This is past research, and didn't have access to craft the recycler.
Can you add a check for if the research was already finished, then enable the machine?
thanks!
Appreciate the mod, really like the thought in it. I feel a 100% return is too grateful though. I really would rather a configurable amount/percent.
I just enabled it in 0.12.35 64-bit and found an existing world doesn't allow you to craft the recycling machines. I expect completing the research would enable it as it should. This is past research, and didn't have access to craft the recycler.
Can you add a check for if the research was already finished, then enable the machine?
thanks!
Re: [MOD 0.12.33+]Recycling Machines
Thanks for the feedback.inick wrote:Thanks for the idea!
Appreciate the mod, really like the thought in it. I feel a 100% return is too grateful though. I really would rather a configurable amount/percent.
I just enabled it in 0.12.35 64-bit and found an existing world doesn't allow you to craft the recycling machines. I expect completing the research would enable it as it should. This is past research, and didn't have access to craft the recycler.
Can you add a check for if the research was already finished, then enable the machine?
thanks!
This is my first factorio mod so I'm learning as I go, but I'm pretty sure that I cannot enable it in an existing world. But I'll do so more reading around the start up phases in the game, and see if I can improve it.
Regarding 100% return, I'm also think about a GUI for that, but again as I understand it, I cannot present a GUI to the user until a world is fully created, and again that's too late to change any recipes.
If you wish to manually edit the percentage return, you can unzip the mod in the mods folder, put the zip file somewhere safe out of the way, and in the unzip, edit constants.lua. The next time you start a new world, the new percentage will be used.
Re: [MOD 0.12.33+]Recycling Machines
OK! I was wrong about not being able to use the mod in a previously saved world. New version now in test that allows this.DRY411S wrote:Thanks for the feedback.inick wrote:Thanks for the idea!
Appreciate the mod, really like the thought in it. I feel a 100% return is too grateful though. I really would rather a configurable amount/percent.
I just enabled it in 0.12.35 64-bit and found an existing world doesn't allow you to craft the recycling machines. I expect completing the research would enable it as it should. This is past research, and didn't have access to craft the recycler.
Can you add a check for if the research was already finished, then enable the machine?
thanks!
This is my first factorio mod so I'm learning as I go, but I'm pretty sure that I cannot enable it in an existing world. But I'll do so more reading around the start up phases in the game, and see if I can improve it.
Regarding 100% return, I'm also think about a GUI for that, but again as I understand it, I cannot present a GUI to the user until a world is fully created, and again that's too late to change any recipes.
If you wish to manually edit the percentage return, you can unzip the mod in the mods folder, put the zip file somewhere safe out of the way, and in the unzip, edit constants.lua. The next time you start a new world, the new percentage will be used.
Still a way to go with a version that lets you choose the recycling return that is always 100% at the moment.
Re: [MOD 0.12.33+]Recycling Machines
DRY411S wrote:
OK! I was wrong about not being able to use the mod in a previously saved world. New version now in test that allows this.
Still a way to go with a version that lets you choose the recycling return that is always 100% at the moment.
I'll throw it on and play with your testing version if you wanna link me. I'm not a fast player and often have hours of "I hate this layout. Why do I keep doing this style layout to myself?!" Let me know if you want another tester!
--iNick
Re: [MOD 0.12.33+]Recycling Machines
You can always download (at your own risk) an unreleased test version by downloading the latest source code (NOT the release zipfile) from https://github.com/DRY411S/Recycling-Machinesinick wrote:DRY411S wrote:
OK! I was wrong about not being able to use the mod in a previously saved world. New version now in test that allows this.
Still a way to go with a version that lets you choose the recycling return that is always 100% at the moment.
I'll throw it on and play with your testing version if you wanna link me. I'm not a fast player and often have hours of "I hate this layout. Why do I keep doing this style layout to myself?!" Let me know if you want another tester!
--iNick
The latest 'master' branch code up there is always tested by me, but not always built into the release at the top of this topic.
That's not for the faint-hearted though, you need to know how to name the mod folder the same as the info.json file.
Re: [MOD 0.12.33+]Recycling Machines
<SNIP>DRY411S wrote:You can always download (at your own risk) an unreleased test version by downloading the latest source code (NOT the release zipfile) from https://github.com/DRY411S/Recycling-Machinesinick wrote:DRY411S wrote:
OK! I was wrong about not being able to use the mod in a previously saved world. New version now in test that allows this.
Still a way to go with a version that lets you choose the recycling return that is always 100% at the moment.
I'll throw it on and play with your testing version if you wanna link me. I'm not a fast player and often have hours of "I hate this layout. Why do I keep doing this style layout to myself?!" Let me know if you want another tester!
--iNick
The latest 'master' branch code up there is always tested by me, but not always built into the release at the top of this topic.
Yea see... I know what github is, I understand it's purpose, but I haven't the faintest of ideas, clues, suggestions, howtos, or overall plain knowledge on how to leverage "building" from github. I don't get it, and don't visit github often enough to even think it's worth my time learning. Guess I'll wait for a release. Thanks, though.
Re: [MOD 0.12.33+]Recycling Machines
This is now available in v0.12.32, just released. The first post in the topic is updated with the new download location, and you can also download it by clicking hereinick wrote:<snip>
I just enabled it in 0.12.35 64-bit and found an existing world doesn't allow you to craft the recycling machines. I expect completing the research would enable it as it should. This is past research, and didn't have access to craft the recycler.
Can you add a check for if the research was already finished, then enable the machine?
thanks!
Re: [MOD 0.12.33+]Recycling Machines
I believe that I cannot make the recycling return percentage interactive.
- The recycling recipes are built during the 'data' phase when they cannot access any global variables.
- I can present the player with a box where they can choose a new percentage only in the 'control' phase, when the recipes are now built, and read-only.
- I could store this new percentage in a global and force the 'data' phase again.
- But the data phase cannot read the global....
- doom loop
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [MOD 0.12.33+]Recycling Machines
That's a limitation of factorio, if you want it configurable you need to do it in the data phase to modify the entities. A way I could think of would be just to create 3 sets of recipes with each set having a different yield, a box for choosing when stating the game and then enabling/disabling the recipes on_researched when a dummy technology is researched. But haven't tried anything like that.DRY411S wrote:I believe that I cannot make the recycling return percentage interactive.
If any modding experts can point me the right way, I'll have a go, but right now I cannot figure out a way.
- The recycling recipes are built during the 'data' phase when they cannot access any global variables.
- I can present the player with a box where they can choose a new percentage only in the 'control' phase, when the recipes are now built, and read-only.
- I could store this new percentage in a global and force the 'data' phase again.
- But the data phase cannot read the global....
- doom loop
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
Re: [MOD 0.12.33+]Recycling Machines
Thanks for the feedback. This would work I think. My mod has an event handler for research_finished which I could adapt. Currently it enables the recycling recipe every time the 'real' recipe research is complete.Arch666Angel wrote:That's a limitation of factorio, if you want it configurable you need to do it in the data phase to modify the entities. A way I could think of would be just to create 3 sets of recipes with each set having a different yield, a box for choosing when stating the game and then enabling/disabling the recipes on_researched when a dummy technology is researched. But haven't tried anything like that.DRY411S wrote:I believe that I cannot make the recycling return percentage interactive.
If any modding experts can point me the right way, I'll have a go, but right now I cannot figure out a way.
- The recycling recipes are built during the 'data' phase when they cannot access any global variables.
- I can present the player with a box where they can choose a new percentage only in the 'control' phase, when the recipes are now built, and read-only.
- I could store this new percentage in a global and force the 'data' phase again.
- But the data phase cannot read the global....
- doom loop
I started working in IT when 32K of memory was a MASSIVE amount. It's hard to get past the idea that I must occupy memory with a bunch of recipes that are never used.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [MOD 0.12.33+]Recycling Machines
Yeah that's not very efficient and on another note, there is probably the issue that this is not multiplayer compatible.DRY411S wrote:Thanks for the feedback. This would work I think. My mod has an event handler for research_finished which I could adapt. Currently it enables the recycling recipe every time the 'real' recipe research is complete.Arch666Angel wrote:That's a limitation of factorio, if you want it configurable you need to do it in the data phase to modify the entities. A way I could think of would be just to create 3 sets of recipes with each set having a different yield, a box for choosing when stating the game and then enabling/disabling the recipes on_researched when a dummy technology is researched. But haven't tried anything like that.DRY411S wrote:I believe that I cannot make the recycling return percentage interactive.
If any modding experts can point me the right way, I'll have a go, but right now I cannot figure out a way.
- The recycling recipes are built during the 'data' phase when they cannot access any global variables.
- I can present the player with a box where they can choose a new percentage only in the 'control' phase, when the recipes are now built, and read-only.
- I could store this new percentage in a global and force the 'data' phase again.
- But the data phase cannot read the global....
- doom loop
I started working in IT when 32K of memory was a MASSIVE amount. It's hard to get past the idea that I must occupy memory with a bunch of recipes that are never used.
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
Re: [MOD 0.12.33+]Recycling Machines
Yes that too. Maybe I should just publish 3 different versions
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [MOD 0.12.33+]Recycling Machines
Or just add a config and do it in the data phaseDRY411S wrote:Yes that too. Maybe I should just publish 3 different versions
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
Re: [MOD 0.12.33+]Recycling Machines
Except that means the users unzipping and editing. I don't like it. The data code already does 'require' from a config file though.Arch666Angel wrote:Or just add a config and do it in the data phaseDRY411S wrote:Yes that too. Maybe I should just publish 3 different versions
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [MOD 0.12.33+]Recycling Machines
What I did: Create trigger mods, so the main mod will change configs depending on which trigger mod is active and they can be switched on and off in the mod menu. the trigger mod only really needs an empty table which you can check in the main mod.DRY411S wrote:Except that means the users unzipping and editing. I don't like it. The data code already does 'require' from a config file though.Arch666Angel wrote:Or just add a config and do it in the data phaseDRY411S wrote:Yes that too. Maybe I should just publish 3 different versions
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
Re: [MOD 0.12.33+]Recycling Machines
Good tip thank you. Which of your mods use this approach so I can take a look?
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [MOD 0.12.33+]Recycling Machines
The ore mod uses this system, did come with it because I found no other way to detect RSO mod.DRY411S wrote:Good tip thank you. Which of your mods use this approach so I can take a look?
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
Re: [MOD 0.12.33+]Recycling Machines
So I understand the logic (in your infinite ores data.lua), but I don't understand where the 'triggers' are being set . Could you help me understand please?Arch666Angel wrote:The ore mod uses this system, did come with it because I found no other way to detect RSO mod.DRY411S wrote:Good tip thank you. Which of your mods use this approach so I can take a look?