OFPEC Forum

Addons & Mods Depot => ArmA - Addons & Mods Discussion => Topic started by: USSRsniper on 17 Jan 2008, 17:36:21

Title: Glass damage in ArmA
Post by: USSRsniper on 17 Jan 2008, 17:36:21
having this problam for long time, got glass to change textures when it takes damage. But the problem is I can't kill anyone inside the vehicle, because glass is bullet proof.
Here is the config and model.cfg attached aswell if this will help.
Title: Re: Glass damage in ArmA
Post by: RM Snipe on 19 Jan 2008, 15:47:59
I'm only a noob at this but after looking at your config try changing values to TRUE or 1,

   class HitRGlass {
         armor = 0.3;
         material = -1;
         name = "sklo predni P";
         visual = "sklo predni P";
         passThrough = 0;
      };

Title: Re: Glass damage in ArmA
Post by: Sparky on 27 Jan 2008, 16:48:13
braking glasses is a bit pain in the ass.
here is a solution.
1)geometry lod, has nothing to do with breaking glass
2)BUT fire geometry has, so you have to create you glass compnents there. Now for some reason bis uses a texture for them as black.pac, so i did the same. The tricky part is that you have to name them, example damage_glass
3)in your config, create the appropriate entry in CfgSkeletons example "damage_glass","",
4)in CFgSkeletons do the same example
class damage_glass
         {
            type="hide";
            selection="damage_glass";
            source="damage";
            damageValue=0.15;
         };

Now how this trick works, damage_glass should be present in FireGeometry LOD, so the 1st bbullet will cause glass to brake, the others will have the glass braked but the glass can be penatrating.
That was the only solution i could foind in this problem.
1)If you don't have the components in FireGeomtery the glass can be pierced but doesn't brake
2)if you have the components but not hte damage trick in order to hide the component after it has dammage, the glass are broken but the cannot be pierced.

An other problem that 'im still trying to solve is the hit points for glass it's something that is a real pain in the ass, since sometimes work and sopmetime not depending the angle you're going to hit the glass....

Ok, i hope that helps.
Title: Re: Glass damage in ArmA
Post by: USSRsniper on 29 Jan 2008, 20:59:17
XSparky
Tried that, still same result.... glass breaking but not penetrated.. Do i make glass into damage_glass selection? Or leave glass as it is sklo predni L, and also add selection damage_glass?
Title: Re: Glass damage in ArmA
Post by: Sparky on 30 Jan 2008, 16:52:44
well
1)in your p3d, in fire geometry for the glass delete all selections except, damage_glass
2)select the glasses and for texture use this
ca\data\data\black.pac i don't know why but bIS uses too.
3)continue with the appropiae definition in CfgSkeletons
4) and then
class damage_glass
         {
            type="hide";
            selection="damage_glass";
            source="damage";
            damageValue=0.15;
         };
also don't frorget to add it as a section is you cfgmodels sections[] array.
Title: Re: Glass damage in ArmA
Post by: USSRsniper on 30 Jan 2008, 20:43:12
Still not working,here is complete package with config and model.  maybe you can take a look.
Title: Re: Glass damage in ArmA
Post by: Sparky on 30 Jan 2008, 21:33:52
asily fixed.
1)go to fire geometry, select damage_glass selection, and right click on it. On the drop down menu select the last option weights, from this you can see the dependencies with other selections, normally you shouldn't have dependancies, but, your selection is dependant to damagehide and component 70
2)delete component 70, as name you don't need this.
3)now from damagehide selection remove (as part with ctrl+shift and drag and click on a corner of the object that corresponds to the damage_glass) the damage_glass and redifine it.
4)to ensure check again, damage_glass selection for weights.
now it should work, i try it and i hadn't any problem. Although i didn't have the textures.
Anyway, i hope that this can solves the problem
Title: Re: Glass damage in ArmA
Post by: USSRsniper on 31 Jan 2008, 08:44:06
Thank you  :good: , now its working, never even though before to check weights...  :whistle:
Title: Re: Glass damage in ArmA
Post by: Nixer6 on 31 Jan 2008, 10:07:29
Why, when BIS advertises and promotes all the "user made addons" is this so hard for an above avereage "player" to figure out?

Congrat's BTW...now if you can teach BIS that a Beret doesn't have the same protection (armor value) as a helmet..................... :P
Title: Re: Glass damage in ArmA
Post by: Nixer6 on 01 Feb 2008, 11:47:52
Dunno if this will help you, but it helped me.

Code: [Select]
  class HitGlass
skip the LGlass and RGlass. Works for me.
Title: Re: Glass damage in ArmA
Post by: Sparky on 01 Feb 2008, 13:35:12
class HitGlass has to do with the Armor Values of the glasses, unfortunately you can't have for every glass different class, and that's why a bullet that hits the rear glass is causing all glasses to get broken.
also, HitGlass is a hardcore coded glass that binds the p3d (hitpoints) with armor values and the visual appearence too.

class HitRGlass {
         armor = 0.15;
         material = 54;
         name = "sklo predni P";
         visual = "sklo predni P";
         passThrough = 0;
      };   
      class HitLGlass {
         armor = 0.15;
         material = 54;
         name = "sklo predni L";
         visual = "sklo predni L";
         passThrough = 0;
      };

now armor = 0.15 that defines the armor value for this component.
material=54 (you can define the material, by giving a user value when you hit the face properties key on O2) (but still i haven't explore ever aspect of this line, since i suspect that works under certain rules.
name="sklo prdeni L"; this is the name on the Hit Points LOD,
visual="sklo predni L"; this is for the viual LODS
passthrough=0; a lot of people mistaken think that passthrough line has to do with this specific component penetration. Well passthrough means that this part is vital for the whole model, so if you have passthrough to 1 for a speific component (example engine), if this component takes an amount of damage it will cause the whole model to blow up. it can takes 2 values 0 or 1


Basicaly the damage system for ArmA is a mix of a lot of things.
Title: Re: Glass damage in ArmA
Post by: bdfy85 on 01 Feb 2008, 17:22:12
Quote
passthrough=0; a lot of people mistaken think that passthrough line has to do with this specific component penetration. Well passthrough means that this part is vital for the whole model, so if you have passthrough to 1 for a speific component (example engine), if this component takes an amount of damage it will cause the whole model to blow up. it can takes 2 values 0 or 1
Yes, it was told so at of forums. But you can try - no matter passthrough=0 or 1 for ex. for engine selection - it will blow up the whole vehicle :) so... it's mostly hardcoded
Quote
visual="sklo predni L"; this is for the viual LODS
false. It's Hit Points LOD selection. name is the name that is displayed when EH damaged is triggered. Visual lod definition to hitpoints is made via material value
Quote
Basicaly the damage system for ArmA is a mix of a lot of things.
basicaly Arma damage systam is just the same as ofp one. And from my experience hitpoints are set in the same way as in ofp. It has nothing to do with hide animation tricks ;) But if that works for you... feel free to complicate that matters :)
Title: Re: Glass damage in ArmA
Post by: Sparky on 01 Feb 2008, 17:30:13
Indeed maybe you're right about the name="" line i haven't gone that so far to test it.
But the damage system is more complicated than it was with OFP, and when i say damage system i'm including the texture tricks, since it's a part of damage system.
So for me, in order to have a complete damage system this is required.
But anyway, this is generally how anyone means the phrase "damage system".
Title: Re: Glass damage in ArmA
Post by: bdfy85 on 01 Feb 2008, 17:43:21
Quote
But the damage system is more complicated than it was with OFP, and when i say damage system i'm including the texture tricks, since it's a part of damage system.
just the same. DamageHalf/damageFull are still working. Remember darken effect on destroyed vehicles ? It's still there - but you can override it by another destroy material. not really a hard trick. +damge animation  now possible. But it's effects only. general system is the same.
Title: Re: Glass damage in ArmA
Post by: Sparky on 01 Feb 2008, 17:49:46
ok, so we're come to my original statement which was "mix of lot of things".....
i didn't say the opposite, than you. And it can be complicated for people that don't understand how this works. Remember not anybody in ArmA community, is a former OFP player, so for a lot of people this thing can be quite hard to understand.
But anyway, i believe that we agree more, than disagree.

Title: Re: Glass damage in ArmA
Post by: Nixer6 on 01 Feb 2008, 18:00:34
The only thing I am working on right now is a config mod for an AH6. In my research I found out that the old "glass" in the bird had been upgraded, along with a lot of other things, IRL.

Sources state they have tried to protect the pilots from small arms fire. I tried all kinds of armor values, still experimenting BTW. In the Air.pbo, the only glass value I see defined is HitRGlass and HitLGlass. I was getting zero changes, that I could tell, by modifying those values. So I tried inserting a new class...HitGlass. Made a very noticeable difference. FWIW.
Title: Re: Glass damage in ArmA
Post by: USSRsniper on 02 Feb 2008, 10:51:07
Maybe some things are different when making damage in ArmA, never really did any addon making in OFP.
But here is other question is there any way to make actuall armored glass? SO for example you can't penetrate with small arms, but you could with .50 cal?

Nixer6,

I don't think that armor values on glass have anything to do with actual armor. All it does is it takes more damage for glass to change the texture, nothing to do with how well it will protect the soldiers.
Title: Re: Glass damage in ArmA
Post by: Obmar on 13 Feb 2008, 09:44:14
Hi Guys, after reading this topic I decided to put a Glass Damage Tutorial together to help all the other modellers.

Glass_Damage_Tutorial (ftp://www.armedassault.info/_hosted/bushwars/tut/glass_damage_tutorial.pdf)



#link corrected - bedges
Title: Re: Glass damage in ArmA
Post by: Gnat on 13 Feb 2008, 12:05:16
Great job Obmar !
Thanks for the community contribution.  :good:
Title: Re: Glass damage in ArmA
Post by: hoz on 13 Feb 2008, 18:03:39
Thanks Obmar, I've added it to the depot.
Title: Re: Glass damage in ArmA
Post by: Nixer6 on 13 Feb 2008, 22:17:56
Yes.... thanks Obmar