Tutorial – Adding a tree

The following tutorial shows you how to add a tree at the XYZ-position 500,2500,0.

Open MAPA0000.VOL

Add the following lines inside the MAPTABPOLYS { } block:
	POLY "ARBOL99",500,2500,0,159,0,1
	RADIO 38
	TILE        460,1463,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "

Now the file should like this:
{
;*****************************************************************************
;* MAPA DE VOLUMENES ESTATICOS
;*****************************************************************************

MAPDIMXY 1453,2450
MAPTABPOLYS
{
	POLY "ARBOL99",500,2500,0,159,0,1
	RADIO 38
	TILE        460,1463,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "
	POLY "ARBOL26",1400,3053,0,159,0,2			;Nombre,CentroX,CentroY
	RADIO		38				;Radio
	EXTRAINFO		0,0,0,0,0,0,0,0                 ;Extra Info Bytes
	TILE        1360,1818,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "
	TILE        1365,1820,  69, 150,   0,   0, 0,"-RUINA07.RLE","   "
	POLY "ARBOL21",1375,2700,0,159,0,2			;Nombre,CentroX,CentroY
	RADIO		38				;Radio
	EXTRAINFO		0,0,0,0,0,0,0,0                 ;Extra Info Bytes
	TILE        1335,1591,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "
	TILE        1340,1593,  69, 150,   0,   0, 0,"-RUINA07.RLE","   "
	POLY "ARBOL20",1156,2646,0,159,0,2			;Nombre,CentroX,CentroY
	RADIO		38				;Radio
	EXTRAINFO		0,0,0,0,0,0,0,0                 ;Extra Info Bytes
	TILE        1116,1556,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "
	TILE        1121,1558,  69, 150,   0,   0, 0,"-RUINA07.RLE","   "

Save the file and start Commandos. There should be a new tree at 500,2500.
But the work is not done yet. As you can see, the tree has no shadow.
You can also walk through the tree and you can't destroy it.

To add a shadow, reopen MAPA0000.VOL and add the following poly:
	POLY "ARBOL99S",500,2500,0,0,0,1
	RADIO		53
	TILE        457,1585,  85,  51,   0,   0, 0,"PISO0000.RLE","   "

To make the tree destroyable, add the following line after the first TILE of the tree:
	TILE        465,1465,  69, 150,   0,   0, 0,"-RUINA07.RLE","   "
Set the number of tiles of "ARBOL99" to 2.
	POLY "ARBOL99",500,2500,0,159,0,2

Note that it's necessary to name a tree ARBOL??. If not, the game doesn't know that the object is a tree.
It's important that the shadow has the same name with an S attached.

Now the file should look like this:
{
;*****************************************************************************
;* MAPA DE VOLUMENES ESTATICOS
;*****************************************************************************

MAPDIMXY 1453,2450
MAPTABPOLYS
{
	POLY "ARBOL99",500,2500,0,159,0,2
	RADIO 38
	TILE        460,1463,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "
	TILE        465,1465,  69, 150,   0,   0, 0,"-RUINA07.RLE","   "
	POLY "ARBOL99S",500,2500,0,0,0,1
	RADIO		53
	TILE        457,1585,  85,  51,   0,   0, 0,"PISO0000.RLE","   "
	POLY "ARBOL26",1400,3053,0,159,0,2			;Nombre,CentroX,CentroY
	RADIO		38				;Radio
	EXTRAINFO		0,0,0,0,0,0,0,0                 ;Extra Info Bytes
	TILE        1360,1818,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "
	TILE        1365,1820,  69, 150,   0,   0, 0,"-RUINA07.RLE","   "
	POLY "ARBOL21",1375,2700,0,159,0,2			;Nombre,CentroX,CentroY
	RADIO		38				;Radio
	EXTRAINFO		0,0,0,0,0,0,0,0                 ;Extra Info Bytes
	TILE        1335,1591,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "
	TILE        1340,1593,  69, 150,   0,   0, 0,"-RUINA07.RLE","   "
	POLY "ARBOL20",1156,2646,0,159,0,2			;Nombre,CentroX,CentroY
	RADIO		38				;Radio
	EXTRAINFO		0,0,0,0,0,0,0,0                 ;Extra Info Bytes
	TILE        1116,1556,  78, 156,   0,   0, 0,"ARBO0001.RLE","   "
	TILE        1121,1558,  69, 150,   0,   0, 0,"-RUINA07.RLE","   "

The last thing you have to do is to open CHOQ0000.VOL and add the following poly:
	POLY "NONAME",500,2500,0,159,0,0
	RADIO		5
Now you can't walk through the tree anymore.

That's it. Save all files and restart the first mission of Commandos.

Please note that this tutorial won't work with all maps, because most tilesets (FASE00??.WAD) don't contain the sprites ARBO0001.RLE and -RUINA07.RLE. If you want to add a tree to another map, just copy an existing ARBOL?? poly and only change the name, the X and the Y value.