[MOD 0.13.X] Killkrog's Blueprint Manager

Topics and discussion about specific mods
User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

[MOD 0.13.X] Killkrog's Blueprint Manager

Post by Killkrog »

This post only contains the manual for my mod.
For the rest of the description, please refer to the mod portal or click here.

Manual
Area 1 (in attached image) from left to right:
  • Add
    • Click while holding a blueprint or blueprint book and it will save it in the list. Should you not have set the label of the blueprint or blueprint book, a popup will appear to ask you for a name.
    • Click without holding a blueprint or blueprint book to make a popup appear where you can enter a string that you want to import.
  • Export All: Click to export all blueprints currently in your list.
  • Load All: Click to make a popup appear where you can enter and import the string that was previously exported by the "Export All" button.
  • Repair: Click while holding a blueprint from versions before 0.12.32 and it will be repaired. Make sure to re-save the blueprint!
  • Flip Horizontally: Click while holding a blueprint or a blueprint book with a blueprint in the active slot to flip it horizontally. (There is also a hotkey for this.)
  • Flip Vertically: Click while holding a blueprint or a blueprint book with a blueprint in the active slot to flip it vertically. (There is also a hotkey for this.)
Area 2 (in attached image) from left to right:
  • Delete entry.
  • Rename entry.
  • Export entry to a file.
  • Load entry.
    • Click while holding a blueprint or blueprint book and it will load the entry into that item, possibly overwriting it.
    • Click without holding a blueprint or blueprint book to load the entry in an empty blueprint or blueprint book on your quickbar or in your inventory.
Destination of exported files:
Individual entries are exported to "FACTORIO\script-output\KBlueprints".
Your collection (all entries) are exported to the sub directory "FACTORIO\script-output\KBlueprints\collection".

Command Line:
/c remote.call("KBlueprints", "Reset GUI")
Will reload the GUI from scratch. Use in case something got butchered (should not really happen).

/c remote.call("KBlueprints", "Always Show GUI", player)
Will always show the GUI, even if you did not research Automated Construction yet!
The 'player' is optional and is mainly for folks that want to configurate my mod from within their mods.
Attachments
manual.png
manual.png (99.4 KiB) Viewed 16986 times
Last edited by Killkrog on Fri Aug 19, 2016 5:49 am, edited 6 times in total.

Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Peppe »

Giving this a try to consolidate mods.

I haven't looked at how the blueprint mods do the flipping/saving, so may be easy may be hard, but any thoughts on supporting left/right and diagonal inserters?
I think bobs is doing it in a new way, but the traditional way is to have left/right variants of an inserter.

I use Yuokio mods, which has those inserters in two variants - left and right. If you flip horizontal or vertical the blueprint would need to change from using the left inserter to using the right inserter and vice versa.
example
To support a mod that does it like this you would just need a substitution map of entities to replace on flip.

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Killkrog »

Will have a look at it later today or tomorrow...

// edit
New version uploaded, have fun!

Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Peppe »

Wow that was quick. Glad it was simple!

I will have no fear flipping things now.

QuackerJ4ck
Inserter
Inserter
Posts: 44
Joined: Wed Apr 06, 2016 4:06 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by QuackerJ4ck »

Getting following Error when clicking "Export All" with an empty list.

Code: Select all

Error while running the event handler: __KBlueprints__/control.lua:328: Expected string as the second argument
Getting this error when exporting a Blueprint Book with 4 Prints in it:

Code: Select all

Error while running the event handler: __KBlueprints__/libs/kbio.lua:232: attempt to index field 'active' (a nil value)

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Killkrog »

Hi QuackerJ4ck,

thanks for the report! Both errors should be fixed in the newest version that I just uploaded.
Hope you enjoy the mod.

Dahn94
Inserter
Inserter
Posts: 34
Joined: Fri Apr 29, 2016 6:32 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Dahn94 »

Any change to add either console or UI for fixing up pre-12.39 blueprints? I still come across strings that haven't yet been updated. That seems to be last of the features I'm still using from other blueprint mods. Nice work!

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Killkrog »

Hi Dahn,

very happy to hear you like the mod.
I can for sure add such a feature, could just take a while because I'm not at home the next 2 days.
A great help would be if you could link one of the strings that need to be converted, so that I can test around...

Cheers!

Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Peppe »

Killkrog wrote:Hi Dahn,

very happy to hear you like the mod.
I can for sure add such a feature, could just take a while because I'm not at home the next 2 days.
A great help would be if you could link one of the strings that need to be converted, so that I can test around...

Cheers!
Here is one:

Code: Select all

H4sIAAAAAAAA/52Y3Y6CMBCFX8V4DcZSAYnhWQyBRpuwZQO42Q3x3ZdSsyuUn+m5pt/McKZzBi2qXVnlWbm7pp1QrWylaNKuU9mHSPd1Jku/kTeVlXvvs2r6
p5VKu+/UPx1C7yf12fEQPr1C1iIfHgVP74U2bQ/f7q2vY0xglmg2AcAYBUMU5CjIQHBNm/xRf4lijoo0dX6nOCkbKiiqJywnxq1hi2LaWkaUXOCrgUqCjQMn
D73N6Pig84oaBOxIw/uNLJD9ccvuyYx7RmPz5GMyv2dSzfLzOCNf0hEW0+dvxIV0jjuXaWOkMu0qaS5o2s9dTZedNBYA+eKVfNt7DAE5CtqtcNhjAIdKgyqz
Jsxy64OeOjpf65lxICQzubCxIWkA3g1QcbDB0IjOTChpl6O3Hh0zdK5RI1k1vE07YCv7bnlr+cHrN8N4bUVjfo7cArcaydz3XTLFaOtOY+7bzqJINVol8m0l
mZFy8quN9m7xtEo65vyBZH5e8r5M6u36J95Snah+5P5FZKnBCVtDu9GZ5OTDWgpJRycnF7Ob5I6NiAZZJ1+atBHSdcXkN6CdHIIm5KC0k0NQxshRiUdNWE4P
2x99ejKvlP4DRqpC6IU+h/YRzePAs3veB7nUon3Uane9CFX8As7kPDzhEQAA
http://factorioblueprints.com/view/3RLWeN86XZmCETo2s

Should make a t-junction, but makes a mess of rails, but blueprint string mod repairs it in 2-3 clicks if i recall.

Blueprint string fixed version:

Code: Select all

H4sIAAAAAAAA/52Y2W6rMBCGXyXiGiIvLKkiLvscEQKrsURMBeScRIh3L5iojTHLeG7DfJ7xPxukqA5llWfl4ZJ2QrWylaJJu05lN5F6dSbLoJFfKis9/7tq
hqeVSrtHGkTHyH+mAaXHqPcLWYtcP2K9/0KbdoC/rm0wnjGDGdEscSfpCU3GaDJEkwxNbiqU3+t/oljikhH7eKc4yB9aVrSqaFGxmuIUjSxBY4gzbJBYVbBp
wOZ9uz63QKwy6C5ENz5+1uhQ43eO/nLrI5VNIzUxJyo3yfyaSbXIk0WcgqvViDeBt6LBRXAudA6TWBgoTGJFCZuJzPYHGcFUp4G7+5vqbcXf/mrDgCEWtDPo
stcQIFYbrDRbyqznnuuJ4VzYCw0B8EYnZ7jOAamAzDKyqpCp2qqMde241aSgvY6tX2zDYDsUOxLwM2i8INlYeeuLK+DT5mLm5opNfomkO+BeIon7yrM52MrT
HHOeDKc5BYryNI+RA7R8iUlMMWG3s8KEYyuvAXtfnmPOoQXGf4k3VyF0JLm/cMRzNThgdYwhJqBhrndTCDJlpuWqd66dOyYi0bJGpqywLhpvEINvALPUh57A
h8Is9aHDJwD0VKDpdCyDHzuY9r7MKzX+NzNlI+3a5/eAylbcPP8vWd5gqArx0DkEmo6RTD9flPj/qdr6Sb3+XIv2XqvD5SxU8QMcIbgHKBIAAA==

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

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Nexela »

Feature request for your next update :)

hotkey for flipping blueprints
viewtopic.php?f=6&t=29941

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by siggboy »

This mod is amazing! I was looking for a Blueprint Flipper replacement. KBM checks all the boxes. I love how you made the UI look neat and slick. 10/10 would recommend.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Killkrog »

siggboy wrote:This mod is amazing! I was looking for a Blueprint Flipper replacement. KBM checks all the boxes. I love how you made the UI look neat and slick. 10/10 would recommend.
Very happy to hear, thanks for taking the time and telling me =)

To the rest, I just uploaded a new version that includes the two last requests (flip hotkeys and upgrading ancient blueprints).

Couldn't test my changes, I'm still not at home and can't install Factorio here. So if there are any exploding computers, please let me know.

Have fun!

canidae
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Thu Feb 18, 2016 6:24 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by canidae »

Great mod, cheers.

A small feature request. Actually, it's more of a request of removing an existing feature:
I (very) recently made my own little mod to play along with this one, a mod that gives you some blueprints, a book and a deconstruction planner when you start a new game. Mostly because I tend to forget my layouts when starting a new game, so I want a visual aid to create e.g. a green science pack factory. It would play well along with your mod, except for one thing: KBM hides its GUI until you research "automated-construction".
Can I persuade you to make the GUI always visible?
If not, can I convince you to rather check if the player has a blueprint/book in his/her inventory? Although, I don't think it would upset many people if the "KBM" button always is visible, it's not that intrusive.

Disregard that. I have no idea how I overlooked "Always Show GUI". Don't disregard the "Great mod" part, though, that's still valid.

About calling functions exposed from KBM:
I'm not sure why, while I can invoke "remote.call("KBlueprints", "Always Show GUI")" from the console, I'm seemingly not able to do so from another mod. Adding the call to an "player_created" event raises this error:

Code: Select all

Error when running interface function KBlueprints.Always Show GUI: __KBlueprints__/control.lua:1003: attempt to index local 'player' (a nil value)
Thinking perhaps the "player_created" event is ahead of "script.on_init" (which wouldn't make much sense) I moved the call to another event, "events.on_gui_click" which I could trigger later in the game. Same error.
Not sure whether I'm doing something wrong, if there's something wrong in KBM or if it's Factorio. Any ideas?

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Killkrog »

canidae wrote:Great mod, cheers.
*happy*
canidae wrote:Not sure whether I'm doing something wrong, if there's something wrong in KBM or if it's Factorio. Any ideas?
Yeah, that's easy to explain. I use the "game.player" object which refers to the player who wrote the command into the console.
Because you try to use the function from within your mod, the game.player object is nul (because nobody actually wrote in the console).
I can implement an optional parameter with which you can pass a player of your choice. Have something to do right now, will implement it later.
Going to edit this post when it's done =)

// edit
Okay, done. You can now pass a player if you want. Here is how that call has to look like:

Code: Select all

remote.call("KBlueprints", "Always Show GUI", player)
So, in your case within the on_player_created event, the following code should do the trick:

Code: Select all

remote.call("KBlueprints", "Always Show GUI", game.players[event.player_index])

canidae
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Thu Feb 18, 2016 6:24 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by canidae »

Much appreciated, that did the trick.

Dahn94
Inserter
Inserter
Posts: 34
Joined: Fri Apr 29, 2016 6:32 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Dahn94 »

Killkrog wrote:A great help would be if you could link one of the strings that need to be converted, so that I can test around...
As of today (30 July), this rail roundabout on Factorio Blueprints seems to require the fixups:
http://factorioblueprints.com/view/X3zrs4jbQ63DxfFEc

Code: Select all

H4sIAAAAAAAA/52X4W6DIBDHX6XpZ22EYg1pfJbGKGlJOlysXbYY330i3YIFvYNPS9b7Hccf78/RtLt7W1f33aUchOplL8WjHAZVfYhy/+i7Sl5vfTr9ue+T z/Yx/d6qcvgu02PyU6aUjGMCB4fEmsSE4xMjY1+Ji4DEVmz97L5E40vL5lA6Jo3sRD3/O//HdHz6kFdVvWPkkM9gfshtlC3R+lZJ5U1g83CVniIZem+ZjZ2w iy2oI+qECg0WNlfgOe5fD5AxMzLy5SmcMMu6q+ZobLFJgjgJQjXGbIxisMzBCEpS7lSJOkIXy+Eq/4pERLoq4L4QSjR49Mu3BRIeCxZxYDQXWeimMkDzzO4z N/ta+0AJuOGzTRP02h9q5a2i30h0N7FAE3WhHCuPUSezHR66FYC9gT0S2yKxHbLCAUbI/Ma07Rss2OG3KoRaMbITI3TUq63cJ4BTR161K/4OYTz0ztNzxHKM KGDKhVAqOgWi5HDUQHyLZlsU3dKpGVF4sF291vGKDhq7sZHt4XR9LF1OpdBQHjCTI0NNWvwbIuQJEfDm0aFjIutW6TeVVI2YBEp86JTR/EwT91SnJOdO9M9O 7S5noZpfrF/hELQNAAA=

Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Peppe »

Dahn94 wrote:
Killkrog wrote:A great help would be if you could link one of the strings that need to be converted, so that I can test around...
As of today (30 July), this rail roundabout on Factorio Blueprints seems to require the fixups:
http://factorioblueprints.com/view/X3zrs4jbQ63DxfFEc

Code: Select all

H4sIAAAAAAAA/52X4W6DIBDHX6XpZ22EYg1pfJbGKGlJOlysXbYY330i3YIFvYNPS9b7Hccf78/RtLt7W1f33aUchOplL8WjHAZVfYhy/+i7Sl5vfTr9ue+T z/Yx/d6qcvgu02PyU6aUjGMCB4fEmsSE4xMjY1+Ji4DEVmz97L5E40vL5lA6Jo3sRD3/O//HdHz6kFdVvWPkkM9gfshtlC3R+lZJ5U1g83CVniIZem+ZjZ2w iy2oI+qECg0WNlfgOe5fD5AxMzLy5SmcMMu6q+ZobLFJgjgJQjXGbIxisMzBCEpS7lSJOkIXy+Eq/4pERLoq4L4QSjR49Mu3BRIeCxZxYDQXWeimMkDzzO4z N/ta+0AJuOGzTRP02h9q5a2i30h0N7FAE3WhHCuPUSezHR66FYC9gT0S2yKxHbLCAUbI/Ma07Rss2OG3KoRaMbITI3TUq63cJ4BTR161K/4OYTz0ztNzxHKM KGDKhVAqOgWi5HDUQHyLZlsU3dKpGVF4sF291vGKDhq7sZHt4XR9LF1OpdBQHjCTI0NNWvwbIuQJEfDm0aFjIutW6TeVVI2YBEp86JTR/EwT91SnJOdO9M9O 7S5noZpfrF/hELQNAAA=
I havn't checked in a month or so, but since about .12.30 something the factorioblueprints update blueprint has been broken. So even if the author has an update for it they can't change it without deleting it and recreating the entire post, which would change the link to it and remove any favorites/ratings etc.

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Killkrog »

Dahn94 wrote:As of today (30 July), this rail roundabout on Factorio Blueprints seems to require the fixups
I am not sure what is expected from me right now. My "Fix Old Blueprint" command works and corrects the mentioned blueprint.
When it comes to factorioblueprints.com I have absolutely no control over the content there.
When the blueprint books were a new thing, I even contacted both Dave and Choumiko and tried to convince them to unify the exported strings between our three mods, but they completely ignored me.
So it's only me now using a rather "complex" way to export strings that also saves the game version of when the blueprint was created. That will make it easy for me to automatically update blueprints when there are major changes...

So, sorry, but with rare blueprints like this rail roundabout you will still have to use the "Fix Old Blueprint" command. I don't see any way around that.
Last edited by Killkrog on Mon Feb 06, 2017 3:46 pm, edited 1 time in total.

canidae
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Thu Feb 18, 2016 6:24 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by canidae »

Do you think it's possible to make this mod require and use empty blueprints when importing rather than create new blueprints?
Currently you can use this mod to duplicate blueprints, just import into a book, take the blueprints out of the book and import some new blueprints into the (empty) book again. It is kinda cheaty says the one who made a mod that gives you blueprints at the start of the game.

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: [MOD 0.13.X] Killkrog's Blueprint Manager

Post by Killkrog »

canidae wrote:Do you think it's possible to make this mod require and use empty blueprints when importing rather than create new blueprints?
Currently you can use this mod to duplicate blueprints, just import into a book, take the blueprints out of the book and import some new blueprints into the (empty) book again. It is kinda cheaty.
It's also kinda cheaty to use a mod that allows you to save hundres of blueprint layouts over the whole duration of the map without needing to have the actual blueprint items stored somewhere ;)
So, no, I don't think I will ever make a change like that. Also I never saw the cost of a mere red circuit to be anything even worthwile to consider. Any base that has a few hours in should be able to generate hundreds of red circuits per minute.

Post Reply

Return to “Mods”