← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/terrain_affinity into lp:widelands

 

SirVer has proposed merging lp:~widelands-dev/widelands/terrain_affinity into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/terrain_affinity/+merge/224045

Suggested commit message: 
Bring back terrain affinity for trees (only) by implementing a model as developed in bug 1328635. Each terrain type gains 3 properties (humidity, temperature, fertility) and each immovable that can "grow" must define its preferred values for these as well as a pickiness value (between 0 (not picky) and 1 (very picky)) that describes how it copes in non ideal situations.

This also changes plant to always plant one of the 6 best matching immovables for the chosen field.
<<<


The core of the work for this branch is not yet done though: defining the model parameter for each terrain and tree. I need help figuring out the values (3 for each soil and 4 for each tree). I added NOCOMM() in each place where change needs to be done. I would be thankful if somebody could take that off of me and figure out suitable values that fit the engine, makes all worlds (the old winter, green, black and desert maps) playable and looks nice. I'd rather continue fixing bugs and review the many open pull requests. Volunteers?

-- 
https://code.launchpad.net/~widelands-dev/widelands/terrain_affinity/+merge/224045
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/terrain_affinity into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2014-06-22 05:28:07 +0000
+++ CMakeLists.txt	2014-06-22 16:38:25 +0000
@@ -120,8 +120,10 @@
   add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-padded")
   add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-sign-conversion")
   add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-switch-enum")
+
   add_flag(WL_COMPILE_DIAGNOSTICS "-Qunused-arguments")
 
+
   # TODO(sirver): weak-vtables should be enabled, but leads to lot of errors right now.
   add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-weak-vtables")
 else()

=== modified file 'src/logic/CMakeLists.txt'
--- src/logic/CMakeLists.txt	2014-06-21 16:01:35 +0000
+++ src/logic/CMakeLists.txt	2014-06-22 16:38:25 +0000
@@ -70,6 +70,8 @@
     immovable.cc
     immovable.h
     immovable_program.h
+    terrain_affinity.cc
+    terrain_affinity.h
     instances.cc
     instances.h
     map.cc

=== modified file 'src/logic/description_maintainer.h'
--- src/logic/description_maintainer.h	2014-06-18 14:23:22 +0000
+++ src/logic/description_maintainer.h	2014-06-22 16:38:25 +0000
@@ -20,6 +20,7 @@
 #ifndef DESCR_MAINTAINER_H
 #define DESCR_MAINTAINER_H
 
+#include <cassert>
 #include <map>
 #include <memory>
 #include <string>
@@ -55,6 +56,14 @@
 		return (idx >= 0 && idx < static_cast<int32_t>(items_.size())) ? items_[idx].get() : nullptr;
 	}
 
+	// Returns the entry at 'index'. If 'index' is out of bounds the result is
+	// undefined.
+	// TODO(sirver): this should be called get and the other should be called get_mutable.
+	T& get_unmutable(const uint32_t index) const {
+		assert(0 <= index && index < items_.size());
+		return *items_.at(index);
+	}
+
 private:
 	typedef std::map<std::string, int> NameToIndexMap;
 	std::vector<std::unique_ptr<T>> items_;

=== modified file 'src/logic/game.cc'
--- src/logic/game.cc	2014-06-21 14:05:00 +0000
+++ src/logic/game.cc	2014-06-22 16:38:25 +0000
@@ -20,6 +20,7 @@
 #include "logic/game.h"
 
 #include <cstring>
+#include <limits>
 #include <memory>
 #include <string>
 
@@ -1162,4 +1163,8 @@
 		}
 }
 
+double logic_rand_as_double(Game* game) {
+	return static_cast<double>(game->logic_rand()) / std::numeric_limits<uint32_t>::max();
+}
+
 }

=== modified file 'src/logic/game.h'
--- src/logic/game.h	2014-06-18 15:33:04 +0000
+++ src/logic/game.h	2014-06-22 16:38:25 +0000
@@ -275,6 +275,9 @@
 	return location;
 }
 
+// Returns a value between [0., 1].
+double logic_rand_as_double(Game* game);
+
 }
 
 #endif

=== modified file 'src/logic/immovable.cc'
--- src/logic/immovable.cc	2014-06-21 10:24:12 +0000
+++ src/logic/immovable.cc	2014-06-22 16:38:25 +0000
@@ -42,6 +42,7 @@
 #include "logic/map.h"
 #include "logic/mapfringeregion.h"
 #include "logic/player.h"
+#include "logic/terrain_affinity.h"
 #include "logic/tribe.h"
 #include "logic/widelands_geometry_io.h"
 #include "logic/worker.h"
@@ -295,6 +296,10 @@
 		add_animation(animation, g_gr->animations().load(*anims->get_table(animation)));
 	}
 
+	if (table.has_key("terrain_affinity")) {
+		terrain_affinity_.reset(new TerrainAffinity(*table.get_table("terrain_affinity"), name()));
+	}
+
 	std::unique_ptr<LuaTable> programs = table.get_table("programs");
 	for (const std::string& program_name : programs->keys<std::string>()) {
 		try {
@@ -320,6 +325,13 @@
 	return *editor_category_;
 }
 
+bool Immovable_Descr::has_terrain_affinity() const {
+	return terrain_affinity_.get() != nullptr;
+}
+
+const TerrainAffinity& Immovable_Descr::terrain_affinity() const {
+	return *terrain_affinity_;
+}
 
 void Immovable_Descr::make_sure_default_program_is_there() {
 	if (!m_programs.count("program")) {  //  default program
@@ -493,10 +505,6 @@
 	schedule_act(game, 1);
 }
 
-uint32_t Immovable_Descr::terrain_suitability(FCoords const, const Map&) const {
-	return 6 * 255;
-}
-
 /**
  * Run program timer.
 */
@@ -956,6 +964,11 @@
 ImmovableProgram::ActGrow::ActGrow
 	(char * parameters, Immovable_Descr & descr)
 {
+	if (!descr.has_terrain_affinity()) {
+		throw game_data_error(
+		   "Immovable %s can 'grow', but has no terrain_affinity entry.", descr.name().c_str());
+	}
+
 	try {
 		tribe = true;
 		for (char * p = parameters;;)
@@ -993,22 +1006,21 @@
 	}
 }
 
-void ImmovableProgram::ActGrow::execute
-	(Game & game, Immovable & immovable) const
-{
-	const Map             & map   = game     .map  ();
-	const Immovable_Descr & descr = immovable.descr();
+void ImmovableProgram::ActGrow::execute(Game& game, Immovable& immovable) const {
+	const Map& map = game.map();
 	FCoords const f = map.get_fcoords(immovable.get_position());
-	if (game.logic_rand() % (6 * 255) < descr.terrain_suitability(f, map)) {
-		Tribe_Descr const * const owner_tribe =
-			tribe ? immovable.descr().get_owner_tribe() : nullptr;
-		immovable.remove(game); //  Now immovable is a dangling reference!
+	const Immovable_Descr& descr = immovable.descr();
+
+	if (logic_rand_as_double(&game) <
+	    probability_to_grow(descr.terrain_affinity(), f, map, game.world().terrains())) {
+		Tribe_Descr const* const owner_tribe = tribe ? descr.get_owner_tribe() : nullptr;
+		immovable.remove(game);  //  Now immovable is a dangling reference!
 		game.create_immovable(f, type_name, owner_tribe);
-	} else
+	} else {
 		immovable.program_step(game);
+	}
 }
 
-
 /**
  * remove
 */
@@ -1039,7 +1051,6 @@
 		immovable.program_step(game);
 }
 
-
 ImmovableProgram::ActSeed::ActSeed(char * parameters, Immovable_Descr & descr)
 {
 	try {
@@ -1096,31 +1107,35 @@
 void ImmovableProgram::ActSeed::execute
 	(Game & game, Immovable & immovable) const
 {
-	const Immovable_Descr & descr = immovable.descr();
-	const Map & map = game.map();
-	if
-		(game.logic_rand() % (6 * 256)
-		 <
-		 descr.terrain_suitability
-		 	(map.get_fcoords(immovable.get_position()), map))
-	{
-		MapFringeRegion<> mr(map, Area<>(immovable.get_position(), 0));
+	const Map& map = game.map();
+	FCoords const f = map.get_fcoords(immovable.get_position());
+	const Immovable_Descr& descr = immovable.descr();
+	double p =
+	   probability_to_grow(descr.terrain_affinity(), f, map, game.world().terrains());
+
+	if (logic_rand_as_double(&game) <
+	    probability_to_grow(descr.terrain_affinity(), f, map, game.world().terrains())) {
+		// Seed a new tree.
+		MapFringeRegion<> mr(map, Area<>(f, 0));
 		uint32_t fringe_size = 0;
 		do {
 			mr.extend(map);
 			fringe_size += 6;
-		} while (game.logic_rand() % 256 < probability);
-		for (uint32_t n = game.logic_rand() % fringe_size; n; --n)
+		} while (game.logic_rand() % std::numeric_limits<uint8_t>::max() < probability);
+
+		for (uint32_t n = game.logic_rand() % fringe_size; n; --n) {
 			mr.advance(map);
-		FCoords const f = map.get_fcoords(mr.location());
-		if
-			(not f.field->get_immovable()        and
-			 (f.field->nodecaps() & MOVECAPS_WALK) and
-			 game.logic_rand() % (6 * 256) < descr.terrain_suitability(f, map))
-			game.create_immovable
-				(mr.location(),
-				 type_name,
-				 tribe ? immovable.descr().get_owner_tribe() : nullptr);
+		}
+
+		const FCoords new_location = map.get_fcoords(mr.location());
+		if (!new_location.field->get_immovable() &&
+		    (new_location.field->nodecaps() & MOVECAPS_WALK) &&
+		    logic_rand_as_double(&game) <
+		       probability_to_grow(
+		          descr.terrain_affinity(), new_location, map, game.world().terrains())) {
+			game.create_immovable(
+			   mr.location(), type_name, tribe ? immovable.descr().get_owner_tribe() : nullptr);
+		}
 	}
 
 	immovable.program_step(game);

=== modified file 'src/logic/immovable.h'
--- src/logic/immovable.h	2014-06-21 10:24:12 +0000
+++ src/logic/immovable.h	2014-06-22 16:38:25 +0000
@@ -35,6 +35,7 @@
 
 class Economy;
 class Map;
+class TerrainAffinity;
 class WareInstance;
 class Worker;
 class World;
@@ -109,14 +110,19 @@
 
 	Tribe_Descr const * get_owner_tribe() const {return m_owner_tribe;}
 
-	/// How well the terrain around f suits an immovable of this type.
-	uint32_t terrain_suitability(FCoords, const Map &) const;
-
 	const Buildcost & buildcost() const {return m_buildcost;}
 
 	// Returns the editor category.
 	const EditorCategory& editor_category() const;
 
+	// Every immovable that can 'grow' needs to have terrain affinity defined,
+	// all others do not. Returns true if this one has it defined.
+	bool has_terrain_affinity() const;
+
+	// Returns the terrain affinity. If !has_terrain_affinity() this will return
+	// an undefined value.
+	const TerrainAffinity& terrain_affinity() const;
+
 protected:
 	int32_t     m_size;
 	Programs    m_programs;
@@ -130,10 +136,11 @@
 	Buildcost m_buildcost;
 
 private:
-	EditorCategory* editor_category_;  // not owned.
-
 	// Adds a default program if none was defined.
 	void make_sure_default_program_is_there();
+
+	EditorCategory* editor_category_;  // not owned.
+	std::unique_ptr<TerrainAffinity> terrain_affinity_;
 };
 
 class Immovable : public BaseImmovable {

=== added file 'src/logic/terrain_affinity.cc'
--- src/logic/terrain_affinity.cc	1970-01-01 00:00:00 +0000
+++ src/logic/terrain_affinity.cc	2014-06-22 16:38:25 +0000
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2006-2014 by the Widelands Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include "logic/terrain_affinity.h"
+
+#include <vector>
+
+#include "logic/description_maintainer.h"
+#include "logic/field.h"
+#include "logic/map.h"
+#include "logic/widelands_geometry.h"
+#include "logic/world/terrain_description.h"
+#include "scripting/lua_table.h"
+
+namespace Widelands {
+
+namespace  {
+
+constexpr double pow2(const double& a) {
+	return a * a;
+}
+
+}  // namespace
+
+TerrainAffinity::TerrainAffinity(const LuaTable& table, const std::string& immovable_name)
+   : preferred_fertility_(table.get_double("preferred_fertility")),
+     preferred_humidity_(table.get_double("preferred_humidity")),
+     preferred_temperature_(table.get_double("preferred_temperature")),
+     pickiness_(table.get_double("pickiness")) {
+	if (!(0 <= preferred_fertility_ && preferred_fertility_ <= 1.)) {
+		throw game_data_error("%s: preferred_fertility is not in [0, 1].", immovable_name.c_str());
+	}
+	if (!(0 <= preferred_humidity_ && preferred_humidity_ <= 1.)) {
+		throw game_data_error("%s: preferred_humidity is not in [0, 1].", immovable_name.c_str());
+	}
+	if (!(0 <= pickiness_ && pickiness_ <= 1.)) {
+		throw game_data_error("%s: pickiness is not in [0, 1].", immovable_name.c_str());
+	}
+	if (preferred_temperature_ < 0) {
+		throw game_data_error("%s: preferred_temperature is not in Kelvin.", immovable_name.c_str());
+	}
+}
+
+double TerrainAffinity::preferred_temperature() const {
+	return preferred_temperature_;
+}
+
+double TerrainAffinity::preferred_fertility() const {
+	return preferred_fertility_;
+}
+
+double TerrainAffinity::preferred_humidity() const {
+	return preferred_humidity_;
+}
+
+double TerrainAffinity::pickiness() const {
+	return pickiness_;
+}
+
+double probability_to_grow
+	(const TerrainAffinity& affinity, const FCoords& fcoords,
+	 const Map& map, const DescriptionMaintainer<TerrainDescription>& terrains)
+{
+	double terrain_humidity = 0;
+	double terrain_fertility = 0;
+	double terrain_temperature = 0;
+
+	const auto average = [&terrain_humidity, &terrain_fertility, &terrain_temperature, &terrains](
+	   const int terrain_index) {
+		const TerrainDescription& t = terrains.get_unmutable(terrain_index);
+		terrain_humidity += t.humidity() / 6.;
+		terrain_temperature += t.temperature() / 6.;
+		terrain_fertility += t.fertility() / 6.;
+	};
+
+	average(fcoords.field->terrain_d());
+	average(fcoords.field->terrain_r());
+	{
+		FCoords tln;
+		map.get_tln(fcoords, &tln);
+		average(tln.field->terrain_d());
+		average(tln.field->terrain_r());
+	}
+
+	{
+		FCoords trn;
+		map.get_trn(fcoords, &trn);
+		average(trn.field->terrain_d());
+	}
+
+	{
+		FCoords ln;
+		map.get_ln(fcoords, &ln);
+		average(ln.field->terrain_r());
+	}
+
+	const double sigma_fertility = (1. - affinity.pickiness()) * 0.25 + 1e-2;
+	const double sigma_humidity = (1. - affinity.pickiness()) * 0.25 + 1e-2;
+	const double sigma_temperature = (1. - affinity.pickiness()) * 12.5 + 1e-1;
+
+	return std::exp(
+	   -pow2(affinity.preferred_fertility() - terrain_fertility) / (2 * pow2(sigma_fertility)) -
+	   pow2(affinity.preferred_humidity() - terrain_humidity) / (2 * pow2(sigma_temperature)) -
+	   pow2(affinity.preferred_temperature() - terrain_temperature) / (2 * pow2(sigma_temperature)));
+}
+
+}  // namespace Widelands

=== added file 'src/logic/terrain_affinity.h'
--- src/logic/terrain_affinity.h	1970-01-01 00:00:00 +0000
+++ src/logic/terrain_affinity.h	2014-06-22 16:38:25 +0000
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2006-2014 by the Widelands Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <string>
+
+#include <boost/noncopyable.hpp>
+
+#include "logic/description_maintainer.h"
+
+class LuaTable;
+
+namespace Widelands {
+
+class Map;
+class TerrainDescription;
+class World;
+struct FCoords;
+
+// Describes the parameters and the pickiness of Immovables towards terrain
+// parameters. Alls immovables that use 'grow' in any of their programs must
+// define this.
+class TerrainAffinity : boost::noncopyable {
+public:
+	explicit TerrainAffinity(const LuaTable& table, const std::string& immovable_name);
+
+	// Preferred temperature in Kelvin.
+	double preferred_temperature() const;
+
+	// Preferred fertility in percent [0, 1].
+	double preferred_fertility() const;
+
+	// Preferred humidity in percent [0, 1].
+	double preferred_humidity() const;
+
+	// A value in [0, 1] that defines how well this can deal with non-ideal
+	// situations. Lower means it is less picky, i.e. it can deal better.
+	double pickiness() const;
+
+private:
+	double preferred_fertility_;
+	double preferred_humidity_;
+	double preferred_temperature_;
+	double pickiness_;
+};
+
+// Returns a value in [0., 1.] that describes the suitability for the
+// 'immovable_affinity' for 'field'. Higher is better suited.
+double probability_to_grow
+	(const TerrainAffinity& immovable_affinity, const FCoords& fcoords,
+	 const Map& map, const DescriptionMaintainer<TerrainDescription>& terrains);
+
+}  // namespace Widelands

=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc	2014-06-18 13:20:33 +0000
+++ src/logic/worker.cc	2014-06-22 16:38:25 +0000
@@ -19,7 +19,9 @@
 
 #include "logic/worker.h"
 
+#include <iterator>
 #include <memory>
+#include <tuple>
 
 #include <boost/format.hpp>
 
@@ -48,6 +50,7 @@
 #include "logic/message_queue.h"
 #include "logic/player.h"
 #include "logic/soldier.h"
+#include "logic/terrain_affinity.h"
 #include "logic/tribe.h"
 #include "logic/warehouse.h"
 #include "logic/worker_program.h"
@@ -806,73 +809,75 @@
 			return true;
 		}
 
-	std::vector<int32_t> best_fitting;
 	std::vector<bool> is_tribe_specific;
-	uint32_t terrain_suitability = 0;
-	for (uint8_t i = 0; i < action.sparamv.size(); ++i) {
-		std::vector<std::string> const list(split_string(action.sparamv[i], ":"));
-		std::string immovable;
-
-		if (list.size() == 1) {
-			state.svar1 = "world";
-			immovable = list[0];
-			state.ivar2 = game.world().get_immovable_index(immovable.c_str());
-			if (state.ivar2 > 0) {
-				Immovable_Descr const * imm =
-					game.world().get_immovable_descr(state.ivar2);
-				uint32_t suits = imm->terrain_suitability(fpos, map);
-				// Remove existing, if this immovable suits better
-				if (suits > terrain_suitability) {
-					best_fitting.clear();
-					is_tribe_specific.clear();
-				}
-				if (suits >= terrain_suitability) {
-					terrain_suitability = suits;
-					best_fitting.push_back(state.ivar2);
-					is_tribe_specific.push_back(false);
-				}
-				continue;
-			}
-		} else {
-			state.svar1 = "tribe";
-			immovable = list[1];
-			state.ivar2 = descr().tribe().get_immovable_index(immovable.c_str());
-			if (state.ivar2 > 0) {
-				Immovable_Descr const * imm =
-					descr().tribe().get_immovable_descr(state.ivar2);
-				uint32_t suits = imm->terrain_suitability(fpos, map);
-				// Remove existing, if this immovable suits better
-				if (suits > terrain_suitability) {
-					best_fitting.clear();
-					is_tribe_specific.clear();
-				}
-				if (suits >= terrain_suitability) {
-					terrain_suitability = suits;
-					best_fitting.push_back(state.ivar2);
-					is_tribe_specific.push_back(true);
-				}
-				continue;
-			}
-		}
-
-		// Only here if immovable was not found
-		molog("  WARNING: Unknown immovable %s\n", action.sparamv[i].c_str());
-		send_signal(game, "fail");
-		pop_task(game);
-		return true;
-	}
-
-	assert(best_fitting.size() == is_tribe_specific.size());
-	if (best_fitting.empty()) {
+
+	// Figure the (at most) six best fitting immovables (as judged by terrain
+	// affinity). We will pick one of them at random later. The container is
+	// picked to be a stable sorting one, so that no deyncs happen in
+	// multiplayer.
+	std::set<std::tuple<double, uint32_t>> best_suited_immovables_index;
+
+	// Checks if the 'immovable_description' has a terrain_affinity, if so use it. Otherwise assume it
+	// to be 1. (perfect fit). Adds it to the best_suited_immovables_index.
+	const auto test_suitability = [&best_suited_immovables_index, &fpos, &map, &game](
+	   const uint32_t index, const Immovable_Descr& immovable_description) {
+		double p = 1.;
+		if (immovable_description.has_terrain_affinity()) {
+			p = probability_to_grow(
+			   immovable_description.terrain_affinity(), fpos, map, game.world().terrains());
+		}
+		best_suited_immovables_index.insert(std::make_tuple(p, index));
+		if (best_suited_immovables_index.size() > 6) {
+			best_suited_immovables_index.erase(best_suited_immovables_index.begin());
+		}
+	};
+
+	if (action.sparamv.size() != 1) {
+			throw game_data_error("plant takes only one argument.");
+	}
+
+	std::vector<std::string> const list(split_string(action.sparamv[0], ":"));
+
+	if (list.size() != 2) {
+		throw game_data_error("plant takes either tribe:<immovable> or attrib:<attribute>");
+	}
+
+	if (list[0] == "attrib") {
+		state.svar1 = "world";
+
+		const DescriptionMaintainer<Immovable_Descr>& immovables = game.world().immovables();
+
+		const uint32_t attribute_id = Immovable_Descr::get_attribute_id(list[1]);
+		for (uint32_t i = 0; i < immovables.get_nitems(); ++i) {
+			Immovable_Descr& immovable_descr = immovables.get_unmutable(i);
+			if (!immovable_descr.has_attribute(attribute_id)) {
+				continue;
+			}
+			test_suitability(i, immovable_descr);
+		}
+	} else {
+		state.svar1 = "tribe";
+		uint32_t immovable_index = descr().tribe().get_immovable_index(list[1]);
+
+		if (immovable_index > 0) {
+			const Immovable_Descr* imm = descr().tribe().get_immovable_descr(immovable_index);
+			test_suitability(immovable_index, *imm);
+		}
+	}
+
+	if (best_suited_immovables_index.empty()) {
 		molog("  WARNING: No suitable immovable found!");
 		send_signal(game, "fail");
 		pop_task(game);
 		return true;
 	}
-	uint32_t const idx = game.logic_rand() % best_fitting.size();
-
-	Immovable & newimm = game.create_immovable
-		(pos, best_fitting[idx], is_tribe_specific[idx] ? &descr().tribe() : nullptr);
+
+	// Randomly pick one of the immovables to be planted.
+	const uint32_t idx = game.logic_rand() % best_suited_immovables_index.size();
+	state.ivar2 = std::get<1>(*std::next(best_suited_immovables_index.begin(), idx));
+
+	Immovable& newimm =
+	   game.create_immovable(pos, state.ivar2, state.svar1 == "tribe" ? &descr().tribe() : nullptr);
 	newimm.set_owner(get_owner());
 
 	if (action.iparam1 == Action::plantUnlessObject)

=== modified file 'src/logic/world/editor_category.cc'
--- src/logic/world/editor_category.cc	2014-05-01 11:46:05 +0000
+++ src/logic/world/editor_category.cc	2014-06-22 16:38:25 +0000
@@ -20,6 +20,8 @@
 #include "logic/world/editor_category.h"
 
 #include "graphic/graphic.h"
+#include "io/filesystem/layered_filesystem.h"
+#include "logic/game_data_error.h"
 #include "scripting/lua_table.h"
 
 namespace Widelands {
@@ -28,6 +30,9 @@
    : name_(table.get_string("name")),
      descname_(table.get_string("descname")),
      image_file_(table.get_string("picture")) {
+	if (!g_fs->FileExists(image_file_)) {
+		throw game_data_error("EditorCategory %s has non-existing \"picture\".", name_.c_str());
+	}
 }
 
 const std::string& EditorCategory::name() const {

=== modified file 'src/logic/world/terrain_description.cc'
--- src/logic/world/terrain_description.cc	2014-06-18 11:26:25 +0000
+++ src/logic/world/terrain_description.cc	2014-06-22 16:38:25 +0000
@@ -72,8 +72,20 @@
      is_(TerrainTypeFromString(table.get_string("is"))),
      default_resource_index_(world.get_resource(table.get_string("default_resource").c_str())),
      default_resource_amount_(table.get_int("default_resource_amount")),
-     dither_layer_(table.get_int("dither_layer")) {
+     dither_layer_(table.get_int("dither_layer")),
+     temperature_(table.get_double("temperature")),
+     fertility_(table.get_double("fertility")),
+     humidity_(table.get_double("humidity")) {
 
+	if (!(0 <= fertility_ && fertility_ <= 1.)) {
+		throw game_data_error("%s: fertility is not in [0, 1].", name_.c_str());
+	}
+	if (!(0 <= humidity_ && humidity_ <= 1.)) {
+		throw game_data_error("%s: humidity is not in [0, 1].", name_.c_str());
+	}
+	if (temperature_ < 0) {
+		throw game_data_error("%s: temperature is not in Kelvin.", name_.c_str());
+	}
 
 	const std::vector<std::string> textures =
 	   table.get_table("textures")->array_entries<std::string>();
@@ -101,8 +113,8 @@
 	int editor_category_index =
 	   world.editor_terrain_categories().get_index(table.get_string("editor_category"));
 	if (editor_category_index < 0) {
-		throw game_data_error("Unknown editor_category: %s\n",
-		                      table.get_string("editor_category").c_str());
+		throw game_data_error(
+		   "Unknown editor_category: %s\n", table.get_string("editor_category").c_str());
 	}
 	editor_category_ = world.editor_terrain_categories().get(editor_category_index);
 }
@@ -159,4 +171,16 @@
 	return dither_layer_;
 }
 
+double TerrainDescription::temperature() const {
+	return temperature_;
+}
+
+double TerrainDescription::humidity() const {
+	return humidity_;
+}
+
+double TerrainDescription::fertility() const {
+	return fertility_;
+}
+
 }  // namespace Widelands

=== modified file 'src/logic/world/terrain_description.h'
--- src/logic/world/terrain_description.h	2014-06-16 17:25:56 +0000
+++ src/logic/world/terrain_description.h	2014-06-22 16:38:25 +0000
@@ -83,6 +83,16 @@
 	/// Returns the editor category.
 	const EditorCategory& editor_category() const;
 
+	/// Parameters for terrain affinity of immovables.
+	/// Temperature in Kelvin.
+	double temperature() const;
+
+	/// Humidity in percent [0, 1].
+	double humidity() const;
+
+	/// Fertility in percent [0, 1].
+	double fertility() const;
+
 private:
 	const std::string name_;
 	const std::string descname_;
@@ -94,6 +104,9 @@
 	const std::vector<std::string> texture_paths_;
 	int32_t dither_layer_;
 	uint32_t texture_;  ///< renderer's texture
+	double temperature_;
+	double fertility_;
+	double humidity_;
 };
 
 }  // namespace Widelands

=== modified file 'src/wui/game_main_menu.h'
--- src/wui/game_main_menu.h	2013-07-26 20:19:36 +0000
+++ src/wui/game_main_menu.h	2014-06-22 16:38:25 +0000
@@ -41,8 +41,8 @@
 	UI::Button stock;
 
 	/** Returns the horizontal/vertical spacing between buttons. */
-	uint32_t hspacing() const {return 5;};
-	uint32_t vspacing() const {return 5;};
+	uint32_t hspacing() const {return 5;}
+	uint32_t vspacing() const {return 5;}
 
 	/** Returns the horizontal/vertical margin between edge and buttons. */
 	uint32_t hmargin() const {return 2 * hspacing();}

=== modified file 'src/wui/game_options_menu.h'
--- src/wui/game_options_menu.h	2013-07-26 20:19:36 +0000
+++ src/wui/game_options_menu.h	2014-06-22 16:38:25 +0000
@@ -43,8 +43,8 @@
 	UI::Button exit_game;
 
 	/** Returns the horizontal/vertical spacing between buttons. */
-	uint32_t hspacing() const {return 5;};
-	uint32_t vspacing() const {return 5;};
+	uint32_t hspacing() const {return 5;}
+	uint32_t vspacing() const {return 5;}
 
 	/** Returns the horizontal/vertical margin between edge and buttons. */
 	uint32_t hmargin() const {return 2 * hspacing();}

=== modified file 'src/wui/interactive_player.cc'
--- src/wui/interactive_player.cc	2014-06-21 15:17:04 +0000
+++ src/wui/interactive_player.cc	2014-06-22 16:38:25 +0000
@@ -63,6 +63,8 @@
 using boost::format;
 
 
+namespace  {
+
 // This function is the callback for recalculation of field overlays
 int32_t Int_Player_overlay_callback_function
 	(Widelands::TCoords<Widelands::FCoords> const c, Interactive_Player& iap)
@@ -71,6 +73,8 @@
 	return iap.get_player()->get_buildcaps(c);
 }
 
+}  // namespace
+
 Interactive_Player::Interactive_Player
 	(Widelands::Game        &       _game,
 	 Section                &       global_s,

=== modified file 'tribes/atlanteans/forester/conf'
--- tribes/atlanteans/forester/conf	2014-04-26 13:55:11 +0000
+++ tribes/atlanteans/forester/conf	2014-06-22 16:38:25 +0000
@@ -10,7 +10,7 @@
 1=walk coords
 2=animation dig 2000 # Play a planting animation
 3=animation crop 1000 # Play a planting animation
-4=plant aspen_summer_sapling oak_summer_sapling spruce_summer_sapling alder_summer_sapling birch_summer_sapling beech_summer_sapling larch_summer_sapling rowan_summer_sapling
+4=plant attrib:tree_sapling
 5=animation water 2000
 6=return
 

=== modified file 'tribes/barbarians/ranger/conf'
--- tribes/barbarians/ranger/conf	2014-04-26 13:55:11 +0000
+++ tribes/barbarians/ranger/conf	2014-06-22 16:38:25 +0000
@@ -10,7 +10,7 @@
 1=walk coords
 2=animation dig 2000 # Play a planting animation
 3=animation crop 1000 # Play a planting animation
-4=plant aspen_summer_sapling oak_summer_sapling spruce_summer_sapling alder_summer_sapling birch_summer_sapling beech_summer_sapling larch_summer_sapling rowan_summer_sapling
+4=plant attrib:tree_sapling
 5=animation water 2000
 6=return
 

=== modified file 'tribes/empire/forester/conf'
--- tribes/empire/forester/conf	2014-04-26 13:55:11 +0000
+++ tribes/empire/forester/conf	2014-06-22 16:38:25 +0000
@@ -10,7 +10,7 @@
 1=walk coords
 2=animation dig 2000 # Play a planting animation
 3=animation crop 1000 # Play a planting animation
-4=plant aspen_summer_sapling oak_summer_sapling spruce_summer_sapling alder_summer_sapling birch_summer_sapling beech_summer_sapling larch_summer_sapling rowan_summer_sapling
+4=plant attrib:tree_sapling
 5=animation water 2000
 6=return
 

=== added directory 'world/immovables/trees/alder'
=== added file 'world/immovables/trees/alder/init.lua'
--- world/immovables/trees/alder/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/alder/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,116 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   -- In Kelvin.
+   preferred_temperature = 289.65,
+
+   -- In percent (1 being very wet).
+   preferred_humidity = 0.66,
+
+   -- In percent (1 being very fertile).
+   preferred_fertility = 0.9,
+
+   -- A value in [0, 1] that defines how well this can deal with non-ideal
+   -- situations. Lower means it is less picky, i.e. it can deal better.
+   pickiness = 0.25,
+}
+
+world:new_immovable_type{
+   name = "alder_summer_sapling",
+   descname = _ "Alder (Sapling)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 57500",
+         "remove=21",
+         "grow=alder_summer_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "alder_summer_pole",
+   descname = _ "Alder (Pole)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 52500",
+         "remove=19",
+         "grow=alder_summer_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "alder_summer_mature",
+   descname = _ "Alder (Mature)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 50000",
+         "remove=18",
+         "grow=alder_summer_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "alder_summer_old",
+   descname = _ "Alder (Old)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1550000",
+         "transform=deadtree4 5",
+         "seed=alder_summer_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 23, 59 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird4",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/alder_summer_mature' => 'world/immovables/trees/alder/mature'
=== renamed directory 'world/immovables/trees/alder_summer_old' => 'world/immovables/trees/alder/old'
=== renamed directory 'world/immovables/trees/alder_summer_pole' => 'world/immovables/trees/alder/pole'
=== renamed directory 'world/immovables/trees/alder_summer_sapling' => 'world/immovables/trees/alder/sapling'
=== removed file 'world/immovables/trees/alder_summer_mature/init.lua'
--- world/immovables/trees/alder_summer_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/alder_summer_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "alder_summer_mature",
-   descname = _ "Alder (Mature)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 50000",
-         "remove=18",
-         "grow=alder_summer_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/alder_summer_old/init.lua'
--- world/immovables/trees/alder_summer_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/alder_summer_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "alder_summer_old",
-   descname = _ "Alder (Old)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1550000",
-         "transform=deadtree4 5",
-         "seed=alder_summer_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 23, 59 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird4",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/alder_summer_pole/init.lua'
--- world/immovables/trees/alder_summer_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/alder_summer_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "alder_summer_pole",
-   descname = _ "Alder (Pole)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 52500",
-         "remove=19",
-         "grow=alder_summer_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/alder_summer_sapling/init.lua'
--- world/immovables/trees/alder_summer_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/alder_summer_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "alder_summer_sapling",
-   descname = _ "Alder (Sapling)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 57500",
-         "remove=21",
-         "grow=alder_summer_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/aspen'
=== added file 'world/immovables/trees/aspen/init.lua'
--- world/immovables/trees/aspen/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/aspen/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,117 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "aspen_summer_sapling",
+   descname = _ "Aspen (Sapling)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 38000",
+         "remove=50",
+         "grow=aspen_summer_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "aspen_summer_pole",
+   descname = _ "Aspen (Pole)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 38000",
+         "remove=47",
+         "grow=aspen_summer_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "aspen_summer_mature",
+   descname = _ "Aspen (Mature)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 20000",
+         "remove=30",
+         "seed=aspen_summer_sapling",
+         "animate=idle 20000",
+         "remove=20",
+         "grow=aspen_summer_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 47 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "aspen_summer_old",
+   descname = _ "Aspen (Old)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1050000",
+         "transform=deadtree2 15",
+         "seed=aspen_summer_sapling",
+      },
+      fall = {
+         "animate=falling 1200",
+         "transform=fallentree",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 23, 58 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird1",
+         },
+      },
+      falling = {
+         pictures = path.list_directory(dirname .. "old/", "f_tree_\\d+.png"),
+         hotspot = { 20, 59 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/aspen_summer_mature' => 'world/immovables/trees/aspen/mature'
=== renamed directory 'world/immovables/trees/aspen_summer_old' => 'world/immovables/trees/aspen/old'
=== renamed directory 'world/immovables/trees/aspen_summer_pole' => 'world/immovables/trees/aspen/pole'
=== renamed directory 'world/immovables/trees/aspen_summer_sapling' => 'world/immovables/trees/aspen/sapling'
=== removed file 'world/immovables/trees/aspen_summer_mature/init.lua'
--- world/immovables/trees/aspen_summer_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/aspen_summer_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "aspen_summer_mature",
-   descname = _ "Aspen (Mature)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 20000",
-         "remove=30",
-         "seed=aspen_summer_sapling",
-         "animate=idle 20000",
-         "remove=20",
-         "grow=aspen_summer_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 47 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/aspen_summer_old/init.lua'
--- world/immovables/trees/aspen_summer_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/aspen_summer_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,36 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "aspen_summer_old",
-   descname = _ "Aspen (Old)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1050000",
-         "transform=deadtree2 15",
-         "seed=aspen_summer_sapling",
-      },
-      fall = {
-         "animate=falling 1200",
-         "transform=fallentree",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 23, 58 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird1",
-         },
-      },
-      falling = {
-         pictures = path.list_directory(dirname, "f_tree_\\d+.png"),
-         hotspot = { 20, 59 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/aspen_summer_pole/init.lua'
--- world/immovables/trees/aspen_summer_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/aspen_summer_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "aspen_summer_pole",
-   descname = _ "Aspen (Pole)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 38000",
-         "remove=47",
-         "grow=aspen_summer_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/aspen_summer_sapling/init.lua'
--- world/immovables/trees/aspen_summer_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/aspen_summer_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "aspen_summer_sapling",
-   descname = _ "Aspen (Sapling)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 38000",
-         "remove=50",
-         "grow=aspen_summer_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/beech'
=== added file 'world/immovables/trees/beech/init.lua'
--- world/immovables/trees/beech/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/beech/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,108 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "beech_summer_sapling",
+   descname = _ "Beech (Sapling)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=35",
+         "grow=beech_summer_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "beech_summer_pole",
+   descname = _ "Beech (Pole)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 65000",
+         "remove=24",
+         "grow=beech_summer_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "beech_summer_mature",
+   descname = _ "Beech (Mature)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 72000",
+         "remove=19",
+         "grow=beech_summer_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "beech_summer_old",
+   descname = _ "Beech (Old)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1525000",
+         "transform=deadtree2 20",
+         "seed=beech_summer_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird6",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/beech_summer_mature' => 'world/immovables/trees/beech/mature'
=== renamed directory 'world/immovables/trees/beech_summer_old' => 'world/immovables/trees/beech/old'
=== renamed directory 'world/immovables/trees/beech_summer_pole' => 'world/immovables/trees/beech/pole'
=== renamed directory 'world/immovables/trees/beech_summer_sapling' => 'world/immovables/trees/beech/sapling'
=== removed file 'world/immovables/trees/beech_summer_mature/init.lua'
--- world/immovables/trees/beech_summer_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/beech_summer_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "beech_summer_mature",
-   descname = _ "Beech (Mature)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 72000",
-         "remove=19",
-         "grow=beech_summer_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/beech_summer_old/init.lua'
--- world/immovables/trees/beech_summer_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/beech_summer_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "beech_summer_old",
-   descname = _ "Beech (Old)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1525000",
-         "transform=deadtree2 20",
-         "seed=beech_summer_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird6",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/beech_summer_pole/init.lua'
--- world/immovables/trees/beech_summer_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/beech_summer_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "beech_summer_pole",
-   descname = _ "Beech (Pole)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 65000",
-         "remove=24",
-         "grow=beech_summer_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/beech_summer_sapling/init.lua'
--- world/immovables/trees/beech_summer_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/beech_summer_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "beech_summer_sapling",
-   descname = _ "Beech (Sapling)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=35",
-         "grow=beech_summer_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/birch'
=== added file 'world/immovables/trees/birch/init.lua'
--- world/immovables/trees/birch/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/birch/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,111 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "birch_summer_sapling",
+   descname = _ "Birch (Sapling)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 42000",
+         "remove=32",
+         "grow=birch_summer_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "birch_summer_pole",
+   descname = _ "Birch (Pole)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 40000",
+         "remove=25",
+         "grow=birch_summer_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "birch_summer_mature",
+   descname = _ "Birch (Mature)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 25000",
+         "remove=10",
+         "seed=birch_summer_sapling",
+         "animate=idle 30000",
+         "remove=10",
+         "grow=birch_summer_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 47 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "birch_summer_old",
+   descname = _ "Birch (Old)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 800000",
+         "transform=deadtree2 27",
+         "seed=birch_summer_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 23, 58 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird5",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/birch_summer_mature' => 'world/immovables/trees/birch/mature'
=== renamed directory 'world/immovables/trees/birch_summer_old' => 'world/immovables/trees/birch/old'
=== renamed directory 'world/immovables/trees/birch_summer_pole' => 'world/immovables/trees/birch/pole'
=== renamed directory 'world/immovables/trees/birch_summer_sapling' => 'world/immovables/trees/birch/sapling'
=== removed file 'world/immovables/trees/birch_summer_mature/init.lua'
--- world/immovables/trees/birch_summer_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/birch_summer_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "birch_summer_mature",
-   descname = _ "Birch (Mature)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 25000",
-         "remove=10",
-         "seed=birch_summer_sapling",
-         "animate=idle 30000",
-         "remove=10",
-         "grow=birch_summer_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 47 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/birch_summer_old/init.lua'
--- world/immovables/trees/birch_summer_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/birch_summer_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "birch_summer_old",
-   descname = _ "Birch (Old)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 800000",
-         "transform=deadtree2 27",
-         "seed=birch_summer_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 23, 58 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird5",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/birch_summer_pole/init.lua'
--- world/immovables/trees/birch_summer_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/birch_summer_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "birch_summer_pole",
-   descname = _ "Birch (Pole)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 40000",
-         "remove=25",
-         "grow=birch_summer_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/birch_summer_sapling/init.lua'
--- world/immovables/trees/birch_summer_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/birch_summer_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "birch_summer_sapling",
-   descname = _ "Birch (Sapling)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 42000",
-         "remove=32",
-         "grow=birch_summer_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/cirrus'
=== added file 'world/immovables/trees/cirrus/init.lua'
--- world/immovables/trees/cirrus/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/cirrus/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,104 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "cirrus_wasteland_sapling",
+   descname = _ " Cirrus Tree (Sapling)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 61000",
+         "remove=44",
+         "grow=cirrus_wasteland_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "cirrus_wasteland_pole",
+   descname = _ "Cirrus Tree (Pole)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 59000",
+         "remove=34",
+         "grow=cirrus_wasteland_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "cirrus_wasteland_mature",
+   descname = _ "Cirrus Tree (Mature)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=24",
+         "grow=cirrus_wasteland_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "cirrus_wasteland_old",
+   descname = _ "Cirrus Tree (Old)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1455000",
+         "transform=deadtree3 34",
+         "seed=cirrus_wasteland_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/cirrus_wasteland_mature' => 'world/immovables/trees/cirrus/mature'
=== renamed directory 'world/immovables/trees/cirrus_wasteland_old' => 'world/immovables/trees/cirrus/old'
=== renamed directory 'world/immovables/trees/cirrus_wasteland_pole' => 'world/immovables/trees/cirrus/pole'
=== renamed directory 'world/immovables/trees/cirrus_wasteland_sapling' => 'world/immovables/trees/cirrus/sapling'
=== removed file 'world/immovables/trees/cirrus_wasteland_mature/init.lua'
--- world/immovables/trees/cirrus_wasteland_mature/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/cirrus_wasteland_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "cirrus_wasteland_mature",
-   descname = _ "Cirrus Tree (Mature)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=24",
-         "grow=cirrus_wasteland_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/cirrus_wasteland_old/init.lua'
--- world/immovables/trees/cirrus_wasteland_old/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/cirrus_wasteland_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "cirrus_wasteland_old",
-   descname = _ "Cirrus Tree (Old)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1455000",
-         "transform=deadtree3 34",
-         "seed=cirrus_wasteland_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/cirrus_wasteland_pole/init.lua'
--- world/immovables/trees/cirrus_wasteland_pole/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/cirrus_wasteland_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "cirrus_wasteland_pole",
-   descname = _ "Cirrus Tree (Pole)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 59000",
-         "remove=34",
-         "grow=cirrus_wasteland_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/cirrus_wasteland_sapling/init.lua'
--- world/immovables/trees/cirrus_wasteland_sapling/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/cirrus_wasteland_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "cirrus_wasteland_sapling",
-   descname = _ " Cirrus Tree (Sapling)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 61000",
-         "remove=44",
-         "grow=cirrus_wasteland_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/larch'
=== added file 'world/immovables/trees/larch/init.lua'
--- world/immovables/trees/larch/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/larch/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,108 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "larch_summer_sapling",
+   descname = _ "Larch (Sapling)",
+   editor_category = "trees_coniferous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 60000",
+         "remove=44",
+         "grow=larch_summer_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 4, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "larch_summer_pole",
+   descname = _ "Larch (Pole)",
+   editor_category = "trees_coniferous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 60000",
+         "remove=34",
+         "grow=larch_summer_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 9, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "larch_summer_mature",
+   descname = _ "Larch (Mature)",
+   editor_category = "trees_coniferous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=24",
+         "grow=larch_summer_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 12, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "larch_summer_old",
+   descname = _ "Larch (Old)",
+   editor_category = "trees_coniferous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1455000",
+         "transform=deadtree3 23",
+         "seed=larch_summer_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 15, 59 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird6",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/larch_summer_mature' => 'world/immovables/trees/larch/mature'
=== renamed directory 'world/immovables/trees/larch_summer_old' => 'world/immovables/trees/larch/old'
=== renamed directory 'world/immovables/trees/larch_summer_pole' => 'world/immovables/trees/larch/pole'
=== renamed directory 'world/immovables/trees/larch_summer_sapling' => 'world/immovables/trees/larch/sapling'
=== removed file 'world/immovables/trees/larch_summer_mature/init.lua'
--- world/immovables/trees/larch_summer_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/larch_summer_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "larch_summer_mature",
-   descname = _ "Larch (Mature)",
-   editor_category = "trees_coniferous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=24",
-         "grow=larch_summer_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/larch_summer_old/init.lua'
--- world/immovables/trees/larch_summer_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/larch_summer_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "larch_summer_old",
-   descname = _ "Larch (Old)",
-   editor_category = "trees_coniferous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1455000",
-         "transform=deadtree3 23",
-         "seed=larch_summer_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 15, 59 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird6",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/larch_summer_pole/init.lua'
--- world/immovables/trees/larch_summer_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/larch_summer_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "larch_summer_pole",
-   descname = _ "Larch (Pole)",
-   editor_category = "trees_coniferous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 60000",
-         "remove=34",
-         "grow=larch_summer_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 9, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/larch_summer_sapling/init.lua'
--- world/immovables/trees/larch_summer_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/larch_summer_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "larch_summer_sapling",
-   descname = _ "Larch (Sapling)",
-   editor_category = "trees_coniferous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 60000",
-         "remove=44",
-         "grow=larch_summer_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 4, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/liana'
=== added file 'world/immovables/trees/liana/init.lua'
--- world/immovables/trees/liana/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/liana/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,107 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "liana_wasteland_sapling",
+   descname = _ "Liana Tree (Sapling)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 60000",
+         "remove=40",
+         "grow=liana_wasteland_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "liana_wasteland_pole",
+   descname = _ "Liana Tree (Pole)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=30",
+         "grow=liana_wasteland_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "liana_wasteland_mature",
+   descname = _ "Liana Tree (Mature)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=10",
+         "seed=liana_wasteland_sapling",
+         "animate=idle 30000",
+         "remove=10",
+         "grow=liana_wasteland_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "liana_wasteland_old",
+   descname = _ "Liana Tree (Old)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1455000",
+         "transform=deadtree4 48",
+         "seed=liana_wasteland_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/liana_wasteland_mature' => 'world/immovables/trees/liana/mature'
=== renamed directory 'world/immovables/trees/liana_wasteland_old' => 'world/immovables/trees/liana/old'
=== renamed directory 'world/immovables/trees/liana_wasteland_pole' => 'world/immovables/trees/liana/pole'
=== renamed directory 'world/immovables/trees/liana_wasteland_sapling' => 'world/immovables/trees/liana/sapling'
=== removed file 'world/immovables/trees/liana_wasteland_mature/init.lua'
--- world/immovables/trees/liana_wasteland_mature/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/liana_wasteland_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "liana_wasteland_mature",
-   descname = _ "Liana Tree (Mature)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=10",
-         "seed=liana_wasteland_sapling",
-         "animate=idle 30000",
-         "remove=10",
-         "grow=liana_wasteland_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/liana_wasteland_old/init.lua'
--- world/immovables/trees/liana_wasteland_old/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/liana_wasteland_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "liana_wasteland_old",
-   descname = _ "Liana Tree (Old)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1455000",
-         "transform=deadtree4 48",
-         "seed=liana_wasteland_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/liana_wasteland_pole/init.lua'
--- world/immovables/trees/liana_wasteland_pole/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/liana_wasteland_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "liana_wasteland_pole",
-   descname = _ "Liana Tree (Pole)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=30",
-         "grow=liana_wasteland_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/liana_wasteland_sapling/init.lua'
--- world/immovables/trees/liana_wasteland_sapling/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/liana_wasteland_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "liana_wasteland_sapling",
-   descname = _ "Liana Tree (Sapling)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 60000",
-         "remove=40",
-         "grow=liana_wasteland_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/maple'
=== added file 'world/immovables/trees/maple/init.lua'
--- world/immovables/trees/maple/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/maple/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,108 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "maple_winter_sapling",
+   descname = _ "Maple (Sapling)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 57500",
+         "remove=21",
+         "grow=maple_winter_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "maple_winter_pole",
+   descname = _ "Maple (Pole)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 52500",
+         "remove=19",
+         "grow=maple_winter_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "maple_winter_mature",
+   descname = _ "Maple (Mature)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 50000",
+         "remove=18",
+         "grow=maple_winter_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "maple_winter_old",
+   descname = _ "Maple (Old)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1550000",
+         "transform=deadtree4 39",
+         "seed=maple_winter_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 23, 59 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird4",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/maple_winter_mature' => 'world/immovables/trees/maple/mature'
=== renamed directory 'world/immovables/trees/maple_winter_old' => 'world/immovables/trees/maple/old'
=== renamed directory 'world/immovables/trees/maple_winter_pole' => 'world/immovables/trees/maple/pole'
=== renamed directory 'world/immovables/trees/maple_winter_sapling' => 'world/immovables/trees/maple/sapling'
=== removed file 'world/immovables/trees/maple_winter_mature/init.lua'
--- world/immovables/trees/maple_winter_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/maple_winter_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "maple_winter_mature",
-   descname = _ "Maple (Mature)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 50000",
-         "remove=18",
-         "grow=maple_winter_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/maple_winter_old/init.lua'
--- world/immovables/trees/maple_winter_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/maple_winter_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "maple_winter_old",
-   descname = _ "Maple (Old)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1550000",
-         "transform=deadtree4 39",
-         "seed=maple_winter_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 23, 59 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird4",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/maple_winter_pole/init.lua'
--- world/immovables/trees/maple_winter_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/maple_winter_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "maple_winter_pole",
-   descname = _ "Maple (Pole)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 52500",
-         "remove=19",
-         "grow=maple_winter_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/maple_winter_sapling/init.lua'
--- world/immovables/trees/maple_winter_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/maple_winter_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "maple_winter_sapling",
-   descname = _ "Maple (Sapling)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 57500",
-         "remove=21",
-         "grow=maple_winter_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/mushroom_dark'
=== added file 'world/immovables/trees/mushroom_dark/init.lua'
--- world/immovables/trees/mushroom_dark/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/mushroom_dark/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,104 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "mushroom_dark_wasteland_sapling",
+   descname = _ "Dark Mushroom Tree (Sapling)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 72500",
+         "remove=80",
+         "grow=mushroom_dark_wasteland_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_dark_wasteland_pole",
+   descname = _ "Dark Mushroom Tree (Pole)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 72500",
+         "remove=70",
+         "grow=mushroom_dark_wasteland_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_dark_wasteland_mature",
+   descname = _ "Dark Mushroom Tree (Mature)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 75000",
+         "remove=40",
+         "grow=mushroom_dark_wasteland_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_dark_wasteland_old",
+   descname = _ "Dark Mushroom Tree (Old)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1050000",
+         "transform=deadtree2 25",
+         "seed=mushroom_dark_wasteland_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 15,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/mushroom_dark_wasteland_mature' => 'world/immovables/trees/mushroom_dark/mature'
=== renamed directory 'world/immovables/trees/mushroom_dark_wasteland_old' => 'world/immovables/trees/mushroom_dark/old'
=== renamed directory 'world/immovables/trees/mushroom_dark_wasteland_pole' => 'world/immovables/trees/mushroom_dark/pole'
=== renamed directory 'world/immovables/trees/mushroom_dark_wasteland_sapling' => 'world/immovables/trees/mushroom_dark/sapling'
=== removed file 'world/immovables/trees/mushroom_dark_wasteland_mature/init.lua'
--- world/immovables/trees/mushroom_dark_wasteland_mature/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_dark_wasteland_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_dark_wasteland_mature",
-   descname = _ "Dark Mushroom Tree (Mature)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 75000",
-         "remove=40",
-         "grow=mushroom_dark_wasteland_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_dark_wasteland_old/init.lua'
--- world/immovables/trees/mushroom_dark_wasteland_old/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_dark_wasteland_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_dark_wasteland_old",
-   descname = _ "Dark Mushroom Tree (Old)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1050000",
-         "transform=deadtree2 25",
-         "seed=mushroom_dark_wasteland_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 15,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_dark_wasteland_pole/init.lua'
--- world/immovables/trees/mushroom_dark_wasteland_pole/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_dark_wasteland_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_dark_wasteland_pole",
-   descname = _ "Dark Mushroom Tree (Pole)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 72500",
-         "remove=70",
-         "grow=mushroom_dark_wasteland_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_dark_wasteland_sapling/init.lua'
--- world/immovables/trees/mushroom_dark_wasteland_sapling/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_dark_wasteland_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_dark_wasteland_sapling",
-   descname = _ "Dark Mushroom Tree (Sapling)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 72500",
-         "remove=80",
-         "grow=mushroom_dark_wasteland_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/mushroom_green'
=== added file 'world/immovables/trees/mushroom_green/init.lua'
--- world/immovables/trees/mushroom_green/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/mushroom_green/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,104 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "mushroom_green_wasteland_sapling",
+   descname = _ "Green Mushroom Tree (Sapling)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=35",
+         "grow=mushroom_green_wasteland_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_green_wasteland_pole",
+   descname = _ "Green Mushroom Tree (Pole)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 65000",
+         "remove=24",
+         "grow=mushroom_green_wasteland_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_green_wasteland_mature",
+   descname = _ "Green Mushroom Tree (Mature)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 72000",
+         "remove=19",
+         "grow=mushroom_green_wasteland_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_green_wasteland_old",
+   descname = _ "Green Mushroom Tree (Old)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1535000",
+         "transform=deadtree2 33",
+         "seed=mushroom_green_wasteland_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/mushroom_green_wasteland_mature' => 'world/immovables/trees/mushroom_green/mature'
=== renamed directory 'world/immovables/trees/mushroom_green_wasteland_old' => 'world/immovables/trees/mushroom_green/old'
=== renamed directory 'world/immovables/trees/mushroom_green_wasteland_pole' => 'world/immovables/trees/mushroom_green/pole'
=== renamed directory 'world/immovables/trees/mushroom_green_wasteland_sapling' => 'world/immovables/trees/mushroom_green/sapling'
=== removed file 'world/immovables/trees/mushroom_green_wasteland_mature/init.lua'
--- world/immovables/trees/mushroom_green_wasteland_mature/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_green_wasteland_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_green_wasteland_mature",
-   descname = _ "Green Mushroom Tree (Mature)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 72000",
-         "remove=19",
-         "grow=mushroom_green_wasteland_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_green_wasteland_old/init.lua'
--- world/immovables/trees/mushroom_green_wasteland_old/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_green_wasteland_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_green_wasteland_old",
-   descname = _ "Green Mushroom Tree (Old)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1535000",
-         "transform=deadtree2 33",
-         "seed=mushroom_green_wasteland_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_green_wasteland_pole/init.lua'
--- world/immovables/trees/mushroom_green_wasteland_pole/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_green_wasteland_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_green_wasteland_pole",
-   descname = _ "Green Mushroom Tree (Pole)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 65000",
-         "remove=24",
-         "grow=mushroom_green_wasteland_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_green_wasteland_sapling/init.lua'
--- world/immovables/trees/mushroom_green_wasteland_sapling/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_green_wasteland_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_green_wasteland_sapling",
-   descname = _ "Green Mushroom Tree (Sapling)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=35",
-         "grow=mushroom_green_wasteland_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/mushroom_red'
=== added file 'world/immovables/trees/mushroom_red/init.lua'
--- world/immovables/trees/mushroom_red/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/mushroom_red/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,107 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): changed to be close to "ashes" for testing
+terrain_affinity = {
+   preferred_temperature = 299.65,
+   preferred_humidity = 0.30,
+   preferred_fertility = 0.2,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "mushroom_red_wasteland_sapling",
+   descname = _ "Red Mushroom Tree (Sapling)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 42000",
+         "remove=32",
+         "grow=mushroom_red_wasteland_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_red_wasteland_pole",
+   descname = _ "Red Mushroom Tree (Pole)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 40000",
+         "remove=25",
+         "grow=mushroom_red_wasteland_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_red_wasteland_mature",
+   descname = _ "Red Mushroom Tree (Mature)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 27000",
+         "remove=10",
+         "seed=mushroom_red_wasteland_sapling",
+         "animate=idle 29000",
+         "remove=10",
+         "grow=mushroom_red_wasteland_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "mushroom_red_wasteland_old",
+   descname = _ "Red Mushroom Tree (Old)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 800000",
+         "transform=deadtree2 50",
+         "seed=mushroom_red_wasteland_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/mushroom_red_wasteland_mature' => 'world/immovables/trees/mushroom_red/mature'
=== renamed directory 'world/immovables/trees/mushroom_red_wasteland_old' => 'world/immovables/trees/mushroom_red/old'
=== renamed directory 'world/immovables/trees/mushroom_red_wasteland_pole' => 'world/immovables/trees/mushroom_red/pole'
=== renamed directory 'world/immovables/trees/mushroom_red_wasteland_sapling' => 'world/immovables/trees/mushroom_red/sapling'
=== removed file 'world/immovables/trees/mushroom_red_wasteland_mature/init.lua'
--- world/immovables/trees/mushroom_red_wasteland_mature/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_red_wasteland_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_red_wasteland_mature",
-   descname = _ "Red Mushroom Tree (Mature)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 27000",
-         "remove=10",
-         "seed=mushroom_red_wasteland_sapling",
-         "animate=idle 29000",
-         "remove=10",
-         "grow=mushroom_red_wasteland_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_red_wasteland_old/init.lua'
--- world/immovables/trees/mushroom_red_wasteland_old/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_red_wasteland_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_red_wasteland_old",
-   descname = _ "Red Mushroom Tree (Old)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 800000",
-         "transform=deadtree2 50",
-         "seed=mushroom_red_wasteland_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_red_wasteland_pole/init.lua'
--- world/immovables/trees/mushroom_red_wasteland_pole/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_red_wasteland_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_red_wasteland_pole",
-   descname = _ "Red Mushroom Tree (Pole)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 40000",
-         "remove=25",
-         "grow=mushroom_red_wasteland_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/mushroom_red_wasteland_sapling/init.lua'
--- world/immovables/trees/mushroom_red_wasteland_sapling/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/mushroom_red_wasteland_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "mushroom_red_wasteland_sapling",
-   descname = _ "Red Mushroom Tree (Sapling)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 42000",
-         "remove=32",
-         "grow=mushroom_red_wasteland_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/oak'
=== added file 'world/immovables/trees/oak/init.lua'
--- world/immovables/trees/oak/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/oak/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,114 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "oak_summer_sapling",
+   descname = _ "Oak (Sapling)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 72500",
+         "remove=80",
+         "grow=oak_summer_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "oak_summer_pole",
+   descname = _ "Oak (Pole)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 72500",
+         "remove=70",
+         "grow=oak_summer_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "oak_summer_mature",
+   descname = _ "Oak (Mature)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 75000",
+         "remove=40",
+         "grow=oak_summer_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "oak_summer_old",
+   descname = _ "Oak (Old)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 2250000",
+         "transform=deadtree2 12",
+         "seed=oak_summer_sapling",
+      },
+      fall = {
+         "animate=falling 1200",
+         "transform=fallentree",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird2",
+         },
+      },
+      falling = {
+         pictures = path.list_directory(dirname .. "old/", "f_tree_\\d+.png"),
+         hotspot = { 10, 60 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/oak_summer_mature' => 'world/immovables/trees/oak/mature'
=== renamed directory 'world/immovables/trees/oak_summer_old' => 'world/immovables/trees/oak/old'
=== renamed directory 'world/immovables/trees/oak_summer_pole' => 'world/immovables/trees/oak/pole'
=== renamed directory 'world/immovables/trees/oak_summer_sapling' => 'world/immovables/trees/oak/sapling'
=== removed file 'world/immovables/trees/oak_summer_mature/init.lua'
--- world/immovables/trees/oak_summer_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/oak_summer_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "oak_summer_mature",
-   descname = _ "Oak (Mature)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 75000",
-         "remove=40",
-         "grow=oak_summer_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/oak_summer_old/init.lua'
--- world/immovables/trees/oak_summer_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/oak_summer_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,36 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "oak_summer_old",
-   descname = _ "Oak (Old)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 2250000",
-         "transform=deadtree2 12",
-         "seed=oak_summer_sapling",
-      },
-      fall = {
-         "animate=falling 1200",
-         "transform=fallentree",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird2",
-         },
-      },
-      falling = {
-         pictures = path.list_directory(dirname, "f_tree_\\d+.png"),
-         hotspot = { 10, 60 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/oak_summer_pole/init.lua'
--- world/immovables/trees/oak_summer_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/oak_summer_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "oak_summer_pole",
-   descname = _ "Oak (Pole)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 72500",
-         "remove=70",
-         "grow=oak_summer_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/oak_summer_sapling/init.lua'
--- world/immovables/trees/oak_summer_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/oak_summer_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "oak_summer_sapling",
-   descname = _ "Oak (Sapling)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 72500",
-         "remove=80",
-         "grow=oak_summer_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/palm_borassus'
=== added file 'world/immovables/trees/palm_borassus/init.lua'
--- world/immovables/trees/palm_borassus/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/palm_borassus/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,108 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "palm_borassus_desert_sapling",
+   descname = _ "Borassus Palm (Sapling)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 70000",
+         "remove=80",
+         "grow=palm_borassus_desert_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_borassus_desert_pole",
+   descname = _ "Borassus Palm (Pole)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 70000",
+         "remove=70",
+         "grow=palm_borassus_desert_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_borassus_desert_mature",
+   descname = _ "Borassus Palm (Mature)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 65000",
+         "remove=40",
+         "grow=palm_borassus_desert_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_borassus_desert_old",
+   descname = _ "Borassus Palm (Old)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 2000000",
+         "transform=deadtree5 25",
+         "seed=palm_borassus_desert_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird2",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/palm_borassus_desert_mature' => 'world/immovables/trees/palm_borassus/mature'
=== renamed directory 'world/immovables/trees/palm_borassus_desert_old' => 'world/immovables/trees/palm_borassus/old'
=== renamed directory 'world/immovables/trees/palm_borassus_desert_pole' => 'world/immovables/trees/palm_borassus/pole'
=== renamed directory 'world/immovables/trees/palm_borassus_desert_sapling' => 'world/immovables/trees/palm_borassus/sapling'
=== removed file 'world/immovables/trees/palm_borassus_desert_mature/init.lua'
--- world/immovables/trees/palm_borassus_desert_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_borassus_desert_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_borassus_desert_mature",
-   descname = _ "Borassus Palm (Mature)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 65000",
-         "remove=40",
-         "grow=palm_borassus_desert_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_borassus_desert_old/init.lua'
--- world/immovables/trees/palm_borassus_desert_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_borassus_desert_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_borassus_desert_old",
-   descname = _ "Borassus Palm (Old)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 2000000",
-         "transform=deadtree5 25",
-         "seed=palm_borassus_desert_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird2",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_borassus_desert_pole/init.lua'
--- world/immovables/trees/palm_borassus_desert_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_borassus_desert_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_borassus_desert_pole",
-   descname = _ "Borassus Palm (Pole)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 70000",
-         "remove=70",
-         "grow=palm_borassus_desert_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_borassus_desert_sapling/init.lua'
--- world/immovables/trees/palm_borassus_desert_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_borassus_desert_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_borassus_desert_sapling",
-   descname = _ "Borassus Palm (Sapling)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 70000",
-         "remove=80",
-         "grow=palm_borassus_desert_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/palm_coconut'
=== added file 'world/immovables/trees/palm_coconut/init.lua'
--- world/immovables/trees/palm_coconut/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/palm_coconut/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,108 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "palm_coconut_desert_sapling",
+   descname = _ "Coconut Palm (Sapling)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=42",
+         "grow=palm_coconut_desert_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_coconut_desert_pole",
+   descname = _ "Coconut Palm (Pole)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=33",
+         "grow=palm_coconut_desert_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_coconut_desert_mature",
+   descname = _ "Coconut Palm (Mature)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 60000",
+         "remove=23",
+         "grow=palm_coconut_desert_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_coconut_desert_old",
+   descname = _ "Coconut Palm (Old)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1550000",
+         "transform=deadtree6 36",
+         "seed=palm_coconut_desert_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 59 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird3",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/palm_coconut_desert_mature' => 'world/immovables/trees/palm_coconut/mature'
=== renamed directory 'world/immovables/trees/palm_coconut_desert_old' => 'world/immovables/trees/palm_coconut/old'
=== renamed directory 'world/immovables/trees/palm_coconut_desert_pole' => 'world/immovables/trees/palm_coconut/pole'
=== renamed directory 'world/immovables/trees/palm_coconut_desert_sapling' => 'world/immovables/trees/palm_coconut/sapling'
=== removed file 'world/immovables/trees/palm_coconut_desert_mature/init.lua'
--- world/immovables/trees/palm_coconut_desert_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_coconut_desert_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_coconut_desert_mature",
-   descname = _ "Coconut Palm (Mature)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 60000",
-         "remove=23",
-         "grow=palm_coconut_desert_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_coconut_desert_old/init.lua'
--- world/immovables/trees/palm_coconut_desert_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_coconut_desert_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_coconut_desert_old",
-   descname = _ "Coconut Palm (Old)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1550000",
-         "transform=deadtree6 36",
-         "seed=palm_coconut_desert_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 59 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird3",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_coconut_desert_pole/init.lua'
--- world/immovables/trees/palm_coconut_desert_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_coconut_desert_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_coconut_desert_pole",
-   descname = _ "Coconut Palm (Pole)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=33",
-         "grow=palm_coconut_desert_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_coconut_desert_sapling/init.lua'
--- world/immovables/trees/palm_coconut_desert_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_coconut_desert_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_coconut_desert_sapling",
-   descname = _ "Coconut Palm (Sapling)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=42",
-         "grow=palm_coconut_desert_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/palm_date'
=== added file 'world/immovables/trees/palm_date/init.lua'
--- world/immovables/trees/palm_date/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/palm_date/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,111 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "palm_date_desert_sapling",
+   descname = _ "Date Palm (Sapling)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 38000",
+         "remove=50",
+         "grow=palm_date_desert_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_date_desert_pole",
+   descname = _ "Date Palm (Pole)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 38000",
+         "remove=47",
+         "grow=palm_date_desert_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_date_desert_mature",
+   descname = _ "Date Palm (Mature)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 20000",
+         "remove=30",
+         "seed=palm_date_desert_sapling",
+         "animate=idle 20000",
+         "remove=20",
+         "grow=palm_date_desert_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_date_desert_old",
+   descname = _ "Date Palm (Old)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1050000",
+         "transform=deadtree5 32",
+         "seed=palm_date_desert_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird1",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/palm_date_desert_mature' => 'world/immovables/trees/palm_date/mature'
=== renamed directory 'world/immovables/trees/palm_date_desert_old' => 'world/immovables/trees/palm_date/old'
=== renamed directory 'world/immovables/trees/palm_date_desert_pole' => 'world/immovables/trees/palm_date/pole'
=== renamed directory 'world/immovables/trees/palm_date_desert_sapling' => 'world/immovables/trees/palm_date/sapling'
=== removed file 'world/immovables/trees/palm_date_desert_mature/init.lua'
--- world/immovables/trees/palm_date_desert_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_date_desert_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_date_desert_mature",
-   descname = _ "Date Palm (Mature)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 20000",
-         "remove=30",
-         "seed=palm_date_desert_sapling",
-         "animate=idle 20000",
-         "remove=20",
-         "grow=palm_date_desert_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_date_desert_old/init.lua'
--- world/immovables/trees/palm_date_desert_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_date_desert_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_date_desert_old",
-   descname = _ "Date Palm (Old)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1050000",
-         "transform=deadtree5 32",
-         "seed=palm_date_desert_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird1",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_date_desert_pole/init.lua'
--- world/immovables/trees/palm_date_desert_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_date_desert_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_date_desert_pole",
-   descname = _ "Date Palm (Pole)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 38000",
-         "remove=47",
-         "grow=palm_date_desert_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_date_desert_sapling/init.lua'
--- world/immovables/trees/palm_date_desert_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_date_desert_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_date_desert_sapling",
-   descname = _ "Date Palm (Sapling)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 38000",
-         "remove=50",
-         "grow=palm_date_desert_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/palm_oil'
=== added file 'world/immovables/trees/palm_oil/init.lua'
--- world/immovables/trees/palm_oil/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/palm_oil/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,112 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "palm_oil_desert_sapling",
+   descname = _ "Oil Palm (Sapling)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 42000",
+         "remove=32",
+         "grow=palm_oil_desert_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_oil_desert_pole",
+   descname = _ "Oil Palm (Pole)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 40000",
+         "remove=25",
+         "grow=palm_oil_desert_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_oil_desert_mature",
+   descname = _ "Oil Palm (Mature)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 25000",
+         "remove=10",
+         "seed=palm_oil_desert_sapling",
+         "animate=idle 30000",
+         "remove=10",
+         "grow=palm_oil_desert_old",
+
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_oil_desert_old",
+   descname = _ "Oil Palm (Old)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 800000",
+         "transform=deadtree5 50",
+         "seed=palm_oil_desert_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird5",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/palm_oil_desert_mature' => 'world/immovables/trees/palm_oil/mature'
=== renamed directory 'world/immovables/trees/palm_oil_desert_old' => 'world/immovables/trees/palm_oil/old'
=== renamed directory 'world/immovables/trees/palm_oil_desert_pole' => 'world/immovables/trees/palm_oil/pole'
=== renamed directory 'world/immovables/trees/palm_oil_desert_sapling' => 'world/immovables/trees/palm_oil/sapling'
=== removed file 'world/immovables/trees/palm_oil_desert_mature/init.lua'
--- world/immovables/trees/palm_oil_desert_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_oil_desert_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_oil_desert_mature",
-   descname = _ "Oil Palm (Mature)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 25000",
-         "remove=10",
-         "seed=palm_oil_desert_sapling",
-         "animate=idle 30000",
-         "remove=10",
-         "grow=palm_oil_desert_old",
-
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_oil_desert_old/init.lua'
--- world/immovables/trees/palm_oil_desert_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_oil_desert_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_oil_desert_old",
-   descname = _ "Oil Palm (Old)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 800000",
-         "transform=deadtree5 50",
-         "seed=palm_oil_desert_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird5",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_oil_desert_pole/init.lua'
--- world/immovables/trees/palm_oil_desert_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_oil_desert_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_oil_desert_pole",
-   descname = _ "Oil Palm (Pole)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 40000",
-         "remove=25",
-         "grow=palm_oil_desert_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_oil_desert_sapling/init.lua'
--- world/immovables/trees/palm_oil_desert_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_oil_desert_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_oil_desert_sapling",
-   descname = _ "Oil Palm (Sapling)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 42000",
-         "remove=32",
-         "grow=palm_oil_desert_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/palm_roystonea'
=== added file 'world/immovables/trees/palm_roystonea/init.lua'
--- world/immovables/trees/palm_roystonea/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/palm_roystonea/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,108 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "palm_roystonea_desert_sapling",
+   descname = _ "Roystonea regia Palm (Sapling)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 57500",
+         "remove=21",
+         "grow=palm_roystonea_desert_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_roystonea_desert_pole",
+   descname = _ "Roystonea regia Palm (Pole)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 52500",
+         "remove=19",
+         "grow=palm_roystonea_desert_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_roystonea_desert_mature",
+   descname = _ "Roystonea regia Palm (Mature)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 50000",
+         "remove=18",
+         "grow=palm_roystonea_desert_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "palm_roystonea_desert_old",
+   descname = _ "Roystonea regia Palm (Old)",
+   editor_category = "trees_palm",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1550000",
+         "transform=deadtree4 39",
+         "seed=palm_roystonea_desert_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird4",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/palm_roystonea_desert_mature' => 'world/immovables/trees/palm_roystonea/mature'
=== renamed directory 'world/immovables/trees/palm_roystonea_desert_old' => 'world/immovables/trees/palm_roystonea/old'
=== renamed directory 'world/immovables/trees/palm_roystonea_desert_pole' => 'world/immovables/trees/palm_roystonea/pole'
=== renamed directory 'world/immovables/trees/palm_roystonea_desert_sapling' => 'world/immovables/trees/palm_roystonea/sapling'
=== removed file 'world/immovables/trees/palm_roystonea_desert_mature/init.lua'
--- world/immovables/trees/palm_roystonea_desert_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_roystonea_desert_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_roystonea_desert_mature",
-   descname = _ "Roystonea regia Palm (Mature)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 50000",
-         "remove=18",
-         "grow=palm_roystonea_desert_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_roystonea_desert_old/init.lua'
--- world/immovables/trees/palm_roystonea_desert_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_roystonea_desert_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_roystonea_desert_old",
-   descname = _ "Roystonea regia Palm (Old)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1550000",
-         "transform=deadtree4 39",
-         "seed=palm_roystonea_desert_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird4",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_roystonea_desert_pole/init.lua'
--- world/immovables/trees/palm_roystonea_desert_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_roystonea_desert_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_roystonea_desert_pole",
-   descname = _ "Roystonea regia Palm (Pole)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 52500",
-         "remove=19",
-         "grow=palm_roystonea_desert_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/palm_roystonea_desert_sapling/init.lua'
--- world/immovables/trees/palm_roystonea_desert_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/palm_roystonea_desert_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "palm_roystonea_desert_sapling",
-   descname = _ "Roystonea regia Palm (Sapling)",
-   editor_category = "trees_palm",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 57500",
-         "remove=21",
-         "grow=palm_roystonea_desert_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/rowan'
=== added file 'world/immovables/trees/rowan/init.lua'
--- world/immovables/trees/rowan/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/rowan/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,111 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "rowan_summer_sapling",
+   descname = _ "Rowan (Sapling)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 60000",
+         "remove=40",
+         "grow=rowan_summer_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "rowan_summer_pole",
+   descname = _ "Rowan (Pole)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=30",
+         "grow=rowan_summer_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "rowan_summer_mature",
+   descname = _ "Rowan (Mature)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=7",
+         "seed=rowan_summer_sapling",
+         "animate=idle 30000",
+         "remove=10",
+         "grow=rowan_summer_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "rowan_summer_old",
+   descname = _ "Rowan (Old)",
+   editor_category = "trees_deciduous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1432000",
+         "transform=deadtree4 26",
+         "seed=rowan_summer_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 23, 59 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird6",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/rowan_summer_mature' => 'world/immovables/trees/rowan/mature'
=== renamed directory 'world/immovables/trees/rowan_summer_old' => 'world/immovables/trees/rowan/old'
=== renamed directory 'world/immovables/trees/rowan_summer_pole' => 'world/immovables/trees/rowan/pole'
=== renamed directory 'world/immovables/trees/rowan_summer_sapling' => 'world/immovables/trees/rowan/sapling'
=== removed file 'world/immovables/trees/rowan_summer_mature/init.lua'
--- world/immovables/trees/rowan_summer_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/rowan_summer_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "rowan_summer_mature",
-   descname = _ "Rowan (Mature)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=7",
-         "seed=rowan_summer_sapling",
-         "animate=idle 30000",
-         "remove=10",
-         "grow=rowan_summer_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/rowan_summer_old/init.lua'
--- world/immovables/trees/rowan_summer_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/rowan_summer_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "rowan_summer_old",
-   descname = _ "Rowan (Old)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1432000",
-         "transform=deadtree4 26",
-         "seed=rowan_summer_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 23, 59 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird6",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/rowan_summer_pole/init.lua'
--- world/immovables/trees/rowan_summer_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/rowan_summer_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "rowan_summer_pole",
-   descname = _ "Rowan (Pole)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=30",
-         "grow=rowan_summer_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/rowan_summer_sapling/init.lua'
--- world/immovables/trees/rowan_summer_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/rowan_summer_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "rowan_summer_sapling",
-   descname = _ "Rowan (Sapling)",
-   editor_category = "trees_deciduous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 60000",
-         "remove=40",
-         "grow=rowan_summer_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/spruce'
=== added file 'world/immovables/trees/spruce/init.lua'
--- world/immovables/trees/spruce/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/spruce/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,108 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "spruce_summer_sapling",
+   descname = _ "Spruce (Sapling)",
+   editor_category = "trees_coniferous",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=42",
+         "grow=spruce_summer_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 4, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "spruce_summer_pole",
+   descname = _ "Spruce (Pole)",
+   editor_category = "trees_coniferous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=33",
+         "grow=spruce_summer_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 9, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "spruce_summer_mature",
+   descname = _ "Spruce (Mature)",
+   editor_category = "trees_coniferous",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 60000",
+         "remove=23",
+         "grow=spruce_summer_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 12, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "spruce_summer_old",
+   descname = _ "Spruce (Old)",
+   editor_category = "trees_coniferous",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1550000",
+         "transform=deadtree3 24",
+         "seed=spruce_summer_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 15, 59 },
+         fps = 10,
+         sound_effect = {
+            directory = "sound/animals",
+            name = "bird3",
+         },
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/spruce_summer_mature' => 'world/immovables/trees/spruce/mature'
=== renamed directory 'world/immovables/trees/spruce_summer_old' => 'world/immovables/trees/spruce/old'
=== renamed directory 'world/immovables/trees/spruce_summer_pole' => 'world/immovables/trees/spruce/pole'
=== renamed directory 'world/immovables/trees/spruce_summer_sapling' => 'world/immovables/trees/spruce/sapling'
=== removed file 'world/immovables/trees/spruce_summer_mature/init.lua'
--- world/immovables/trees/spruce_summer_mature/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/spruce_summer_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "spruce_summer_mature",
-   descname = _ "Spruce (Mature)",
-   editor_category = "trees_coniferous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 60000",
-         "remove=23",
-         "grow=spruce_summer_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/spruce_summer_old/init.lua'
--- world/immovables/trees/spruce_summer_old/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/spruce_summer_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "spruce_summer_old",
-   descname = _ "Spruce (Old)",
-   editor_category = "trees_coniferous",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1550000",
-         "transform=deadtree3 24",
-         "seed=spruce_summer_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 15, 59 },
-         fps = 10,
-         sound_effect = {
-            directory = "sound/animals",
-            name = "bird3",
-         },
-      },
-   },
-}

=== removed file 'world/immovables/trees/spruce_summer_pole/init.lua'
--- world/immovables/trees/spruce_summer_pole/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/spruce_summer_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "spruce_summer_pole",
-   descname = _ "Spruce (Pole)",
-   editor_category = "trees_coniferous",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=33",
-         "grow=spruce_summer_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 9, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/spruce_summer_sapling/init.lua'
--- world/immovables/trees/spruce_summer_sapling/init.lua	2014-05-03 08:40:59 +0000
+++ world/immovables/trees/spruce_summer_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "spruce_summer_sapling",
-   descname = _ "Spruce (Sapling)",
-   editor_category = "trees_coniferous",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=42",
-         "grow=spruce_summer_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 4, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/twine'
=== added file 'world/immovables/trees/twine/init.lua'
--- world/immovables/trees/twine/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/twine/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,104 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "twine_wasteland_sapling",
+   descname = _ "Twine Tree (Sapling)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=42",
+         "grow=twine_wasteland_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "twine_wasteland_pole",
+   descname = _ "Twine Tree (Pole)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 55000",
+         "remove=33",
+         "grow=twine_wasteland_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "twine_wasteland_mature",
+   descname = _ "Twine Tree (Mature)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 60000",
+         "remove=23",
+         "grow=twine_wasteland_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "twine_wasteland_old",
+   descname = _ "Twine Tree (Old)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1550000",
+         "transform=deadtree3 36",
+         "seed=twine_wasteland_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/twine_wasteland_mature' => 'world/immovables/trees/twine/mature'
=== renamed directory 'world/immovables/trees/twine_wasteland_old' => 'world/immovables/trees/twine/old'
=== renamed directory 'world/immovables/trees/twine_wasteland_pole' => 'world/immovables/trees/twine/pole'
=== renamed directory 'world/immovables/trees/twine_wasteland_sapling' => 'world/immovables/trees/twine/sapling'
=== removed file 'world/immovables/trees/twine_wasteland_mature/init.lua'
--- world/immovables/trees/twine_wasteland_mature/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/twine_wasteland_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "twine_wasteland_mature",
-   descname = _ "Twine Tree (Mature)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 60000",
-         "remove=23",
-         "grow=twine_wasteland_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/twine_wasteland_old/init.lua'
--- world/immovables/trees/twine_wasteland_old/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/twine_wasteland_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "twine_wasteland_old",
-   descname = _ "Twine Tree (Old)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1550000",
-         "transform=deadtree3 36",
-         "seed=twine_wasteland_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/twine_wasteland_pole/init.lua'
--- world/immovables/trees/twine_wasteland_pole/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/twine_wasteland_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "twine_wasteland_pole",
-   descname = _ "Twine Tree (Pole)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=33",
-         "grow=twine_wasteland_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/twine_wasteland_sapling/init.lua'
--- world/immovables/trees/twine_wasteland_sapling/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/twine_wasteland_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "twine_wasteland_sapling",
-   descname = _ "Twine Tree (Sapling)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 55000",
-         "remove=42",
-         "grow=twine_wasteland_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/umbrella_green'
=== added file 'world/immovables/trees/umbrella_green/init.lua'
--- world/immovables/trees/umbrella_green/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/umbrella_green/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,104 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "umbrella_green_wasteland_sapling",
+   descname = _ "Green Umbrella Tree (Sapling)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 57000",
+         "remove=21",
+         "grow=umbrella_green_wasteland_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "umbrella_green_wasteland_pole",
+   descname = _ "Green Umbrella Tree (Pole)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 53000",
+         "remove=19",
+         "grow=umbrella_green_wasteland_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "umbrella_green_wasteland_mature",
+   descname = _ "Green Umbrella Tree (Mature)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 50000",
+         "remove=18",
+         "grow=umbrella_green_wasteland_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "umbrella_green_wasteland_old",
+   descname = _ "Green Umbrella Tree (Old)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1550000",
+         "transform=deadtree4 39",
+         "seed=umbrella_green_wasteland_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/umbrella_green_wasteland_mature' => 'world/immovables/trees/umbrella_green/mature'
=== renamed directory 'world/immovables/trees/umbrella_green_wasteland_old' => 'world/immovables/trees/umbrella_green/old'
=== renamed directory 'world/immovables/trees/umbrella_green_wasteland_pole' => 'world/immovables/trees/umbrella_green/pole'
=== renamed directory 'world/immovables/trees/umbrella_green_wasteland_sapling' => 'world/immovables/trees/umbrella_green/sapling'
=== removed file 'world/immovables/trees/umbrella_green_wasteland_mature/init.lua'
--- world/immovables/trees/umbrella_green_wasteland_mature/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/umbrella_green_wasteland_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "umbrella_green_wasteland_mature",
-   descname = _ "Green Umbrella Tree (Mature)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 50000",
-         "remove=18",
-         "grow=umbrella_green_wasteland_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/umbrella_green_wasteland_old/init.lua'
--- world/immovables/trees/umbrella_green_wasteland_old/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/umbrella_green_wasteland_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "umbrella_green_wasteland_old",
-   descname = _ "Green Umbrella Tree (Old)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1550000",
-         "transform=deadtree4 39",
-         "seed=umbrella_green_wasteland_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/umbrella_green_wasteland_pole/init.lua'
--- world/immovables/trees/umbrella_green_wasteland_pole/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/umbrella_green_wasteland_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "umbrella_green_wasteland_pole",
-   descname = _ "Green Umbrella Tree (Pole)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 53000",
-         "remove=19",
-         "grow=umbrella_green_wasteland_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/umbrella_green_wasteland_sapling/init.lua'
--- world/immovables/trees/umbrella_green_wasteland_sapling/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/umbrella_green_wasteland_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "umbrella_green_wasteland_sapling",
-   descname = _ "Green Umbrella Tree (Sapling)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 57000",
-         "remove=21",
-         "grow=umbrella_green_wasteland_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== added directory 'world/immovables/trees/umbrella_red'
=== added file 'world/immovables/trees/umbrella_red/init.lua'
--- world/immovables/trees/umbrella_red/init.lua	1970-01-01 00:00:00 +0000
+++ world/immovables/trees/umbrella_red/init.lua	2014-06-22 16:38:25 +0000
@@ -0,0 +1,107 @@
+dirname = path.dirname(__file__)
+
+-- NOCOM(#sirver): these are concept values and all the same for all trees right now.
+terrain_affinity = {
+   preferred_temperature = 289.65,
+   preferred_humidity = 0.66,
+   preferred_fertility = 0.9,
+   pickiness = 0.2,
+}
+
+world:new_immovable_type{
+   name = "umbrella_red_wasteland_sapling",
+   descname = _ "Red Umbrella Tree (Sapling)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree_sapling" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 38000",
+         "remove=50",
+         "grow=umbrella_red_wasteland_pole",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "sapling/", "idle_\\d+.png"),
+         hotspot = { 5, 12 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "umbrella_red_wasteland_pole",
+   descname = _ "Red Umbrella Tree (Pole)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 38000",
+         "remove=47",
+         "grow=umbrella_red_wasteland_mature",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "pole/", "idle_\\d+.png"),
+         hotspot = { 12, 28 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "umbrella_red_wasteland_mature",
+   descname = _ "Red Umbrella Tree (Mature)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = {},
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 20000",
+         "remove=30",
+         "seed=umbrella_red_wasteland_sapling",
+         "animate=idle 20000",
+         "remove=20",
+         "grow=umbrella_red_wasteland_old",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "mature/", "idle_\\d+.png"),
+         hotspot = { 18, 48 },
+         fps = 8,
+      },
+   },
+}
+
+world:new_immovable_type{
+   name = "umbrella_red_wasteland_old",
+   descname = _ "Red Umbrella Tree (Old)",
+   editor_category = "trees_wasteland",
+   size = "small",
+   attributes = { "tree" },
+   terrain_affinity = terrain_affinity,
+   programs = {
+      program = {
+         "animate=idle 1050000",
+         "transform=deadtree2 32",
+         "seed=umbrella_red_wasteland_sapling",
+      },
+      fall = {
+         "remove=",
+      },
+   },
+   animations = {
+      idle = {
+         pictures = path.list_directory(dirname .. "old/", "idle_\\d+.png"),
+         hotspot = { 24, 60 },
+         fps = 10,
+      },
+   },
+}

=== renamed directory 'world/immovables/trees/umbrella_red_wasteland_mature' => 'world/immovables/trees/umbrella_red/mature'
=== renamed directory 'world/immovables/trees/umbrella_red_wasteland_old' => 'world/immovables/trees/umbrella_red/old'
=== renamed directory 'world/immovables/trees/umbrella_red_wasteland_pole' => 'world/immovables/trees/umbrella_red/pole'
=== renamed directory 'world/immovables/trees/umbrella_red_wasteland_sapling' => 'world/immovables/trees/umbrella_red/sapling'
=== removed file 'world/immovables/trees/umbrella_red_wasteland_mature/init.lua'
--- world/immovables/trees/umbrella_red_wasteland_mature/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/umbrella_red_wasteland_mature/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "umbrella_red_wasteland_mature",
-   descname = _ "Red Umbrella Tree (Mature)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 20000",
-         "remove=30",
-         "seed=umbrella_red_wasteland_sapling",
-         "animate=idle 20000",
-         "remove=20",
-         "grow=umbrella_red_wasteland_old",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 18, 48 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/umbrella_red_wasteland_old/init.lua'
--- world/immovables/trees/umbrella_red_wasteland_old/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/umbrella_red_wasteland_old/init.lua	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "umbrella_red_wasteland_old",
-   descname = _ "Red Umbrella Tree (Old)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "tree" },
-   programs = {
-      program = {
-         "animate=idle 1050000",
-         "transform=deadtree2 32",
-         "seed=umbrella_red_wasteland_sapling",
-      },
-      fall = {
-         "remove=",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 24, 60 },
-         fps = 10,
-      },
-   },
-}

=== removed file 'world/immovables/trees/umbrella_red_wasteland_pole/init.lua'
--- world/immovables/trees/umbrella_red_wasteland_pole/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/umbrella_red_wasteland_pole/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "umbrella_red_wasteland_pole",
-   descname = _ "Red Umbrella Tree (Pole)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = {},
-   programs = {
-      program = {
-         "animate=idle 38000",
-         "remove=47",
-         "grow=umbrella_red_wasteland_mature",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 12, 28 },
-         fps = 8,
-      },
-   },
-}

=== removed file 'world/immovables/trees/umbrella_red_wasteland_sapling/init.lua'
--- world/immovables/trees/umbrella_red_wasteland_sapling/init.lua	2014-06-14 14:33:44 +0000
+++ world/immovables/trees/umbrella_red_wasteland_sapling/init.lua	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-dirname = path.dirname(__file__)
-
-world:new_immovable_type{
-   name = "umbrella_red_wasteland_sapling",
-   descname = _ "Red Umbrella Tree (Sapling)",
-   editor_category = "trees_wasteland",
-   size = "small",
-   attributes = { "seed" },
-   programs = {
-      program = {
-         "animate=idle 38000",
-         "remove=50",
-         "grow=umbrella_red_wasteland_pole",
-      },
-   },
-   animations = {
-      idle = {
-         pictures = path.list_directory(dirname, "idle_\\d+.png"),
-         hotspot = { 5, 12 },
-         fps = 8,
-      },
-   },
-}

=== modified file 'world/init.lua'
--- world/init.lua	2014-05-03 08:40:59 +0000
+++ world/init.lua	2014-06-22 16:38:25 +0000
@@ -33,7 +33,7 @@
 world:new_editor_immovable_category{
    name = "trees_coniferous",
    descname = _ "Coniferous Trees",
-   picture = "world/immovables/trees/spruce_summer_old/idle_0.png",
+   picture = "world/immovables/trees/spruce/old/idle_0.png",
 }
 
 world:new_editor_immovable_category{
@@ -45,19 +45,19 @@
 world:new_editor_immovable_category{
    name = "trees_deciduous",
    descname = _ "Deciduous Trees",
-   picture = "world/immovables/trees/alder_summer_old/idle_0.png",
+   picture = "world/immovables/trees/alder/old/idle_0.png",
 }
 
 world:new_editor_immovable_category{
    name = "trees_palm",
    descname = _ "Palm Trees",
-   picture = "world/immovables/trees/palm_borassus_desert_old/idle_0.png",
+   picture = "world/immovables/trees/palm_borassus/old/idle_0.png",
 }
 
 world:new_editor_immovable_category{
    name = "trees_wasteland",
    descname = _ "Wasteland Trees",
-   picture = "world/immovables/trees/umbrella_red_wasteland_old/idle_0.png",
+   picture = "world/immovables/trees/umbrella_red/old/idle_0.png",
 }
 
 include "world/immovables/grass1/init.lua"
@@ -150,125 +150,35 @@
 include "world/immovables/stones/winterland_stones6/init.lua"
 
 -- Trees
-include "world/immovables/trees/alder_summer_mature/init.lua"
-include "world/immovables/trees/alder_summer_old/init.lua"
-include "world/immovables/trees/alder_summer_pole/init.lua"
-include "world/immovables/trees/alder_summer_sapling/init.lua"
-
-include "world/immovables/trees/aspen_summer_mature/init.lua"
-include "world/immovables/trees/aspen_summer_old/init.lua"
-include "world/immovables/trees/aspen_summer_pole/init.lua"
-include "world/immovables/trees/aspen_summer_sapling/init.lua"
-
-include "world/immovables/trees/beech_summer_mature/init.lua"
-include "world/immovables/trees/beech_summer_old/init.lua"
-include "world/immovables/trees/beech_summer_pole/init.lua"
-include "world/immovables/trees/beech_summer_sapling/init.lua"
-
-include "world/immovables/trees/birch_summer_mature/init.lua"
-include "world/immovables/trees/birch_summer_old/init.lua"
-include "world/immovables/trees/birch_summer_pole/init.lua"
-include "world/immovables/trees/birch_summer_sapling/init.lua"
-
-include "world/immovables/trees/cirrus_wasteland_mature/init.lua"
-include "world/immovables/trees/cirrus_wasteland_old/init.lua"
-include "world/immovables/trees/cirrus_wasteland_pole/init.lua"
-include "world/immovables/trees/cirrus_wasteland_sapling/init.lua"
-
+include "world/immovables/trees/alder/init.lua"
+include "world/immovables/trees/aspen/init.lua"
+include "world/immovables/trees/beech/init.lua"
+include "world/immovables/trees/birch/init.lua"
+include "world/immovables/trees/cirrus/init.lua"
 include "world/immovables/trees/deadtree1/init.lua"
 include "world/immovables/trees/deadtree2/init.lua"
 include "world/immovables/trees/deadtree3/init.lua"
 include "world/immovables/trees/deadtree4/init.lua"
 include "world/immovables/trees/deadtree5/init.lua"
 include "world/immovables/trees/deadtree6/init.lua"
-
 include "world/immovables/trees/fallentree/init.lua"
-
-include "world/immovables/trees/larch_summer_mature/init.lua"
-include "world/immovables/trees/larch_summer_old/init.lua"
-include "world/immovables/trees/larch_summer_pole/init.lua"
-include "world/immovables/trees/larch_summer_sapling/init.lua"
-
-include "world/immovables/trees/liana_wasteland_mature/init.lua"
-include "world/immovables/trees/liana_wasteland_old/init.lua"
-include "world/immovables/trees/liana_wasteland_pole/init.lua"
-include "world/immovables/trees/liana_wasteland_sapling/init.lua"
-
-include "world/immovables/trees/maple_winter_mature/init.lua"
-include "world/immovables/trees/maple_winter_old/init.lua"
-include "world/immovables/trees/maple_winter_pole/init.lua"
-include "world/immovables/trees/maple_winter_sapling/init.lua"
-
-include "world/immovables/trees/mushroom_dark_wasteland_mature/init.lua"
-include "world/immovables/trees/mushroom_dark_wasteland_old/init.lua"
-include "world/immovables/trees/mushroom_dark_wasteland_pole/init.lua"
-include "world/immovables/trees/mushroom_dark_wasteland_sapling/init.lua"
-
-include "world/immovables/trees/mushroom_green_wasteland_mature/init.lua"
-include "world/immovables/trees/mushroom_green_wasteland_old/init.lua"
-include "world/immovables/trees/mushroom_green_wasteland_pole/init.lua"
-include "world/immovables/trees/mushroom_green_wasteland_sapling/init.lua"
-
-include "world/immovables/trees/mushroom_red_wasteland_mature/init.lua"
-include "world/immovables/trees/mushroom_red_wasteland_old/init.lua"
-include "world/immovables/trees/mushroom_red_wasteland_pole/init.lua"
-include "world/immovables/trees/mushroom_red_wasteland_sapling/init.lua"
-
-include "world/immovables/trees/oak_summer_mature/init.lua"
-include "world/immovables/trees/oak_summer_old/init.lua"
-include "world/immovables/trees/oak_summer_pole/init.lua"
-include "world/immovables/trees/oak_summer_sapling/init.lua"
-
-include "world/immovables/trees/palm_borassus_desert_mature/init.lua"
-include "world/immovables/trees/palm_borassus_desert_old/init.lua"
-include "world/immovables/trees/palm_borassus_desert_pole/init.lua"
-include "world/immovables/trees/palm_borassus_desert_sapling/init.lua"
-
-include "world/immovables/trees/palm_coconut_desert_mature/init.lua"
-include "world/immovables/trees/palm_coconut_desert_old/init.lua"
-include "world/immovables/trees/palm_coconut_desert_pole/init.lua"
-include "world/immovables/trees/palm_coconut_desert_sapling/init.lua"
-
-include "world/immovables/trees/palm_date_desert_mature/init.lua"
-include "world/immovables/trees/palm_date_desert_old/init.lua"
-include "world/immovables/trees/palm_date_desert_pole/init.lua"
-include "world/immovables/trees/palm_date_desert_sapling/init.lua"
-
-include "world/immovables/trees/palm_oil_desert_mature/init.lua"
-include "world/immovables/trees/palm_oil_desert_old/init.lua"
-include "world/immovables/trees/palm_oil_desert_pole/init.lua"
-include "world/immovables/trees/palm_oil_desert_sapling/init.lua"
-
-include "world/immovables/trees/palm_roystonea_desert_mature/init.lua"
-include "world/immovables/trees/palm_roystonea_desert_old/init.lua"
-include "world/immovables/trees/palm_roystonea_desert_pole/init.lua"
-include "world/immovables/trees/palm_roystonea_desert_sapling/init.lua"
-
-include "world/immovables/trees/rowan_summer_mature/init.lua"
-include "world/immovables/trees/rowan_summer_old/init.lua"
-include "world/immovables/trees/rowan_summer_pole/init.lua"
-include "world/immovables/trees/rowan_summer_sapling/init.lua"
-
-include "world/immovables/trees/spruce_summer_mature/init.lua"
-include "world/immovables/trees/spruce_summer_old/init.lua"
-include "world/immovables/trees/spruce_summer_pole/init.lua"
-include "world/immovables/trees/spruce_summer_sapling/init.lua"
-
-include "world/immovables/trees/twine_wasteland_mature/init.lua"
-include "world/immovables/trees/twine_wasteland_old/init.lua"
-include "world/immovables/trees/twine_wasteland_pole/init.lua"
-include "world/immovables/trees/twine_wasteland_sapling/init.lua"
-
-include "world/immovables/trees/umbrella_red_wasteland_mature/init.lua"
-include "world/immovables/trees/umbrella_red_wasteland_old/init.lua"
-include "world/immovables/trees/umbrella_red_wasteland_pole/init.lua"
-include "world/immovables/trees/umbrella_red_wasteland_sapling/init.lua"
-
-include "world/immovables/trees/umbrella_green_wasteland_mature/init.lua"
-include "world/immovables/trees/umbrella_green_wasteland_old/init.lua"
-include "world/immovables/trees/umbrella_green_wasteland_pole/init.lua"
-include "world/immovables/trees/umbrella_green_wasteland_sapling/init.lua"
-
+include "world/immovables/trees/larch/init.lua"
+include "world/immovables/trees/liana/init.lua"
+include "world/immovables/trees/maple/init.lua"
+include "world/immovables/trees/mushroom_dark/init.lua"
+include "world/immovables/trees/mushroom_green/init.lua"
+include "world/immovables/trees/mushroom_red/init.lua"
+include "world/immovables/trees/oak/init.lua"
+include "world/immovables/trees/palm_borassus/init.lua"
+include "world/immovables/trees/palm_coconut/init.lua"
+include "world/immovables/trees/palm_date/init.lua"
+include "world/immovables/trees/palm_oil/init.lua"
+include "world/immovables/trees/palm_roystonea/init.lua"
+include "world/immovables/trees/rowan/init.lua"
+include "world/immovables/trees/spruce/init.lua"
+include "world/immovables/trees/twine/init.lua"
+include "world/immovables/trees/umbrella_green/init.lua"
+include "world/immovables/trees/umbrella_red/init.lua"
 
 -- Adds 6 animations for each walking direction into 'table'. The pictures are
 -- searched for in 'dirname'. All files should look like this

=== modified file 'world/terrains/init.lua'
--- world/terrains/init.lua	2014-05-01 11:53:53 +0000
+++ world/terrains/init.lua	2014-06-22 16:38:25 +0000
@@ -26,15 +26,44 @@
 
 pics_dir = path.dirname(__file__) .. "pics/"
 world:new_terrain_type{
+   -- The internal name of this terrain.
    name = "wiese1",
+
+   -- The name that will be used in UI and translated.
    descname = _ "Meadow 1",
+
+   -- The category for sorting this into menus in the editor.
    editor_category = "green",
+
+   -- Type of terrain. Describes if the terrain is walkable, swimmable, if
+   -- mines or buildings can be build on it, if flags can be build on it and so
+   -- on.
    is = "green",
+
+   -- The list resources that can be found in this terrain.
    valid_resources = {"water"},
+
+   -- The resources that is always in this terrain (if not overwritten by the
+   -- map maker through the editor) and the amount.
    default_resource = "water",
    default_resource_amount = 10,
+
+   -- The images used for this terrain.
    textures = { pics_dir .. "green/wiese1_00.png" },
+
+   -- This describes the z layer of the terrain when rendered next to another
+   -- one and blending slightly over it to hide the triangles.
    dither_layer = 40,
+
+   -- Terrain affinity constants. This is used to model how well plants grow on this terrain.
+   -- Temperature are in Kelvin.
+   temperature = 289.65,
+
+   -- Humidity is in percent (1 being very wet).
+   humidity = 0.66,
+
+   -- Fertility is in percent (1 being very fertile).
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -47,6 +76,11 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "green/wiese2_00.png" },
    dither_layer = 40,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
+
 }
 
 world:new_terrain_type{
@@ -59,6 +93,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "green/wiese3_00.png" },
    dither_layer = 40,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -71,6 +109,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "green/wiese4_00.png" },
    dither_layer = 40,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -83,6 +125,10 @@
    default_resource_amount = 5,
    textures = { pics_dir .. "green/steppe_00.png" },
    dither_layer = 20,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -95,6 +141,10 @@
    default_resource_amount = 4,
    textures = { pics_dir .. "green/steppe_kahl_00.png" },
    dither_layer = 20,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -107,6 +157,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "green/bergwiese_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -119,6 +173,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "green/berg1_00.png" },
    dither_layer = 60,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -131,6 +189,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "green/berg2_00.png" },
    dither_layer = 60,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -143,6 +205,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "green/berg3_00.png" },
    dither_layer = 40,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -155,6 +221,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "green/berg4_00.png" },
    dither_layer = 60,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -168,6 +238,10 @@
    textures = path.list_directory(pics_dir .. "green", "sumpf_\\d+.png"),
    dither_layer = 30,
    fps = 14,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -180,6 +254,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "green/strand_00.png" },
    dither_layer = 10,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -192,6 +270,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "green/schnee_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -205,6 +287,10 @@
    textures = path.list_directory(pics_dir .. "green", "lava_\\d+.png"),
    dither_layer = 80,
    fps = 4,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -218,6 +304,10 @@
    textures = path.list_directory(pics_dir .. "green", "wasser_\\d+.png"),
    dither_layer = 0,
    fps = 14,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 ------------------------
 --  Former blackland  --
@@ -233,6 +323,10 @@
    default_resource_amount = 5,
    textures = { pics_dir .. "wasteland/ashes_00.png" },
    dither_layer = 20,
+   -- NOCOM(#sirver): these have only be changed to be better suited to mushroom_red for testing.
+   temperature = 301,
+   humidity = 0.3,
+   fertility = 0.2,
 }
 
 world:new_terrain_type{
@@ -245,6 +339,10 @@
    default_resource_amount = 4,
    textures = { pics_dir .. "wasteland/ashes2_00.png" },
    dither_layer = 20,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -257,6 +355,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "wasteland/hardground1_00.png" },
    dither_layer = 30,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -269,6 +371,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "wasteland/hardground2_00.png" },
    dither_layer = 30,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -281,6 +387,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "wasteland/hardground3_00.png" },
    dither_layer = 30,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -293,6 +403,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "wasteland/hardground4_00.png" },
    dither_layer = 30,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -305,6 +419,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "wasteland/hardlava_00.png" },
    dither_layer = 40,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -317,6 +435,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "wasteland/mountain1_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -329,6 +451,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "wasteland/mountain2_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -341,6 +467,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "wasteland/mountain3_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -353,6 +483,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "wasteland/mountain4_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -365,6 +499,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "wasteland/strand_00.png" },
    dither_layer = 0,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -377,6 +515,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "wasteland/lava-stone1_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -389,6 +531,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "wasteland/lava-stone2_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -402,6 +548,10 @@
    textures = path.list_directory(pics_dir .. "wasteland", "water_\\d+.png"),
    dither_layer = 0,
    fps = 14,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 -------------------------
@@ -418,6 +568,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "winter/tundra_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -430,6 +584,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "winter/tundra2_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -442,6 +600,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "winter/tundra3_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -454,6 +616,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "winter/tundra_taiga_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -466,6 +632,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "winter/taiga_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -478,6 +648,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "winter/snow_00.png" },
    dither_layer = 60,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -490,6 +664,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "winter/mountain1_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -502,6 +680,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "winter/mountain2_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -514,6 +696,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "winter/mountain3_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -526,6 +712,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "winter/mountain4_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -538,6 +728,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "winter/ice_00.png" },
    dither_layer = 30,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -550,6 +744,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "winter/strand_00.png" },
    dither_layer = 40,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -563,6 +761,10 @@
    textures = path.list_directory(pics_dir .. "winter", "ice_flows_\\d+.png"),
    dither_layer = 10,
    fps = 5,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -576,6 +778,10 @@
    textures = path.list_directory(pics_dir .. "winter", "ice_flows2_\\d+.png"),
    dither_layer = 20,
    fps = 5,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -589,6 +795,10 @@
    textures = path.list_directory(pics_dir .. "winter", "water_\\d+.png"),
    dither_layer = 0,
    fps = 8,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 ---------------------
@@ -605,6 +815,10 @@
    default_resource_amount = 2,
    textures = { pics_dir .. "desert/desert4_00.png" },
    dither_layer = 20,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -617,6 +831,10 @@
    default_resource_amount = 4,
    textures = { pics_dir .. "desert/drysoil_00.png" },
    dither_layer = 30,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -629,6 +847,10 @@
    default_resource_amount = 5,
    textures = { pics_dir .. "desert/steppe_00.png" },
    dither_layer = 30,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -641,6 +863,10 @@
    default_resource_amount = 10,
    textures = { pics_dir .. "desert/meadow_00.png" },
    dither_layer = 40,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -653,6 +879,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/mountainmeadow_00.png" },
    dither_layer = 50,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -665,6 +895,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/highmountainmeadow_00.png" },
    dither_layer = 60,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -677,6 +911,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/mountain1_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -689,6 +927,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/mountain2_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -701,6 +943,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/mountain3_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -713,6 +959,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/mountain4_00.png" },
    dither_layer = 70,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -725,6 +975,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/desert1_00.png" },
    dither_layer = 20,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -737,6 +991,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/desert2_00.png" },
    dither_layer = 20,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -749,6 +1007,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/desert3_00.png" },
    dither_layer = 20,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -761,6 +1023,10 @@
    default_resource_amount = 0,
    textures = { pics_dir .. "desert/beach_00.png" },
    dither_layer = 10,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }
 
 world:new_terrain_type{
@@ -774,4 +1040,8 @@
    textures = path.list_directory(pics_dir .. "desert", "wasser_\\d+.png"),
    dither_layer = 0,
    fps = 5,
+   -- NOCOM(#sirver): these are unchanged default values.
+   temperature = 289.65,
+   humidity = 0.66,
+   fertility = 0.9,
 }


Follow ups