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
### Deer
id=46
name=Deer
group=animal
icon=gfx\Lion_Hearted\Animals\Deer.bmp
model=gfx\Lion_Hearted\Animals\Deer.b3d
scale=0.7
behaviour=shy
health=100
speed=1.3
turnspeed=1
eyes=10
colxr=12
colyr=18
ani_idle1=31,47,0.1
ani_move=5,29,2
ani_die=47,95,0.8
loot=215,3
script=start
	//Kill
	on:kill {
		event "iskill_hunt","global";
			local $id,$x,$z;
			$x=getx("self");
			$z=getz("self");
			$id=create("object",227,$x,$z);
	}
script=end
loot=9,2
loot=96,1
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
### Deer
// The ### means that this is just a note to tell you what there is in the following script, this makes no difference in-game that I'm aware of. Its very possible that I'm wrong on this... When you add ### infront of something, the game ignores anything after the # sign.
id=46
// Id numbers are important in stranded 2, no unit or item, or object can have the same ID number, combination can have the same ID name, but that is prone to problems. Usually you would want to keep your IDs orderly, starting with ID number 2, and going from there... The player already uses ID number 1, and most likely there are animals that use ID 2. Make sure you do not have to animals, or objects or items with the same ID number, ever.
name=Deer
// This is the official name, this is the name that you will see ingame.
group=animal
// Groups are used in the editor and it making maps.
icon=gfx\Lion_Hearted\Animals\Deer.bmp
// This is where the icon graphic can be found, you have to tell the computer where to find the graphics to run, icon graphics are by default meant to be 40 by 40 pixels.
model=gfx\Lion_Hearted\Animals\Deer.b3d
// This is where the 3D model is found, same as the icon, you have to tell it where the model is. Note that when your playing around with units, you have to have animation codes, and stranded 2 as far as I know only accepts b3d animation, so you cannot use 3ds in the units, however 3ds works in the items, and the objects without problem.
scale=0.7
//This is the size of the model, often of my models I have to scale them up so that they appear right ingame. You want something to appear bigger ingame? Make this number larger, wanna make it smaller, make this number smaller.
behaviour=shy
//This is the behavior of the animal, shy means that it will run away from you should you approach it. On the other hand, raptor means that the animal will chase you and in the end try to kill you.
health=100
// Health is the amount of life an animal has, the higher this number goes, the longer it will take for you to kill the animal. The lower this number goes, the shorter the time it will take for you to kill the animal.
speed=1.3
// This is the speed of the animal, when it walks, it walks at a certain speed, if you want your animal to go faster, then increase this number, if you want it to go slower, then lower this number.
turnspeed=1
// This is the speed at which the animal turns, meaning. This is the speed that it take for it to turn around and start heading in a completely different direction. If you want to make the animal slow in turning around, lower this number, if you want to make it faster in turning around, raise this number.
eyes=10
// This is where the animals sees things, the higher the number, the higher off the ground is the view range of the animal.
colxr=12
// This is the collision radius of width. All animals have this command, the collision radius is necessary for arrows and other projectiles to hit the animal. Increase this number to make the animal easier to hit on the width angle.
colyr=18
// This is the collision radius of height. All animals have this command, the collision radius is necessary for arrows and other projectiles to hit the animal. Increase this number to make the animal easier to hit on the height angle.
ani_idle1=31,47,0.1
// This is an animation code. The name details what kind of animation it is, with it is a walking animation, a death animation, or an idle animation. The numbers after the = sign are separated by , there are three numbers. The first one is the starting frame, the second one is the stopping frame, and the third one is the speed at which the game processes the frames. You won't be playing with this until you learn how to animate most likely. This is the same explanation for the next three code lines.
ani_move=5,29,2
ani_die=47,95,0.8
loot=215,3
// Loot is what the animal drops on its death. The first number after the = sign is the ID of the item its supposed to drop, the second one is the number of items its supposed to drop. The loot command has to be repeated for every new item id.
script=start
// This signifies that there is supposed to be a script here. Scripts can do multiple things, to learn how to script, I recommend trying to understand some basic scripts, such as the eating script, (found in "items_edible.inf) you will learn how to make scripts by observing other scripts.
	//Kill
// This //Kill script is actually just a comment on what the following script is doing.
	on:kill {
// This starts up a script that happens only when you kill the animal. The bracket at the end of the command signifies that everything between the two brackets, (Opening and closing) pertains to this line of code.
		event "iskill_hunt","global";
// This is where you earn one hunting skill point every time you kill an animal.	
		local $id,$x,$z;
// This creates local variables, the variable names always has to start with $. And the variable names are separated by , . Local variables do not mess with other items or objects in the game, they are specific only to the object that they were activated in.
			$x=getx("self");
//This assigns the $x variable a value based on the x location of the animal.
			$z=getz("self");
//This assigns the $z variable a value based on the z location of the animal.
			$id=create("object",227,$x,$z);
//This makes the local variable $id, creating an object, with the id number 227, at the location of $x and $z.
	}
//This is the closing bracket that was opened on the "on:kill {" code. This signifies that everything that is supposed to happen on the death of the animal has happened.
script=end
//This means that the script has ended, and there is no more scripting for this unit.
loot=9,2
loot=96,1
// See the loot explanation above.