### Crystal
id=2
name=small Crystal
group=material
icon=gfx\crystal01.bmp
model=gfx\crystal01.b3d
color=0,255,0
shine=1
blend=3
scale=2
mat=stone
weight=200
info=a small crystal
healthchange=0

### Crystal
id=3
name=Crystal
group=material
icon=gfx\crystal02.bmp
model=gfx\crystal02.b3d
color=0,255,0
shine=1
blend=3
scale=2
mat=stone
weight=500
info=a sparkling crystal
healthchange=0

### Goldnugget
id=4
name=Goldnugget
group=material
icon=gfx\goldnugget.bmp
model=gfx\nugget.b3d
color=255,255,0
shine=1
scale=2
behaviour=ammo:51
mat=metal
weight=350
info=a big goldnugget! I'm rich!
healthchange=0

### Trunk
id=7
name=Log
group=material
icon=gfx\trunk.bmp
model=gfx\trunk.b3d
mat=wood
weight=10000
info=a heavy log. Why do I have to haul this bulky thing?
healthchange=0
script=start
	on:kill {
		local $x,$y,$z,$id,$c,$typ;
		$x=getx("self");
		$y=gety("self");
		$z=getz("self");
		$c=random(2,5);
		loop ("count",$c){
			$typ=24;
			if (random(1,3)==1){ $typ=107; }
			$id=create("item",$typ,$x,$z);
			setpos "item",$id,$x+random(-5,5),$y+random(-2,2),$z+random(-5,5);
			setrot "item",$id,"self",random(360),"self";
		}
		freevar $x,$y,$z,$id,$c,$typ; 
	}
script=end

### Bamboo
id=8
name=Bamboo
group=material
icon=gfx\bambooitem.bmp
model=gfx\bambooitem.b3d
fx=16
scale=0.3
mat=wood
weight=100
info=weird bamboo stuff!

### Leaf
id=15
name=Leaf
group=material
icon=gfx\leaf.bmp
model=gfx\leaf.b3d
fx=16
scale=0.6
mat=leaf
weight=30
info=a wonderful leaf. I can use a stone to press the water out of leaves if I have many of them

### Pebbles
id=21
name=Pebbles
group=material
icon=gfx\pebbles.bmp
model=gfx\pebbles.b3d
scale=0.4
behaviour=ammo:51
mat=stone
weight=50
info=small pebbles - I'm sure that they could be a good ammunition
healthchange=0
damage=5
script=start
	on:impact {
		if (impact_first()==1){
			if (skillvalue("hunt")>=25){
				if (random(1,10)<=5){
					$tmp=create("item",21);
					setpos "item",$tmp,impact_x(),impact_y(),impact_z();
				}
			}
		}
	}
script=end

### Stone
id=23
name=Stone
group=material
icon=gfx\stone04.bmp
model=gfx\stone04.b3d
scale=1.4
mat=stone
weight=1500
info=a heavy stone
healthchange=0
script=start
	on:eat {
		play "bite.wav";
		addstate "unit",1,"bleeding";
		msg "Ouch! My teeth!",3;
		msg "I'm bleeding!",3;
	}
script=end

### Branch
id=24
name=Branch
group=material
icon=gfx\branch.bmp
model=gfx\branch.b3d
scale=0.4
mat=wood
weight=200
info=a branch. You can make it bendable with water or light it with fire
script=start
	on:use {
		if ( ((count_behaviourinrange("object","fountain",50)+count_behaviourinrange("object","watersource",50))>0) or (inarea_freshwater("unit",1)==1) ){
			alteritem 1,25;
			process "making bendable",2000;
		}elseif ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
			alteritem 1,111;
			process "making torch",3000;
		}else{
			msg "I need fire or freshwater!",3;
			speech "negative";
		}
	}
script=end

### Bendable Branch
id=25
name=bendable Branch
group=material
icon=gfx\bendablebranch.bmp
model=gfx\bendablebranch.b3d
scale=0.8
mat=wood
weight=200
info=a branch which has been made bendable with water
script=start
	on:use {
		if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
			alteritem 1,24;
			process "hardening",2000;
		}
	}
script=end

### Liana
id=26
name=Vine
group=material
icon=gfx\liana.bmp
model=gfx\liana.b3d
scale=0.4
mat=leaf
weight=300
behaviour=fastblade
damage=0
rate=1000
info=a vine. I can use it as a whip to drove animals
script=start
	on:impact {
		play "whip.wav";
		$tmp=impact_class();
		$tmp2=impact_id();
		//2 Damage on everything which is no flesh
		if (compare_material($tmp,$tmp2,"flesh")==0){
			damage $tmp,$tmp2,2;
		}
		freevar $tmp;
		freevar $tmp2;
	}
script=end

### Wool
id=48
name=Cotton / Wool
group=material
icon=gfx\wool.bmp
model=gfx\wool.b3d
scale=0.6
mat=none
weight=30
info=cotton and/or wool. I can use it to make cord out of it
script=start
	on:use {
		play "mat_leaf1.wav";
		alteritem 1,49,1;
		process "making cord",2000;
	}
script=end

### Cord
id=49
name=Thread
group=material
icon=gfx\cord.bmp
model=gfx\cord.b3d
scale=0.4
mat=none
weight=5
info=thread!

### Feather
id=57
name=Feather
group=material
icon=gfx\feather.bmp
model=gfx\feather.b3d
fx=16
scale=0.5
mat=none
weight=1
info=a bird's feather

### Iron
id=85
name=Iron
group=material
icon=gfx\iron.bmp
model=gfx\nugget.b3d
color=220,220,220
shine=1
scale=2
mat=metal
weight=350
info=a clump of iron. I can use a hammer to process it. But this form can be used to make tools too
healthchange=-0.1

### Ironbar
id=86
name=Iron Rod
group=material
icon=gfx\ironbar.bmp
model=gfx\ironbar.b3d
shine=1
scale=0.9
mat=metal
weight=300
info=an iron rod. Combine it with a hammer and other stuff to create tools
healthchange=-0.1

### Tooth
id=94
name=Tooth
group=material
icon=gfx\tooth.bmp
model=gfx\tooth.b3d
scale=0.4
damage=15
behaviour=ammo:51,ammo:64
drag=0.25
mat=stone
weight=5
info=a spiky tooth
healthchange=0

### Claw
id=95
name=Claw
group=material
icon=gfx\claw.bmp
model=gfx\claw.b3d
scale=0.7
damage=20
behaviour=ammo:51,ammo:64
drag=0.5
mat=stone
weight=10
info=a sharp claw of some threatening animals
healthchange=0

### Skin
id=96
name=Skin
group=material
icon=gfx\skin.bmp
model=gfx\skin.b3d
scale=1
fx=16
mat=none
weight=500
info=skins/hides. I can create a tent out of this when I combine it with branches

### Bark
id=107
name=Bark
group=material
icon=gfx\bark.bmp
model=gfx\bark.b3d
scale=0.4
fx=16
weight=40
info=a piece of bark. Maybe I can create fire with this...
script=start
	on:use {
		process "searching",1500;
		local $r;
		local $id;
		$r=random(1,3);
		if (random(10)==1){
			speech "negative",1,2;
			play "mat_wood1.wav";
			msg "The bark is broken!",3;
			freestored "unit",1,107,1;		
		}else{
			if ($r==1){
				speech "positive";
				play "mat_leaf1.wav";
				msg "Insects!",4;
				$id=create("item",98);
				store $id,"unit",1;
			}elseif ($r==2){
				play "mat_leaf1.wav";
				speech "positive";
				msg "Slime!",4;
				$id=create("item",99);
				store $id,"unit",1;
			}else{
				play "mat_leaf1.wav";
				msg "I found nothing!",3;
			}	
		}
	}
script=end