Factorio Item List and uses


Trees


List

tree-01
tree-02
tree-03
tree-04
tree-05
tree-06
tree-07
tree-08
tree-09
dead-tree
dry-tree
green-coral
dead-grey-trunk
dry-hairy-tree
dead-dry-hairy-tree

Commands

single tree

/c game.player.surface.create_entity{name="green-coral", position={game.local_player.position.x, game.local_player.position.y-5}}

line of one type

/c   length = 30;
      width = 10;
emptypercent= 75;
   filltype = "tree-01";
     safety = 5;
offx = 0; offy = 0;
faceing = game.local_player.walking_state.direction;
    if faceing == 0 then            offy = -1;
elseif faceing == 1 then offx =  1; offy = -1;
elseif faceing == 2 then offx =  1;
elseif faceing == 3 then offx =  1; offy =  1;
elseif faceing == 4 then            offy =  1;
elseif faceing == 5 then offx = -1; offy =  1;
elseif faceing == 6 then offx = -1;
elseif faceing == 7 then offx = -1; offy = -1;
end
for vl=0,length do
    for vw = -width,width do
        flip = math.random(100);
         if flip > emptypercent then
             game.local_player.surface.create_entity{name=filltype, position={game.local_player.position.x+(vl*offx)+(offx*safety)+(vw*offy), game.local_player.position.y+(vl*offy)+(offy*safety)+(vw*offx)}} 
         end
    end
end
game.player.clear_console()

line of random type

/c   length = 30;
      width = 10;
emptypercent= 75;
     safety = 5;
offx = 0; offy = 0;
faceing = game.local_player.walking_state.direction;
    if faceing == 0 then            offy = -1;
elseif faceing == 1 then offx =  1; offy = -1;
elseif faceing == 2 then offx =  1;
elseif faceing == 3 then offx =  1; offy =  1;
elseif faceing == 4 then            offy =  1;
elseif faceing == 5 then offx = -1; offy =  1;
elseif faceing == 6 then offx = -1;
elseif faceing == 7 then offx = -1; offy = -1;
end
for vl=0,length do
    for vw = -width,width do
        flip = math.random(100);
         if flip > emptypercent then 
             game.local_player.surface.create_entity{name="tree-0" .. math.random(9), position={game.local_player.position.x+(vl*offx)+(offx*safety)+(vw*offy), game.local_player.position.y+(vl*offy)+(offy*safety)+(vw*offx)}} 
         end
    end
end
game.player.clear_console()
/r/factorio Thread Parent