MD File Information

Let's take an example first ( Algerian Townhall)
 

NAME Center_Algir // Name of the building as been called up on in the .nds file & nmlist.txt
MESSAGE ƒ®à®¤áª®©_業âà    // coded message
BUILDING     // What type of building it is ( see [UNITKINDS] in NRES.DAT)( there are 4-UNIT,BUILDING, WALL & TOWER)
FARM      // States whether the building should house population
ICON AU_Cntr     //Icon used ( in icon.txt)
USERLC 0 cal  SHADOW 0 0   //>> refers to the .GP files( this case cal.GP & Caldez.gp)
USERLC 1 caldez SHADOW 0 0   //Next section : Lockpoints; define the building after test it is to block units from going trough the building.Buildpoints are where the peasants will build it
LOCKPOINTS 194    7 35  7 36  7 37  8 34  8 35  8 36  8 37  8 38  9 33  9 34  9 35  9 36  9 37  9 38  9 39  10 32  10 33  10 34  10 35  10 36  10 37  10 38  10 39  10 40  11 31  11 32  11 33  11 34  11 35  11 36  11 37  11 38  11 39  11 40  11 41  12 30  12 31  12 32  12 33  12 34  12 35  12 36  12 37  12 38  12 39  12 40  12 41  13 29  13 30  13 31  13 32  13 33  13 34  13 35  13 36  13 37  13 38  13 39  13 40  13 41  14 28  14 29  14 30  14 31  14 32  14 33  14 34  14 35  14 36  14 37  14 38  14 39  14 40  14 41  15 27  15 28  15 29  15 30  15 31  15 32  15 33  15 34  15 35  15 36  15 37  15 38  15 39  15 40  15 41  16 26  16 27  16 28  16 29  16 30  16 31  16 32  16 33  16 34  16 35  16 36  16 37  16 38  16 39  16 40  16 41  17 26  17 27  17 28  17 29  17 30  17 31  17 32  17 33  17 34  17 35  17 36  17 37  17 38  17 39  17 40  18 26  18 27  18 28  18 29  18 30  18 31  18 32  18 33  18 34  18 35  18 36  18 37  18 38  18 39  19 26  19 27  19 28  19 29  19 30  19 31  19 32  19 33  19 34  19 35  19 36  19 37  19 38  20 26  20 27  20 28  20 29  20 30  20 31  20 32  20 33  20 34  20 35  20 36  20 37  21 26  21 27  21 28  21 29  21 30  21 31  21 32  21 33  21 34  21 35  21 36  22 27  22 28  22 29  22 30  22 31  22 32  22 33  22 34  22 35  23 28  23 29  23 30  23 31  23 32  23 33  23 34  24 29  24 30  24 31  24 32  24 33  25 30  25 31  25 32
BUILDPOINTS 26    5 35  5 37  6 33  6 39  8 31  8 41  10 29  10 43  12 27  12 43  14 25  14 43  16 24  16 43  18 24  18 42  20 24  20 40  22 24  22 38  24 26  24 36  26 28  26 34  27 30  27 32
BORNPOINTS 8   21 32  22 33  23 34  24 35  25 36  26 37  27 38  28 39 // Point where units will come out of building, without this game crashes if you recruit units inside this building)
CHECKPOINTS 194    7 35  7 36  7 37  8 34  8 35  8 36  8 37  8 38  9 33  9 34  9 35  9 36  9 37  9 38  9 39  10 32  10 33  10 34  10 35  10 36  10 37  10 38  10 39  10 40  11 31  11 32  11 33  11 34  11 35  11 36  11 37  11 38  11 39  11 40  11 41  12 30  12 31  12 32  12 33  12 34  12 35  12 36  12 37  12 38  12 39  12 40  12 41  13 29  13 30  13 31  13 32  13 33  13 34  13 35  13 36  13 37  13 38  13 39  13 40  13 41  14 28  14 29  14 30  14 31  14 32  14 33  14 34  14 35  14 36  14 37  14 38  14 39  14 40  14 41  15 27  15 28  15 29  15 30  15 31  15 32  15 33  15 34  15 35  15 36  15 37  15 38  15 39  15 40  15 41  16 26  16 27  16 28  16 29  16 30  16 31  16 32  16 33  16 34  16 35  16 36  16 37  16 38  16 39  16 40  16 41  17 26  17 27  17 28  17 29  17 30  17 31  17 32  17 33  17 34  17 35  17 36  17 37  17 38  17 39  17 40  18 26  18 27  18 28  18 29  18 30  18 31  18 32  18 33  18 34  18 35  18 36  18 37  18 38  18 39  19 26  19 27  19 28  19 29  19 30  19 31  19 32  19 33  19 34  19 35  19 36  19 37  19 38  20 26  20 27  20 28  20 29  20 30  20 31  20 32  20 33  20 34  20 35  20 36  20 37  21 26  21 27  21 28  21 29  21 30  21 31  21 32  21 33  21 34  21 35  21 36  22 27  22 28  22 29  22 30  22 31  22 32  22 33  22 34  22 35  23 28  23 29  23 30  23 31  23 32  23 33  23 34  24 29  24 30  24 31  24 32  24 33  25 30  25 31  25 32
DAMPOINTS 1    16 28      // (mostlikely dam points are damage points,)
CONCENTRATOR 1    19 24    // Point of origin where a unit is born
FIRES 10 194 171  214 168  174 168  194 110  211 108  177 107  175 85  187 87  201 88  214 85  //Points with the fire's
SMOKE 16 371 220  379 221  367 224  364 228  360 186  344 195  337 196  321 199  314 199  296 198  289 196  274 187  269 278  275 275  299 264  307 261 //points with the smoke 
SETANMPARAM -281 -281 1 0   //for animations numbers refer to offset of picture(x,y) sprites/picture sprite width
LOCATION -281 -281 403 309    //location for animations, numbers refer to: #ANIMATION Rotations NFrames FileID_1 frame1 ... FileID_N frameN
#STANDLO    1 3   0 8 0 9 0 10   
#BUILDLO_0  1 2   0 0  0 1 
#BUILDLO_1  1 2   0 2  0 3
#BUILDLO_2  1 2   0 4  0 5
#BUILDLO_3  1 2   0 6  0 7
#DEATHLIE1  1 2   1 0  1 1
#DEATHLIE2  1 2   1 2  1 3
LINESORT #STANDLO     GROUND LINE 137 307 358 283 LINE 359 260 402 263
LINESORT #BUILDLO_0   GROUND LINE 128 302 438 273
LINESORT #BUILDLO_1   GROUND LINE 128 302 438 273
LINESORT #BUILDLO_2   GROUND LINE 128 302 438 273
LINESORT #BUILDLO_3   GROUND LINE 128 302 438 273
LINESORT #DEATHLIE1   GROUND LINE 137 308 401 263
LINESORT #DEATHLIE2   GROUND LINE 137 308 401 263
DESTRUCT 16000 13 obl16 obl23 obl38 obl16 obl23 obl38 obl16 obl23 obl38 PU4 PU2 PU6 PU6 // stages of destruction?
GEOMETRY 1 199 32     //Third parameter (32) is actually for the speed of a unit, but since this is a building, its kinda funny /:Numbers refer to : Radius1 Radius2 StepSize
LIFE     5500      // the amount of life the building has
PRICE 2 WOOD 450 STONE 700    // 2 resources in order to be able to build this, resource type and amount
RANGE    18 6 22 0 0 9     //numbers refer to: AttackRange MaxAttackRange MinAttRange MaxNearRange ActionType VisibilityRadius
MATHERIAL 1 BUILDING     // what material it is.can be : BODY,STONE,WOOD,IRON,AIR
BUILDSTAGES 500      // how long in game time it takes to build
RECTANGLE    0 60 180 200    //sets a box around a unit/building so you can select it
MFARM 50      // amount of housing population can be had in the building
BUILDBAR   1 36  31 31     / the texture below the building how large it is
3DBARS 1 136 304 90 178 78     // this makes a building have a shape so cannonballs for example can kill it
CAPTURE       // building can be captured
SELECT_SOUND CENTER1     // sound played on selecting building
ORDER_SOUND CENTER1     // sound played on giving an order
BORN_SOUND CENTER1     // sound when unit is created or build
USAGE CENTER      // idle peasants icon will appear if you put this. Could be USAGE: TOWER aswell or USAGE FIELD , STRELOK, LIGHTINFANTRY
SLOWDEATH      // rate( pace) at which it burns down
COSTPERCENT 300      // how much additional buildings will cost
RESOURCEBASE 3 WOOD STONE FOOD    // meaning wood, stone and food can be dropped here
VES 1000      // no idea, for houses its: 100;not all buildings have these(think this maybe for the 'score'value given on building a unit, but where would the value be then for 'destroying' a unit?
INFO 3 0      // for the display of the ingame information ( I ) Not sure about the parameters, got it written down somewhere, cant remember where
[END]


So what other functions can you add to make stuff happen:

UNITABSORBER 10         // This will enable units to go inside the building ( 10 in this case)
TRANSPORT 10  / This will enable units to go inside the building ( 10) and will give you the icon to  disembark ( UNLOADALL) so you can get them out again

Now if you use UNITABSORBER on the CAL.MD ( Center algir, example above) you will be able to put peasants inside your townhall and be able to get them out again, if you add bornpoints to the building, but since the townhall already has them, no need to do so. Note that the icon which shows up the units inside will be behind the 'produce peasant' button as defined in Algir.NDS under [FIXED PRODUCE]. If you move the peasant in the NDS file to say position 0 1, then you will see the icon with the units inside.
You could also use PEASANTABSORBER which will only allow peasants to enter.

WALLS for example:
------------------
NO_HUNGRY     // For Walls for example (WALL_EV.MD). Means the Building or unit will not consume any food

RESCONSUMER STONE 750   //Means this building will consume stone for upkeep cost( could be gold aswell for dragoons or victoria)

TURNOFF   //Means if you run of out stone ( since its a resconsumer) units will stop building walls, same goes for shooting units ( see further)


BGAUZ(blockhouse-logcabin)  
-------------------------
SHOTS 15  202 250 221 263 241 271 258 281 272 287 289 294 305 301 332 304 349 295 366 288 283 280 201 238 380 262 288 185 351 212 //I presume these show the shots being fired from the block house
ZPOINTS 96 96     // ??
RASTRATA_NA_VISTREL 0 2 IRON 2 COAL 2     //Meaning this building or unit will use so much coal and iron for firing shots
CANKILL 1 BODY     //Meaning it can kill units who have BODY as a MATHERIAL
DAMAGE         0 300   //Meaning it has  shotpower of 300
ATTACK_RADIUS  0 550  950  //Min and max range
ATTACK_PAUSE  0 1   / Time to reload-??
DET_RADIUS 0 550 950   // ( min max range ( at 550 it cant shoot at pikes anymore and will retreat, at 950 it reaches maximum range)
WEAPON 0 SHOTFOG   / type of weapon
WEAPONKIND 0 VISTREL2   / this one should be the type of weapon
SEARCH_ENEMY_RADIUS 1000  / how far it will look for enemies
VISION 3    //how far the fog of war be lifted for this unit
It actually has 2 times USAGE TOWER: wtf, too much coffee @ GSC? ;-)

Artdepot (ADET.MD)
--------
ARTDEPO 5 5 30 5     / states how much cannons ( 5) howitsers ( 5) mortars( 30) multibarrels ( 5) is the limit


 
Peasants:
---------
PORTION  4 WOOD 28 GOLD 100 STONE 40 FOOD 30  //means it can collect these resources           
 

 
Priest:
-----
WEAPONKIND 0 MEDIK              
 

VIC.MD ( victoria)
--------------------
MEDIA WATER
LINEARSORT 128
MOTIONSTYLE SHEEPS ( bééééé ;-) )
DAMAGE   0 30
LIFE     65500
SHIELD 400
PRICE 4 WOOD 65500 GOLD 45050 IRON 53000 COAL 47200
MATHERIAL 1 WOOD
RECTANGLE 0 62 232 240
WEAPON 0 PPOINTTKOR      /weapon
ATTACK_ANGLES  0 -255 255
ATTACK_RADIUS  0 800 4500
DET_RADIUS  0 800 15000    
ADD_ATTACK_RADIUS 0 32
ATTACK_PAUSE  0 200
SEARCH_ENEMY_RADIUS 3500
CANKILL   5 BODY WOOD STONE BUILDING STENA   / Mega killer :-)
ZPOINTS   3 3
BUILDSTAGES 2500
WEAPONKIND 0 IADRO     
SHOWDELAY
RASTRATA_NA_VISTREL2 0 1 2 IRON 5 COAL 15
EXPLMEDIA BOAT 225
WAVES 215 296 24 4  247 250  190 254  249 264  188 260
RESCONSUMER GOLD 15000
NAEMNIK        /Means it can  mutiny
VISION 8
RAZBROS 150       / Inaccuracy of firing
USAGE LINKOR
ROTATE 2
NO_HUNGRY
ROTATE 2
USAGE LINKOR       
STANDGROUND
FLAGS 320 3 320 210 183 0 320 354 160 0 320 478 198 0   /
DESTRUCT 16000 25 obl1 obl2 obl3 obl4 obl5 obl6 obl7 obl8 obl10 obl11 obl12 obl13 obl14 obl15 obl17 obl18 obl19 PU4KOR PU2KOR PU6KOR PU6KOR PU4KOR PU2KOR PU6KOR PU6KOR
VES 2000
INFO 2 10
COSTPERCENT 200
ZALP 40        / Means it will shoot 40 time's before having to reload



TURNOFF   Does it mean that when you run out of coal and iron, they stop shooting? -->Yes

Mines:
(SHA.MD) 

PEASANTABSORBER 5
PRODUCER 3 GOLD COAL IRON 0 10


Transport:
 (PRS.MD)
 
VESACCEL  28 42        ( Accelleration speed ?)  


Notes:"Odd ones"

- ATL_B1.MD     ? Special file s-only states "building" but uses ev_bsh as icon, so is it a tower? or? in descript it states :building:
  But towers already have their icons? have i missed one? So Turkish tower ( ) Kremlin Tower () Europe tower ( ) Perhaps shipyard portugal tower? hmmm

- BUI.MD ? what unit is this it has 65300 life?? and is made of wood.Tested it under the cal.md showed up as funky stable , under akada.md it showed up as art depot when i relocate the rlc's to bui????( Very likely this is the thing that shows up at a harbour in the water, dont know the word in english)(well here's a pic from gpview):

- WAKKR.MD ?
- VER.MD ? has icon -->G_Kor & uses ver.gp as rlc but cant find ver.gp . It looks like a unit: special function : MAGIC 256. Test icon: no working.Test 2 replaced the icon to the CAL.MD and added it to the iconlist. Messes up the icons badly for Algeria, see SS. I reckon its the balloon. But not sure
- VES.GP & VESSMAL.GP?
- BAS.MD : tower but uses different icon then the other towers? : bashnya .Prolly not working either, indeed cannot create object? WEAPON REVENANT? prolly doesnt work since it has no gp.files? like basa.gp etc..test the icon?
- MUSOR.MD : (UN) Rubble of tent.