[MOD 0.12.x] Treefarm REDUX (DISCONTINUED)

Looking for a mod? Have a review on a mod you'd like to share?
Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Bizz Keryear »

If I try to use Treefarm-Lite 0.2.0 (and that only) I get an

Code: Select all

_ _ Treefarm-Lite_ _/control.lua:18:attempt to index global 'game' (a nil value)
error.
Game version is 0.12.12

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 693
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by SuperSandro2000 »

Treefarm only works until 0.12.10.

Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Bizz Keryear »

Then it should said so ...

(thought maybe the treefarm mod decides to work if I use both, but same error)
But something is odd ... after I decided to live without I disabled them and lazy as I am I tried to play without restarting the game ... then the mod worked. ... well kinda ... I can research stuff and I made all sorts of stuff from it ... but trees don't grow and the cokery ... I dunno how to bring it to work ... (I wanted to try if the fertilizer makes the trees grow) .... but think I skip the whole mod now since it is now incompatible ... well ... if I take your word for it.

PiggyWhiskey
Fast Inserter
Fast Inserter
Posts: 240
Joined: Wed May 13, 2015 5:28 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by PiggyWhiskey »

The mod author hasn't posted to these forums since July. The only reason it broke was the devs made some API changes (for the better) unfortunately for users of this mod, it broke a bit. The tree growth and some t2 farm functionality isn't working.

Ive only played with lite, so I can't be sure about the rest.

If you like you could learn to mod and fix it? :-)

Otherwise as posted a few posts ago, try the greenhouse mod.

Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Bizz Keryear »

PiggyWhiskey wrote:The mod author hasn't posted to these forums since July. The only reason it broke was the devs made some API changes (for the better) unfortunately for users of this mod, it broke a bit. The tree growth and some t2 farm functionality isn't working.

Ive only played with lite, so I can't be sure about the rest.

If you like you could learn to mod and fix it? :-)

Otherwise as posted a few posts ago, try the greenhouse mod.
Thanks a bunch, that is a cool tip. And for the info about the changes, too. I want to grow trees ... so that I can protect my factory ... (remove the little pollution that I have)

User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 421
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Afforess »

I have ported TreeFarm to 0.12.11+. I fixed the on_load, and renamed the game.on_events to script.on_event.

I haven't tested too much, but my game managed to load, so there's that. If a few other people confirm it works, I might add a post in the Unofficial Updates section.


Removed - Non functional.
Last edited by Afforess on Mon Jan 11, 2016 6:17 pm, edited 2 times in total.

PiggyWhiskey
Fast Inserter
Fast Inserter
Posts: 240
Joined: Wed May 13, 2015 5:28 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by PiggyWhiskey »

With no forum activity from the mod author and if you plan on maintaining it, it might be better to make a new thread so you'd have control of the original post.

User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 421
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Afforess »

PiggyWhiskey wrote:With no forum activity from the mod author and if you plan on maintaining it, it might be better to make a new thread so you'd have control of the original post.
Probably. I will do that in a day or so.

crazylionator
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Oct 22, 2015 8:59 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by crazylionator »

Afforess wrote:
PiggyWhiskey wrote:With no forum activity from the mod author and if you plan on maintaining it, it might be better to make a new thread so you'd have control of the original post.
Probably. I will do that in a day or so.
Thank you very much.
But it works until load game. When loading trees are not growing.

User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 421
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Afforess »

crazylionator wrote:
Afforess wrote:
PiggyWhiskey wrote:With no forum activity from the mod author and if you plan on maintaining it, it might be better to make a new thread so you'd have control of the original post.
Probably. I will do that in a day or so.
Thank you very much.
But it works until load game. When loading trees are not growing.
Alright. I didn't notice because I hadn't gotten to treefarms in my game yet. Sounds like it still needs some work. I will take a look.

sarcolopter
Inserter
Inserter
Posts: 42
Joined: Sun Jul 26, 2015 5:08 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by sarcolopter »

I went through and edited all instances of "game.on" to "script.on", this fixed the mod, but for some reason it only works on my notebook. On my main computer, I still get the "attempt to index global 'game' (nil value)" error.

Update: Starting a new game works, and functions normally, but trying to load any saved game throws the error, even if it's a brand new start.

User avatar
Kadaban
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sun Feb 24, 2013 9:30 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Kadaban »

Afforess wrote:I have ported TreeFarm to 0.12.11+. I fixed the on_load, and renamed the game.on_events to script.on_event.

I haven't tested too much, but my game managed to load, so there's that. If a few other people confirm it works, I might add a post in the Unofficial Updates section.
Your modifications work well even with Factorio 0.12.16 until you place down the first MK2 treefarm (the logistics one).
The following error pops up as soon as placing it:

Code: Select all

Notice
Error while running the even handler: __Treefarm-Lite__/control.lua:664: LuaGameScript doesn't contain key get_localised_entity_name.
The game then boots you to the main screen.

rubixqubed
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Feb 27, 2015 10:08 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by rubixqubed »

sarcolopter: sounds like you may have missed a 'game.on_load' to 'script.on_load' change
Kadaban wrote:
Afforess wrote:I have ported TreeFarm to 0.12.11+. I fixed the on_load, and renamed the game.on_events to script.on_event.

I haven't tested too much, but my game managed to load, so there's that. If a few other people confirm it works, I might add a post in the Unofficial Updates section.
Your modifications work well even with Factorio 0.12.16 until you place down the first MK2 treefarm (the logistics one).
The following error pops up as soon as placing it:

Code: Select all

Notice
Error while running the even handler: __Treefarm-Lite__/control.lua:664: LuaGameScript doesn't contain key get_localised_entity_name.
The game then boots you to the main screen.
The line in control.lua that is being referenced needs the caption parameter removed (luckily it's an optional parameter). It should look like this:

Code: Select all

local rootFrame = player.gui.center.add{type = "frame", name = "fieldmk2Root", direction = "vertical"}
Instead of this:

Code: Select all

 local rootFrame = player.gui.center.add{type = "frame", name = "fieldmk2Root", caption = game.get_localised_entity_name("tf-fieldmk2"), direction = "vertical"}

Mordred
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Mar 15, 2014 10:32 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Mordred »

Can someone upload a file with the necessary changes done to get it up n running in newer builds again?

Would be cool, 'cause i'm not sure if i found all the necessery changes in the board.

[Edit]
Nvm. found it out. The files are in the attachments.

[Edit2]
Tried to fix the error "on load", i added a check if "game is Nil" and the following 2 lines are not called as Long as that's the case. But i'm honestly not sure about the Long term effects from that Change. The game loads, saves, loads again even with running tree farms, but there may be resulting Errors later on due to that Change.
Attachments
control.lua
TreefarmLite --> Control.lua
(26.15 KiB) Downloaded 927 times
control.lua
TreefarmAC --> Control.lua
(325 Bytes) Downloaded 434 times

TimmPure
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Sep 08, 2015 9:29 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by TimmPure »

Thanks for the effort Mordred, I'll give that attachment a shot :).

Mordred
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Mar 15, 2014 10:32 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Mordred »

TimmPure wrote:Thanks for the effort Mordred, I'll give that attachment a shot :).
Hey TimmePure, you're welcome, and thanks for taking the time to say "thanks" :) i hope it worked for you (and the 54 others that downloaded it :P)

In my case i havent had any issues yet, and i played it several hours with my own "hotfix".

roy7
Filter Inserter
Filter Inserter
Posts: 334
Joined: Fri Dec 12, 2014 4:24 pm
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by roy7 »

Mordred wrote:Can someone upload a file with the necessary changes done to get it up n running in newer builds again?

Would be cool, 'cause i'm not sure if i found all the necessery changes in the board.

[Edit]
Nvm. found it out. The files are in the attachments.

[Edit2]
Tried to fix the error "on load", i added a check if "game is Nil" and the following 2 lines are not called as Long as that's the case. But i'm honestly not sure about the Long term effects from that Change. The game loads, saves, loads again even with running tree farms, but there may be resulting Errors later on due to that Change.
Thanks!

goku90504
Inserter
Inserter
Posts: 24
Joined: Mon Nov 16, 2015 9:16 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by goku90504 »

whats the difference between lite and AC?

User avatar
Kayanor
Global Moderator
Global Moderator
Posts: 562
Joined: Sat May 10, 2014 7:20 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by Kayanor »

goku90504 wrote:whats the difference between lite and AC?
Lite is just Treefarm MK1 and MK2 with germling production, AC adds Fertilizer production, a coke coal production chain, medicine (healing stuff) production chain, and "organic warfare" - that is glue turrets, glue rockets, and glue capsule (or something like that).

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [MOD 0.12.x] Treefarm REDUX

Post by n9103 »

Unless you're in a huge desert biome, or are using another mod that uses wood, (or the fields) there's very little need for the Lite version.
Most of the time you'll hear Treefarm mentioned, it'll be the All Content version being referenced.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

Post Reply

Return to “Questions, reviews and ratings”

Who is online

Users browsing this forum: No registered users