Author Topic: Tips for Module Builders  (Read 6126 times)

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Tips for Module Builders
« on: November 28, 2006, 02:01:11 PM »
Post tips for NWN2 module building here. I just got a couple interesting replies from the Rogue Dao team about static vs. environmental objects:

Quote
If you convert a non-static placeable to an environmental object, the placeable will lose it's non-static flag, along with any other non-static-type information such as an inventory, a usable flag, etc.  The conversion process will actually warn you if you try to convert a usable placeable to an environmental object.

My understanding is probably not exact, but an environmental object is basically just the visual mesh of a model and the elements that interact with light/negative light.  The collision meshes are "turned off" in some manner when you convert something to an environmental object.  You also are telling the engine to ignore any walkmesh data when you convert to an environmental object.

Because the environmental object instance of a placeable has less information associated with it, it reduces the size of an area if you convert placeables to environmental objects and then paint no-walk or use the walkmesh cutter to manually cut the environmental objects out of the walkmesh.

For a couple of placeables, the difference is not notable.  But for an area with a large number of placeables, you can achieve a reduction in file size by around 10-15% by converting all of the placeables in the area to environmental objects and manually cutting the walkmesh.  Then you can go back and reconvert those objects to placeables that you want the player to be able to interact with.

In addition to a smaller module size, extensive use of environmental objects will improve in-game performance since less information is being processed

-Monty

EDIT: I tried this on the tavern of doors mod which is about 6.3 MB and it knocked off about 10 kb from the file. However, when I did it with the mod I'm using to design the new arena, which weighs in at a hefty 29 MB it knocked off about 200 kb. That was after converting about 20 objects in the arena compared to around 50+ objects in the Tavern of Doors.

So it looks like it doesn't make too much of a difference of indoor areas but it can be used to optimize large outdoor areas.
« Last Edit: November 28, 2006, 06:10:12 PM by 420 »