wpe4B.jpg (6339 bytes)

You will need n3def and n2 3do decompiler and recompiler from BB&B, Microsoft Excel, and the fence.xls spreadsheet.    fence.zip

1. go to the 3do and open it in 3doedit
2. click on the polygon info for both the posts and cross pieces of the fence and note what color they are
3. also check to see if there are any other track polygons that are the same color, if there are, you need to either change those other polygons or the fence polygons so that the fence polygons have their own color.
4. In some cases, the posts have a different color than the cross pieces. If this happens you will need to select both colors in excel and sort them by column B when the time comes.

4. open the flavor.def in excel by selecting delimited with spaces.
5. go down the first Fxx line which should be F16 and the longest line in the file
6. highlight the whole line, right click, insert. This should add a line between the FIL and Fxx sections
7. click a box in the Fxx section then click the data tab and select sort
8. sort by column A, then by column D, leave the third option at none, both in ascending, no header row
9. scroll down until you find flavor 2's with the same column D value as the fence color value.
10. Highlight these lines from column a through to and including column i. If you have the multi-colored fence as described above, now is when you need to sort by column B. Keep this selection highlighted.

11. now open the fence.xls file. at no point should you save over this file.
12. the first 4 lines in the first 9 columns are reserved for the last 4 lines in the section you just highlighted.
13. go back to the flavor def and copy those highlighted lines.
14. starting at the block on line 5, column a in the fence.xls, paste those lines.
15. then go to the bottom of that section and copy the last 4 lines in the section you just pasted. careful, the section continues past where the copied data ended. you want the last 4 lines of pasted data from the flavor file.
16. paste those 4 lines at the top of the section
17. If all worked well, the section of numbers in columns k-n changed from zeros to new vertex points.

18. highlight the entire spreadsheet and copy it
19. open a new spreadsheet and paste the fence sheet in it.
20. now save the new spreadsheet using whatever filename you like, just as long as it's in txt format (tab delimited)
21. close both the fence.xls (don't save) and the new spreadsheet.
22. reopen the sreadsheet and scroll over to the section of new flavor2 lines.
23. copy from line 5, column s down to line wherever-the-data-you-entered-stops, column ai. it'll end on the last big number in column t.
24. paste these lines into the lines you originally copied from the flavor file

25. go to the top of the flavor file
26. the last FIL line has either a texture or an object. remember how many characters are in the filename
27. if it's an object, go down to the flavor 14 section, highlight all flavor14's, and sort by column c. The highest value in column c (at bottom of flavor 14 section) is the
offset number for your last object file. add the number of characters in that file to the aforementioned offset number and then add 1. remember this number, it's the byte offset for the fence texture.
27b. if it's a texture, go down to the flavor 5 section, highlight all flavor5's, and sort by column f. The highest value in column f (at bottom of flavor 5 section) is the
offset number for your last texture file. add the number of characters in that file to the aforementioned offset number and then add 1. remember this number, it's the byte offset for the fence texture.

28. go back to the new spreadsheet you made earlier. toward the bottom is a section of flavor 5's. the # will become the new byte offset so replace all of those #'s with the number you just found down until column T gets small again.
29. Copy all of those flavor 5 lines (excluding the place-holder lines for larger tracks) to the very bottom of the flavor.def file.
30. now find the flavor 21 lines in the flavor.def.
31. find all the f21's with column d that is the same as the fence color index
32. replace columns F and G with zeros for these lines.
33. highlight everything except the FIL section and sort by column B.
34. make sure there are no spaces between the FIL and Fxx sections or between anything else.
35. recompile.

This has not been tested on all tracks so I can't garantee it will always work. There are a lot of places where things can go wrong so take it slow and easy and don't be surprised if you have to start over a time or two. I pulled my hair out for 2 hours because I was one number off on the byte offset.