[0.17] QuickBar Import/Export

Topics and discussion about specific mods
Post Reply
Therenas
Fast Inserter
Fast Inserter
Posts: 107
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

[0.17] QuickBar Import/Export

Post by Therenas » Fri Mar 08, 2019 1:07 pm

Description

This mod allows you to import the current state of your fancy new quickbar as a string and import it in another save. It is the same principle as blueprint strings. So, you can either use this to take the laborious work you did on your quickbar to a new save of yours, or share it with others.
Has support for quickbar and keyboard shortcuts, EN, DE and FR localisations, multiplayer, and hopefully compatability with any other mod.
Sadly, the current modding API doesn't allow me to migrate your blueprints over in a clean way, so they will show up blank on import.

Mod Portal Link
Source code on GitHub

Hopefully it works for everyone, if not, or if you have any suggestion, feel free to PM/email me, or post it right here!
Last edited by Therenas on Tue Mar 12, 2019 11:20 am, edited 3 times in total.

GTrak
Inserter
Inserter
Posts: 21
Joined: Tue Mar 01, 2016 10:44 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by GTrak » Fri Mar 08, 2019 7:17 pm

This mod's awesome!
Would be nice if export can restore same blueprint book.

Therenas
Fast Inserter
Fast Inserter
Posts: 107
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by Therenas » Fri Mar 08, 2019 9:36 pm

Thanks! Yeah that doesn‘t work currently, and the solution might be a bit complicated, I will take a look at it tomorrow.

torne
Filter Inserter
Filter Inserter
Posts: 272
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: [0.17] QuickBar Import/Export

Post by torne » Fri Mar 08, 2019 10:29 pm

Would it be possible to add a config option that you can paste an exported quickbar config into, and then automatically import that just once when starting a new game? (but not change anything when loading an existing save) That would be really neat :)

Therenas
Fast Inserter
Fast Inserter
Posts: 107
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by Therenas » Fri Mar 08, 2019 11:03 pm

torne wrote:
Fri Mar 08, 2019 10:29 pm
Would it be possible to add a config option that you can paste an exported quickbar config into, and then automatically import that just once when starting a new game? (but not change anything when loading an existing save) That would be really neat :)
So you want to set a sort of default quickbar setup that will always be loaded when you start a new save?

torne
Filter Inserter
Filter Inserter
Posts: 272
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: [0.17] QuickBar Import/Export

Post by torne » Sat Mar 09, 2019 1:13 am

Yeah. Set it up once, export it, paste it into a player specific mod setting, and then automatically import it from the on_player_created event, which triggers when a player joins a map for the first time (i.e. when starting a new game or when joining a multiplayer game you haven't been in before). That would let me have a "default" quickbar :)

Therenas
Fast Inserter
Fast Inserter
Posts: 107
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by Therenas » Sat Mar 09, 2019 10:57 am

Hm that is a nice idea, but I don't think it is such a frequent use case for me to implement it. You can just store the string anywhere else. In principle it would be a simple thing, but as soon as I add any kind of permanent state to the mod (stuff that will be saved anywhere), it complicates the whole thing quite a bit. Also, now that I think about it, I don't think mods even have any good way to save data 'outside' of specific saves. I guess you could use a string mod setting, as you aluded to, but that seems really hacky.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2236
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by steinio » Sat Mar 09, 2019 11:07 am

You can abuse a blueprint which is stored in the library.
Give it a distinct name (Toolbar 01) and put the filtered items in it.
Image
Transport Belt Repair Man
My little mods: Link | My favourite mods: Bob's Mods | Angel's Mods | Yuoki Railway Core | EvoGUI | Logistic Train Network
Factorio Cheat Sheet by Denis Zholob

View unread Posts

GTrak
Inserter
Inserter
Posts: 21
Joined: Tue Mar 01, 2016 10:44 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by GTrak » Sat Mar 09, 2019 6:48 pm

Would be nice if export windows has copy button (if possible).
IDK about modding but is it hard to make QBIE button to standard button(top left rocket silo status button)?

Therenas
Fast Inserter
Fast Inserter
Posts: 107
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by Therenas » Sun Mar 10, 2019 10:50 am

steinio wrote:
Sat Mar 09, 2019 11:07 am
You can abuse a blueprint which is stored in the library.
Give it a distinct name (Toolbar 01) and put the filtered items in it.
Yeah that is a way to do it, This mod pretty much does that. I will investigate what is possible with the blueprint library, but I might be satisfied leaving it as is for now.
GTrak wrote:
Sat Mar 09, 2019 6:48 pm
Would be nice if export windows has copy button (if possible).
IDK about modding but is it hard to make QBIE button to standard button(top left rocket silo status button)?
Modders don't currently have access to a players clipboard (for good reasons), so I can't add a copy button. I would love to select the whole text for you, but that is no possible either currently (I posted an API feature request though).
I'm not sure what you mean by your second sentence, mind explaining it a bit differently?

GTrak
Inserter
Inserter
Posts: 21
Joined: Tue Mar 01, 2016 10:44 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by GTrak » Sun Mar 10, 2019 11:07 am

it's about button style.
icon button instead of text button. and button location to most upper line. (like rocket silo icon button) :D
Last edited by GTrak on Sun Mar 10, 2019 3:12 pm, edited 1 time in total.

Therenas
Fast Inserter
Fast Inserter
Posts: 107
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by Therenas » Sun Mar 10, 2019 2:38 pm

Oh I realised that I was doing the button placement wrong, my bad! The new version fixes this, thanks for the tip. I also changed it to a pretty generic icon, I myself sadly don't have the artistics talent to do a custom one.
(Also, if the button bothers you, you can now also evoque the import/export from your quickbar shortcuts and disable the button in settings)

GTrak
Inserter
Inserter
Posts: 21
Joined: Tue Mar 01, 2016 10:44 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by GTrak » Sun Mar 10, 2019 3:13 pm

it looks dandy. thank you for quick update.
I also like new shortcut bar feature.
but, is it necessary to remove empty blueprints?
I always using empty blueprint for temporary in quickbar. (copy & paste is similar to temp blueprint but definitely different)
I think it's good as placeholder. It doesn't make people confused about what item was in empty slot even it's empty blueprint.

Therenas
Fast Inserter
Fast Inserter
Posts: 107
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by Therenas » Sun Mar 10, 2019 7:31 pm

You make a really good point there. It is better to see an empty blueprint instead of wondering where everything went. I incorporated it in the newest version. Would love to make it actually work though in the future, if the API gets extended at some point.

GTrak
Inserter
Inserter
Posts: 21
Joined: Tue Mar 01, 2016 10:44 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by GTrak » Mon Mar 11, 2019 6:15 am

thank you for update.
the last thing is to wait for the API to extend. :?

this is not important, but what do you think about changing text import/export buttons to icon buttons? (icons are already in vanilla)

Therenas
Fast Inserter
Fast Inserter
Posts: 107
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [0.17] QuickBar Import/Export

Post by Therenas » Mon Mar 11, 2019 3:11 pm

Well I think I want to leave it the way it is. I saw the icons and they are nice, but the text is more intuitive at a glance. Also, as those buttons aren‘t on screen most of the time, the space they take up doesn‘t matter much.

Post Reply

Return to “Mods”

Who is online

Users browsing this forum: No registered users