Building Land Classes: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Removed unhelpful information)
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Destroyed Buildings that used the DestructEngine type will vaporise (dissappear) unless a ruin model is associated with them.
Destroyed Buildings that used the DestructEngine type will vaporise (dissappear) unless a rubble model is associated with them.


In OFP we had a rather nice rendition of the bulding after destruction, that, in itself, was useful, visual, and usable for some missions (The Award winning Abandoned Armies eg).
In OFP we had a rather nice rendition of the bulding after destruction, that, in itself, was useful, visual, and usable for some missions (The Award winning Abandoned Armies eg).


In Arma, we have an un-asked for, and quite idiotic piece of rubble at best, or nothing at all, at worst.
In Arma, we have an un-asked for, but rather clever piece of rubble at best, or nothing at all, at worst.


To further confuse matters BIS choose to call this nonsense 'ruins', rubble would be more appropriate, since there are also genuine ruins in the game. (Helfenburks eg)
To further confuse matters BIS choose to call this class stuff 'ruins'. Rubble would be more appropriate, since there are also genuine ruins in the game. (Helfenburks eg). But one thing you can count on is that bis have never cared about compatibilty with anything previous. The code below avoids the use of the word ruin where possible.


Even worse, a building that is replaced by a ruin comes alive again. It's damage is no longer one. Making target scripting moot.
Worse, a building that is replaced by rubble comes alive again. It's damage is no longer one. Making target scripting moot.  


To further complicate the issue, any building that needs a ruin replacement (what doesn't?) must be called a Land_xyz class. Why this should be can only depend on what you're smoking at the time.
To further complicate the issue, any building that needs a ruin replacement (what doesn't?) must be called a Land_xyz class. Why this should be can only depend on what you're smoking at the time.


To whit:
'''Even worse''', building animations did not work in arma one without a Land class. Mercifully, this seems to have been fixed (probably by sheer oversight)
 
And so...:


standard building declaration that no longer works (if you want to see anything after destruction)
standard building declaration that no longer works (if you want to see anything after destruction)
Line 29: Line 31:
                                                           // the extern declarations were supposed to remove this sillyness but BIS as usual broke their own rules
                                                           // the extern declarations were supposed to remove this sillyness but BIS as usual broke their own rules
                                                           // then changed the rules to suit, and finally forgot what they were.
                                                           // then changed the rules to suit, and finally forgot what they were.
   class '''Land_'''MyRuinedHouseModel''':Ruins
   class '''Land_'''MyRuinedHouseModel:Ruins
   {
   {
     scope=protected;                                      // yes folks, even tho this model might only be local in scope
     scope=protected;                                      // yes folks, even tho this model might only be local in scope
                                                           // the engine can't find it
                                                           // the engine can't find it
     displayname=Rubble;                                  // at least call it something sensible when it shows
     displayname=Rubble;                                  // at least call it something sensible when it shows
     model = \some\idiotic\rubble\'''MyRuinedHouseModel'''[.p3d];
     model = \some\rubble\'''MyRuinedHouseModel'''[.p3d];
   };
   };
   class '''Land_'''MyHouse: House
   class '''Land_'''MyHouse: House
Line 44: Line 46:
       {
       {
         simulation = "ruin";                                      // bis broke most of their simulations. but this one works
         simulation = "ruin";                                      // bis broke most of their simulations. but this one works
         type= \some\idiotic\rubble\'''MyRuinedHouseModel'''[.p3d];// don't even try and work out how the engine prepends land_
         type= \some\rubble\'''MyRuinedHouseModel'''[.p3d];           // don't even try and work out how the engine prepends land_
                                                                   // to get at the class. But, you can start crying in frustration
                                                                   // to get at the class. But, you can start crying in frustration
                                                                   // about now and go back and play ofp. It remains a superior game.
                                                                   // about now and go back and play ofp. It remains a superior game.
Line 54: Line 56:
     };
     };
   };
   };
[[Category:ArmA: Addon Configuration]]
[[Category:ArmA: Terrain Editing]]

Revision as of 11:20, 24 February 2012

Destroyed Buildings that used the DestructEngine type will vaporise (dissappear) unless a rubble model is associated with them.

In OFP we had a rather nice rendition of the bulding after destruction, that, in itself, was useful, visual, and usable for some missions (The Award winning Abandoned Armies eg).

In Arma, we have an un-asked for, but rather clever piece of rubble at best, or nothing at all, at worst.

To further confuse matters BIS choose to call this class stuff 'ruins'. Rubble would be more appropriate, since there are also genuine ruins in the game. (Helfenburks eg). But one thing you can count on is that bis have never cared about compatibilty with anything previous. The code below avoids the use of the word ruin where possible.

Worse, a building that is replaced by rubble comes alive again. It's damage is no longer one. Making target scripting moot.

To further complicate the issue, any building that needs a ruin replacement (what doesn't?) must be called a Land_xyz class. Why this should be can only depend on what you're smoking at the time.

Even worse, building animations did not work in arma one without a Land class. Mercifully, this seems to have been fixed (probably by sheer oversight)

And so...:

standard building declaration that no longer works (if you want to see anything after destruction)

class CfgVehicles
{
 class House;
 class MyHouse:House {...........};

Shiny new idiocy

class CfgVehicles
{
 class Ruins; // required for the ruin model
 class NonStrategic;
 class House: NonStrategic {class DestructionEffects; }; // ie a completely stupid re-declaration of what should not have to be known.
                                                         // the extern declarations were supposed to remove this sillyness but BIS as usual broke their own rules
                                                         // then changed the rules to suit, and finally forgot what they were.
 class Land_MyRuinedHouseModel:Ruins
 {
   scope=protected;                                      // yes folks, even tho this model might only be local in scope
                                                         // the engine can't find it
   displayname=Rubble;                                   // at least call it something sensible when it shows
   model = \some\rubble\MyRuinedHouseModel[.p3d];
 };
 class Land_MyHouse: House
 {
     ... usual stuff followed by ...
  class DestructionEffects: DestructionEffects
  {
     class Ruin1
     {
       simulation = "ruin";                                      // bis broke most of their simulations. but this one works
       type= \some\rubble\MyRuinedHouseModel[.p3d];            // don't even try and work out how the engine prepends land_
                                                                 // to get at the class. But, you can start crying in frustration
                                                                 // about now and go back and play ofp. It remains a superior game.
       position = "";
       intensity = 1;
       interval = 1;
       lifeTime = 1;
     };
   };
 };