Page 5 of 22

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Wed Apr 24, 2013 2:57 pm
by rk84

Code: Select all

line 26:        for i = 1 , glob.fieldcount , 1 do                -- run trough all field-entities
line 36:            glob.fieldcount = glob.fieldcount-1
I think the problem is here.

"all three expressions are evaluated once, before the loop starts"
-http://www.lua.org/pil/4.3.4.html

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Wed Apr 24, 2013 4:03 pm
by ficolas
why dont you use in pairs?

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Wed Apr 24, 2013 5:04 pm
by FreeER
ficolas wrote:why dont you use in pairs?
for some reason I saw this and was compelled to try it :)
so here it is, should work pretty much exactly the same though so :?
rewritten_control.zip
/me shrugs
(1.03 KiB) Downloaded 271 times
btw anyone find the serpent library in factorio? Pretty useful table/variable printing function makes it easy to create a handy function refrence sheet (f=io.open("filename","a+") f:write(serpent.block(game) f:write(serpent.block(game.player) etc f:close())
I think the game.player.connecttocharacter function could be useful lol

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Thu Apr 25, 2013 9:13 am
by drs9999
oh wow, how embaressing...

thx freeer, that looks good!

I slightly modified the control-file, so people like morzan are able to continue their saved game without errors

So if something similar like the error morzan reported appear you have to do the following:
1) download the control-file that is attached to this post and replace the control.lua with this file in the treefarm-mod folder
2) load your savegame and open the console
3) type

Code: Select all

remote.call("treefarm","cleartable")
4) remove and rebuild all fields
5) enjoy ;)

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Thu Apr 25, 2013 12:44 pm
by Morzan
drs9999 wrote: I slightly modified the control-file, so people like morzan are able to continue their saved game without errors
YES! How can i open the console?

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Thu Apr 25, 2013 12:50 pm
by drs9999
the wiki says "it is opened/closed by ~ or / key" but for me it is the # key

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Thu Apr 25, 2013 12:56 pm
by ficolas
~ ñ ç / #...
I have been able to open with those ( in different pcs)
Also the ñ is a spanish character so it is not in uk or usa keyboards.

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Fri Apr 26, 2013 10:30 am
by Morzan
Yes i opened the console and right now i don't have any problem (for me the console key is ˝)

I did everything and now my power plant looks weird:
power plant field.JPG
power plant field.JPG (275.22 KiB) Viewed 8385 times

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Fri Apr 26, 2013 2:48 pm
by drs9999
like I said, you have to remove ABD rebuild the fields.

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Mon May 06, 2013 10:05 am
by Tenschi
Hey drs9999 thanks for this awesome mod. Im using it in my german lets play :)

But after I installed version 0.4.0 i got this error:

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Mon May 06, 2013 10:21 am
by rk84
Its back to math.random :)
It uses in game random generator now.

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Mon May 06, 2013 10:23 am
by FreeER
Tenschi wrote:Hey drs9999 thanks for this awesome mod. Im using it in my german lets play :)
But after I installed version 0.4.0 i got this error:
game.getrandomnumber() (the devs random number generator) was changed in the 4.0 version, if you go into the code and change it to math.random() instead it should work fine :)

edit lol, posted this and then saw that you got it while I was typing.

Re: [MOD 0.3.x] Treefarm v0.5

Posted: Mon May 06, 2013 11:11 am
by Tenschi
Ahh thx guys now it works again :)

Re: [MOD 0.5.x] Treefarm v0.6.1

Posted: Sun Jun 16, 2013 8:26 am
by drs9999
Hello, I just updated the mod-version to 0.6.1

So basically the mod was compatible with the newest version of factorio. The only changes I did was moving the buildings from the "questionmark"-category to to production-category in the crafting-UI.
If you already use the mod there is no need to update this version IMO. Anyway, overwriting the mod with the newest version works fine and is save-game compatible.

From my point of view the mod looks complete now, so I will only maintain it in the future, but if you have any suggestions feel free to post it, maybe I missed something important.

Re: [MOD 0.5.x] Treefarm v0.6.1

Posted: Mon Jul 01, 2013 7:29 am
by n9103
I'm chiming in here to say that the overlaying of multiple tree farms is not significantly less efficient, and may even be faster in overall production.

I built a cokecoal plant with the farm area being between 25 and 30 treefarms with one chest directly below the next, and they fully supplied no less than 8 wood -> cokecoal lines, I suspect they would support no less than 12, given that the short conveyor from the compact layout was about 1/3rd backed up at minimum.

On a different note, even if the overlapping isn't of interest, the boundries of where tress spawn need to be adjusted, as the tress can block belt items on the near or middle rows if the belt touches any edge of the field, meaning the only low maintenance layout is to remove the wood from the top or left hand sides.

Re: [MOD 0.5.x] Treefarm v0.6.1

Posted: Mon Jul 01, 2013 11:20 am
by drs9999
Thanks for your feetback.
At the moment I rewrite I completly to adjust some points you mentioned.
First the belt-blocking problem will be fixed.

And about the field overlaying, the reason is the small collision-box ( it only covers the chest). But I had and have two points why I will not change it.
First is that it is just logical that the player is able to run over the fields. Ok if I would add a wall or somethingelse to the entity-image it could explain why the player is not able to cross a field, but this leads to the second point, so if I expand the collisionbox over the whole field, to avoid overlaying, the inserter-animations would look ugly. If an inserters removes items from an entity it moves his arm to the center of the entity's collision box. You can see the result in the screenshot below.
tree.png
tree.png (337.44 KiB) Viewed 8455 times

Re: [MOD 0.5.x] Treefarm v0.6.1

Posted: Tue Jul 02, 2013 9:15 am
by n9103
So it's not possible to designate two bounding boxes for a single entity? One of them being collision the other being building-blocking?
I'm woefully unfamiliar with the backend to know if the idea is currently possible, but it seems simple enough to already exist, or have a possible hack-around.

Re: [MOD 0.5.x] Treefarm v0.6.1

Posted: Tue Jul 02, 2013 9:22 am
by ficolas
n9103 wrote:So it's not possible to designate two bounding boxes for a single entity? One of them being collision the other being building-blocking?
I'm woefully unfamiliar with the backend to know if the idea is currently possible, but it seems simple enough to already exist, or have a possible hack-around.
No os not, but you can use the onplacedentity event to place an invisible entity with no image, and the second collision box.

Re: [MOD 0.5.x] Treefarm v0.7.0

Posted: Thu Jul 04, 2013 2:19 pm
by drs9999
I just updated the mod. More precisly I reworked it completly, so sadly it is not compatible with the old version, but what you can do is destroy all fields and build them again.

Most important changes are that the wood-output and fertilizer-effect on fields were increased.
Fertilizer now quadruples the farm-output, which means that one field produces nearly enough wood to supply one cokery.

Here 2 screenshots how you can setup a treefarm with fertilizer:
tf2.png
tf2.png (1.24 MiB) Viewed 8436 times
tf1.png
tf1.png (160.94 KiB) Viewed 8436 times

Re: [MOD 0.5.x] Treefarm v0.7.0

Posted: Wed Jul 10, 2013 8:14 pm
by Phantasm
The cokery really feels like a cheat... Virtually free way to increase fuel value. It should make the fuel more compact and thus reduce the count in the process thus helping logistics. The fuel value actually lowers a bit in reality.