1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
### Grain Pile
id=42
name=Grains
group=food
icon=gfx\grainpile.bmp
model=gfx\grainpile.b3d
scale=0.65
mat=dust
weight=50
info=can be grinded with a stone. take them into your hand and use the ground in order to plant them
script=start
	on:use {
		msg "I have to take them into my hand",3;
		msg "and to use the ground!",3;
		speech "negative";
	}
	on:eat {
		process "eating",1000;
		eat 2,5,0,0;
	}
script=end
then you change line 2 to "id=121" (or some bigger number) because 120 is the largest number that is already being used.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
### Grain
id=121
name=Grain
group=stuff
icon=gfx\grain.bmp
model=gfx\grain.b3d
behaviour=plague_target
fx=16
scale=0.8
swayspeed=2
swaypower=5
col=2
health=45
mat=leaf
growtime=5
script=start
	on:kill {
		$tmp=1;
		$tmp2=spawntimer("self");
		if ($tmp2>-3){$tmp=2;}
		if ($tmp2>=0){$tmp=3;}
		create "item",41,getx("self"),getz("self"),$tmp;
		corona getx("self"),getz("self");
		freevar $tmp,$tmp2;
	}
	on:plant {
		spawntimer "self",-4;
	}
script=end
same as above, change the values as needed.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//Planting
on:useground {
	local $x,$y,$z,$id,$item;
	$x=use_x();
	$y=use_y();
	$z=use_z();
	$item=getplayerweapon();
	
	if (count_stored("unit",1,$item)>0){
	
		//Grain
		if ($item==42){
			if ($y>0){
				if (freespace($x,$y,$z,20,1,0,0,0)){
					freestored "unit",1,42,1;
					$id=create("object",121,$x,$z);
					event "plant","object",$id;
					if (skillvalue("plant")>=400){
						process "planting grain",500;
					}else{
						process "planting grain",2000;
					}
					play "dig.wav";
					play "mat_leaf1.wav";
					event "iskill_plant","global";
				}else{
					speech "negative";
					msg "Here is not enough space!",3;
				}
			}else{
				speech "negative";
				msg "Grain does not grow in water!",3;
			}
		}
	}
}
this is a part of the "game.inf" file. you will need to make some more changes here to match the numbers from the first and second file you created.