Overgrowth Fields Simplified

Information and tutorials related to modding BF2.
Post Reply
Outlawz7
Retired PR Developer
Posts: 17261
Joined: 2007-02-17 14:59

Overgrowth Fields Simplified

Post by Outlawz7 »

If you have read this tutorial from Rhino, you'll see that it's mentioned that you can skip the undergrowth part and start from overgrowth part. I decided to do a simplified tutorial on overgrowth field placement using just that.

This tutorial correlates with the tutorial above, so be sure to read up on it to learn about stuff explained in detail which I'll skip over here.


What you'll require:
  • BFEditor v1.3
  • Notepad
  • XVI32 or an advanced hex/text editor of your choice.
What you'll need to backup in your map files
  • Overgrowth folder
  • Staticobjects.con
  • Rename your GPO and Layer.con in the Editor folder
I usually copypaste them in the same spot and leave them named 'copy of ...' works good enough.
To rename your GPO and Layer.con just add some text in front of the filename ie. 'asdfLayer.con', that disables the file without screwing it up too much. This of course, if you have any of these files (you placed down vehicles, spawn points etc.) because later on all the vehicles are loaded into the staticobjects.con run lines and we don't need that :)

Step 1: Placing your Overgrowth

Load up your map, switch to Terrain Editor, Overgrowth tool, create one or several Overgrowth materials, their types and select the field geometries from vegetation/PR/fields/.

Leave the density settings alone for now. First, above your materials in the resource tab there's a file called General where the common overgrowth settings are.
Select the draw distance and reduce it; default is at 500, deleting one 0 to bring it down to 50 should do, I used 150 since the process wasn't that resource heavy this time. Note that setting the draw distance does seem to affect density.

Image

Now, go play with your density settings. As said in the other tutorial, put the density between 100 and 300 and the MinRadiustoSame to 0.4 or 0.2, depending on the field type. I strongly suggest you set the radius first, then pump the density to 100, as unless your editor crashes, it will take a while to load up all the new overgrowth.


Step 2: Converting your Overgrowth

Now switch to Level Editor, go to Layers tab and right click on Layer 1, choose Select all in layer and press Delete; this deleted all of the static objects in your map, that's why we backed up the staticobjects.con file.

Image

Now, drag a small object into your map and lightmap it on Low, this will convert your overgrowth to static objects.

Image

You can set your OG density back to 0 to reduce lag/prevent crashes.

Delete your lightmapped object and then select one of the fields, use the Select all of the same type option to select all your fields.

Image

Now in the TweakBar, select isSaveable and set the Layer to 1.

Image

Now save your map, it will probably warn you about lightmaps not matching objects, ignore that.


Step 3: Finalizing your Overgrowth

Now, just to be sure, without closing the editor, go to your map's directory and check the newly saved staticobjects.con file.

If done correctly, all there should be in it is the run commands for your fields and all of the field object positions.

Image

Close the editor.

Now here's what you can do. Since the fields are still considered as overgrowth and are thus affected by overgrowth light settings, you might want to have them as normal objects to get rid of the dark/light sided spots on each object, caused by light settings.

This is optional and since I tolerate that you use your own software, if you do, you'll have to figure out this one a bit. I'll be using XVI32 as said.
Open XVI32 and drag and drop the staticobjects.con file into it, then go Search/Replace or press Ctrl+R and replace the Find string with Object.isOvergrowth 1 and the Replace string with nothing

Image

Click Replace all and it should replace all of the strings in a moment. Close and save.

You could do this with Notepad, but it's unstable and can't handle such massive tasks as this so it usually crashes.

If you want to tweak your field placement, reload the editor and map and tweak them, then save.

Now you can either rename your staticobjects.con to fields.con and your copy of staticobjects.con back to normal and follow the usual path and end here or you can merge them.

To merge them, select all of the text in your current file and copy, then open your backed up/renamed original staticobjects.con file and paste in the middle between run lines and placement lines

Image

then deleted the duplicated lines in the middle and save.

Image

Now you can rename your backed up files, delete the overgrowth folder and rename the backed up one back, reload the map and continue working on your map with cute little fields placed down among other objects. :)
Last edited by Outlawz7 on 2010-03-14 09:10, edited 6 times in total.
Reason: added pics
Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Map Tutorial]Overgrowth Fields Simplified

Post by Rhino »

'[R-CON wrote:Outlawz;1294781']Delete your lightmapped object and then select one of the fields, use the Select all of the same type option to select all your fields.
The "Select all of same type" method only works if your using only one type of overgrowth field which in most cases people are not.


Anyways good tut it looks for the most part, nice tip about dropping the OG VD too to make it easier on the editor :)
Image
Amok@ndy
Retired PR Developer
Posts: 5144
Joined: 2008-11-27 22:13

Re: [Map Tutorial] Overgrowth Fields Simplified

Post by Amok@ndy »

how does the VD affects the Detensity ?
Image
Outlawz7
Retired PR Developer
Posts: 17261
Joined: 2007-02-17 14:59

Re: [Map Tutorial] Overgrowth Fields Simplified

Post by Outlawz7 »

[quote=""'[R-DEV"]Rhino;1294837']The "Select all of same type" method only works if your using only one type of overgrowth field which in most cases people are not.
[/quote]

Still works, you just need to take some time and select type by type and tweak.

[quote="Amok@ndy""]how does the VD affects the Detensity ?[/quote]

Not sure, but I noticed that when I changed the view distance and reloaded overgrowth, the amount would go up or down by several thousand objects.
Image
Hans Martin Slayer
Retired PR Developer
Posts: 4090
Joined: 2007-01-21 02:20

Re: [Map Tutorial] Overgrowth Fields Simplified

Post by Hans Martin Slayer »

Good stuff.

Been banging my head on the desk when trying to set up the fields on my 4k map, lowering the VD should help me out here. :-)
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Map Tutorial] Overgrowth Fields Simplified

Post by Rhino »

Amok@ndy wrote:how does the VD affects the Detensity ?
lower VD = smaller OG patch size = smaller density needed to fill each patch to the same amount of OG objects / meter squared, if that makes any sense.
Image
Post Reply

Return to “Modding Tutorials”