@Redmeth
3dsMax definately would work, that's how I made the picture.
I thought about the format. Just make a new format with extension
.ms3dbig. It's exactly the same as .ms3d except where words and bytes
are used for number of vertices, faces, and groups one uses 4-byte ints.
Then the import/export script just needs two more buttons, Import ms3dbig
and Export ms3dbig. The changes required for reading and writing .ms3dbig
files would be trivial. And Max has a 100 vertex data channels for storing
extra info on a per vertex basis so storing quad block 1 and 2 data
should be easy too.
@all
I uploaded the settlementextractor.py file and a small material file for the obj format here:
http://www.twcenter.net/forums/downl...o=file&id=2019
Make a directory where you are going to do settlement work and put the
python file, material file, and any settlement or castle .world files you want
to look at in here. Double click on settlementextractor.py in explorer to
run it. You'll get a dialog that looks like this:

The listbox is populated with whatever .world files it sees in the local
directory. The first time you run it on a given world file just select structure 1 and then the
desired .world file. After it runs you will get a small summary file showing you how
many complexes and structures (models) are in the file. You can then rerun it and pick
your structures. The edit box will accept a single number like 1 or 29 or a range
like 11-21. It WON'T work with multiple ranges like "1-5,7,21-24".
To keep things organized, for each world file, it creates a subdirectory
with that world file's name and outputs the obj, ms3d, and summary files in that
subdirectory. It also creates a large .txt file that has all the headers and footers but
no data. You can edit this in Notepad to find the names of the texture files. The textures
come after the structures.
The summary file looks like this for north_european_village_a.world:
Code:
There are 31 complexes in this file.
Complex 1 has 2 structures: 1 2
Complex 2 has 3 structures: 3 4 5
Complex 3 has 6 structures: 6 7 8 9 10 11
Complex 4 has 4 structures: 12 13 14 15
Complex 5 has 1 structures: 16
Complex 6 has 3 structures: 17 18 19
Complex 7 has 3 structures: 20 21 22
Complex 8 has 3 structures: 23 24 25
Complex 9 has 4 structures: 26 27 28 29
Complex 10 has 2 structures: 30 31
Complex 11 has 4 structures: 32 33 34 35
Complex 12 has 3 structures: 36 37 38
Complex 13 has 6 structures: 39 40 41 42 43 44
Complex 14 has 5 structures: 45 46 47 48 49
Complex 15 has 5 structures: 50 51 52 53 54
Complex 16 has 5 structures: 55 56 57 58 59
Complex 17 has 4 structures: 60 61 62 63
Complex 18 has 2 structures: 64 65
Complex 19 has 6 structures: 66 67 68 69 70 71
Complex 20 has 5 structures: 72 73 74 75 76
Complex 21 has 5 structures: 77 78 79 80 81
Complex 22 has 4 structures: 82 83 84 85
Complex 23 has 2 structures: 86 87
Complex 24 has 1 structures: 88
Complex 25 has 1 structures: 89
Complex 26 has 2 structures: 90 91
Complex 27 has 2 structures: 92 93
Complex 28 has 2 structures: 94 95
Complex 29 has 1 structures: 96
Complex 30 has 1 structures: 97
Complex 31 has 1 structures: 98
The big .txt file has parts that look like this (look for the red part to see the texture names):
Code:
------------------------
Complex 10
------------------------
16 0 [1321] (nstruct = 2) 20 0 [1322] odd seq. number [1339], even seq. number [1340]
Structure Number 30
23 0 [1323] (num_groups = 3) odd seq. number [1341], even seq. number [1340]
Triangle data section:
27 0 [1324] 0 0 0 0 0 0 0 0 (416 tris) 0 0 0 0 0 26 0 [1325] 27 0 [1324] odd seq. number [1343], even seq. number [1342]
27 0 [1326] 0 0 0 0 0 0 0 0 (184 tris) 0 0 0 0 0 26 0 [1327] 27 0 [1326] odd seq. number [1345], even seq. number [1344]
27 0 [1328] 0 0 0 0 0 0 0 0 (300 tris) 0 0 0 0 0 26 0 [1329] 27 0 [1328] odd seq. number [1347], even seq. number [1346]
vertex block:
22 0 [1330] 23 0 43 5 0 0 {1727} 0 0 0 0 1 0 0 0 35 0 [1331] 0 0 0 0
(1727 verts) 0 0 0 0 34 0 [1332] 35 0 [1331] 5 0 0 0 odd seq. number [1349], even seq. number [1350]
quad byte blocks:
40 0 [1333] 8 0 0 0 (1727 quads) 0 0 0 0 39 0 [1334] 40 0[1333] odd seq. number [1351], even seq. number [1352]
40 0 [1335] 9 0 0 0 (1727 quads) 0 0 0 0 39 0 [1336] 40 0[1335] odd seq. number [1353], even seq. number [1354]
40 0 [1337] 3 0 0 0 (1727 quads) 0 0 0 0 39 0 [1338] 40 0[1337] odd seq. number [1355], even seq. number [1356]
40 0 [1339] 10 0 0 0 (1727 quads) 0 0 0 0 39 0 [1340] 40 0[1339] odd seq. number [1357], even seq. number [1358]
40 0 [1341] 4 0 0 0 (1727 quads) 0 0 0 0 39 0 [1342] 40 0[1341] odd seq. number [1359], even seq. number [1360]
bounding sphere:
0 0 0 0 -103.40617 +1.06102 +13.06679 +33.55326 0 0 0 0 19 0 [1343] 20 0 {1322} 20 0 [1344] odd seq. number [1361], even seq. number [1362]
Structure Number 31
23 0 [1345] (num_groups = 9) odd seq. number [1363], even seq. number [1362]
Triangle data section:
27 0 [1346] 0 0 0 0 0 0 0 0 ( 18 tris) 0 0 0 0 0 26 0 [1347] 27 0 [1346] odd seq. number [1365], even seq. number [1364]
27 0 [1348] 0 0 0 0 0 0 0 0 ( 26 tris) 0 0 0 0 0 26 0 [1349] 27 0 [1348] odd seq. number [1367], even seq. number [1366]
27 0 [1350] 0 0 0 0 0 0 0 0 ( 12 tris) 0 0 0 0 0 26 0 [1351] 27 0 [1350] odd seq. number [1369], even seq. number [1368]
27 0 [1352] 0 0 0 0 0 0 0 0 ( 12 tris) 0 0 0 0 0 26 0 [1353] 27 0 [1352] odd seq. number [1371], even seq. number [1370]
27 0 [1354] 0 0 0 0 0 0 0 0 ( 44 tris) 0 0 0 0 0 26 0 [1355] 27 0 [1354] odd seq. number [1373], even seq. number [1372]
27 0 [1356] 0 0 0 0 0 0 0 0 ( 12 tris) 0 0 0 0 0 26 0 [1357] 27 0 [1356] odd seq. number [1375], even seq. number [1374]
27 0 [1358] 0 0 0 0 0 0 0 0 ( 12 tris) 0 0 0 0 0 26 0 [1359] 27 0 [1358] odd seq. number [1377], even seq. number [1376]
27 0 [1360] 0 0 0 0 0 0 0 0 ( 12 tris) 0 0 0 0 0 26 0 [1361] 27 0 [1360] odd seq. number [1379], even seq. number [1378]
27 0 [1362] 0 0 0 0 0 0 0 0 ( 60 tris) 0 0 0 0 0 26 0 [1363] 27 0 [1362] odd seq. number [1381], even seq. number [1380]
vertex block:
22 0 [1364] 23 0 65 5 0 0 { 333} 0 0 0 0 1 0 0 0 35 0 [1365] 0 0 0 0
( 333 verts) 0 0 0 0 34 0 [1366] 35 0 [1365] 5 0 0 0 odd seq. number [1383], even seq. number [1384]
quad byte blocks:
40 0 [1367] 8 0 0 0 ( 333 quads) 0 0 0 0 39 0 [1368] 40 0[1367] odd seq. number [1385], even seq. number [1386]
40 0 [1369] 9 0 0 0 ( 333 quads) 0 0 0 0 39 0 [1370] 40 0[1369] odd seq. number [1387], even seq. number [1388]
40 0 [1371] 3 0 0 0 ( 333 quads) 0 0 0 0 39 0 [1372] 40 0[1371] odd seq. number [1389], even seq. number [1390]
40 0 [1373] 10 0 0 0 ( 333 quads) 0 0 0 0 39 0 [1374] 40 0[1373] odd seq. number [1391], even seq. number [1392]
40 0 [1375] 4 0 0 0 ( 333 quads) 0 0 0 0 39 0 [1376] 40 0[1375] odd seq. number [1393], even seq. number [1394]
bounding sphere:
0 0 0 0 -94.23789 +0.01352 +13.91741 +28.65560 0 0 0 0 19 0 [1377] 20 0 {1344} 2 0 0 0 odd seq. number [1395], even seq. number [1396]
About to read texture or bounding sphere header: tell says 1815580
Number of bytes from getheadersize = 18
header: 49 0 [ 82] 48 0 [ 83] 49 0 [1378] odd seq. number [1397], even seq. number [1398]
18 buildinglitterlod0
17
40 BlockSet/Textures/NE_litter_pass.texture
47 BlockSet/Textures/NE_litter_pass_normal.texture
{====>>> 428 bytes of the standard big granny string omitted here <<<====}
About to read texture or bounding sphere header: tell says 1816147
Number of bytes from getheadersize = 12
Bounding sphere:
48 0 [1379] 49 0 [1378] -100.72674 +0.00183 +15.21055 +34.82426
15 0 [1380] 16 0 {1321} { 315} { 326} 1 0 0 0 2 0 0 0 odd seq. number [1399], even seq. number [1400]
For 2 structures:
Preceding integers: 716 208 16
[34] Integers: (plus the final 1)
109 27 92 93 94 95 96 97 98 99 100 101 102 103 104 105
106 107 108 163 164 165 166 167 168 169 170 171 173 174 175 176
177 178 1
So far the script fails on:
ne_huge_city_a
ne_large_castle_a
but at least it fails in the same way; something non-standard in the header
of the verts block and the way the verts are organized. Presumably it will
fail on the corresponding non-Northern European files as well. Don't have
fortress, or large_city, or whatever else I may have forgotten, to test on.
ne_city_a has 11 structures too large: 2, 12, 32, 50, 55, 67, 88, 93, 100, 105, and 107
ne_stone_keep_a has 1 structure too large: 38
ne_castle_a has 4 structures too large: 24, 41, 66, 69