Re: Destroyable buildings
Posted: Mon Feb 15, 2010 4:52 pm
Unfortunately I don't know of any Bf1942 mod with destructible vanilla buildings.
If you want a code template, just unpack Battle_of_Britain.rfa, go inside objects and copy Britain_Factory. Then you can simply replace lodFactory with your own lodObject that contains geometry of another building. You'll still get the factory wreck upon destruction, unless you make your own wreck mesh for each building or just give up on wrecks.
Another problem might be with materials - Bf1942 static buildings tend to use materials with materialDamage set to 0. Also all attack materials have damageMod set to 0 for said material. It means that your building will not take any damage no matter how long you shoot it. You can fix this by looking up building's materials and for each one set MaterialDamage to non-zero, and for each weapon set damageMod to non-zero for current material. This would be tedious (you'd have to go trough all attack materials) and there may be unforeseeable side effects. The alternative is to change materials of your buildings to standard destructible armor. Either way you'd have to open each building in max and look at materials.
In other words: there's no simple way of doing it. At least none that I'm aware of.
If you want a code template, just unpack Battle_of_Britain.rfa, go inside objects and copy Britain_Factory. Then you can simply replace lodFactory with your own lodObject that contains geometry of another building. You'll still get the factory wreck upon destruction, unless you make your own wreck mesh for each building or just give up on wrecks.
Another problem might be with materials - Bf1942 static buildings tend to use materials with materialDamage set to 0. Also all attack materials have damageMod set to 0 for said material. It means that your building will not take any damage no matter how long you shoot it. You can fix this by looking up building's materials and for each one set MaterialDamage to non-zero, and for each weapon set damageMod to non-zero for current material. This would be tedious (you'd have to go trough all attack materials) and there may be unforeseeable side effects. The alternative is to change materials of your buildings to standard destructible armor. Either way you'd have to open each building in max and look at materials.
In other words: there's no simple way of doing it. At least none that I'm aware of.