1. Post #1
    Fantym420's Avatar
    October 2010
    901 Posts
    PDMG - Prop Damage By Fantym

    Easy Prop Damage system for those that feel the need for destruction.

    --- Pending Update ----

    I just a beta key and am going to update this and get it up on the workshop....

    However the first copy you'll see on there should be the same as the last release, and may break as I update it, so be aware.





    Video PDMG v3 :




    Features:
    * Option Menu!!
    * Enable and Disable the Addon
    * Choose the effect displayed when props are destroyed.
    * Override Ragdoll Health
    * Override All Props Health
    * Calculate Prop health using Mass and Volume, Just Mass, or Just Volume
    * Random Health Generation if not using the above.
    * Auto-Heal Props - Amount and Interval
    * When to show Props Health
    * Prop Health when displayed will change from green to red based on health left.
    * Break Constraints on Low Prop Health with selectable percentage
    * Unfreeze prop on low health
    * Prop Healing SWEP
    * Spawnable Ammo Entity For SWEP
    * Auto-Heal Players - Amount and Interval
    * Auto-Heal NPCs - Amount and Interval
    * Visual Color Damage - Enable/Disable in Menu
    * Health Multiplier Option
    * Option to disable damage to different addon's


    Availible Via SVN:
    http://propdamage.googlecode.com/svn/trunk/

    Non-SVN (v3):
    .
    Non-SVN (v3.5 ):
    .
    NOTE:Non-SVN Versions are not updated as often as the SVN

    To-Do:
    Fix as needed
    Add more exclusions to list.


    Change Log:
    =-=-=-=-=--=-=-=-=-
    v4.20: Comming Soon, Just got the Beta.

    v3.5:
    Updated file structure, broke pdmg.lua in to 3 files
    Fixed Break Constraints and UnFreeze so they can be disabled.
    Changed SWEP to auto fire, 0.3 delay primary, 0.6 secondary
    Updated the effect to come from the entity's center of mass.
    Removed Unneeded print's and PrintTable's

    v3.2:
    Added Check Marks for Exclusions will add custom text box for more exclusions later
    Added Health Multiplier Option

    v3.0:
    Fixed Several Bugs dealing with enabling and disabling of things.
    Added Visual Color Damage Effect, can be turned on and off in menu.
    Made a bunch of stuff local, and changed the file name

    v2.7:
    Added PHX Explosives and Explosive Barrel to default exclusions

    NOTE: If there are any more that should be added please post the model or if it's an entity post the class and I'll add them to the list when I get time.

    v2.6:
    Added pdmg_exclusions.lua to the autorun directory
    It has 2 tables, pdmgClassEx and pdmgModelEx if you add
    anything to the tables it will be excluded from taking damages.

    v2.5:
    Added Player Auto Heal
    Added NPC Auto Heal
    Cleaned Up Code A Bit
    Fixed Crash When World Entities Are Killed
    (map entities ( func_ ) now do not receive health)

    v2.3:
    Optimized Code - A Lot of internal Changes
    Added Option to Unfreeze Props at low health

    v2.2:
    Fixed Health Display To Center On Entity
    Changed Text Style and Added Green to Red Fade based on Health
    Added sv_tags ability to code

    v2.1:
    Added Ammo Entity For SWEP

    v2.0:
    Added Auto-Heal
    Added When to show Prop Health
    Added Break Constraints on low health

    v1.5:
    Added Prop heal Swep - Uses Standard Battery Ammo
    Added Options Menu

    v1:
    Released
    -=-=-=-=-=-=-=-=-=-

    And as always any suggestions are appreciated.

    Happy Destruction!
    Reply With Quote Edit / Delete Reply United States Show Events Lua King x 12Winner x 4Lua Helper x 2Dumb x 1Friendly x 1 (list)

  2. Post #2
    zzaacckk's Avatar
    June 2009
    2,152 Posts
    Nice release.

    Also, you sound out of breath throughout the whole video.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 2Zing Zing x 1 (list)

  3. Post #3
    Fantym420's Avatar
    October 2010
    901 Posts
    Nice release.

    Also, you sound out of breath throughout the whole video.
    yea, I was really tired when I made it, it was like 3am or something
    Reply With Quote Edit / Delete Reply United States Show Events Friendly Friendly x 2 (list)

  4. Post #4
    Wunce's Avatar
    May 2010
    267 Posts
    Is there a convar for when the constraints of a prop break?
    Oh cool, I just read it again, that's exactly what I wanted.

  5. Post #5
    Gold Member
    thejjokerr's Avatar
    December 2007
    2,139 Posts
    Nice.

    Though in the video, your voice reminds me of someone:
    Reply With Quote Edit / Delete Reply Netherlands Show Events Funny Funny x 7Friendly Friendly x 1 (list)

  6. Post #6
    Fantym420's Avatar
    October 2010
    901 Posts
    haha, LOL, I.... Don't....... Know...... what you're **WHEEEEZ*** .... Talking about.
    I was getting very frustrated at the fraps demo, it's hard to do a video 30 seconds at a time.

  7. Post #7
    TheBricktop's Avatar
    September 2008
    77 Posts
    Add some better effects on prop destroy, smoke puff or something.

  8. Post #8
    Fantym420's Avatar
    October 2010
    901 Posts
    Add some better effects on prop destroy, smoke puff or something.
    The effects are selectable in the options menu, there's a bunch in the list.

  9. Post #9
    Fantym420's Avatar
    October 2010
    901 Posts
    Updated to v2.1: Added Ammo Entity for Heal SWEP

  10. Post #10
    Fantym420's Avatar
    October 2010
    901 Posts
    Updated to v2.2:
    Fixed Health Display To Center On Entity
    Changed Text Style and Added Green to Red Fade based on Health
    Added sv_tags ability to code

  11. Post #11
    moo
    CowThing's Avatar
    November 2006
    4,833 Posts
    You should use img_thumb tags in the opening post so we can see the pictures, and makes it look more professional.

    eg:
    [img_thumb]http://img258.imageshack.us/img258/7109/gmconstruct0001s.jpg[/img_thumb]
    will make


    And media tags for the youtube video.
    Reply With Quote Edit / Delete Reply United States Show Events Useful Useful x 1 (list)

  12. Post #12
    Fantym420's Avatar
    October 2010
    901 Posts
    I wanted to, but I couldn't find the list of tags availible, so it's img_thumb for images and media for videos?

  13. Post #13
    c-unit's Avatar
    March 2010
    1,685 Posts
    Why don't you code a nospread so you can actually hit the object. You miss like half your shots.

    Edited:

    nice script though

  14. Post #14
    Gold Member
    Covict Joe's Avatar
    June 2008
    227 Posts
    Is it just me, or is this script VERY laggy?

  15. Post #15
    Fantym420's Avatar
    October 2010
    901 Posts
    I was noticing that just last night, i will work on optimizing it over the next couple of days, but my internet at home is down at the moment.

  16. Post #16
    NitronikALT's Avatar
    September 2010
    7,049 Posts
    Is it just me, or is this script VERY laggy?
    what do you mean?

    Also, this script looks really nice

  17. Post #17
    Gold Member
    Covict Joe's Avatar
    June 2008
    227 Posts
    what do you mean?

    Also, this script looks really nice
    on gm_flatgrass I get < 10 fps with this addon enabled and a fin plane I built while i usually get > 60 fps

  18. Post #18
    NitronikALT's Avatar
    September 2010
    7,049 Posts
    on gm_flatgrass I get < 10 fps with this addon enabled and a fin plane I built while i usually get > 60 fps
    Oh, well, maybe the script contains some loops?

    (and thanks for clarification)

  19. Post #19
    Fantym420's Avatar
    October 2010
    901 Posts
    v2.3:
    Optimized Code - A Lot of internal Changes
    Added Option to Unfreeze Props on low health

  20. Post #20
    Gold Member
    elowin's Avatar
    December 2009
    7,967 Posts
    Finally, a good alternative to SPD, and even better too.

  21. Post #21
    Fantym420's Avatar
    October 2010
    901 Posts
    Finally, a good alternative to SPD, and even better too.
    Thank You, I should get my internet back at home tonight, so if anyone has any suggestions for more features or different functionalities I might be up for doin a few more updates.

  22. Post #22
    Gold Member
    dumbfox's Avatar
    October 2008
    944 Posts
    A damn decent job on this, Have a lua king for your work.

  23. Post #23
    Fantym420's Avatar
    October 2010
    901 Posts
    Just noticed a bug or feature, It seems my auto-heal code heals the player as well. I can either remove this all together, or add it as another option. I found it's almost impossible to die if you but the heal on 10 and the interval at 0. If I add it as a feature should it have it's own settings or just use the prop heal settings? If anyone finds any bugs please report them here, thank you and happy destruction.

  24. Post #24
    Brandan's Avatar
    May 2009
    321 Posts
    Own settings.

  25. Post #25
    Fantym420's Avatar
    October 2010
    901 Posts
    v2.5:
    Added Player Auto Heal
    Added NPC Auto Heal
    Cleaned Up Code A Bit
    Fixed Crash When Map Entities Are Killed
    (map entities ( func_ ) now do not receive health)

    If you've found any bugs, or can think of any more features please drop a reply or message my way.
    Thank you, and Happy Destruction!

  26. Post #26
    Gold Member
    elowin's Avatar
    December 2009
    7,967 Posts
    v2.5:
    Added Player Auto Heal
    Added NPC Auto Heal
    Cleaned Up Code A Bit
    Fixed Crash When Map Entities Are Killed
    (map entities ( func_ ) now do not receive health)

    If you've found any bugs, or can think of any more features please drop a reply or message my way.
    Thank you, and Happy Destruction!
    Woot!

  27. Post #27
    Gold Member
    cis.joshb's Avatar
    January 2011
    1,877 Posts
    Do entities have health too? Also you should make it so you can set if this applies to ragdolls, props, or entities in the menu.

    Edited:

    SVN dosen't work.

  28. Post #28
    matt1201's Avatar
    September 2009
    26 Posts
    I found a bug with this. Whenever you kill an npc the ragdoll goes invisible but is still there. If you could fix this that would be great.

  29. Post #29
    Fantym420's Avatar
    October 2010
    901 Posts
    I found a bug with this. Whenever you kill an npc the ragdoll goes invisible but is still there. If you could fix this that would be great.
    I'll look into that as soon as I can

    Edit:

    I Just tried it out, and nothing stays, what other addons do you have installed?

  30. Post #30
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    Can you let us make a list of props that will never receive damage

    for example, Mad Cows Weapons has an incendiary grenade that literally burns itself to death and that's really dumb.

  31. Post #31
    Fantym420's Avatar
    October 2010
    901 Posts
    Can you let us make a list of props that will never receive damage

    for example, Mad Cows Weapons has an incendiary grenade that literally burns itself to death and that's really dumb.
    hmm, good idea, i'll try and implement that.

    Edited:

    Can you let us make a list of props that will never receive damage

    for example, Mad Cows Weapons has an incendiary grenade that literally burns itself to death and that's really dumb.
    You'll have to find the class or model names but, ....

    v2.6:
    Added pdmg_exclusions.lua to the autorun directory
    It has 2 tables, pdmgClassEx and pdmgModelEx if you add
    anything to the tables it will be excluded from taking damages.

  32. Post #32
    Gold Member
    cis.joshb's Avatar
    January 2011
    1,877 Posts
    Do entities have health?

  33. Post #33
    Fantym420's Avatar
    October 2010
    901 Posts
    Do entities have health?
    Some of them do, a lot depends on the entity it self, the way the code works is anything that doesn't have health to start with gets health based of the options (mass & vol). Also if the entity has code in it to stop health loss, it usually won't damage them.

  34. Post #34
    Gold Member
    cis.joshb's Avatar
    January 2011
    1,877 Posts
    Vehicles?

  35. Post #35
    Fantym420's Avatar
    October 2010
    901 Posts
    Vehicles?
    Vehicles are a strange story, they are some odd parented thing (my guess) , like the jeep, if you shoot the seat or close to it, it will take damage, but you can shoot the tires and other parts and no damage, the air boat is similar, and the jaloppy it's the wall behind the seat that takes the damage.

    Edit:

    By all that, I mean the vehicles use no special code, but are somewhat destructible.

  36. Post #36
    Gold Member
    cis.joshb's Avatar
    January 2011
    1,877 Posts
    I think it's because only part of the vehicle has any substance. Like you can't place thrusters on the wheels.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)

  37. Post #37
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    TY so much. This script cured my cancer.
    Reply With Quote Edit / Delete Reply United States Show Events Optimistic Optimistic x 1 (list)

  38. Post #38
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    Shit, explosive barrels and such don't blow up now, they just turn into gibs and sparks

  39. Post #39
    Fantym420's Avatar
    October 2010
    901 Posts
    odd, they blow up for me, maybe you need to add them to the pdmg_exclusions.lua file in the model table, yea, that's what I did, here's the code for it

    pdmg_exclusions.lua
    
    -- This file is for Exclusions to the Damage System
    -- Above each table is an example of how they work
    
    -- The pdmgClassEx table will exclude all listed classes from taking damage from this addon
    --pdmgClassEx = { "npc_grenade_frag", "gmod_thruster"	}
    pdmgClassEx = {}
    
    -- The pdmgModelEx table will exclude all listed models from taking damage from this addon
    --pdmgModelEx = { "models/props_c17/concrete_barrier001a.mdl", "models/props_c17/canister01a.mdl"}
    pdmgModelEx = { "models/props_phx/mk-82.mdl", "models/props_phx/ball.mdl", "models/props_c17/oildrum001_explosive.mdl"}
    
    --
    

    After I get the rest of the explosives in the list i'll commit it to the svn.

  40. Post #40
    Jrose14's Avatar
    May 2010
    2,099 Posts
    odd, they blow up for me, maybe you need to add them to the pdmg_exclusions.lua file in the model table, yea, that's what I did, here's the code for it

    pdmg_exclusions.lua
    
    -- This file is for Exclusions to the Damage System
    -- Above each table is an example of how they work
    
    -- The pdmgClassEx table will exclude all listed classes from taking damage from this addon
    --pdmgClassEx = { "npc_grenade_frag", "gmod_thruster"	}
    pdmgClassEx = {}
    
    -- The pdmgModelEx table will exclude all listed models from taking damage from this addon
    --pdmgModelEx = { "models/props_c17/concrete_barrier001a.mdl", "models/props_c17/canister01a.mdl"}
    pdmgModelEx = { "models/props_phx/mk-82.mdl", "models/props_phx/ball.mdl", "models/props_c17/oildrum001_explosive.mdl"}
    
    --
    

    After I get the rest of the explosives in the list i'll commit it to the svn.
    Please do this soon! Mainly because this seems really nice, and that I have no idea what you just said and what to do with that lua.