Turn off OG lods without separate file

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

Turn off OG lods without separate file

Post by Outlawz7 »

As more experienced mappers may know, in order for some vegitation like static fields to show up correctly ingame, the _lod model needs to be "turned off" by editing or removing the line "Object.isOvergrowth 1" that editor creates for each object.

The editor will readd that line every time you save, meaning the best course is to separate the objects into a separate file which editor will leave alone.
However, if you need to edit the placement of these objects, you'll need to add them back in or load them as staticobjects.con but have no reference to where other objects on the map are and so on.

There is another way which also has its ups and downs but I believe is more practical.

Requirements First, load your map in editor, create a new layer (that doesn't save into any gamemodes or sizes) and place all objects that you want to turn off _lods for into that layer and save.

Next, run Notepad++, go Plugins>Plugins Admin and install ToolBucket plugin.

Image

Image

Open your map's staticobjects.con file in Notepad++, go Plugins>ToolBucket>Multiline find and replace.

Image

Find an object in your new layer, copy the layer and isOvergrowth line, change 1 to 0, Replace All.

Image

All objects in that layer are now isOvergrowth 0 and will not switch to _lod while any other overgrowth object in static objects that should switch, will remain so.

The downside is that editor will undo this when you again save static objects, so repeat this after each save or when you're done with editing static objects.

The upside is that you do not need to store those objects in a separate file and can work with those objects much easier as everything is in one file.
Image
Post Reply

Return to “Modding Tutorials”