Page 1 of 1

read/set Tree color

Posted: Wed May 03, 2017 6:39 am
by Graveeater
I asked about graphics_variation for trees and this was added 0.15. This helped to make the simulated tree growth look a lot more natural.
But now I notice that the tree color seems to change, too. This is probably due to trees having a list of possible colors and a random one beeing picked, i.e, exactly the same problem just less noticable.

I tried to set the color using http://lua-api.factorio.com/latest/LuaE ... tity.color but that just errors out:

Code: Select all

104.742 Error MainLoop.cpp:853: Exception at tick 79577: Error while running event tree-growth-natural-growth::on_tick (ID 0)
__tree-growth-natural-growth__/control.lua:166: bad argument #1 to '__newindex' (table expected, got nil)
Probably because the luadoc tells us this is only for "character or rolling stock".

Now I would like to be able to read and specify the color for a tree, too.
Maybe extending this color property could work for trees? Or adding another like color_variation?

Re: read/set Tree color

Posted: Thu May 04, 2017 4:31 pm
by Graveeater
I just noticed that this has been asked before: viewtopic.php?f=28&t=14193