SC2Mapster Forums

Development > Data

Custom Unit Attributes possible?

  • 4 posts
    #1 Nov 04, 2012 at 05:28 UTC - 0 likes

    Each unit has an attribute (light, mechanical, biological, massive, etc) that helps dictate how much damage is dealt to it by various weapon types. Is there a way to add custom attribute types? Or at least a clever way to fake it?

    #2 Nov 04, 2012 at 06:13 UTC - 0 likes
    Quote from bulletbutter: Go

    Each unit has an attribute (light, mechanical, biological, massive, etc) that helps dictate how much damage is dealt to it by various weapon types. Is there a way to add custom attribute types? Or at least a clever way to fake it?

    It's possible but complicated. Probably the easiest route is to use a buff behavior with a combat damage response of 1 that reduces the damage fraction by X amount and a required effect or excluded effect array set to the possible effects. Of course, this isnt very handy if you have a ton of damage effects, but I guess you'd have to set the "attribute modifier" for the weapon damage anyway, so I guess the work involved is the same.

    Ex:
    "Super Light Armored Behavior"
    Combat Damage Response
    - Chance: 1
    - Modify Fraction: 1.4
    Required Effects: Weapon 1 Damage, Weapon 2 Damage, Weapon 3 Damage, etc etc etc

    "Titanium Armor Behavior"
    Combat Damage Response
    - Chance: 1
    - Modify Fraction: 0.3
    Required Effects: Weapon 4 Damage, Weapon 5 Damage, Weapon 6 Damage, etc etc etc

    Last edited Nov 04, 2012 by ckSynergy
    #3 Nov 04, 2012 at 06:19 UTC - 0 likes

    But doing it that way wont make it show up on the units info card. Would I need to just make a custom dialog to get it show up?

    #4 Nov 04, 2012 at 07:57 UTC - 0 likes

    You can only rename existing attributes but not add new ones. I believe the text editor is where to look. There is a whole tutorial on it in the tutorials forum.

  • 4 posts

You must login to post a comment. Don't have an account? Register to get one!