Page 5 of 18

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Wed Feb 04, 2015 12:44 pm
by ares0027
i feel like an idiot :D i must have missed the part about zips. but i now have different symptoms for you :P

i extracted all the mods from zips and installed them correctly as folders (tested in-game) but now when i launch Foreman i receive this error.


Image


and the Details are;

Code: Select all

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Foreman.DataCache.extractIngredientsFromLuaRecipe(LuaTable values)
   at Foreman.DataCache.InterpretLuaRecipe(String name, LuaTable values)
   at Foreman.DataCache.LoadAllData()
   at Foreman.MainForm.Form1_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Foreman
    Assembly Version: 0.0.1.1
    Win32 Version: 0.0.0.0
    CodeBase: file:///D:/Program%20Files/Factorio/Foreman%200.1.7.1/Foreman.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
NLua
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0
    CodeBase: file:///D:/Program%20Files/Factorio/Foreman%200.1.7.1/NLua.DLL
----------------------------------------
KeraLua
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: file:///D:/Program%20Files/Factorio/Foreman%200.1.7.1/KeraLua.DLL
----------------------------------------
Newtonsoft.Json
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.8.18111
    CodeBase: file:///D:/Program%20Files/Factorio/Foreman%200.1.7.1/Newtonsoft.Json.DLL
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


and this is the content of the errorlog.txt

Code: Select all

Error reading value 'amount' from recipe prototype 'raw-wood-centrifuge'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-2'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-5'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'dirty-water-stone-sand-random'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-3'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-1'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-4'. Returned error message: 'Key is missing'

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Wed Feb 04, 2015 12:56 pm
by SuperSandro2000
I'm using Foreman the first time so don't go crazy if this where asked many times but I have a exe version of factorio installed and 3 zips and I want that Foreman loads on of the zip factorios but I can't find a option for that and it didn't asked me anything at the first start.

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Wed Feb 04, 2015 10:42 pm
by ares0027
ares0027 wrote:i feel like an idiot :D i must have missed the part about zips. but i now have different symptoms for you :P

i extracted all the mods from zips and installed them correctly as folders (tested in-game) but now when i launch Foreman i receive this error.





and the Details are;

Code: Select all

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Foreman.DataCache.extractIngredientsFromLuaRecipe(LuaTable values)
   at Foreman.DataCache.InterpretLuaRecipe(String name, LuaTable values)
   at Foreman.DataCache.LoadAllData()
   at Foreman.MainForm.Form1_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
Foreman
    Assembly Version: 0.0.1.1
    Win32 Version: 0.0.0.0
    CodeBase: 
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
NLua
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0
    CodeBase: 
----------------------------------------
KeraLua
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: 
----------------------------------------
Newtonsoft.Json
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.8.18111
    CodeBase: 
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: 
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: 
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


and this is the content of the errorlog.txt

Code: Select all

Error reading value 'amount' from recipe prototype 'raw-wood-centrifuge'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-2'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-5'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'dirty-water-stone-sand-random'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-3'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-1'. Returned error message: 'Key is missing'
Error reading value 'amount' from recipe prototype 'stone-4'. Returned error message: 'Key is missing'

late edit (couldnt edit it correctly) it turns out that Dytech Machine 1.0.1 was causing the duplicates. i will move it to Dytech mod subforums but are there anything you can do about it? (even without any other addons, including dytech, it gives the same error)

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Thu Feb 05, 2015 1:37 am
by Nicksaurus
SuperSandro2000 wrote:I'm using Foreman the first time so don't go crazy if this where asked many times but I have a exe version of factorio installed and 3 zips and I want that Foreman loads on of the zip factorios but I can't find a option for that and it didn't asked me anything at the first start.
I just put up a new version: https://bitbucket.org/Nicksaurus/foreman/downloads

You can choose where the mod directory is yourself now.
ares0027 wrote: it turns out that Dytech Machine 1.0.1 was causing the duplicates. i will move it to Dytech mod subforums but are there anything you can do about it? (even without any other addons, including dytech, it gives the same error)
Yep. It's not Dytech's fault - my code just couldn't handle having the same input more than once on recipes. The newest version should be fine.

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Thu Feb 05, 2015 3:55 am
by SuperSandro2000
Thanks for the quick help.
Don't say I must extract all mods now? Can you add that the programm can read zips?
Bug with modhole mod it show that it needs 0 lava but when you hover over the thing it show the right numbers.
Can you make that the programm reads the control.lua/data.lua and the recipe changes there?

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Thu Feb 05, 2015 5:53 am
by ares0027
Nicksaurus wrote:
SuperSandro2000 wrote:I'm using Foreman the first time so don't go crazy if this where asked many times but I have a exe version of factorio installed and 3 zips and I want that Foreman loads on of the zip factorios but I can't find a option for that and it didn't asked me anything at the first start.
I just put up a new version:

You can choose where the mod directory is yourself now.
ares0027 wrote: it turns out that Dytech Machine 1.0.1 was causing the duplicates. i will move it to Dytech mod subforums but are there anything you can do about it? (even without any other addons, including dytech, it gives the same error)
Yep. It's not Dytech's fault - my code just couldn't handle having the same input more than once on recipes. The newest version should be fine.

thank you so much :) and yes, new version works flawlessly ("so far" again :P ) i used to ignore (let it stay in zip) Dytech Machine but it was causing some of the "Machine only recipes" to show wrong ingredients etc (obviously) but now, everything is okay, and working great. Thank you :)

a few minutes late edit: it seems to work flawlessly except that when i press "Automatically complete flowchart" it simply crashes with no error. It does that on every single recipes added by ANY DYTECH mod. It doesnt do that for Landfill etc.

P.S. sorry for causing so much trouble :/ I just cant play Factorio without Dytech and I have been an addict of Foreman since the initial release i think.


second edit: i did the same thing (put machine back to zip) and same behavior is back; it works but shows wrong recipes for dytech machine recipes. i hope Dysoch can have the time to look into this problem and make it work.

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Tue Feb 24, 2015 7:03 am
by Rylshen
Quick edit to outright ignore cyclic ingredients/results. "Fixes" the crash when auto completing a flow chart with mods that have such recipes (Dytech).

Active Provider Chest Mk 2 - http://i.imgur.com/7I6HjGy.jpg
Sci Pack 3 - http://i.imgur.com/jNLbOu0.png

Code: Select all

@@ -639,6 +639,32 @@
 				Dictionary<Item, float> ingredients = extractIngredientsFromLuaRecipe(values);
 				Dictionary<Item, float> results = extractResultsFromLuaRecipe(values);
 
+                for (int i = 0; i < ingredients.Keys.Count; i++)
+                {
+                    Item itemIngredient = ingredients.ElementAt(i).Key;
+
+                    for (int j = 0; j < results.Keys.Count; j++)
+                    {
+                        Item itemResult = results.ElementAt(j).Key;
+                        bool tripped = false;
+
+                        if (itemIngredient.Name == itemResult.Name)
+                        {
+                            System.Diagnostics.Debug.Print("Removed ingredient {0} from {1}\n", itemIngredient.Name, name);
+
+                            ingredients.Remove(itemIngredient);
+                            results.Remove(itemResult);
+
+                            j--;
+                            if (!tripped)
+                            {
+                                i--;
+                                tripped = true;
+                            }
+                        }
+                    }
+                }
+
 				Recipe newRecipe = new Recipe(name, time == 0.0f ? defaultRecipeTime : time, ingredients, results);
 
 				newRecipe.Category = ReadLuaString(values, "category", true, "crafting");
@Mods / @Nicksaurus I'll remove the attachment if you don't want me linking a binary.

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Tue Feb 24, 2015 4:53 pm
by StanFear
last week, I tried to find this tool (had already used it before) but couldn't find it, now, there it is, on top of the threads list, coool !!

amazing tool BTW

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Tue Feb 24, 2015 5:29 pm
by quinor
I wish there was linux version too... Could you rewrite it to some multi-platform version?

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Fri Feb 27, 2015 7:55 am
by Rylshen
psorek wrote:I wish there was linux version too...
Compiled KeraLua and lua52 for linux (64bit)
Some sizing changes to the main form to work around a small bug with the AutoSize property of the FlowLayout in mono
Null checks for environment variables that likely won't exist, but Path.Combine throws on null
Ignore cyclic items in recipes (see earlier post)

http://a.pomf.se/dinkfr.png

linux support.diff in the zip contains changes.

To run, you will likely need a recent version of mono (3.12.0) and libmono-winforms2.0-cil or equivalent for your distro.

Problems: Creating new connections doesn't seem to work

Re: Foreman - A factory optimisation tool. Now 11.X compatib

Posted: Fri Feb 27, 2015 7:57 am
by quinor
thank you, I'll try that :)

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Sat Feb 28, 2015 11:01 am
by Rylshen
Changes:
  • ChooserPanel more or less works on linux
Again, .diff from rev 206 included in zip.

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Sat Feb 28, 2015 4:58 pm
by quinor
It work just fine. I managed to crash it, but still :)

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Sun Mar 01, 2015 1:50 pm
by omagaalpha
Unfortunately mods don't seem work for this :( . Which were DyTech, Mohole, silica, slipstream,Treefarm using Windows 8 64-bit os. Some them when try complete work flow crash program or not all recipe or item load in. Does anyone have better luck with mods in this program?

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Sun Mar 01, 2015 2:02 pm
by SHiRKiT
Can't seem to get mods to work as well =\

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Sun Mar 01, 2015 2:20 pm
by omagaalpha
Crash happen with mods because some them give multiple recipe for same item when use Automatically complete Workflow. But if all recipe node all chose down to raw forum then the Automatically complete Workflow works. Only problem I notice now is for some reason in silica mod that it's silica wafer does not have any recipe to its raw resource Silicon.(Science Pack 3 as test).
Frozen program when try same method for Secondary Solar Panel Mk V.

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Wed Mar 11, 2015 1:59 am
by waduk
Incomplete flowchart ?
Crude oil didn't showing pumpjack as an option for input. It only shows as an input if i use automatically complete chart.
Only use base, no mod activated.

Edit :
Oh, it turns out all raw material is acting this way (not showing drill either)

Edit 2 :
Can you make it that it remember the last setting before closing ?

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Sun Mar 15, 2015 2:33 pm
by XyLe
Hello! I'm kind of new to this topic, i'm sorry i can't read all the messages, so forgive me if i'm gonna post something already mentioned earlier.

First of all, thanks a lot for a great tool ! it makes things a lot easier when you're trying to figure out bigger builds.

I see quite a few flaws with that program though, for instance if you mis-click once instead of dragging something you are forced to create a new node. You can't cancel node-creation window. You have to pick something and then delete the node, i'd just intuitively want to press esc key. but whatever, who's perfect, right? xD

Help me with something else please:
o_O
On this picture I need 2000 plates per minute. If i read the game right it takes 3.5 secs to process 1 ore into 1 copper plate. So 1 furnace can make 17.14 plates / minute. That makes me think i'm gonna need roughly 116-117 furnaces to make 2000 plates/min. Although the program is showing number 59. Can you please take a look at this situation and explain me who's wrong here?

Thank you very much for an amazing work on that tool, it's really outstanding))

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Sun Mar 15, 2015 3:13 pm
by waduk
Hmm..i test it. By test i mean not relying on Production info chart, but also counting manually. A furnace can produce about 34 plates/min. So in your case 59 furnace for 2000 plate/min is pretty much accurate.

Re: Foreman - A factory optimisation tool. Now 11.X compatible!

Posted: Sun Mar 15, 2015 3:39 pm
by XyLe
waduk wrote:Hmm..i test it. By test i mean not relying on Production info chart, but also counting manually. A furnace can produce about 34 plates/min. So in your case 59 furnace for 2000 plate/min is pretty much accurate.
Can this situation relate to electric-furnace crafting speed being 2 ? so the initial recipe is 1/3.5 sec, with crafting sped = 2 we have twice the production then. i see, this makes sense to me now. thank you very much