[MOD 1.1.x|1.0.x]Recycling Machines

Topics and discussion about specific mods
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.14.x|MOD 0.13.9+]Recycling Machines

Post by DRY411S »

dgw wrote:I went poking about in the Lua API documentation a bit just now, and I think I hit the jackpot for this in the form of LuaBootstrap.on_configuration_changed(f): "Register a function to be run when mod configuration changes. This is called any time the game version changes, prototypes change, startup mod settings change, and any time mod versions change including adding or removing mods."

Edit: Added this particular info to the issue tracker, with details of how far back in the Factorio version history it goes (at least to 0.13).
Thanks for raising the issue. I've taken further discussion of this into the comment tracker in GitHub itself, rather than here, as I think its just a bit too technical for this topic. For those who may want to contribute, the issue is at this link.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.14.x|MOD 0.13.9+]Recycling Machines

Post by DRY411S »

DRY411S wrote:Thanks for raising the issue. I've taken further discussion of this into the comment tracker in GitHub itself, rather than here, as I think its just a bit too technical for this topic. For those who may want to contribute, the issue is at this link.
I am now closing this issue. My mod does behave correctly when mods are added to a saved game that has previously used mine. On GitHub, I am adding a new issue for the actual problem being observed.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by DRY411S »

v0.15.5
Fix: Locale missing for 3 items in factorio v0.15

For factorio v0.15: v0.15.5 (21-Jul-2017) is available on the mod portal.


For factorio v0.14: v0.14.1 (30-Aug-2016) is available on the mod portal.

With this bug fix, and with factorio v0.15 about to be set as stable (from experimental), the version of this mod which supports v0.13 of factorio is withdrawn and has been removed from the mod portal.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by DRY411S »

The next version of this mod will have 2 enhancements and 1 new feature.

Enhancement # 1 - Replace "Percentage Recycling Return" into "Number of Items Required to Recycle"

Currently, the Recycling Machine percentage is applied to the ingredients returned, rounded up. This means that for most items put into the machine, the percentage is irrelevant, and 100% of the ingredients are returned.

For example, when recycling batteries, whatever the Recycling Percentage set, you always get back 1 copper plate, 1 iron plate and 20 sulphuric acid.

The mod will be amended so that you must insert X items into the Recycling Machine to get the ingredients back for ONE of those items. This will be a startup mod setting, applied to a new game/map.

So again using batteries as an example, if instead of a Recycling Percentage of 10%, you would set "the number of items required to get the original ingredients back" = 10. This would mean that you must recycle 10 batteries to get the 1 copper plate, 1 iron plate and 20 acid.

New Feature #1 - Change the speed of the Recycling Machines

You'll (optionally) be able to change the speed of the Recycling Machines as a startup mod setting, applied to a new game/map. It seems to me that taking something apart to recover the ingredients would take longer than building (assembling) them in the first place. So you'll be able to change the speed of Recycling Machines relative to Assembly Machines. The crafting speed of the Recycling Machines will be adjusted at startup based on what you choose.
Startup Mod Settings
Startup Mod Settings
modsettings2.PNG (156.43 KiB) Viewed 9714 times
New Feature #2 - Dynamically change the Recycling Subgroups

I get more feedback than anything else about how Recycling Machines Mod clutters the Crafting GUI, and how the lists of items that could be recycled is far too long. For example, in vanilla, the Crafting GUI is amended so it looks like this.
4 recycling tabs
4 recycling tabs
intermediaterecycling.PNG (284.47 KiB) Viewed 9714 times
These extra tabs are annoying, particularly when I don't allow recycling 'in hand'. I've tried several ways to hide them from the Crafting GUI so they appear only in the Recycling Machine GUI. The only 100% successful method I found, meant a large performance hit, and was not acceptable.

I now have a 'compromise' solution. Say for example I knew I'd never (or hardly ever) want to recycle those intermediate products and science packs. In the mod runtime settings I would uncheck their subgroups as shown below.
Deselect intermediate products and science packs
Deselect intermediate products and science packs
modsettings1.PNG (544.32 KiB) Viewed 9714 times
After doing that, the next time I open the player Crafting GUI, one of the Recycling tabs has gone = less GUI clutter. :)
Less Clutter
Less Clutter
lessguiclutter.PNG (427.29 KiB) Viewed 9714 times
Later on the same map, if I did have some intermediate products to recycle, then I'd just go into the mod settings in game and recheck the box.

Unchecking ALL the boxes would mean that none of the tabs would appear in the Crafting GUI, and then I'd just check the box I wanted when I actually had something to recycle. Perfect. :)

Well, not quite perfect. This feature needs to be sensitive to what other mods are installed. At the moment, it works only with vanilla, but watch this space!
User avatar
Senacharim
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 01, 2014 4:58 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by Senacharim »

Recently migrated to Linux. This is one of my "must have" mods--sadly, and this mod doesn't seem to be working.

The machines build, but the recipes are empty--there's just a gray "search" box, no recipes.

Worth mentioning, this is on a save I copied from my old OS. I have recently started a new Test Game to see if this also happens on a new game.

If you need any questions answered as to working/save directories and such, please ask. I'd be glad to provide details.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by DRY411S »

Senacharim wrote:Recently migrated to Linux. This is one of my "must have" mods--sadly, and this mod doesn't seem to be working.

The machines build, but the recipes are empty--there's just a gray "search" box, no recipes.

Worth mentioning, this is on a save I copied from my old OS. I have recently started a new Test Game to see if this also happens on a new game.

If you need any questions answered as to working/save directories and such, please ask. I'd be glad to provide details.
Please provide any screen shots to provide more detail of what you are seeing in the UI. I confess that I've never tested this on a Linux client. However, I am familiar with Linux, and I cannot imagine that there is anything in the mod that is Windows OS-specific.

Let me know how the new game goes.
User avatar
Senacharim
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 01, 2014 4:58 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by Senacharim »

Screenshot attached. I don't have much playtime, but the moment I get recycling in the new test game I'll let you know if it's working.
Attachments
Screenshot Showing Recycling Bug
Screenshot Showing Recycling Bug
Screenshot from 2017-08-10 16-23-40.png (2.5 MiB) Viewed 9677 times
dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by dgw »

While I haven't tested on LInux specifically, I have run games with this mod on Mac, as well as Windows. For only one of the three supported platforms to exhibit a problem would be quite strange, especially since the mod API is built in Lua, which is an interpreted language (and whose interpreter runs flawlessly on all mentioned platforms).

Is the new game using Creative Mode? I surmise the recipe lists might be empty until the technology has been unlocked. (Wouldn't explain the issue with the existing save, though.)
User avatar
Senacharim
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 01, 2014 4:58 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by Senacharim »

I never do creative mode, new game is just on "normal". As soon as I know if it's the same I'll let you know.

Edit:

So, I removed the mod, loaded my save, saved again, re-added the mod, and the reloaded the save with the "new" mod and now it's working correctly.
Last edited by Senacharim on Fri Aug 11, 2017 5:31 am, edited 1 time in total.
dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by dgw »

Hmm. I only asked because the robots in that screenshot are very purple. CM uses purple for a lot of its special super-powered versions of things.
User avatar
Senacharim
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 01, 2014 4:58 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by Senacharim »

dgw wrote:Hmm. I only asked because the robots in that screenshot are very purple. CM uses purple for a lot of its special super-powered versions of things.
They're from "FactorioExtended-Logistics" (and they're stupid expensive but rather fast).

Anyway, edited the previous post to say "it's working now". Thank you for your help on this troubleshooting issue.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by DRY411S »

Senacharim wrote:Screenshot attached. I don't have much playtime, but the moment I get recycling in the new test game I'll let you know if it's working.
The screenshot tells me that, for some reason, the Recycling Machines recipes are either missing completely, or haven't been enabled correctly. (Each Recycling recipe is enabled when the equivalent 'vanilla' recipe is enabled.)
Senacharim wrote:So, I removed the mod, loaded my save, saved again, re-added the mod, and the reloaded the save with the "new" mod and now it's working correctly.
That is EXACTLY what I was going to suggest you do. :)
  1. removed the mod- forces factorio to rebuild all the recipes - the Recycling Machines recipes are not part of 'base' factorio
  2. loaded my save - the 'base' recipes are being used
  3. saved again - Yes, necessary so you can perform the next step
  4. re-added the mod - forces factorio to rebuild all the recipes - the Recycling Machine recipes become part of factorio 'base' again
  5. reloaded the save - the Recycling Machines mod migration script runs on the save, and enables all the Recycling recipes for the save to use
So that's fixed your issue, but why you had the issue in the first place is beyond my understanding.

Oh, and thanks for the feedback that this is one of your 'must have' mods. :)
User avatar
Senacharim
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 01, 2014 4:58 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by Senacharim »

DRY411S wrote:
Senacharim wrote:Screenshot attached. I don't have much playtime, but the moment I get recycling in the new test game I'll let you know if it's working.
The screenshot tells me that, for some reason, the Recycling Machines recipes are either missing completely, or haven't been enabled correctly. (Each Recycling recipe is enabled when the equivalent 'vanilla' recipe is enabled.)
Senacharim wrote:So, I removed the mod, loaded my save, saved again, re-added the mod, and the reloaded the save with the "new" mod and now it's working correctly.
That is EXACTLY what I was going to suggest you do. :)
  1. removed the mod- forces factorio to rebuild all the recipes - the Recycling Machines recipes are not part of 'base' factorio
  2. loaded my save - the 'base' recipes are being used
  3. saved again - Yes, necessary so you can perform the next step
  4. re-added the mod - forces factorio to rebuild all the recipes - the Recycling Machine recipes become part of factorio 'base' again
  5. reloaded the save - the Recycling Machines mod migration script runs on the save, and enables all the Recycling recipes for the save to use
So that's fixed your issue, but why you had the issue in the first place is beyond my understanding.

Oh, and thanks for the feedback that this is one of your 'must have' mods. :)
Sorry to steal your thunder 8-) . I was a code monkey in a previous life, and sometimes still think in those circles.
dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by dgw »

They're good circles to think in. Keeping them in your brain will serve you well, I bet, given how software is eating the world (not my phrase, but accurate).
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by DRY411S »

In summary, the fix for this issue was to switch it off and then switch it on again. The perfect IT Department solution. :lol:
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.15.x|0.14.x]Recycling Machines

Post by DRY411S »

v0.15.6
Fix: Mod does not handle recipes with no results
Enhancement: Add crafting time factor
Enhancement: Change ratios from percentages returned, to items required
Enhancement: More efficient mod startup

For factorio v0.15: v0.15.6 (24-Aug-2017) is available on the mod portal.

The add crafting time factor and change ratios enhancements are the implementations of New Feature #1 and Enhancement #1, as described at this post

These fixes and enhancements are not implemented in factorio v0.14 version
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.16.x|0.15.x|0.14.x]Recycling Machines

Post by DRY411S »

v0.16.1
Initial release for factorio 0.16. Functionally identical to v0.15.6, includes support for recycling of new v0.16 entities.

For factorio v0.16: v0.16.1 (16-Dec-2017) is available on the mod portal.
vedrit
Filter Inserter
Filter Inserter
Posts: 293
Joined: Sun Aug 03, 2014 2:25 am
Contact:

Re: [MOD 0.16.x|0.15.x|0.14.x]Recycling Machines

Post by vedrit »

It seems that you only unlock recycling recipes if you unlock the regular recipe via research. Any base or previously unlocked recipes are not available. Updated from a previous version of the mod

EDIT: Disregard. Removing, loading save, saving, re-adding, and loading did the trick.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.16.x|0.15.x|0.14.x]Recycling Machines

Post by DRY411S »

vedrit wrote:It seems that you only unlock recycling recipes if you unlock the regular recipe via research. Any base or previously unlocked recipes are not available. Updated from a previous version of the mod

EDIT: Disregard. Removing, loading save, saving, re-adding, and loading did the trick.
Thanks for the feedback. I think what you've observed is caused by me forgetting to include a migration (upgrade) script with the mod, in my rush to release it. Your actions are a good workaround, but you shouldn't have needed to do them.

I'll fix in next update.
Serenity
Smart Inserter
Smart Inserter
Posts: 1017
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: [MOD 0.16.x|0.15.x|0.14.x]Recycling Machines

Post by Serenity »

Can I add this to an existing game or does it require a new one?
Post Reply

Return to “Mods”