[Mod 0.11.x] Foreman - Blueprint Manager

Topics and discussion about specific mods
katyal
Fast Inserter
Fast Inserter
Posts: 208
Joined: Wed Nov 12, 2014 8:42 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by katyal »

Just a theory here and I know it would be less than ideal but what about having a clearly indicated section in one of the mod's files where one could go paste their blueprint strings?

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

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by JamesOFarrell »

katyal wrote:Just a theory here and I know it would be less than ideal but what about having a clearly indicated section in one of the mod's files where one could go paste their blueprint strings?
That would work for single player games but everyone has to have the same mods for multiplayer games. so if anyone had added any different blueprints it would not work. What might work is a blueprint mod generator. Where you enter a name and press export and it exports all your blueprints into a newly created mod that when loaded next to Foreman imports them automatically. That way you could make a blueprint pack mod and distribute it to your friends without causing the issue above.

katyal
Fast Inserter
Fast Inserter
Posts: 208
Joined: Wed Nov 12, 2014 8:42 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by katyal »

Lol some ideas just won't go away, i was about to repeat the same post as I made just above :oops:

Well without getting bogged down in implementation details I guess the essential part of my request was to have a way to persist a set of blueprints from one savegame to another. A mod as was suggested would nicely

Rseding91
Factorio Staff
Factorio Staff
Posts: 14093
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by Rseding91 »

Just FYI: the "API bugs" listed on the first post should be resolved as of the latest release. The final one with the rail directions getting fixed in one of the most recent versions.

If anyone could test it that would be great.
If you want to get ahold of me I'm almost always on Discord.

jerem0883
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Dec 06, 2014 1:20 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by jerem0883 »

Hi.
Nice mod, really useful with a blueprint at the start of the game :)
I keep getting an error when I want to load a blueprint ("l" button), saying that 'name' field should be a string, in control.lua, setBlueprintData.
the code was

Code: Select all

for i,d in ipairs(blueprintData.icons) do
  if i < 4 then -- stops bug with 4th icon!
    table.insert(newTable, d)
  end
end
I replaced it by

Code: Select all

for i = 1, #blueprintData.icons do
  table.insert(newTable, blueprintData.icons[i])
end
Using your debugLog, I saw that d is {index, name}, not only name.
Didn't try your code with a 4th icon, but with mine there's no bug.

EDIT
factorio 0.11.13

whooshin
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Feb 04, 2015 11:46 am
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by whooshin »

I tried this mod but it keeps saying "No blueprint found in toolbar" when I try to add a blueprint to the list from the toolbar. I get the same error when I try to add one of the example blueprints from the list (importing from a string to the list works fine) to the toolbar. There's only 2 things on the toolbar: an existing blueprint and an empty blueprint. Is there any way to debug this? I tested it with a saved game in 0.11.14.

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

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by Choumiko »

0.11.14 removed a function that Foreman uses. Try the attached zip.
Attachments
Foreman_0.0.4.zip
(24.83 KiB) Downloaded 367 times

whooshin
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Feb 04, 2015 11:46 am
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by whooshin »

Thanks, Choumiko. Your version works fine.

Wenihal
Inserter
Inserter
Posts: 26
Joined: Thu Jan 22, 2015 11:56 am
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by Wenihal »

When I try to load blueprint I receive msg:
Unknown key:"msg-blueprint-notloaded"
__Foreman__/control.lua:735: Name field is supposed to be string

Foreman_0.0.4 (Choumiko version)
Factorio 0.11.15

jerem0883
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Dec 06, 2014 1:20 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by jerem0883 »

Wenihal wrote:When I try to load blueprint I receive msg:
Unknown key:"msg-blueprint-notloaded"
__Foreman__/control.lua:735: Name field is supposed to be string

Foreman_0.0.4 (Choumiko version)
Factorio 0.11.15
Unzip your mod and check the file Foreman_0.0.4/locale/en/en.cfg
what do you get on the line starting by "msg-blueprint-notloaded" ?

GhengizCohen
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Jan 26, 2015 5:46 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by GhengizCohen »

jerem0883 wrote:
Wenihal wrote:When I try to load blueprint I receive msg:
Unknown key:"msg-blueprint-notloaded"
__Foreman__/control.lua:735: Name field is supposed to be string

Foreman_0.0.4 (Choumiko version)
Factorio 0.11.15
Unzip your mod and check the file Foreman_0.0.4/locale/en/en.cfg
what do you get on the line starting by "msg-blueprint-notloaded" ?
I get the same error, same Factorio and Foreman version (both regular and Choumiko)
There is no "msg-blueprint-notloaded" line in either versions

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by waduk »

GhengizCohen wrote:
jerem0883 wrote:
Wenihal wrote:When I try to load blueprint I receive msg:
Unknown key:"msg-blueprint-notloaded"
__Foreman__/control.lua:735: Name field is supposed to be string

Foreman_0.0.4 (Choumiko version)
Factorio 0.11.15
Unzip your mod and check the file Foreman_0.0.4/locale/en/en.cfg
what do you get on the line starting by "msg-blueprint-notloaded" ?
I get the same error, same Factorio and Foreman version (both regular and Choumiko)
There is no "msg-blueprint-notloaded" line in either versions
Did you guys also try the fix that jerem0883 provided ? Because only using choumiko version didn't fix the " "name field...string" problem :
https://forums.factorio.com/forum/vie ... 639#p66639

Basically the step is download/use the choumiko version, then edit the corresponding code in control.lua that jerem0883 provide.

whooshin
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Feb 04, 2015 11:46 am
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by whooshin »

waduk wrote:
GhengizCohen wrote:
jerem0883 wrote:
Wenihal wrote:When I try to load blueprint I receive msg:
Unknown key:"msg-blueprint-notloaded"
__Foreman__/control.lua:735: Name field is supposed to be string

Foreman_0.0.4 (Choumiko version)
Factorio 0.11.15
Unzip your mod and check the file Foreman_0.0.4/locale/en/en.cfg
what do you get on the line starting by "msg-blueprint-notloaded" ?
I get the same error, same Factorio and Foreman version (both regular and Choumiko)
There is no "msg-blueprint-notloaded" line in either versions
Did you guys also try the fix that jerem0883 provided ? Because only using choumiko version didn't fix the " "name field...string" problem :
https://forums.factorio.com/forum/vie ... 639#p66639

Basically the step is download/use the choumiko version, then edit the corresponding code in control.lua that jerem0883 provide.
Aha. Now it works. Thanks for the info.

GhengizCohen
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Jan 26, 2015 5:46 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by GhengizCohen »

waduk wrote:
GhengizCohen wrote:
jerem0883 wrote:
Wenihal wrote:When I try to load blueprint I receive msg:
Unknown key:"msg-blueprint-notloaded"
__Foreman__/control.lua:735: Name field is supposed to be string

Foreman_0.0.4 (Choumiko version)
Factorio 0.11.15
Unzip your mod and check the file Foreman_0.0.4/locale/en/en.cfg
what do you get on the line starting by "msg-blueprint-notloaded" ?
I get the same error, same Factorio and Foreman version (both regular and Choumiko)
There is no "msg-blueprint-notloaded" line in either versions
Did you guys also try the fix that jerem0883 provided ? Because only using choumiko version didn't fix the " "name field...string" problem :
https://forums.factorio.com/forum/vie ... 639#p66639

Basically the step is download/use the choumiko version, then edit the corresponding code in control.lua that jerem0883 provide.

I tried that and it doesnt fix it for me, and I get this error:
Unknown key:"msg-blueprint-notloaded"
__Foreman__/control.lua:725: Unknown item name:

In the locale file theres no entry for "msg-blueprint-notloaded"

Talguy
Fast Inserter
Fast Inserter
Posts: 105
Joined: Tue Apr 29, 2014 8:54 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by Talguy »

Please someone allow using Ghosts from the start

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by SHiRKiT »

For the people that can't do the fix steps, here comes the choumiko's version with the jerem0883's fix. I'm just posting it here for the sake of simplicity. It's ready to use in 0.11.16

I have one question to James: what does convertToRecipeName (around line 754) accomplishes? I noticed that currently it does two things:
- When saving a blueprint to the manager, it removes all recipes from the current blueprint (it alters the blueprint in the hotbar).
- When loading a blueprint, it doesn't load any recipe at all.

Is it there to fix a bug or something? Because removing the call to it removes those bugs. Thanks.
Attachments
Foreman_0.0.4.zip
(24.71 KiB) Downloaded 336 times

teenusa
Inserter
Inserter
Posts: 36
Joined: Sat Jan 24, 2015 1:36 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by teenusa »

Thank you very much for the fix i am loving that mod :D
aka Chaftalie

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by waduk »

Is there a way to batch loading the blueprint ?

TeDeum
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sat Mar 28, 2015 1:43 am
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by TeDeum »

I installed Choumiko's archive with jerem0883 fix, but i got error: "blueprint has to have at least one icon". And blueprint has old icon. I fixed it by replacing in control.lua

Code: Select all

function setBlueprintData(blueprintStack, blueprintData)
	if blueprintStack ~= nil then
		blueprintStack.setblueprintentities(blueprintData.entities)
		--debugLog(serpent.block(blueprintData.icons))
		local newTable = {}
		for i,d in ipairs(blueprintData.icons) do
			if i < 4 then -- stops bug with 4th icon!
				table.insert(newTable, {index = i, name=d})
			end
		end
		blueprintStack.blueprinticons = newTable
		return true
	end
	return false
end
with

Code: Select all

function setBlueprintData(blueprintStack, blueprintData)
	if blueprintStack ~= nil then
		blueprintStack.setblueprintentities(blueprintData.entities)
		blueprintStack.blueprinticons = blueprintData.icons
		return true
	end
	return false
end
Works fine.

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: [Mod 0.11.x] Foreman - Blueprint Manager

Post by Smarty »

[Moved to helper mods by Smarty]

Post Reply

Return to “Mods”