Dem2Terrain rules file-Need help

Terrain / Theater editing

Moderators: Snake Man, Lone Wolf

Post Reply
User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24, 10:01:01 PM
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Dem2Terrain rules file-Need help

Post by Sherlock » 2006-09-01, 11:22:00 PM

Ok, I read through the accompanying help file that comes with Dem2Terrain but it's just not clicking. Here is the example rules file that comes with it:
code:

Code: Select all

# rules
Type Town-2
Ids	231, 859, 1070, 1187, 1535, 1537, 1538, 1539, 1566, 1567, 1579, 1582,
Ids	1597, 1598, 1600, 1602, 1604, 1606, 1623, 1625, 1626, 1629, 1630,
Ids	1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1906, 1911,
Ids	1912, 1913, 1914, 1915,
Priority 50
Generates Factory 1-3

Type Town-0
Ids	1555, 1558, 1569, 1572, 1573, 1574, 1576, 1577, 1578, 1580, 1584,
Ids	1585, 1586, 1587, 1588, 1590, 1591, 1592, 1593, 1594, 1595, 1917,
Ids	1926, 1927, 1928, 1929, 1930, 1931, 1932,
Priority 15

Type Town-1
Ids	1555, 1558, 1569, 1572, 1573, 1574, 1576, 1577, 1578, 1580, 1584,
Ids	1585, 1586, 1587, 1588, 1590, 1591, 1592, 1593, 1594, 1595, 1917,
Ids	1926, 1927, 1928, 1929, 1930, 1931, 1932,
Priority 11

Type Airport
Ids 1775
Priority 60
Generates Radar 0-1

Type Factory
Priority 25
Ids	218, 230, 234, 872, 1344, 1347, 1348, 1349, 1350, 1351, 1353, 1354,
Ids	1355, 1356, 1357, 1358, 1595, 1810, 1811, 1814, 1815, 1816, 1817,
Ids	1819, 1820, 1821, 1823, 1824, 1825, 1826, 1828, 1829, 1830, 1832,
Ids	1833, 1834, 1836, 1838, 1840, 1841, 1842, 1843, 1844, 1845, 1846,
Ids	1847, 1848, 1849, 1851, 1852, 1854, 1855, 1856, 1910,
Ids	245, 1412, 1479, 1728, 1729,
Ids	230, 1441, 1720, 1721, 1722, 1724, 1725, 1726, 1816, 1910,

Type Radar
Priority 11
Ids 111  
I would like to understand (through examples if you can) what each category of statement does and how it interacts to populate the output .csv file.

Also, does the rules file have any effect on the different TDF files that are output? I couldn't see anything in my few runs I did to try and test it this.

Thanks for any help you can offer on this!

Sherlock
Sherlock
Victurous te Saluto

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24, 10:01:01 PM
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Re: Dem2Terrain rules file-Need help

Post by Sherlock » 2006-09-07, 03:23:00 PM

Ok, through the help of bird at the FF forum and Qaz at FF/FW I have finally come up with some information that applies here.

The "Ids" are the objective IDs that TacEdit will show. These are the "Objectives" in the 3D database such as airfields, bridges, cities, towns, etc. Using LODEditor you can view the CT numbers (which are 100 LESS than the number in TacEdit). So don't forget to do the math when comparing objects between TacEdit and LODEditor.

I think it is evident that the "Town-1", "Town-2", etc., are different "levels" of towns/cities. I haven't deciphered that yet, but I will post back here when I have. Still have to crawl through the 3D database and extract / understand all that good information.

The Priority, Generates and Type commands are pretty much self explainatory (and addressed pretty well in the help file for DEM2Terrain).
Sherlock
Victurous te Saluto

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24, 10:01:01 PM
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Re: Dem2Terrain rules file-Need help

Post by Sherlock » 2006-09-27, 06:12:00 PM

Well, continuing this discussion with myself (since no one else seems to stop by here anymore)....

I can get the CSV file to be created with airports/airfields and to auto-generate radars (or whatever I put in such as factories,etc.) but that is all. For the life of me I cannot get it to generate towns of any level.
Sherlock
Victurous te Saluto

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24, 10:01:01 PM
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Re: Dem2Terrain rules file-Need help

Post by Sherlock » 2006-10-07, 01:54:00 AM

A-HA!

Eureka!

I had a real breakthrough on this problem with DEM2Terrain yesterday! So I thought I would come back here and close this thread up by providing the solution for any of you that might want to "bite off" creating any of your own terrains in the future.

Here is the basic discovery that I made: The HELP example file and the HELP file are W-R-O-N-G! Yes, WRONG! Well, at least a part of a small section that reads:

"Type <NAME> - this introduces a new type of objective. The name can be any single string. However some names are special. When dem2terrain finds an airfield E00 record, it tries to locate a n airport-NUM NAME. NUM is the type of airport from the E00 file (a number usually between 1 and 5). If it can't find one of these, it will try the NAME airport.
For towns, villages cities, it will similarly try Town-NUM followed by Town.
If it can't find either of these, it gives up"

The part that says "For towns, villages cities, it will similarly try Town-NUM followed by Town." above is what is totally WRONG!

Some background first:

Here is an extract from my theaters AIRPORT.TDF file (generated by DEM2Terrain when building the terrain .L2, .o2, .mea, etc., files):
code:

Code: Select all

AIRPORT 1 457,141 3 AL KHARJ                                
AIRPORT 1 481,139 4 AL KHARJ EAST                           
AIRPORT 1 184,1978 5 ABANDONED KARS                          
AIRPORT 1 186,1976 5 KARS SOUTHEAST                          
AIRPORT 1 33,1923 5 HINS                                    
AIRPORT 1 15,1909 2 ERZURUM                                 
AIRPORT 1 24,1778 4 MUS WEST                                
AIRPORT 1 40,1774 4 MUS                                     
AIRPORT 1 95,1751 4 TATVAN                                  
AIRPORT 1 181,1743 1 VAN       
 
Notice two things from this example: (1) the leading word on each line is "AIRPORT" and (2) there are numbers just before the names of the airports (e.g., 4 MUS WEST) that vary from 1 through 5; now go back and read the "airport" section from the help file for DEM2Terrain above again. Can you see why the obr file rule with AIRPORT-[num] would work? Yes, the type keyword "AIRPORT" is recognized by the DEM2Terrain program and it is designed to look for the values 1 through 5 (as the help file describes above) just before the airport names.

I should probably stop to say that I don't profess to be an expert/guru with DEM2Terrain and others may know better ways to use it than me. I considered using the CITIES.TDF file to generate my town/village/city objectives but it is not in the same output format as the AIRPORT.TDF and the LABEL.TDF. Here is an extract of my CITY.TDF file to give you an idea about what I am talking:
code:

Code: Select all

CITY 2 299,1913 301,1913 0
CITY 15 307,1913 307,1913 307,1914 307,1914 307,1914 307,1915 307,1915 307,1916 307,1916 306,1916 306,1915 305,1914 305,1914 304,1914 304,1913 0
CITY 4 304,1913 306,1913 306,1913 307,1913 0
CITY 7 306,1911 306,1911 306,1912 306,1912 307,1913 307,1913 307,1913 0
CITY 4 304,1913 305,1913 305,1913 306,1911 0
CITY 6 311,1910 312,1911 311,1912 311,1912 310,1911 311,1910 0
But I do know that I have gotten the objectices to be generated to the CSV file that I think I need to import in via TACEdit and at this point I am very happy with my progress! Time will tell if I have taken a wrong turn and have to backtrack but we'll see!

Ok, let's move on....

Now let's look at an extract from my theaters LABEL.TDF file:
code:

Code: Select all

LABEL 1 256,2028 1 Gukasyan
LABEL 1 238,2022 1 
LABEL 1 259,2022 1 
LABEL 1 319,2021 1 
LABEL 1 309,2021 2 Gyulagarak
LABEL 1 322,2020 2 TUMANYAN
LABEL 1 249,2019 1 Amasiya 
LABEL 1 379,2018 1 
LABEL 1 338,2016 1 Atan 
LABEL 1 397,2013 1 
LABEL 1 384,2011 1 Berd 
Notice two things here: (1) the type keyword is "LABEL" for each line and (2) the numbers just before the town/villiage/city names (e.g., 1 Amasiya) vary between one (1) and two (2) only! The blank lines (with no name for the town/city/village) will end up being stripped out by the command "IgnoreNoNames 1" in the obr rule file I will show later. This means they will not end up in the theater CSV file but that won't be a problem because there are so many towns, villages and cities that there is still plenty left over when the "nonames" are stripped out.

All right...here is the crux of the dilemma...the help file and the example file all profess to use the type keyword of "TOWN"...but that just doesn't work. Use the type keyword of "LABEL" instead and you get exactly what you need. Here is my current DEM2Terrain obr rules file:
code:

Code: Select all

#Theater rules

IgnoreNoNames 1

Type Airport-1
# Double runways
Ids	3501, 3487, 3485, 3483, 3486,
# 3207 has no fence 
Priority 50

Type Airport-2
# Double runways
Ids	3501, 3487, 3485, 3483, 3486,
# 3207 has no fence 
Priority 40

Type Airport-3
# Single runways
Ids	3495, 3493, 3491, 3479, 3478, 3480, 3490, 
Priority 30

Type Airport-4
# Single runways
Ids	3495, 3493, 3491, 3479, 3478, 3480, 3490, 
Priority 20

Type Airport-5
# Single runways
Ids	3495, 3493, 3491, 3479, 3478, 3480, 3490, 
Priority 20

# City
#Type CITY-3
#Priority 50
#Ids	859, 1070, 1339, 1536, 1569, 1582, 1592, 1619, 1912, 1913, 
#Ids	1914, 1915, 
#Generates Factory 1-3
#Generates ArmyBase 0-1
#Generates Refinery 0-1
#Generates Junction 0-2
#Generates Headquarters 0-1
#Generates PowerPlant 0-2
#Generates NucReactor 0-1
#Generates CementFactory 0-2
#Generates ChemicalPlant 0-1

# Village
Type LABEL-1
Priority 10
Ids	215, 1159, 1160, 1161, 1162, 1163, 1174, 1175, 1176, 1178, 
Ids	1179, 1180, 1187, 1335, 1480, 1486, 1534, 1535, 1537, 1538, 
Ids	1540, 1542, 1544, 1545, 1546, 1547, 1548, 1549, 1551, 1554,
Ids	1555, 1558, 1566, 1570, 1572, 1573, 1574, 1576, 1578, 1579,
Ids	1580, 1583, 1584, 1585, 1586, 1587, 1588, 1590, 1591, 1595,
Ids	1596, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606,
Ids	1623, 1624, 1626, 1628, 1629, 1630, 1633, 1635, 1637, 1638,
Ids	1640, 1907, 1917, 1921, 1926, 1927, 1929, 1930, 1932, 
Generates Army_Base 0-1
Generates UnderGround_Factory 0-1
Generates Factory 0-1
Generates Power_Plant 0-1
Generates Radio_Tower 0-1
Generates Radar_Station 0-1

# City and Town
Type LABEL-2
Priority 15
Ids	859, 1070, 1339, 1536, 1569, 1582, 1592, 1619, 1912, 1913,
Ids	1914, 1915, 1103, 1177, 1334, 1336, 1337, 1338, 1539, 1543, 
Ids	1550, 1564, 1565, 1567, 1568, 1571, 1575, 1577, 1581, 1589,
Ids	1593, 1594, 1597, 1620, 1625, 1627, 1631, 1632, 1634, 1636,
Ids	1639, 1641, 1906, 1911, 1919, 1920, 1922, 1923, 1924, 1928,
Ids	1931,231, 1049,
Generates Factory 1-3
Generates Refinery 0-1
Generates Junction 0-1
Generates Headquarters 0-1
Generates Power_Plant 0-1
Generates Nuclear_Plant 0-1
Generates Chemical_Plant 0-1 
Generates Depot 0-1
Generates Radar_Station 0-1
Generates BioWeapons_Plant 0-1

Type Junction
Priority 10
Ids	1340, 1341, 1342, 1343, 1556, 1557, 1559, 1560, 1561, 1562,
Ids	1563, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617,
Ids	1618, 1621, 1622, 1918, 1933, 1934, 1935, 1936, 1937, 1938,
Ids	1939, 

Type Depot
Priority 20
Ids	2108, 2106, 2104, 2103, 2102, 2099, 2096, 2094, 2092, 233, 

Type Army_Base
Priority 15
Ids	2090, 2088, 1902, 1902, 

Type Headquarters
Priority 10
Ids	2109,

Type Power_Plant
Priority 30
Ids	1459, 1463, 1465, 1868, 1869, 1870, 1871, 1872, 1873, 1874
Ids	1875, 

Type Factory
Priority 30
Ids	218, 234, 872, 1347, 1348, 1349, 1350, 1351, 1352, 1810,
Ids	1353, 1354, 1355, 1356, 1357, 1358, 1451, 1471, 1721, 1811,
Ids	1812, 1813, 1815, 1816, 1817, 1819, 1820, 1822, 1823, 1824,
Ids	1825, 1826, 1827, 1828, 1829, 1830, 1832, 1833, 1834, 1835,
Ids	1836, 1837, 1838, 1839, 1840, 1841, 1843, 1844, 1846, 1847,
Ids	1848, 1849, 1850, 1851, 1916, 1925, 1413, 1722, 1814,


Type UnderGround_Factory
Priority 15
Ids	1852, 1853, 1854, 1855, 1856, 1857, 

Type Radar_Station
# These radar objectives don't appear to link to anything in LODEditor so they probably won't work.
# Ids	2113, 2114, 2115, 2116, 2117, 2119, 2122, 2123, 2124, 2125, 
# Ids	2126, 2127, 2128, 2129, 2130, 2131, 
# Ids	727, 860, 861, 864, 865, 867, 659, 548, 467,
# <----These Radar OCDIDs are from the FEATURES LIST
Priority 15
Ids	242,

Type BioWeapons_Plant
Priority 10
Ids	230, 1441, 1723, 1842, 

# this is from the feature list: Type Bunker   
# This is a very cool underground access bunker entrance.
# Ids	688

# Type Fortification
# Ids	235, 
# Priority

Type Nuclear_Plant
Priority 15
Ids	238, 873, 1420, 1427, 1428, 1433, 1730, 1731, 1732, 1733,
Ids	1734, 1735, 1736, 1737, 1738, 1739, 1740, 1909, 

Type Refinery
Priority 15
Ids	245, 1363, 1412, 1479, 1728, 1729, 

Type Chemical_Plant
Priority 20
Ids	1724, 1725, 1726, 1727, 1818, 1821, 1831, 1845, 1910,

Type Radio_Tower
Priority 30
Ids	662,
This rules file is probably still a "work in progress" as I advance through the stages of finishing the terrain and moving on to creating the actual campaigns themselves. I may very well have to backtrack and recreate the objectives using some more "tweeks" that I am not aware I need yet... :)

And, finally, here is the ultimate goal of this entire exercise...an extract from my theater .CSV file that will become the objectives and airbases to be imported into TACEDIT:
code:

Code: Select all

YEREVAN-PARAKAR	320	3491	293	1931	0	2	320	0	20	2
OKTEMBER HIGHWAY STRIP	321	3479	249	1923	0	2	321	0	20	2
SISIAN	322	3491	425	1863	0	2	322	0	20	2
SHINUYAR	323	3480	452	1852	0	2	323	0	20	2
Irganchay	324	1550	289	2046	0	2	324	0	15	2
0 Factory	325	218	290	0	0	2	325	324	30	2
0 Refinery	326	245	289	2044	0	2	326	324	15	2
0 Junction	327	1340	291	2047	0	2	327	324	10	2
0 Headquarters	328	2109	290	2045	0	2	328	324	10	2
0 Nuclear_Plant	329	1909	287	2044	0	2	329	324	15	2
0 Radar_Station	330	242	290	2047	0	2	330	324	15	2
0 BioWeapons_Plant	331	1842	287	2045	0	2	331	324	10	2
ALAVERDI	332	1630	324	2038	0	2	332	0	10	2
0 Army_Base	333	2088	325	2038	0	2	333	332	15	2
0 Radar_Station	334	242	324	2036	0	2	334	332	15	2
Uzunla	335	1049	320	2030	0	2	335	0	15	2
0 Factory	336	1352	321	2032	0	2	336	335	30	2
0 Refinery	337	245	318	2030	0	2	337	335	15	2
0 Junction	338	1618	319	2032	0	2	338	335	10	2
0 Headquarters	339	2109	318	2032	0	2	339	335	10	2
0 Power_Plant	340	1871	322	2028	0	2	340	335	30	2
0 Nuclear_Plant	341	1731	320	2032	0	2	341	335	15	2
0 Chemical_Plant	342	1725	321	2030	0	2	342	335	20	2
0 Radar_Station	343	242	318	2028	0	2	343	335	15	2
Gukasyan	344	1580	256	2028	0	2	344	0	10	2
0 UnderGround_Factory	345	1853	255	2028	0	2	345	344	15	2
0 Factory	346	1812	254	2028	0	2	346	344	30	2
Gyulagarak	347	1589	309	2021	0	2	347	0	15	2
0 Factory	348	1837	310	2023	0	2	348	347	30	2
0 Factory	349	1925	311	2021	0	2	349	347	30	2
0 Factory	350	234	310	2021	0	2	350	347	30	2
0 Refinery	351	1479	310	2019	0	2	351	347	15	2
0 Nuclear_Plant	352	2428	311	2020	0	2	352	347	15	2
0 Depot	353	2104	310	2020	0	2	353	347	20	2
0 BioWeapons_Plant	354	1723	311	2022	0	2	354	347	10	2
null
Sherlock
Victurous te Saluto

ccc
Chief of Staff
Posts: 4857
Joined: 2000-08-06, 10:01:01 PM

Re: Dem2Terrain rules file-Need help

Post by ccc » 2006-10-07, 04:24:00 PM

good job. :)

theater making is a truely lonely way these days.. go go go!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests