Page 1 of 2

[MOD_0.14.x] Compressed Materials

Posted: Sat Feb 04, 2017 6:25 am
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

Re: [MOD_0.14.x] Compressed Materials

Posted: Sat Feb 04, 2017 12:18 pm
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

Re: [MOD_0.14.x] Compressed Materials

Posted: Sat Feb 04, 2017 12:47 pm
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.

Re: [MOD_0.14.x] Compressed Materials

Posted: Sat Feb 04, 2017 2:13 pm
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.

Re: [MOD_0.14.x] Compressed Materials

Posted: Sat Feb 04, 2017 2:54 pm
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!

Re: [MOD_0.14.x] Compressed Materials

Posted: Sat Feb 04, 2017 10:50 pm
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.

Re: [MOD_0.14.x] Compressed Materials

Posted: Fri Feb 10, 2017 3:10 am
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?

Re: [MOD_0.14.x] Compressed Materials

Posted: Fri Feb 10, 2017 4:02 am
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.

Re: [MOD_0.14.x] Compressed Materials

Posted: Fri Feb 10, 2017 8:55 am
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?

Re: [MOD_0.14.x] Compressed Materials

Posted: Fri Feb 10, 2017 9:12 am
by Nexela
Probably a migration problem, I will try and have a new version out later tonight.

Re: [MOD_0.14.x] Compressed Materials

Posted: Fri Feb 10, 2017 10:02 am
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?

Re: [MOD_0.14.x] Compressed Materials

Posted: Wed Feb 15, 2017 8:26 pm
by Nexela
Updated 0.2.1 to the mod portal. Fixes any potential migration issues.

Re: [MOD_0.14.x] Compressed Materials

Posted: Thu Feb 16, 2017 1:16 am
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?

Re: [MOD_0.14.x] Compressed Materials

Posted: Thu Feb 16, 2017 5:37 am
by Nexela
Yes, I hate migrations :)

Uploaded new version which should fix the migration issue.

Re: [MOD_0.14.x] Compressed Materials

Posted: Thu Feb 16, 2017 2:56 pm
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. ..

Re: [MOD_0.14.x] Compressed Materials

Posted: Thu Feb 16, 2017 3:36 pm
by Arch666Angel
#blameNexela :D

Re: [MOD_0.14.x] Compressed Materials

Posted: Thu Feb 16, 2017 8:59 pm
by Lord_Soddy
I rather appreciate all the work and effort invested by him/her into this great mod :-)

Re: [MOD_0.14.x] Compressed Materials

Posted: Fri Feb 17, 2017 1:10 am
by Nexela
Would it be possible for you to upload your map/mods To help me narrow this down.

Re: [MOD_0.14.x] Compressed Materials

Posted: Fri Feb 17, 2017 2:31 am
by Lord_Soddy
Sure, what exactly do you need?

Re: [MOD_0.14.x] Compressed Materials

Posted: Fri Feb 17, 2017 2:38 am
by Nexela
Zip up the save and mods to dropbox/google drive and post a link here (or in PM if you prefer).