[MOD 0.12.x] Treefarm REDUX (DISCONTINUED)

Looking for a mod? Have a review on a mod you'd like to share?
Post Reply
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

[MOD 0.12.x] Treefarm REDUX (DISCONTINUED)

Post by drs9999 »

TF_Banner.png
TF_Banner.png (149 KiB) Viewed 99040 times

THIS MOD IS DISCONTINUED. FEEL FREE TO KEEP IT UP AND DO WHATEVER YOU WANT TO DO WITH IT!!!








Description:
This Mods adds treefarms, coal-processing and a production-chain for organic plastic.


Mod-Spotlight:
FishSandwich made a spotlight for the mod (thanks a lot!).
Image

(Click on Image to watch)

Screenshots


Installation:
- download the *.zip and put it into the mods-folder
Changelog TF-Lite
Changelog TF-AC
Legacy Changelog
A big THANK YOU goes to YuokiTani for the awesome Sprites!
He also made an own mod so check it out: https://forums.factorio.com/forum/vie ... =32&t=3453

Downloads:
FOR FACTORIO 0.12.x:
Treefarm-Lite 0.2.0
Treefarm-AC 0.2.1



FOR FACTORIO 0.11.13+:
(might work with older versions, too. Not tested, though)
Treefarm-Lite
Treefarm-AC

!!!IMPORTANT!!!
The new versions are NOT compatible with old versions (treefarm1.2.7 and prior). However if you want to continue a savegame you can disable the old mod and play with the new versions without any problems, although you have to rebuild all treefarm-related things, because the will be gone.



Example Addon "AlienSeed" for Treefarm-Lite:
I do NOT recommend it for in-game use, because very OP.
It is intented to serve as a source for people who want to publish their own addons!
for TF-Lite >= 0.2.0

for TF-Lite < 0.2.0
Last edited by drs9999 on Wed Apr 23, 2014 7:44 am, edited 36 times in total.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [MOD 0.2.10] Treefarm

Post by ficolas »

Last edited by ficolas on Thu Apr 11, 2013 5:36 pm, edited 1 time in total.

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

I just updated the mod. The known bugs should be fixed and i cant find new one while playing/ testing around.
I also added fertilizer to speed up the wood production, but it has no recipe yet. You can cheat it in with typing "glob.player.insert{name="fertilizer",count=128}" in the command-line. I have to figure out a complex, hard and slow way to produce fertilizer, because it is very (over-)powered (but i like that, so the production of it has to be difficult to qualify this).

Maybe you guys have some ideas about that.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [MOD 0.2.10] Treefarm

Post by kovarex »

I have just question, what kind of mod features you miss the most?

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

Absolutly most I miss the ability to write complex mods (complex mods means mods which uses lua scripts) without editing the freeplay.lua / control.lua
Maybe like this: every mod has its own *.lua (if it uses/needs a lua of course) in the lualib-dir which is able to have access to the game-events "ontick" "onbuildentity" etc., so multiple mods can coexist to eachother and the freeplay.lua

Also an "extract" method ( as opposite to the insert- method) would be fine, but I still believe that something like this is possible right know (with the given possibilities merged together in a function in someway), is that the case a function as a supplement to the util.lua should be enough.

That are the aspects I missed before you asked. After i read your question, an "onentityspawned"-event (as expansion to the "onentitybuild"-event) came to my mind. But I am not sure how useful or needful it is. I dont miss it right know.

15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by 15Cyndaquil »

how does the fields work exactly
The more complicated the game the better

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

from what point of view are you asking?

how the code work, or how you can use them in-game?

for the first one, just look into the code. It contains a lot of comments ( as compared to other code I wrote :D )

And for the second. Its quiet simple. craft a field, place it and wait...
After some time trees should start spawning (it is randomly - so sometime it is quicker, sometimes slower) If at least 4 trees are spawned they field will start chopping down some trees and insert the wood into its inventory. You can extract it by using inserters which have to be placed next to the chest at the topleft corner.

15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by 15Cyndaquil »

it was the second and thank you for letting me know to just wait. and what happens if i over lap fields
The more complicated the game the better

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

nothing really bad will happen than. I guess 2 fields that ovelapping each other in some point wont be as effective as 2 seperated ones, but to be honest I didnt test that over a longer period. I just checked if this will cause an error or samething and that wasnt the case ;)
Maybe see it as a game experience to try it out.

15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by 15Cyndaquil »

how did you make it so the crafting recipe for charcoal, coal, and coal-coke is not accessible for the player and only the corker
The more complicated the game the better

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

You can define recipe-categories. every recipe is allocated to one category and last but not least every machine that is able to produce something is allocated to one categorie as well.
The vanilla-version of the game only have the categories "crafting" and "smelting". the stone-furnace only have access to recipes that have the "smelting" attribute, the assemply-machines and the player only have access to "crafting"-recipes.
I just add another category and attached the attribute the charcoal etc recipe and the cokery building.

I tried place the recipes "into" the smelting-category. This was working theoretically. The problem was that inserters allways placed the materials into the fuelslot, because they were fuel.

15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by 15Cyndaquil »

Thank you and with this information i made an electric furnace mod if you want to check it out
The more complicated the game the better

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

I just found a minor bug in my mod.
Because of the reason that the cokery is still an assembly building you can rotate it before placing. ( You dont notice that with the assembly building because the texture dont rotate and its a square)

But the cokery isnt a square so the collision and selection box will rotate while pressing the "R"-Key . (And the textures wont)
Also it depends on the rotation of the last building/ inserter whatever is rotable.
Simple solution is just to rotate it again if it messed up, so the collision and selection box will correspond to the texture again.

Any ideas how to solve that?
I know that there is a get/setrotatable function but i guess that will work for allready placed entities only.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.2.10] Treefarm

Post by FreeER »

interesting, the only thing that comes to mind is redrawing your graphic for multiple directions :) though that might not work either, i don't know for sure
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

Yes sure this would be the simpliest solution. But to do this you have to add a "direction"-attribute to the building.Inserters for example have that, but the assembly-building-type dont have it and I am not sure if it will work like that, just adding an additional attribute to it.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.2.10] Treefarm

Post by FreeER »

It should.. you could always just add direction and see if it throws an error before you do all the work :) (might have to have a second direction, but all for the sake of testing)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

Nope it doesnt work. But yeah, that is what I expected.
I added "direction-count"- atrribute to the animation in the entity.json and placed a second row in the png.
You wont receive an error by doing this, but the game wont "load" the second animation.
I think the reason for this is that the game dont expect such a "direction-count" atrribute in an assembling-machine-type entity, so it wont look or use it in-game.

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.2.10] Treefarm

Post by rk84 »

drs9999 wrote:Nope it doesnt work. But yeah, that is what I expected.
I added "direction-count"- atrribute to the animation in the entity.json and placed a second row in the png.
You wont receive an error by doing this, but the game wont "load" the second animation.
I think the reason for this is that the game dont expect such a "direction-count" atrribute in an assembling-machine-type entity, so it wont look or use it in-game.
did you have frame-count?
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.2.10] Treefarm

Post by drs9999 »

I made the quick test with this:

Code: Select all

      "animation":
    {
      "filename": "entity/treefarm-mod/cokery.png",
      "priority": "medium",
      "frame-width": 96,
      "frame-height": 142,
      "direction-count": 2,
      "frame-count": 15
    },
This is similar to the "animation" of the transport-belt in my opinion.

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD 0.2.10] Treefarm

Post by rk84 »

How about with 3 direction? Copy top row to bottom.

edit: or 2 direction with one of these?
"axially-symmetrical": false (locomotives use this)
"axially-symetric": false (electric poles use this)
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

Post Reply

Return to “Questions, reviews and ratings”