diff --git a/src/common/attributes/attributes.c b/src/common/attributes/attributes.c
index cdd474eb7..da795f288 100644
--- a/src/common/attributes/attributes.c
+++ b/src/common/attributes/attributes.c
@@ -28,6 +28,7 @@
 #include "overrideroads.h"
 #include "otherfaction.h"
 #include "racename.h"
+#include "ugroup.h"
 #ifdef AT_OPTION
 # include "option.h"
 #endif
@@ -63,4 +64,5 @@ init_attributes(void)
 #ifdef AT_OPTION
 	init_option();
 #endif
+	init_ugroup();
 }
diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c
index ab99502e4..23c109a5d 100644
--- a/src/common/kernel/eressea.c
+++ b/src/common/kernel/eressea.c
@@ -203,7 +203,9 @@ const char *keywords[MAXKEYWORDS] =
 	"SORTIEREN",
 	"JIHAD",
 	"GM",
-	"INFO"
+	"INFO",
+	"JOINVERBAND",
+	"LEAVEVERBAND"
 };
 
 const char *report_options[MAX_MSG] =
diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h
index d23b5fb43..0b8fd8487 100644
--- a/src/common/kernel/eressea.h
+++ b/src/common/kernel/eressea.h
@@ -412,6 +412,8 @@ enum {
 	K_SETJIHAD,
 	K_GM,          /* perform GM commands */
 	K_INFO,        /* set player-info */
+	K_JOINUGROUP,
+	K_LEAVEUGROUP,
 	MAXKEYWORDS,
 	NOKEYWORD = (keyword_t) - 1
 };
diff --git a/src/common/kernel/faction.h b/src/common/kernel/faction.h
index 55f018683..1a1656c6c 100644
--- a/src/common/kernel/faction.h
+++ b/src/common/kernel/faction.h
@@ -41,6 +41,7 @@ typedef struct faction {
 	int options;
 	int no_units;
 	int karma;
+	struct ugroup *ugroups;
 	struct warning * warnings;
 	struct msglevel * msglevels;
 	struct ally *allies;
diff --git a/src/res/de/messages.xml b/src/res/de/messages.xml
index 8d7cdcf9a..ed25536bf 100644
--- a/src/res/de/messages.xml
+++ b/src/res/de/messages.xml
@@ -3762,6 +3762,74 @@
 	</locale>
 </message>
 
+<message name="error289">
+	<type>
+		<arg name="unit" type="unit"></arg>
+		<arg name="region" type="region"></arg>
+		<arg name="command" type="string"></arg>
+	</type>
+	<locale name="de">
+		<nr section="errors">
+			<text>"$unit($unit) in $region($region): '$command' - Wie sollen wir uns tarnen?"</text>
+		</nr>
+	</locale>
+</message>
+
+<message name="error290">
+	<param name="unit" type="unit"></param>
+	<param name="region" type="region"></param>
+	<param name="command" type="string"></param>
+	<locale name="de">
+		<nr section="de">
+			<text>"$unit in $region: '$command' - Eine Einheit kann nur in einem Verband Mitglied sein."</text>
+		</nr>
+	</locale>
+</message>
+
+<message name="error291">
+	<param name="unit" type="unit"></param>
+	<param name="region" type="region"></param>
+	<param name="command" type="string"></param>
+	<locale name="de">
+		<nr section="de">
+			<text>"$unit in $region: '$command' - Die Einheit ist in keinem Verband."</text>
+		</nr>
+	</locale>
+</message>
+
+<message name="error292">
+	<param name="unit" type="unit"></param>
+	<param name="region" type="region"></param>
+	<param name="command" type="string"></param>
+	<locale name="de">
+		<nr section="de">
+			<text>"$unit in $region: '$command' - Mit sich selbst kann man keinen Verband bilden."</text>
+		</nr>
+	</locale>
+</message>
+
+<message name="error293">
+	<param name="unit" type="unit"></param>
+	<param name="region" type="region"></param>
+	<param name="command" type="string"></param>
+	<locale name="de">
+		<nr section="de">
+			<text>"$unit in $region: '$command' - Verb�nde k�nnen nur zwischen Einheiten derselben Partei gebildet werden."</text>
+		</nr>
+	</locale>
+</message>
+
+<message name="error294">
+	<param name="unit" type="unit"></param>
+	<param name="region" type="region"></param>
+	<param name="command" type="string"></param>
+	<locale name="de">
+		<nr section="de">
+			<text>"$unit in $region: '$command' - Die Einheiten m�ssen sich im selben Schiff oder Geb�ude aufhalten."</text>
+		</nr>
+	</locale>
+</message>
+
 <message name="msg_event">
 	<type>
 		<arg name="string" type="string"></arg>
diff --git a/src/tools/prototype-advance/battle.py b/src/tools/prototype-advance/battle.py
index 3f1d61a70..9652da755 100755
--- a/src/tools/prototype-advance/battle.py
+++ b/src/tools/prototype-advance/battle.py
@@ -16,15 +16,16 @@ import re
 from Graph import *
 
 class heer:
-	def __init__(self, rx, ry, f, o):
+	def __init__(self, rx, ry, f, p, o):
 		self.rx = rx
 		self.ry = ry
 		self.f  = f
+		self.part = p
 		self.o  = o
 		self.attacked = []
 
 	def toString(self):
-		return "("+self.f+","+str(self.rx)+","+str(self.ry)+")"
+		return "("+self.f+"/"+str(self.part)+","+str(self.rx)+","+str(self.ry)+")"
 
 
 def dist(x1, y1, x2, y2):
@@ -52,14 +53,11 @@ def is_neighbour(h, r1, r2):
 	return 0
 
 heere = [
-	Node(heer(0,-2, 'D', 'A->C:1,-3')),
-	Node(heer(1,-3, 'D', '')),
-	Node(heer(1,-2, 'D', '')),
-	Node(heer(2,-3, 'D', 'A->C:1,-3')),
-	Node(heer(1,-2, 'C', 'L->D')),
-	Node(heer(1,-3, 'C', 'A->D:1,-2')),
-	Node(heer(0, 0, 'A', '')),
-	Node(heer(0, 0, 'B', 'L->A'))
+	Node(heer(0,0,  'A', 1, 'A->B:-1,1')),
+	Node(heer(0,0,  'A', 2, 'A->B:0,1')),
+	Node(heer(-1,1, 'B', 1, '')),
+	Node(heer(1,-1, 'B', 1, '')),
+	Node(heer(0,1,  'B', 1, ''))
 ]
 
 def find_heer_node(x, y, f):