ZBarrier Asset

From COD Engine Research
Jump to: navigation, search

The zbarrier asset is a new asset to Black Ops 2 and as of yet is the only game it has appeared in. It is used to store information on the zombie barriers used to block windows and such in Zombie mode. Zbarrier assets are used by the mapents as a base for barriers around the map.

struct ZBarrierBoard
{
  XModel *pBoardModel;
  XModel *pAlternateBoardModel;
  XModel *pUpgradedBoardModel;
  const char *pTearAnim;
  const char *pBoardAnim;
  FxEffectDef * repairEffect[2];
  vec3_t repairEffectOffset[2];
  unsigned int boardRepairSound;
  unsigned int boardRepairHoverSound;
  unsigned int pauseAndRepeatRepairSound;
  float pauseBetweenRepSoundsMin;
  float pauseBetweenRepSoundsMax;
  ScriptString zombieBoardTearStateName;
  ScriptString zombieBoardTearSubStateName;
  unsigned int numRepsToPullProBoard;
};
 
struct ZBarrierDef
{
  const char *name;
  unsigned int generalRepairSound[2];
  unsigned int upgradedGeneralRepairSound[2];
  unsigned int useDelayBetweenGeneralRepSounds;
  float delayBetweenGeneralRepSounds;
  unsigned int earthquakeOnRepair;
  float earthquakeMinScale;
  float earthquakeMaxScale;
  float earthquakeMinDuration;
  float earthquakeMaxDuration;
  float earthquakeRadius;
  int numBoardsInBarrier;
  unsigned int autoHideOpenPieces;
  unsigned int taunts;
  unsigned int reachThroughAttacks;
  ScriptString zombieTauntAnimState;
  ScriptString zombieReachThroughAnimState;
  int numAttackSlots;
  float attackSpotHorzOffset;
  ZBarrierBoard boards[6];
};

Source Format

The source format for zbarriers is currently unknown, however there are 2 suspects. Either way, the most likely path for zbarriers is at "raw/zbarrier/". The first format is similar to other assets by using a raw text files with no extension, with each setting name and value separated by a back-slash. The first setting identifies the file, and for zbarrier the identifier string is most likely "BARRIER". The other possible format is a format similar to the one found in the mapents asset.

{
"type" "zmcore_BasicWoodBarrier_hide_pieces"
"barrieranimtime" "0"
"showalternatemodel" "0"
"showupgradedmodel" "0"
"zbarriernumboards" "6"
"zbarrierboardmodel1" "p6_anim_zm_barricade_board_01"
"zbarrierupgradedboardmodel1" "p6_anim_zm_barricade_board_01_upgrade"
"zbarriertearanim1" "o_zombie_board_1_pull"
"zbarrierboardanim1" "o_zombie_board_1_repair"
"zbarrierboardmodel2" "p6_anim_zm_barricade_board_02"
"zbarrierupgradedboardmodel2" "p6_anim_zm_barricade_board_02_upgrade"
"zbarriertearanim2" "o_zombie_board_2_pull"
"zbarrierboardanim2" "o_zombie_board_2_repair"
"zbarrierboardmodel3" "p6_anim_zm_barricade_board_03"
"zbarrierupgradedboardmodel3" "p6_anim_zm_barricade_board_03_upgrade"
"zbarriertearanim3" "o_zombie_board_3_pull"
"zbarrierboardanim3" "o_zombie_board_3_repair"
"zbarrierboardmodel4" "p6_anim_zm_barricade_board_04"
"zbarrierupgradedboardmodel4" "p6_anim_zm_barricade_board_04_upgrade"
"zbarriertearanim4" "o_zombie_board_4_pull"
"zbarrierboardanim4" "o_zombie_board_4_repair"
"zbarrierboardmodel5" "p6_anim_zm_barricade_board_05"
"zbarrierupgradedboardmodel5" "p6_anim_zm_barricade_board_05_upgrade"
"zbarriertearanim5" "o_zombie_board_5_pull"
"zbarrierboardanim5" "o_zombie_board_5_repair"
"zbarrierboardmodel6" "p6_anim_zm_barricade_board_06"
"zbarrierupgradedboardmodel6" "p6_anim_zm_barricade_board_06_upgrade"
"zbarriertearanim6" "o_zombie_board_6_pull"
"zbarrierboardanim6" "o_zombie_board_6_repair"
"classname" "zbarrier_zmcore_BasicWoodBarrier_hide_pieces"
}