Page 3 of 4

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

Posted: Mon Dec 08, 2014 10:29 pm
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?

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

Posted: Mon Dec 08, 2014 10:37 pm
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.

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

Posted: Tue Jan 20, 2015 7:04 pm
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

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

Posted: Tue Jan 20, 2015 7:17 pm
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.

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

Posted: Sun Feb 01, 2015 1:24 pm
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

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

Posted: Wed Feb 04, 2015 12:16 pm
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.

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

Posted: Wed Feb 04, 2015 12:23 pm
by Choumiko
0.11.14 removed a function that Foreman uses. Try the attached zip.

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

Posted: Wed Feb 04, 2015 12:46 pm
by whooshin
Thanks, Choumiko. Your version works fine.

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

Posted: Thu Feb 05, 2015 11:56 am
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

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

Posted: Thu Feb 05, 2015 4:50 pm
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" ?

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

Posted: Mon Feb 16, 2015 4:00 am
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

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

Posted: Mon Feb 16, 2015 4:51 am
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.

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

Posted: Mon Feb 16, 2015 5:12 pm
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.

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

Posted: Wed Feb 18, 2015 6:19 pm
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"

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

Posted: Sat Feb 21, 2015 9:42 am
by Talguy
Please someone allow using Ghosts from the start

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

Posted: Sun Mar 01, 2015 6:32 pm
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.

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

Posted: Wed Mar 04, 2015 7:36 pm
by teenusa
Thank you very much for the fix i am loving that mod :D

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

Posted: Sun Mar 08, 2015 11:07 am
by waduk
Is there a way to batch loading the blueprint ?

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

Posted: Thu Apr 02, 2015 3:28 pm
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.

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

Posted: Wed Jul 08, 2015 8:23 pm
by Smarty
[Moved to helper mods by Smarty]