Index: /java/Framclipse/com.framsticks.framclipse/res/framscript.xml
===================================================================
--- /java/Framclipse/com.framsticks.framclipse/res/framscript.xml	(revision 468)
+++ /java/Framclipse/com.framsticks.framclipse/res/framscript.xml	(revision 469)
@@ -630,14 +630,4 @@
 <arguments/></element>
 		<element name="pathseparator" type="string" flags="33"/>
-		<element name="system" function="true" type="integer" flags="32">
-			<description><![CDATA[Invokes a system command and returns its exit code (0 usually means the command was completed successfully).
-
-Example:
-File.system("wget",["-O","/tmp/filename","http://example.com/file"]);]]></description>
-			<arguments>
-				<argument name="executable" type="string"/>
-				<argument name="string arguments" type="Vector"/>
-			</arguments>
-		</element>
 	</type>
 	<type name="FunctionReference" context="Global context">
@@ -746,11 +736,11 @@
 <arguments/></element>
 		<element name="roulette" function="true" type="Genotype" flags="34">
-			<description><![CDATA[Returns a fitness-proportional genotype object]]></description>
+			<description><![CDATA[Returns a randomly selected, fitness-proportional genotype object. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.]]></description>
 <arguments/></element>
 		<element name="revroulette" function="true" type="Genotype" flags="34">
-			<description><![CDATA[Returns a reverse fitness-proportional genotype object]]></description>
+			<description><![CDATA[Returns a randomly selected, reverse fitness-proportional genotype object. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.]]></description>
 <arguments/></element>
 		<element name="tournament" function="true" type="Genotype" flags="34">
-			<description><![CDATA[Returns a tournament winner genotype object]]></description>
+			<description><![CDATA[Returns a tournament winner genotype object. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.]]></description>
 			<arguments>
 				<argument name="genotypes in tournament" type="integer"/>
@@ -758,5 +748,5 @@
 		</element>
 		<element name="randomLikeGeno" function="true" type="Genotype" flags="34">
-			<description><![CDATA[Returns a random genotype index similar to the target genotype. Read about details:
+			<description><![CDATA[Returns a random genotype index similar to the target genotype. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness. Read about details:
 http://www.framsticks.com/node/795
 http://www.framsticks.com/node/890]]></description>
@@ -767,5 +757,5 @@
 		</element>
 		<element name="rouletteLikeGeno" function="true" type="Genotype" flags="34">
-			<description><![CDATA[Returns a random genotype similar to the target genotype, fitness-proportional. Read about details:
+			<description><![CDATA[Returns a random genotype similar to the target genotype, fitness-proportional. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness. Read about details:
 http://www.framsticks.com/node/795
 http://www.framsticks.com/node/890]]></description>
@@ -886,5 +876,5 @@
 		</element>
 		<element name="worst" function="true" type="integer" deprecated="true" flags="8226">
-			<description><![CDATA[Gets worst genotype index.]]></description>
+			<description><![CDATA[Gets the worst (lowest fitness) genotype index. Unrated genotypes (instances==0) are ranked lower than those having at least one instance.]]></description>
 <arguments/></element>
 		<element name="random" function="true" type="integer" deprecated="true" flags="8226">
@@ -892,11 +882,11 @@
 <arguments/></element>
 		<element name="roulette" function="true" type="integer" deprecated="true" flags="8226">
-			<description><![CDATA[Gets fitness-proportional genotype index.]]></description>
+			<description><![CDATA[Gets a randomly selected, fitness-proportional genotype index. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.]]></description>
 <arguments/></element>
 		<element name="revroulette" function="true" type="integer" deprecated="true" flags="8226">
-			<description><![CDATA[Get reverse fitness-proportional genotype index.]]></description>
+			<description><![CDATA[Gets a randomly selected, reverse fitness-proportional genotype index. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.]]></description>
 <arguments/></element>
 		<element name="tournament" function="true" type="integer" deprecated="true" flags="8226">
-			<description><![CDATA[Gets tournament winner genotype.]]></description>
+			<description><![CDATA[Gets tournament winner genotype. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.]]></description>
 			<arguments>
 				<argument name="genotypes in tournament" type="integer"/>
@@ -904,5 +894,5 @@
 		</element>
 		<element name="randomLikeThis" function="true" type="integer" deprecated="true" flags="8226">
-			<description><![CDATA[Gets a random genotype index similar to the selected one.]]></description>
+			<description><![CDATA[Gets a random genotype index similar to the selected one. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.]]></description>
 			<arguments>
 				<argument name="minimum similarity" type="float"/>
@@ -910,5 +900,5 @@
 		</element>
 		<element name="likeThisRoulette" function="true" type="integer" deprecated="true" flags="8226">
-			<description><![CDATA[Gets a random genotype similar to the selected one, fitness-proportional.]]></description>
+			<description><![CDATA[Gets a random genotype similar to the selected one, fitness-proportional. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.]]></description>
 			<arguments>
 				<argument name="minimum similarity" type="float"/>
@@ -1886,4 +1876,9 @@
 		</element>
 		<element name="cos" function="true" type="float">
+			<arguments>
+				<argument type="float"/>
+			</arguments>
+		</element>
+		<element name="tan" function="true" type="float">
 			<arguments>
 				<argument type="float"/>
@@ -2876,5 +2871,7 @@
 	- food and food: collision value = 0x20002 & 0x10002 = 2 -> As above.
 	- creature and food: collision value = (0x10001 & 0x10002) or (0x20002 & 0x20001) = 0x10000 or 0x20000 -> Custom handling will be used (the result falls into higher 16 bits).
-]]></description>
+
+
+Instead of manually calculating mask values, you can use this interactive graphical helper: http://www.framsticks.com/files/apps/js/population-mask-helper/index.html]]></description>
 		</element>
 		<element name="othermask" type="integer" min="0" max="2147483647" default="0" flags="32">
@@ -3262,5 +3259,5 @@
 		<element name="import" function="true" type="void" flags="32">
 			<description><![CDATA[Load some data from file. The second optional argument selects what section(s) will be imported:
-	1 - experiment (works like "load" and can reset the simulator state!)
+	1 - experiment (works just like load(), all other bits are ignored, and can reset the simulator state!)
 	2 - genotypes
 	4 - simulator parameters
@@ -3292,5 +3289,5 @@
 - filename
 - flags: composed of the following bit values:
-   1 - experiment (works like "save" and all other bits are ignored)
+   1 - experiment (works just like save() and all other bits are ignored)
    2 - genotypes
    4 - simulator parameters
@@ -4419,5 +4416,5 @@
 		<element name="import" function="true" type="void" flags="32">
 			<description><![CDATA[Load some data from file. The second optional argument selects what section(s) will be imported:
-	1 - experiment (works like "load" and can reset the simulator state!)
+	1 - experiment (works just like load(), all other bits are ignored, and can reset the simulator state!)
 	2 - genotypes
 	4 - simulator parameters
@@ -4449,5 +4446,5 @@
 - filename
 - flags: composed of the following bit values:
-   1 - experiment (works like "save" and all other bits are ignored)
+   1 - experiment (works just like save() and all other bits are ignored)
    2 - genotypes
    4 - simulator parameters
@@ -4910,5 +4907,5 @@
 		</element>
 		<element name="serialize" function="true" type="string">
-			<description><![CDATA[convert to textual representation, preserving the object hierarchy]]></description>
+			<description><![CDATA[Converts to textual representation, preserving object hierarchy.]]></description>
 			<arguments>
 				<argument type="untyped"/>
@@ -4916,7 +4913,13 @@
 		</element>
 		<element name="deserialize" function="true" type="untyped">
-			<description><![CDATA[extract objects from textual representation]]></description>
+			<description><![CDATA[Extracts objects from textual representation.]]></description>
 			<arguments>
 				<argument type="string"/>
+			</arguments>
+		</element>
+		<element name="toJSON" function="true" type="string">
+			<description><![CDATA[Exports to JSON format, preserving object hierarchy (excluding recursion).]]></description>
+			<arguments>
+				<argument type="untyped"/>
 			</arguments>
 		</element>
@@ -6587,4 +6590,9 @@
 			</arguments>
 		</element>
+		<element name="newScroll" function="true" type="GUIElement">
+			<arguments>
+				<argument name="name" type="string"/>
+			</arguments>
+		</element>
 		<element name="get" function="true" type="GUIElement">
 			<arguments>
@@ -6694,4 +6702,10 @@
 				<argument name="index" type="integer"/>
 				<argument name="image" type="string"/>
+			</arguments>
+		</element>
+		<element name="getItemRect" function="true" type="Rect">
+			<description><![CDATA[Returns null if the requested item is scrolled out of view.]]></description>
+			<arguments>
+				<argument name="index" type="integer"/>
 			</arguments>
 		</element>
@@ -6752,6 +6766,10 @@
 			</arguments>
 		</element>
-		<element name="scroll_x" type="float" flags="1"/>
-		<element name="scroll_y" type="float" flags="1"/>
+		<element name="scroll_x" type="float"/>
+		<element name="scroll_y" type="float"/>
+		<element name="scroll_w" type="float"/>
+		<element name="scroll_h" type="float"/>
+		<element name="page_w" type="float"/>
+		<element name="page_h" type="float"/>
 		<element name="focus" type="integer" min="0" max="1"/>
 		<element name="edit" function="true" type="void">
@@ -6800,4 +6818,5 @@
 <description><![CDATA[Material object]]></description>
 		<element name="new" function="true" type="Material"><arguments/></element>
+		<element name="clone" function="true" type="Material"><arguments/></element>
 		<element name="color" type="string" flags="256"/>
 		<element name="lighting" type="integer" min="0" max="1" flags="256"/>
@@ -6882,4 +6901,5 @@
 			</arguments>
 		</element>
+		<element name="clone" function="true" type="Obj3D"><arguments/></element>
 		<element name="load" function="true" type="Obj3D">
 			<arguments>
