Page 4 of 22

Re: [MOD 0.3.x] Treefarm

Posted: Fri Apr 12, 2013 6:22 pm
by FreeER
rk84 wrote:y+x has some ill effects, because like (-10)+(10) = (10)+(-10) is equal. It will give zeros on y=x line and makes mirror image over opposite side of that line.
oops, I figured that wasn't the best way but lol. I imagine you could always come up with some equation/algorithim type thing like 2x^2+3y-math.sqrt(30).

Re: [MOD 0.3.x] Treefarm

Posted: Fri Apr 12, 2013 7:29 pm
by Morzan
This mod is good, because the wood is now renewable. But the field and the cokery has a very weird hitbox. Please fix it! Thanks. :)

Re: [MOD 0.3.x] Treefarm

Posted: Fri Apr 12, 2013 9:22 pm
by FreeER
there's really nothing that can be done with the hit box unless he wants to make two seperate entities and have it so that when you place the 'field' (the chest is the actual field right now) and it then spawns in another entity that would take the place of the field itself. As for the cokery that's because the enitity is not exactly square so rotating it causes issues, you should be able to rotate it again to fix the hitbox but I wish it worked better as well lol

Re: [MOD 0.3.x] Treefarm

Posted: Fri Apr 12, 2013 9:34 pm
by rk84
you can restore correct orientation of hitboxes by saving and loading the game.

Re: [MOD 0.3.x] Treefarm

Posted: Fri Apr 12, 2013 9:51 pm
by kovarex
Yes, rectangular collision boxes were buggy, I already fixed that few days ago for the furutre 0.4.0

Posted: Mon Apr 15, 2013 12:01 pm
by Morzan
Hey everyone!

It's time to introduce my Power Plant! This system makes energy and coke coal!
I used 16 fields to make wood producton enough fast.
Image:
power plant.JPG
power plant.JPG (245.29 KiB) Viewed 8612 times
Edit: I working on to make it bigger and better!

Re: [MOD 0.3.x] Treefarm

Posted: Wed Apr 17, 2013 1:01 pm
by drs9999
I updated the mod a second ago.

It is now possible to produce fertilizer which increase the tree-spawning-rate and the field output.

hope you like it

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

Posted: Wed Apr 17, 2013 1:16 pm
by Morzan
Good good! But what think you about my power plant? Note: Right now it's bigger than in the picture.

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

Posted: Wed Apr 17, 2013 1:56 pm
by drs9999
Yeah I like it!

And now build a new one, which includes fertilizer production :D

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

Posted: Thu Apr 18, 2013 4:44 am
by Morzan
Yes, you right...

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

Posted: Sun Apr 21, 2013 2:09 pm
by misterlui
And how do I apply the fertilizer on the field? How do I increase the amount of tree harvesting? Explanation please picture. Thank you.

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

Posted: Tue Apr 23, 2013 8:02 am
by drs9999
misterlui wrote:And how do I apply the fertilizer on the field? How do I increase the amount of tree harvesting? Explanation please picture. Thank you.
You have insert the fertilizer at the top left corner (the chest), the wood-output increases automatically as long as fertilizer is in the fields inventory.
But make sure that you use filter inserters to output the wood then.

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

Posted: Tue Apr 23, 2013 7:33 pm
by Morzan
WOW. Today i played a bit in my modded map and this happend:
treefarm bug.JPG
treefarm bug.JPG (62.43 KiB) Viewed 8779 times
treefarm bug2.JPG
treefarm bug2.JPG (45.89 KiB) Viewed 8779 times
So this happend with me two times. Please help me, because I WANT TO PLAY IN MY MODDED MAP. :D

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

Posted: Tue Apr 23, 2013 7:44 pm
by drs9999
Ok I see what went wrong, but I cant explain it :D
Can you upload the savefile of the world pls?

Just to make sure I guess you use the treefarm-mod and f-mod only ( treefarm v0.5 and f-mod v1.3?)?

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

Posted: Tue Apr 23, 2013 7:57 pm
by ficolas
the code tries to insert inside a fish?
nom

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

Posted: Wed Apr 24, 2013 4:50 am
by Morzan
Yes i use just Treefarm v0.5 and F-mod v1.3.

I can upload the world save. Here it is:
http://www.mediafire.com/?9ah82woieilpnza

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

Posted: Wed Apr 24, 2013 10:24 am
by drs9999
Well, obviously the table which stores the field-entities messed up. I am not sure why.

I think this part of the code is the reason:

Code: Select all

game.onevent(defines.events.onbuiltentity, function(event)
1:  if event.createdentity.name == "field" then
2:   glob.fieldcount = glob.fieldcount + 1    
3:    glob.field[glob.fieldcount] = event.createdentity
  end
end)
@ the devs:
How does the fish-spawning works atm?
Is the following possible?

- player places a field
- onbuilt event is raised
- codeline 1 is executed => result is true, because builtentity==field
- codeline 2 is excuted AND a fish spawns, so maybe event.createdentity becomes fish, but the onbuiltevent is not raised again, because it is executed atm
- the fish-entity is stored to the table instead of the field

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

Posted: Wed Apr 24, 2013 11:30 am
by Morzan
So this interesting think in my map not just me happend?

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

Posted: Wed Apr 24, 2013 11:40 am
by drs9999
At least you are the first one who reported this :D

While I was testing and playing with the mod I had never ran into that problem. But yeah, if my suspicion is correct it will only appear under very very very rare circumstances.
Sadly I can not help you for now... But let us wait until a game-dev see this and say something.

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

Posted: Wed Apr 24, 2013 2:09 pm
by kovarex
drs9999 wrote: Is the following possible?
No :)
The value of the event can't change while you execute, that would make the script unusable.
The event is processed synchronously and nothing else is happening when the code is being executed.