[MOD 0.11.14+] Blueprint String

Topics and discussion about specific mods
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.11.3+] Blueprint String

Post by DaveMcW »

I spent the past week porting gzip to lua.

We now have automatic compression for blueprints!

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [0.11.3+] Blueprint String

Post by JamesOFarrell »

DaveMcW wrote:I spent the past week porting gzip to lua.

We now have automatic compression for blueprints!
That is awesome. amazing work DaveMcW.

User_Name
Fast Inserter
Fast Inserter
Posts: 142
Joined: Sun May 18, 2014 2:07 pm
Contact:

Re: [0.11.3+] Blueprint String

Post by User_Name »

DaveMcW wrote:I spent the past week porting gzip to lua.

We now have automatic compression for blueprints!
:o :shock:
Attach your blueprints to forum posts with Foreman or Blueprint string.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.11.14] Blueprint String

Post by DaveMcW »

Updated for Factorio 0.11.14.

I added support for line breaks in blueprint strings. This allows people to break up long lines of text to get around phpbb's 10,000 character line limit.

I am planning to add line breaks by default, but I will wait a bit to give everyone a chance to upgrade. I also need to figure out the best line length. 80 characters? 200 characters? User-defined?

Jos
Inserter
Inserter
Posts: 30
Joined: Mon Jun 16, 2014 5:07 am
Contact:

Re: [0.11.14] Blueprint String

Post by Jos »

Excellent work!
This is the most stable tool for sharing blueprint!
What's more, it is really simple and clear to use!

NotABiter
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri Nov 14, 2014 9:05 am
Contact:

Re: [0.11.14] Blueprint String

Post by NotABiter »

DaveMcW wrote:This mod has strict error checking, so bad strings will not crash your game or mess it up.
But good strings can bring down your whole computer. :lol:

Just posting here to let you know I filed this bug: import "large" blueprints -> computer locks up

In short, something is up with the memory usage. If I import a blueprint with 1,024 items, I see ~38KB of memory used per item (which seems kind of high to me -- 38 bytes would seem more than enough, but whatever - "modern" software is what it is). When I import a blueprint with 2,048 items the per item use goes through the roof (running my machine out of memory when it gets to somewhere around 1MB per item). The massively higher per item memory usage makes it seem that something is broken somewhere, but I have no idea whether the issue is in the blueprint string mod or in Factorio itself.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.11.14] Blueprint String

Post by DaveMcW »

Thanks, I added a workaround in version 0.0.7.

Using indexes increases blueprint size by up to 50%, but at least it doesn't freeze.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.11.14] Blueprint String

Post by DaveMcW »

In version 0.0.8, I removed all the indexes and entitynumbers. This cuts blueprint size in half.

Newly generated blueprints require the new import function, so they are not compatible with previous versions.

Jos
Inserter
Inserter
Posts: 30
Joined: Mon Jun 16, 2014 5:07 am
Contact:

Re: [0.11.14] Blueprint String

Post by Jos »

Thank you for your excellent work again! :D

This is my translation text for zh-CN:

Code: Select all

main-button=蓝图代码
save-all=蓝图->代码
load-string=代码->蓝图
textbox-caption=代码:
blueprints-saved=已保存__1__个蓝图的代码至 'script-output/blueprint-string'
blueprints-not-saved=未找到可保存的蓝图.
no-empty-blueprint=没有空蓝图, 无法加载代码.
unknown-format=这不是有效的蓝图代码.
no-string=请将蓝图代码粘贴至代码框.
blueprint-api-error=蓝图错误: __1__
blueprint-icon-error=蓝图图标错误: __1__

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.11.14+] Blueprint String

Post by DaveMcW »

Thanks, I added the translation in version 0.0.9.

Giz
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Apr 03, 2015 10:27 am
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by Giz »

Hi. I'm from Russia. Sorry for my English. :)
Really like your mod.
Is it possible to add to the mod the opportunity to replace old things with new ones? For example transport belt, assembling machine, furnace? Also is it possible to make the ability to completely remove from blueprint objects like electric pole, chests and other ?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by DaveMcW »

It is possible, but that is not the goal of my mod. You are welcome to include my mod in a bigger mod that does more.

This mod has started doing some blueprint editing.

Giz
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Apr 03, 2015 10:27 am
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by Giz »

DaveMcW wrote:It is possible, but that is not the goal of my mod. You are welcome to include my mod in a bigger mod that does more.

This mod has started doing some blueprint editing.
Thanks!

Leveller
Inserter
Inserter
Posts: 44
Joined: Fri Mar 06, 2015 3:37 pm
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by Leveller »

I really cant find the output folder when saving all blueprints.

I got the .zip version so installed och d:\games\factorio

Its not in the mods, saves etc. Searched whole computer for script-output but cannot find it.

User avatar
MasterBuilder
Filter Inserter
Filter Inserter
Posts: 348
Joined: Sun Nov 23, 2014 1:22 am
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by MasterBuilder »

Leveller wrote:I really cant find the output folder when saving all blueprints.

I got the .zip version so installed och d:\games\factorio

Its not in the mods, saves etc. Searched whole computer for script-output but cannot find it.
If that's where you installed it (and the exe is in d:\games\factorio\bin\xxx\Factorio.exe) then your script output should simply be:

Code: Select all

d:\games\factorio\script-output
Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.

jerrycheng
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Apr 21, 2015 7:53 pm
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by jerrycheng »

I can't find the output folder either. Could you please check the compatibility between 0.11.21 version and blueprint-string 1.0.0?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by DaveMcW »

script-output and mods folder are always in the same place.

jerrycheng
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Apr 21, 2015 7:53 pm
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by jerrycheng »

DaveMcW wrote:script-output and mods folder are always in the same place.
I knew the output location, but the file just did not appear.
However blueprint String 1.0.0 did work with the compressed version Factorio.
As a result of it, it is assumed that the problem is related to the environment variable.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by Choumiko »

I had trouble with underground belts being messed up after importing a string.
Changing line 87 in blueprintstring.lua to

Code: Select all

    if (entity.type ~= "input" and entity.type ~= "output") then
      entity.type = nil
    end
fixed it. Won't work for already exported blueprints though

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3705
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [MOD 0.11.14+] Blueprint String

Post by DaveMcW »

Thanks, it is fixed in version 1.0.1.

Post Reply

Return to “Mods”