Prop_physics metal prop does not break!

Got problems with your models? Struggling with textures? Get help with your custom assets.

Prop_physics metal prop does not break!

Postby SmokersCough on Thu May 26, 2011 12:21 pm

Hi guys,

I've got a custom model (prop_physics) into the engine, textures work fine but I have a problem with the break ability of the prop, it's metallic and has it's base set to metal but even with health settings etc it simply won't break. I have also set health in my propdata.txt (it's a mod i'm making).

I've tried using the prop_physics_override and setting a health and other settings but that still doesn't work.

This is my QC file for the model:

Code: Select all
//QC File generated by the Wall Worm Model Tools Version 1.41
//Get the latest version and notes at:
//http://wallworm.com/projects/utilities/docs

$modelname   "teleport_disc/teleport_disc.mdl"
$staticprop
$body teleport_disc "teleport_disc.smd"
$texturegroup skinfamilies
{
   { "teleport_disc_material"  }
   { "teleport_disc_destination_material" }
}
$collisionmodel "teleport_disc_hull.smd" {
$automass

}
$surfaceprop "metalvent"
$cdmaterials "teleport_disc"
$sequence idle "teleport_disc" loop fps 30
 $keyvalues {
   "prop_data"
   {
      "base"      "Metal.Base"
      "health"      "20"
      "AIWalkable"      "true"
      "physicsmode"      "0"
      "dmg.club"      "0.25"
      "dmg.bullets"      "1"
      "dmg.explosive"      "2.0"
      "breakable_model"      "MetalChunks"

   }

   }


This is my prop data for metal:

Code: Select all
//=================================================================================
//      METAL
//=================================================================================
   // Base damage modifiers for metal objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Metal.Base"
   {
      "dmg.bullets"      "1.0"
      "dmg.club"      "1.0"
      "dmg.explosive"    "1.0"
      "breakable_model"   "MetalChunks"
      "health"      "30"      // By default, metal objects aren't breakable
      
   }

   // Small metal blocks, less than 1 foot cubed
   // i.e. tin cans, paint tins, metal buckets.
   "Metal.Small"
   {
      "base"      "Metal.Base"
   }

   // Medium metal objects.
   // i.e. wheelbarrows, metal boxes, bicycles, barrels, ladders, filing cabinets.
   "Metal.Medium"
   {
      "base"      "Metal.Base"
   }

   // Large metal objects.
   // i.e. ibeams, dumpsters, car bodies, refridgerators
   "Metal.Large"
   {
      "base"      "Metal.Base"
   }



I'd really appreciate some help here as it's frustrating the hell out of me :)

Thanks
SmokersCough
Member
Member
 
Joined: Thu Mar 16, 2006 4:52 pm

Re: Prop_physics metal prop does not break!

Postby Welsh Mullet on Thu May 26, 2011 11:10 pm

// DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.


....

// DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.!

Does this tell you nothing? :P
That's what she said.
User avatar
Welsh Mullet
Regular
Regular
 
Joined: Mon Jul 12, 2010 10:37 am
Location: Reading... Or sometimes Wales for the weekend.

Re: Prop_physics metal prop does not break!

Postby SmokersCough on Fri May 27, 2011 10:38 am

:) yeah I know, I did notice that. I've tried not setting a base at all and just setting a material type (allows for the object to make the correct sounds when punted, dropped etc) but still have had no joy.

Can anyone point me in the right direction, i need the prop to break after say 50 health and then spawn a few metallic gibs!

Thanks Guys!
SmokersCough
Member
Member
 
Joined: Thu Mar 16, 2006 4:52 pm

Re: Prop_physics metal prop does not break!

Postby SmokersCough on Fri May 27, 2011 11:49 am

Hey guys,

Ok now the model breaks but it does not spawn any gibs, also I have the "Don't take physics damage" flag ticked but it still gets damaged when it bounces into walls, it's getting there but any help would be greatly appreciated :)
SmokersCough
Member
Member
 
Joined: Thu Mar 16, 2006 4:52 pm

Re: Prop_physics metal prop does not break!

Postby SmokersCough on Fri May 27, 2011 11:50 am

Oh here's my setup now
QC file:
Code: Select all
//QC File generated by the Wall Worm Model Tools Version 1.41
//Get the latest version and notes at:
//http://wallworm.com/projects/utilities/docs

$modelname   "teleport_disc/teleport_disc.mdl"
$staticprop
$body teleport_disc "teleport_disc.smd"
$texturegroup skinfamilies
{
   { "teleport_disc_material"  }
   { "teleport_disc_destination_material" }
}
$collisionmodel "teleport_disc_hull.smd" {
$automass

}
$surfaceprop "metalvent"
$cdmaterials "teleport_disc"
$sequence idle "teleport_disc" loop fps 30
 $keyvalues {
   "prop_data"
   {
      "base"      "Metal.Small"
      "AIWalkable"      "true"
      "physicsmode"      "0"
      "breakable_model"   "MetalChunks"
      "breakable_count"   "1"
   }

   }

propdata.txt:
Code: Select all
// "prop data name"
// {
// "property"    "value"
// ...
// }
//
//
// "base"      : Specify a base propdata class to derive from (base types can be found in propdata.txt)
//
// "blockLOS"      : Override whether this prop should block NPC's Line-Of-Sight.
// "AIWalkable"      : Override whether AI should consider this prop as walkable on.
// "dmg.bullets"   : Mod damage done by bullets to this prop.
// "dmg.club"      : Mod damage done by clubs to this prop.
// "dmg.explosive"   : Mod damage done by explosives to this prop.
//      NOTE: Use damage modifiers to reflect differences between the amount of
//           damage that an object takes from different damage types. Don't
//           use them to reflect overall damage strength. i.e. Stone is resilient
//           to everything. To reflect this, increase the health of all stone
//           objects, don't set the damage modifiers lower.
//
// "damage_table"   : Specify a custom physics impact damage table for this prop.
// "health"      : Amount of damage this prop should take before breaking.
//
// "explosive_damage"   : Explosive damage done by this prop.
// "explosive_radius"   : Radius of the explosion caused by this prop when it breaks.
//      NOTE: If these two fields are specified for a prop, then the prop will automatically
//           create an explosion with the specified values when the prop is broken.
//
// "breakable_model"   : The type of breakable gibs this prop should break into. This list is at the bottom of this file.
// "breakable_count"   : The number of breakable gibs to break into.
// "allowstatic"   : Allow this prop to be static as well as physically simulated.
//
//
"PropData.txt"
{

//=================================================================================
//      PAPER
//=================================================================================
   // Base damage modifiers for paper objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Cardboard.Base"
   {
      "dmg.bullets"      "0.5"
      "dmg.club"      "1.25"
      "dmg.explosive"    "1.5"
   }

   // Cardboard / Paper blocks, less than 1 foot cubed.
   //   i.e. small cardboard boxes, notepads, newspapers, thin books.
   "Cardboard.Small"
   {
      "base"      "Cardboard.Base"
      "health"   "10"
   }

   // Cardboard / Paper blocks, less than 3 foot cubed.
   //   i.e. cardboard boxes. thick books
   "Cardboard.Medium"
   {
      "base"      "Cardboard.Base"
      "health"   "20"
   }

   // Large Cardboard / Paper blocks
   //   i.e. solid cardboard boxes
   "Cardboard.Large"
   {
      "base"      "Cardboard.Base"
      "health"   "40"
   }

//=================================================================================
//      CLOTH
//=================================================================================
   // Base damage modifiers for cloth objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Cloth.Base"
   {
      "dmg.bullets"      "0.5"
      "dmg.club"      "0.75"
      "dmg.explosive"    "1.5"
   }

   // Small / thin cloth objects
   //   i.e. shorts, shirts, pants.
   "Cloth.Small"
   {
      "base"      "Cloth.Base"
      "health"   "30"
   }

   // Heavier cloth / leather objects
   //   i.e. briefcases
   "Cloth.Medium"
   {
      "base"      "Cloth.Base"
      "health"   "50"
   }

   // Large / thick cloth objects
   //   i.e. armchairs, mattresses
   "Cloth.Large"
   {
      "base"      "Cloth.Base"
      "health"   "100"
   }


//=================================================================================
//      WOOD
//=================================================================================
   // Base damage modifiers for wooden objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Wooden.Base"
   {
      "dmg.bullets"      "0.75"
      "dmg.club"      "2.0"
      "dmg.explosive"    "1.5"
      
      "breakable_model"   "WoodChunks"
      "breakable_skin"   "0"
   }

   // Tiny Wooden pieces that should die in one hit
   //   i.e splinters
   "Wooden.Tiny"
   {
      "base"         "Wooden.Base"
      "health"      "6"

      "breakable_count"   "0"
   }

   // Wooden blocks, less than 1 foot cubed.
   //   i.e pieces of board, branches.
   "Wooden.Small"
   {
      "base"         "Wooden.Base"
      "health"      "20"

      "breakable_count"   "2"
   }

   // Wooden blocks, less than 3 foot cubed.
   //   i.e boards, small crates, pallettes, ladders, chairs.
   "Wooden.Medium"
   {
      "base"         "Wooden.Base"
      "health"      "30"

      "breakable_count"   "4"
   }

   // Large wooden blocks, less than 5 foot cubed.
   //   i.e Crates, benches.
   "Wooden.Large"
   {
      "base"         "Wooden.Base"
      "health"      "50"

      "breakable_count"   "6"
   }

   // Extra large wooden objects
   //   i.e posts
   "Wooden.ExtraLarge"
   {
      "base"         "Wooden.Base"
      "health"      "100"

      "breakable_count"   "8"
   }

   // Huge wooden objects.
   //   i.e Big Wardrobes, bookcases
   "Wooden.Huge"
   {
      "base"         "Wooden.Base"
      "health"      "130"

      "breakable_count"   "10"
   }

   // Unbreakable Huge wooden objects.
   //   i.e Big Wardrobes, bookcases
   "Wooden_Unbreakable.Huge"
   {
      "base"         "Wooden.Base"
      "health"      "0"

      "breakable_count"   "10"
   }




//=================================================================================
//      STONE
//=================================================================================
   // Base damage modifiers for stone objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Stone.Base"
   {
      "dmg.bullets"      "1.0"
      "dmg.club"      "1.0"
      "dmg.explosive"    "1.0"
   }

   // Stone blocks, less than 1 foot cubed
   // i.e. cinderblocks, small rocks.
   "Stone.Small"
   {
      "base"      "Stone.Base"
      "health"   "50"
   }

   // Medium stone blocks, less than 3 foot cubed
   // i.e. rubble chunks
   "Stone.Medium"
   {
      "base"      "Stone.Base"
      "health"   "100"
   }

   // Large stone blocks, less than 5 foot cubed
   // i.e. big rubble chunks
   "Stone.Large"
   {
      "base"      "Stone.Base"
      "health"   "200"
   }

   // Huge stone blocks, less than 5 foot cubed
   // i.e. enormous rubble chunks
   "Stone.Huge"
   {
      "base"      "Stone.Base"
      "health"   "400"
   }

//=================================================================================
//      GLASS
//=================================================================================
   // Base damage modifiers for glass objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Glass.Base"
   {
      "dmg.bullets"      "1.0"
      "dmg.club"      "1.0"
      "dmg.explosive"    "0.1"      // Trial: Get knocked around more than destroyed?
   }

   // Glass blocks, less than 1 foot cubed
   // i.e. bottles, jugs, glasses.
   "Glass.Small"
   {
      "base"      "Glass.Base"
      "health"   "5"
      "damage_table"      "glass"
   }

   "Glass.Window"
   {
      "base"         "Glass.Base"
      "dmg.explosive"    "1.0"      // Override base glass explosive behavior
      "dmg.bullets"      "0.5"
      "health"      "15"
      "damage_table"      "glass"
   }


//=================================================================================
//      METAL
//=================================================================================
   // Base damage modifiers for metal objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Metal.Base"
   {
      "dmg.bullets"      "1.0"
      "dmg.club"      "1.0"
      "dmg.explosive"    "1.0"
      "breakable_model"   "MetalChunks"
      
   }

   // Small metal blocks, less than 1 foot cubed
   // i.e. tin cans, paint tins, metal buckets.
   "Metal.Small"
   {
      "base"      "Metal.Base"
      "health"      "15"
   }

   // Medium metal objects.
   // i.e. wheelbarrows, metal boxes, bicycles, barrels, ladders, filing cabinets.
   "Metal.Medium"
   {
      "base"      "Metal.Base"
   }

   // Large metal objects.
   // i.e. ibeams, dumpsters, car bodies, refridgerators
   "Metal.Large"
   {
      "base"      "Metal.Base"
   }




//=================================================================================
//      PLASTIC
//=================================================================================
   // Base damage modifiers for plastic objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Plastic.Base"
   {
      "dmg.bullets"      "1.0"
      "dmg.club"      "1.0"
      "dmg.explosive"    "1.0"
      "health"      "0"
   }

   // Plastic blocks, less than 2 foot cubed
   // i.e. plastic cups, plastic milk crates, phones
   "Plastic.Small"
   {
      "base"      "Plastic.Base"
   }

   // Plastic blocks, less than 4 foot cubed
   // i.e. plastic chairs, tables, barrels
   "Plastic.Medium"
   {
      "base"      "Plastic.Base"
   }
   
   // Large Plastic objects, or medium objects with mixes of plastic & metal that you still want destructable
   // i.e. computer equipment
   "Plastic.Large"
   {
      "base"      "Plastic.Base"
   }


      
//=================================================================================
//      ITEMS
//=================================================================================
   // Base damage modifiers for items
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Item.Base"
   {
      "dmg.bullets"      "1.0"
      "dmg.club"         "1.0"
      "dmg.explosive"    "1.0"

      "health"         "0"      // By default, metal objects aren't breakable
   }

   // Plastic blocks, less than 2 foot cubed
   // i.e. plastic cups, plastic milk crates, phones
   "Item.Small"
   {
      "base"      "Item.Base"
   }

   // Plastic blocks, less than 4 foot cubed
   // i.e. plastic chairs, tables, barrels
   "Item.Medium"
   {
      "base"      "Item.Base"
   }
   
   // Large Plastic objects, or medium objects with mixes of plastic & metal that you still want destructable
   // i.e. computer equipment
   "Item.Large"
   {
      "base"      "Item.Base"
   }


//=================================================================================
//      POTTERY
//=================================================================================
   // Base damage modifiers for pottery objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Pottery.Base"
   {
      "dmg.bullets"      "1.0"
      "dmg.club"      "1.25"
      "dmg.explosive"    "1.5"
   }

   // Pottery blocks, less than 2 foot cubed
   // i.e. flowerpots.
   "Pottery.Small"
   {
      "base"      "Pottery.Base"
      "health"   "5"
      "damage_table"      "glass"
   }

   // Medium pottery objects
   // i.e. large flowerpots.
   "Pottery.Medium"
   {
      "base"      "Pottery.Base"
      "health"   "40"
   }

   // Large pottery objects
   // i.e. big chunks of wall plaster
   "Pottery.Large"
   {
      "base"      "Pottery.Base"
      "health"   "70"
   }

   // Huge pottery objects.
   // i.e. big ornate pottery vessels.
   "Pottery.Huge"
   {
      "base"      "Pottery.Base"
      "health"   "100"
   }


//=================================================================================
//      FLESH
//=================================================================================
   // Base damage modifiers for flesh objects
   // DON'T USE THIS FOR A PROP. USE THE NON.BASE ONES.
   "Flesh.Base"
   {
      "dmg.bullets"      "1.25"
      "dmg.club"      "1.0"
      "dmg.explosive"    "1.5"
   }

   // Flesh blocks that should die in a single hit
   // i.e. fruit, food items, gibs.
   "Flesh.Tiny"
   {
      "base"      "Flesh.Base"
      "health"   "3"
   }

   // Flesh blocks, less than 1 foot cubed
   // i.e. fruit, food items, gibs.
   "Flesh.Small"
   {
      "base"      "Flesh.Base"
      "health"   "10"
   }



//=================================================================================
//      BREAKABLE DATA. NOT PROPDATA TYPES.
//=================================================================================
   "BreakableModels"
   {
      // Sorted in order of smallest to largest

      "WoodChunks"
      {
         "models\Gibs\wood_gib01e.mdl"   "1"
         "models\Gibs\wood_gib01d.mdl"   "1"
         "models\Gibs\wood_gib01c.mdl"   "1"
         "models\Gibs\wood_gib01b.mdl"   "1"
         "models\Gibs\wood_gib01a.mdl"   "1"
      }
      "GlassChunks"
      {
         "models\Gibs\Glass_shard01.mdl"   "1"
         "models\Gibs\Glass_shard02.mdl"   "1"
         "models\Gibs\Glass_shard03.mdl"   "1"
         "models\Gibs\Glass_shard04.mdl"   "1"
         "models\Gibs\Glass_shard05.mdl"   "1"
         "models\Gibs\Glass_shard06.mdl"   "1"
      }
      "ConcreteChunks"
      {
         "models\props_debris\concrete_chunk08a.mdl"   "1"
         "models\props_debris\concrete_chunk09a.mdl"   "1"
         "models\props_debris\concrete_chunk03a.mdl"   "1"
         "models\props_debris\concrete_chunk07a.mdl"   "1"
         "models\props_debris\concrete_chunk09a.mdl"   "1"
         "models\props_debris\concrete_chunk02a.mdl"   "1"
      }
      "MetalChunks"
      {
         "models\Gibs\metal_gib1.mdl"         "1"
         "models\Gibs\metal_gib2.mdl"         "1"
         "models\Gibs\metal_gib3.mdl"         "1"
         "models\Gibs\metal_gib4.mdl"         "1"
         "models\Gibs\metal_gib5.mdl"         "1"
      }
   }
}
SmokersCough
Member
Member
 
Joined: Thu Mar 16, 2006 4:52 pm

Re: Prop_physics metal prop does not break!

Postby SmokersCough on Fri May 27, 2011 2:29 pm

And yet another update :) I've got the prop to not take damage from physics, by making it an prop_physics_override, and setting the "Scale factor for inertia" to 0 and also flagging "Don't take physics damage".

The Prop also disappears as it should do when shot / blown up and destroyed.

Now the only problem remaining is getting the metal gibs to spawn when the disc breaks. Any ideas... i'll post my results here if i get it to work, that way anyone else running into the same issues can resolve them.

Cheers
SmokersCough
Member
Member
 
Joined: Thu Mar 16, 2006 4:52 pm

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users