blu3wolf / treefarm-lite Goto Github PK
View Code? Open in Web Editor NEWThis mod enables you to cultivate trees or other plants
License: GNU General Public License v3.0
This mod enables you to cultivate trees or other plants
License: GNU General Public License v3.0
Hey Blu3wolf =) Treefarm-lite 0.3.3 so far is stable, but eats CPU/UPS. We have maybe a dozen mk2 farms, and it's eating 2.5-3 (units) of UPS. Any suggestions?
" Error while running the on_configuration_changed: Treefarm-Lite/control.lua:230: attempt to call global v34Update
(a nil value) "
i have updated the game from 0.12.35 to 0.13.9.
i had in the 0.12 treefarm-lite.
mods:
DyTech (all) newest
MoMods (all except MoWeather) newest
Satellite Uplink Station_1.0.0
RoboCharge_0.0.7
Rename Trains_0.2.0
RailTanker_1.3.32
Landfill_2.1.10
Flare Stack_2.0.0
compoundsplitters_0.2.5
alien-artifact-loot_0.0.2
AdvancedEquipment_0.5.7
and:
Windows 10 64-bit (Factorio 64-bit)
Intel Core i7-4790 3.0 GHz (not overclockt)
Nvidia GTX 940
and before this error came i have the error on_load ( #60 )
(yet i go playing in 0.12.35 there are all working fine :) )
When selecting buildings for making a blueprint, Field MK2 is not recognized. It would be useful if it is fixed so we can place huge farms with blueprint.
Removed game.get_player() and game.get_surface(): game.players[] and game.surfaces[] can be used instead.
This needs to be done for control.lua still.
Getting crashes on current version(0.5.2) after playing for a bit with a tree farm,
Error while running event on_tick(ID 0)
Item stack count has to be a positive number
stack traceback:
Treefarm-Lite/control.lua:575:in function'harvest_tree'
Treefarm-Lite/control.lua:1061:in function'on_tree_is_ready_to_harvest'
Treefarm-Lite/control.lua:1027:in function'tick_trees'
Treefarm-Lite/control.lua:1102:in function<treefarm-lite/control.lua:1095>
The version number is still set to 0.4.1 so the game crashes on startup, can be fixed by opening info.json and changing it to 0.4.2
I'd like to RTFM. How does it work?
Log snippet: 10955.467 Info NetworkInputHandler.cpp:582: assigning playerIndex(1) to peer(9)
10955.467 Info GameActionHandler.cpp:1945: MapTick(10406807) processed PlayerJoinGame peerID(9) playerIndex(1) mode(connect)
11432.460 Error Util.cpp:58: Error while running the event handler: __Treefarm-Lite__/control.lua:220: attempt to index local 'player' (a nil value)
Factorio crashed. Generating symbolized stacktrace, please wait ...
#0 0x7a0c99 in SignalHandler at /tmp/factorio-mKmiz7/src/Util/CrashHandler.cpp:176
#1 0x7f041e88dd40 in ?? at ??:0
#2 0x3b74ac0 in ?? at ??:0
11434.689 Error Util.cpp:78: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.
Steps to reproduce: Have a Field mk2 in your hand. Shift-click for a construction bot to place it. As soon as the bot places it, the mod crashes, then the game crashes (after clicking ok).
218-220: local ent = game.get_surface("nauvis").create_entity{name = "tf-fieldmk2",
position = event.created_entity.position,
force = player.force}
It'd be nice to rotate (using R) the farms to allow moving the output box to a different location.
Original: #31 (comment)
Sadly the drone towers have one glaring weakness.... they never stop harvesting. At least I couldn't find a way to make them stop. (short of stopping seedling production to prevent new plantings which would then stop harvesting)
Mk1 farms will stop harvesting once their output inventory is full, but Mk2 farms will only stop once all 400 trees they support are marked for deconstruction or they don't have any germlings. it would be nice to control them some other way, since Factorio does not handle lots of outstanding deconstruction requests well.
Originally #30 - don't know how to reopen and haven't verified that #30 isn't happening
In Treefarm Lite version 0.4.0, when you place a tree farm (MK1) in an invalid location, you no longer get the error message (as in previous versions), instead it just disappears and is lost. You don't get the item back.
In Treefarm Lite version 0.4.0, when you place a tree farm (MK1) in an invalid location, you no longer get the error message (as in previous versions), instead it just disappears and is lost. You don't get the item back.
Mod: https://forums.factorio.com/viewtopic.php?f=91&t=16476&hilit=squeak+through#p109009
original: #29 (comment)
Testing this out, I had run into a problem where the field kept planting germlings even after the field was already full, but they didn't seem to be appearing anywhere. After removing the field and the germlings, I realized they were stacking on top of each other, and it turns out it's because I use squeak through (with trees set to have no collision). Manually adjusting squeak through to set the minimum collision size 0.01 instead of 0 fixed the fields while keeping a minimal collision box.
Wanted to let you know about the collision box planting issue since I'm sure I'm not the only one who adjusts tree collision boxes, and it's pretty confusing to see the fields using up more germlings than they should. Haven't tested on the official versions to see if it happens there as well.
I'd like to work on this for a bit to see how feasible support for Squeak Through is. The issue described makes squeak through and Treefarm completely incompatible
Hi
My treefarms randomly stops working, both before sappling enter and when there's fully mature trees. Only fix is to replace the farm, which sucks to do over and over.
Modlist:
{
"mods": [
{
"name": "base",
"enabled": "true"
},
{
"name": "5dim_automatization",
"enabled": "true"
},
{
"name": "5dim_battlefield",
"enabled": "true"
},
{
"name": "5dim_core",
"enabled": "true"
},
{
"name": "5dim_decoration",
"enabled": "false"
},
{
"name": "5dim_energy",
"enabled": "false"
},
{
"name": "5dim_logistic",
"enabled": "false"
},
{
"name": "5dim_mining",
"enabled": "true"
},
{
"name": "5dim_module",
"enabled": "true"
},
{
"name": "5dim_ores",
"enabled": "true"
},
{
"name": "5dim_resources",
"enabled": "true"
},
{
"name": "5dim_trains",
"enabled": "true"
},
{
"name": "5dim_transport",
"enabled": "true"
},
{
"name": "5dim_vehicle",
"enabled": "true"
},
{
"name": "AdvancedEquipment",
"enabled": "true"
},
{
"name": "bobassembly",
"enabled": "false"
},
{
"name": "bobconfig",
"enabled": "false"
},
{
"name": "bobelectronics",
"enabled": "false"
},
{
"name": "bobenemies",
"enabled": "false"
},
{
"name": "boblibrary",
"enabled": "true"
},
{
"name": "boblogistics",
"enabled": "false"
},
{
"name": "bobmining",
"enabled": "false"
},
{
"name": "bobmodules",
"enabled": "false"
},
{
"name": "bobores",
"enabled": "false"
},
{
"name": "bobplates",
"enabled": "false"
},
{
"name": "bobpower",
"enabled": "false"
},
{
"name": "bobtech",
"enabled": "false"
},
{
"name": "bobwarfare",
"enabled": "false"
},
{
"name": "clock",
"enabled": "true"
},
{
"name": "CORE-DyTech-Core",
"enabled": "true"
},
{
"name": "Cursed-PI",
"enabled": "true"
},
{
"name": "EvoGUI",
"enabled": "true"
},
{
"name": "FARL",
"enabled": "true"
},
{
"name": "Force Fields",
"enabled": "true"
},
{
"name": "Foreman",
"enabled": "true"
},
{
"name": "InterfaceChest",
"enabled": "true"
},
{
"name": "KS_Power",
"enabled": "true"
},
{
"name": "Landfill",
"enabled": "true"
},
{
"name": "MAIN-DyTech-Dynamics",
"enabled": "false"
},
{
"name": "MAIN-DyTech-Machine",
"enabled": "true"
},
{
"name": "MAIN-DyTech-Power",
"enabled": "true"
},
{
"name": "MAIN-DyTech-War",
"enabled": "true"
},
{
"name": "MAIN-DyTech-World",
"enabled": "true"
},
{
"name": "RailTanker",
"enabled": "true"
},
{
"name": "research-queue",
"enabled": "true"
},
{
"name": "RoadWorks",
"enabled": "true"
},
{
"name": "rso-mod",
"enabled": "true"
},
{
"name": "scarynights",
"enabled": "true"
},
{
"name": "SmartLoader",
"enabled": "true"
},
{
"name": "SmartSplitters",
"enabled": "true"
},
{
"name": "TheFatController",
"enabled": "true"
},
{
"name": "Treefarm-AC",
"enabled": "true"
},
{
"name": "Treefarm-Lite",
"enabled": "true"
},
{
"name": "upgrade-planner",
"enabled": "true"
},
{
"name": "Warehousing",
"enabled": "true"
}
]
}
@Blu3wolf the issue w/ 0.3.4 was that it eliminated the "nextUpdate" field from the field and the tree, correct?
would a reasonable solution simply be to recalculate the nextUpdate assuming the tree has just finished growing?
Error while loading entity prototype "tf-field" (furnace): selection box has to have distance at most 0.5 from the [0,0] point.
Modifications: Treefarm-Lite
Already have perf test functions for mk2 farms - do something similar for mk1 farms.
Also add a documentation file describing how to use the functions and conduct a performance test.
All active mode are visible in the screenshot.
Game was played in one go with all mods active from the get go.
First try to load the save in question.
So the Mk2 fields auto plant, but need robots to harvest. The Mk1 fields auto plant and harvest. On the whole, the Mk1 fields sound more efficient - the larger size of the Mk2 fields notwithstanding.
Thoughts on making the Mk1 fields smaller? Perhaps 6x6, or 6x7, instead of the current 7x8?
Alternatively, other thoughts on how there could be a bigger difference made between the Mk1 and Mk2 fields?
Noticeable stuttering occurs in MP with just treefarm loaded, on a fast LAN. Every five or so seconds, a 0.2 or so second lag happens on both connected machines.
As of factorio 0.13.10 using find_entities with area = { {x,y},{x,y} } is now longer working.
To fix this you should simply specify: position = {x,y} for this case.
Error while running event on_tick (ID 0)
An area of zero size is not supported. Either don't define area to search the entire surface or use 'position'.
stack traceback:
__Surfaces__/script/lib/api.lua:322: in function 'find_entities'
__Surfaces__/script/lib/pair-util.lua:144: in function 'clear_ground'
__Surfaces__/script/lib/pair-util.lua:95: in function 'create_paired_entity'
__Surfaces__/script/events.lua:250: in function '?'
__Surfaces__/script/events.lua:40: in function 'on_tick'
__Surfaces__/control.lua:171: in function <__Surfaces__/control.lua:171>
Thanks for the great mod!
Please also update the versions on mods.factorio.com.
Tree stumps block placement of fields but should not.
They should be removed when a field is placed, rather than prevent the placement.
This mod is very nice.
I have a question, treefarm-lite 0.3.4 to 0.3.5 is incompatible?
I tried in HeadlessServer v0.12.29 (on linux)
3.702 Loading map /home/factorio/servers/mods/saves/world.zip
3.717 Info Scenario.cpp:124: Map version 0.12.29-0
3.963 Warning NetworkInputHandler.cpp:739: mapTick(-1) networkTick(0) disconnecting from player but already disconnected.
4.009 Error MultiplayerManager.cpp:109: MultiplayerManager failed: "Error while running the on_configuration_changed: __Treefarm-Lite__/control.lua:327: table index is nil"
4.009 Info MultiplayerManager.cpp:912: networkTick(0) mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)
4.009 Error Main.cpp:344: Couldn't load the game for MP: Error while running the on_configuration_changed: __Treefarm-Lite__/control.lua:327: table index is nil
Bad english sorry.
Would you be interested in a slimed-down version of tree farm that I've been using? I was thinking about it and If you're interested I could take what I've got and re-write it from scratch to provide a "clean" version of tree farm with all the performance optimizations in it that I mentioned in the forum posts.
It probably wouldn't take long to do if you wanted it.
@Blu3wolf please update the mod version available on mods.factorio.com as soon as you can
It would be great if we can see the plant area of Field MK2 when hovering it with mouse, just like hovering a Robotport.
Treefarms are maintained by the fieldmaintainer method in control.lua. This updates all treefarms in a queue (global.tf.fieldList).
global.tf.fieldList[1].nextUpdate = tick + 60
local field = table.remove(global.tf.fieldList, 1)
table.insert(global.tf.fieldList, field)
table.insert and table.remove for lua tables more than 100 entries can cause performance issues. This suggests that to have 600 treefarms at 60 FPS, the queue currently implemented will not work.
The sparse table solution proposed by @Rseding91 for seed planting may also work for the treefarms themselves:
Lua tables do not work well when you table.insert into the middle of them or table.remove from not-the-end of them. I can't stress this enough: every time you table.insert() into the middle of an indexed lua table it has to push all elements after the insertion point out by 1. Every time you table.remove() from not-the-end all elements after the one you remove are shifted up by one. This happens every time a tree is grown and so it eats a ton of CPU time.
To fix this: you can use (like I did) a sparse table of trees to grow. The "trees to grow" contains a table of tables. You index the table with the current tick to see if that index contains a table of trees to grow and if it does you grow all of those trees and then re-insert them at the next tick they should grow.
In this case, instead of tables of tables of trees to grow at this tick, indexed by tick, it would be tables of tables of treefarms to maintain at this tick, indexed by tick.
Treefarm specifies the surface its entities are placed on - this will break with mods that change the surface used.
Im not sure if its possible, but it would be useful if it were possible to be able to prevent non seeds from being inserted into the fuel slot of a farm.
Is there much reason to move treefarms to update on mod 60 of the tick instead of the tick number? Just on its own that would prevent 'lost' treefarms like #25, but other than improving performance of a loop in a loop that searched for 'lost' treefarms, I cant see much use to it. And seeing as it would prevent them, such a function would not serve much purpose.
Thoughts? Im just debating whether or not to delete dd216bf, or maybe to develop it further.
https://github.com/Blu3wolf/Treefarm-Lite/tree/feature/fieldfix
Reports of performance hits in 0.4.0 when output inventory is full - #30
@secondadvent and @StephenWard
Original : https://forums.factorio.com/viewtopic.php?f=44&t=23417#p146851
As mentioned, mk1 farms are incompatible with the "Magnets, Motors, Transformers, and More!" mod
This would help treefarm's look and feel fit the game better. We could also randomize the final tree images to provide more variety.
Treefarm-Lite__/control.lua:573: LuaEntity API call when LuaEntity was invalid.
CTD
Three farms producing with germlings. It looks like possibly that it is happening when trees are going from medium to large.
Treefarm Lite Version 0.3.4
Factorio version 0.12.29
New world.
Mods:
Advanced Logistics
Autofill
Bob's Mods Suite
EvoGUI
FARL
Fluid Barrel
Initial Scan
Larger Inventory
Rail Tanker
RSO
Smart Trains
TheFatController
Tree Collision
YARM
I get this error every time i open up my saved game.
Error while running the event handler: Treefarm-Lite/control.lua:275: attempt to index field '?' (a nil value)
It's pissing me off because i don't know coding and can't seem to fix it
(worked fine yesterday, did like no change today)
error while running the on_configuration_changed: control.lua:49: attempt to call global defineStandardSeedPrototype (a nil value)
would be interesting if circuit wires could be run to Mk2 farms, so that you can configure their output. Even as simply as 'stop harvesting if there is more than x wood in the network'.
hiho Blu3wolf
i have newest version of treefarm and factorio experimental version
on loading my saved game the following error:
mod-Treefarm-Lite::on_load().
Detected modifications to the 'global' table:
CRC before: 3459036740
CRC after: 4032063333"
complete log:
http://pastebin.com/raw/54r07k9u
Also bump coral's pollution absorption up to where tf trees are now. Right now, tf trees absorbs half of what the base game's trees do, and coral absorbs half of that.
As you may have figured out from the title or the date of my last contribution, this repository is not presently updated on a regular basis. If you are interested in maintaining it, the easiest way would be to fork the repository and make new releases there.
Anyone doing this for a regular period of time may contact me to request access to the factorio mods list to update the link to their fork, provided their fork is stable and regularly updated with Factorio.
Cheers, and happy mining/industrial takeover of a poor unsuspecting planet!
Hey i just placed a mark2 and our savegame is broken now
a wierd control.lua issue
if you need something specific ask
Hi!
I'm playing Factorio 0.12.24 with TF Lite 0.2.6 in multiplayer.
I've got problem, when I try to plant a seed, my friend is desynchronized. We tried to change the version of the mod, but it didn't make any sense.
--Georg999
Factorio 13.6
Treefarm-lite 5.0.1
When loading saved game with treefarm enabled after installing other non treefarm mods an error is reported and the save will not load.
Error while running mod-Treefarm-Lite::on_load().
Detected modifications to the 'global' table:
CRC before: 2954502010
CRC after: 1701740150
Saved game that generates error
Derp 13 Bobs re-tree planted.zip
Mod list for saved game and new additions that triggered treefarm error.
Temporary Workaround:
Disable treefarm > load save > let game clear all treefarm items > save game > enable treefarm > load game and everything works fine from that point on saving and loading.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.