read/set Tree color

Things that already exist in the current mod API
Graveeater
Burner Inserter
Burner Inserter
Posts: 19
Joined: Thu Jul 07, 2016 8:00 pm
Contact:

read/set Tree color

Post 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?
Graveeater
Burner Inserter
Burner Inserter
Posts: 19
Joined: Thu Jul 07, 2016 8:00 pm
Contact:

Re: read/set Tree color

Post by Graveeater »

I just noticed that this has been asked before: viewtopic.php?f=28&t=14193
Post Reply

Return to “Already exists”