[MOD_0.14.x] Compressed Materials

Topics and discussion about specific mods
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

[MOD_0.14.x] Compressed Materials

Post by Nexela »

Compressed Materials
Authors: Theradman221, Nexela
Description:
This mod is for anyone who loves to store large amounts of ore/items. Every item in the game with a stack size greater than 1 can be compressed.
one stack of items = one compressed item, does dynamically change recipes based on item's stack size.
Dynamic recipes so many if not all other mods are supported.
if you love filling thousands of chests with ore why not fill thousands with compressed ore?
default stack size of all compressed items is 50 though that can be changed.

Details:
Factorio Version: 0.14
Released: 2/3/2017 (in WIP mods since around 5/16)
Dependencies: None
License: https://opensource.org/licenses/MIT

Current version
https://mods.factorio.com/mods/Nexela/compressor
long description
change log
known issues
Last edited by Nexela on Thu Feb 16, 2017 5:45 am, edited 3 times in total.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by orzelek »

Any idea how this mod will interact with big bags and changes to stack sizes?
If it would compress 600 plates into one item with stack of 150... that could get interesting and might actually get hard to use.

I've been looking at something like this to reduce amount of belts needed to carry materials by boxing or compressing them :D
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Nexela »

Should work no problem.

1 full stack of items will compress to 1 compressed item.

Just remember the bigger the stack, the longer it takes to compress.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by orzelek »

Main thing for me would be ability to specify compression of less then full stack. I see that currently I'd need to compress 600 ore to one item :D

Another thing - is it by design that all compressed ores are white or it's a bug somewhere?

I'm using AnonyMods and lots of small utility mods. Ore pictures match the original on compressed items but they are all white. It's for AnonyMods ores only. Uranium from Nucular has proper color on compressed ore icon. One hint might be the fact that AnonyMods uses tinting on it's icons to add color and base icons are white.

This seems to fix it:
Add this before uncompress recipe:

Code: Select all

			local iconTint = nil
			if item.icons and item.icons[1] then
				iconTint = item.icons[1].tint
			end
Then change two icon definition lines to this:

Code: Select all

                    {icon = item.icon or item.icons[1].icon,tint = iconTint}
This doesn't fix the barelling/unbarelling icons - it seems they have multiple icon layers from start so new icon would need to copy also further layers.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Nexela »

orzelek wrote:This seems to fix it:
I'll push that fix in tonight, also possibly a fix for items with multiple icons (angels barrels etc)

Can't wait for .15 scale/shift on icons, Will make building these icons to look a lot better!
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by orzelek »

I made small config option locally to allow for reduction of compression stack for items with big stack (like if stack is more then 200 divide by 3 - thats set up to match my bigbags config).
I tried to drop my big bags stack size increase but it's an interesting endeavor when in middle of game.. very interesting item explosion from inventory. And I like to hand craft buildings and stuff so lower stacks mean carrying much less in inventory.
Lord_Soddy
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Feb 10, 2017 2:49 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Lord_Soddy »

Nice mod indeed, but it appears that I fail to find the option for compressing unrefined ore and iron/ copper plates. Might you be so kind as to help me out with that on?
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Nexela »

Lord_Soddy wrote:Nice mod indeed, but it appears that I fail to find the option for compressing unrefined ore and iron/ copper plates. Might you be so kind as to help me out with that on?
Have you researched the appropriate technologies? Off the top of my head I think ore compression is the first technology and items like plates are the second or third tier.
Lord_Soddy
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Feb 10, 2017 2:49 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Lord_Soddy »

Hi Nexela, yeah, I have researched down the whole tech line. In the first tech step, only automatic compressors and uranium compression are enabled, and in the second tech, plenty of items such as wheel gears, engines and fluid barrels are enabled, but still no additional ores or plates. Also the later tech steps do not enable this option. Do I make something wrong?
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Nexela »

Probably a migration problem, I will try and have a new version out later tonight.
Lord_Soddy
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Feb 10, 2017 2:49 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Lord_Soddy »

Great, thank you very much. Coal and solid fuel compressing seems to be missing as well. If time allows, could you please check the whole tier 0 and tier 1 lines?
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Nexela »

Updated 0.2.1 to the mod portal. Fixes any potential migration issues.
Lord_Soddy
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Feb 10, 2017 2:49 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Lord_Soddy »

Great, thank you. But now I get the following error message when trying to start the game:

Error while applying migration: Compressed Materials: migration_2.0.1.lua

Cannot execute command. Error: [string "for _, force in pairs(game.forces) do..."]:6: attempt to index field 'recipe' (a string value)


Any idea?
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Nexela »

Yes, I hate migrations :)

Uploaded new version which should fix the migration issue.
Lord_Soddy
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Feb 10, 2017 2:49 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Lord_Soddy »

Well, sorry to be a party pooper, but the basic raw materials still cant be compressed. The first level of research enables the compression of Fluorite and Uraninite, but that's it. ..
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Arch666Angel »

#blameNexela :D
Lord_Soddy
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Feb 10, 2017 2:49 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Lord_Soddy »

I rather appreciate all the work and effort invested by him/her into this great mod :-)
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Nexela »

Would it be possible for you to upload your map/mods To help me narrow this down.
Lord_Soddy
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Feb 10, 2017 2:49 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Lord_Soddy »

Sure, what exactly do you need?
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD_0.14.x] Compressed Materials

Post by Nexela »

Zip up the save and mods to dropbox/google drive and post a link here (or in PM if you prefer).
Post Reply

Return to “Mods”