TreeGen 1.0001 (Instructions re-written by takiwa, 2019)
**************
You need to copy the "windows/system32/*.*" files into the windows\system32 directory. Once this is done you can run
the program.
The sourcefiles are just a bmpfile in order for you to view what type of tree is to be created.
You must do the following to generate trees:
1. Open your heightmap.raw in a photo editor. Resize the heightmap to your map's worldsize (the worldsize can be found in your map's Terrain.con file), and then FLIP THE IMAGE VERTICALLY!. Save this file as an 8bit .bmp file (heightmap).
2. Open the .bmp heightmap you created in step 1 in a photo editor. Create a new layer, and paint white everywhere you want trees. Then select the non-white areas on that layer and fill them in black. Compress the layers and save this file as a separate 8bit .bmp file (objectplacementmap).
3. Open TreeGen, and choose the vegetation in the Object box.
4. Choose the number of objects you want placed on the map.
5. The first filename you select will be the file you created in step 2 (objectplacementmap)
6. The second filename you select will be the heightmap you converted and resized in step 1 (heightmap)
6a. Once you choose your images, make sure the sizes shown below them in the Preview Box are the same. If not, go back to steps 1 & 2 and make sure you are resizing your images correctly. Otherwise you will not get correct object placement.
7. The worldsize will be your map's worldsize found in your map's Terrain.con
8. The scale will be the yScale found in your map's Terrain.con (typically 0.6)
9. Click generate. When the generating is complete, right click in the text box, select all, copy, and paste into your StaticObjects.con.
10. To generate different foliage on the same map, click Clear Gen Obj, select a new object, and click Generate again. This will place new object on the same map, bypassing the locations of the last placed objects.
TIPS:
You can have several different objectplacementmap files (the file you created in step 2), to create a layering effect of bushes to small trees to large trees, or to pinpoint the exact areas you want certain vegetation. Just select the new objectplacementmap before regenerating in step 10.
If you choose to have only one objectplacementmap file, generate your small plants and bushes first. Then generate you medium sized plants/trees, followed by your largest. This will progressively "lock out" the location of the smaller bushes, which will be placed over a larger area, helping to clump the larger objects as you generate newer objects.
You can use this app for any static object in BF1942 (including custom objects), not just vegetation. Just type the name of the object into the Object Selection box. You will see a "No Preview" picture, but the file will be written with the correct object name and placement. As long as that object has the correct files in your BF1942 .rfa's, it will load in game. Some great examples would be rocks, barrels, and crates
Remember to open your map in an editor after the generation process, and check your locations. Some objects will be placed right next to one another, which may not look good on the map. You will need to move these objects away from each other by hand.
CONS:
There is only one con with this program, and that is that every object you place will have the same rotation. There is no ability to choose a random rotation, so all your trees, bushes, rocks, etc. will all face the same direction. Keep this in mind when placing obects. You may need to open the map up with an editor and manually rotate some obects to achieve a better look for your map.