Announcement

Collapse
No announcement yet.

Any way to use the EntityDamage variable for CVar calculations?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Any way to use the EntityDamage variable for CVar calculations?

    This would save me a lot of complication of having to enter in damage values for every weapon and factor in all modifiers. I notice in ui_display.xml, for displaying damage and such, it is able to pull these variables and display them.

    <display_entry name="EntityDamage" title_key="statEntityDamage"/>
    <display_entry name="BlockDamage" title_key="statBlockDamage"/>

    This shows your current damage and block damage post-all perc_add calculations in the in-game character stat menu.

    However there doesn't seem to be a way to pull these values to use in CVar calculations. I've tried adding @, #, and _ infront of EntityDamage and statEntityDamage (think latter is just for localization) and it doesn't seem to be possible. Trying to do something like this...

    Code:
    <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="set" value="1.5"/>
    <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="multiply" value="_EntityDamage"/>

  • #2
    Bumping this once

    Comment


    • #3
      Originally posted by Deceptive Pastry View Post
      This would save me a lot of complication of having to enter in damage values for every weapon and factor in all modifiers. I notice in ui_display.xml, for displaying damage and such, it is able to pull these variables and display them.

      <display_entry name="EntityDamage" title_key="statEntityDamage"/>
      <display_entry name="BlockDamage" title_key="statBlockDamage"/>

      This shows your current damage and block damage post-all perc_add calculations in the in-game character stat menu.

      However there doesn't seem to be a way to pull these values to use in CVar calculations. I've tried adding @, #, and _ infront of EntityDamage and statEntityDamage (think latter is just for localization) and it doesn't seem to be possible. Trying to do something like this...

      Code:
      <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="set" value="1.5"/>
      <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="multiply" value="_EntityDamage"/>
      I am in the early stages of investigating using custom variables and hoping that maybe you figured something out pertaining over the past 6 months? Hoping to get a much better clarity as to what we can do with the ModifyCVar

      Comment


      • #4
        any luck with cvar stuff?
        Last edited by dstevens79; 12-20-2019, 05:21 PM.

        Comment


        • #5
          Originally posted by Deceptive Pastry View Post
          This would save me a lot of complication of having to enter in damage values for every weapon and factor in all modifiers. I notice in ui_display.xml, for displaying damage and such, it is able to pull these variables and display them.

          <display_entry name="EntityDamage" title_key="statEntityDamage"/>
          <display_entry name="BlockDamage" title_key="statBlockDamage"/>

          This shows your current damage and block damage post-all perc_add calculations in the in-game character stat menu.

          However there doesn't seem to be a way to pull these values to use in CVar calculations. I've tried adding @, #, and _ infront of EntityDamage and statEntityDamage (think latter is just for localization) and it doesn't seem to be possible. Trying to do something like this...

          Code:
          <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="set" value="1.5"/>
          <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="multiply" value="_EntityDamage"/>
          I think you're probably reading the XML wrong. Take this for example:
          Code:
          <display_entry name="EntityDamage" title_key="statEntityDamage"/>
          In this tag, "EntityDamage" is the name of that particular display entry. It probably corresponds to a C# class in the code.

          The "statEntityDamage" value is the key used in Localization.txt. You can see it there:
          Code:
          statEntityDamage,UI,Item stat,New,Damage,,,,,
          Neither of these values are either game values or cvars.

          At least, that's how I understand it. I could be wrong.

          EDIT: OK, maybe I am wrong. Many items in items.xml have a property named "EntityDamage" in them. I don't know if they're actually related though.

          If that actually is turned into a game variable, you would reference its value using "#EntityDamage". The "@" and "." symbols are for cvars.

          I was trying to find some kind of list of available game variables, but couldn't find one. The best documentation I could find was in the buffs.xml file comments.
          Last edited by khzmusik; 12-21-2019, 03:12 PM.

          Comment


          • #6
            I saw in the code how there are assigned variables that will be available for xml.
            I think now those variables (like "_EntityDamage") that you want - are not available in this way...
            (but i'm not sure, i'm a beginner)
            I hope the following Alphas will allow it .

            Comment


            • #7
              heres teh right wrench for that... i think

              Originally posted by Deceptive Pastry View Post
              This would save me a lot of complication of having to enter in damage values for every weapon and factor in all modifiers. I notice in ui_display.xml, for displaying damage and such, it is able to pull these variables and display them.

              <display_entry name="EntityDamage" title_key="statEntityDamage"/>
              <display_entry name="BlockDamage" title_key="statBlockDamage"/>

              This shows your current damage and block damage post-all perc_add calculations in the in-game character stat menu.

              However there doesn't seem to be a way to pull these values to use in CVar calculations. I've tried adding @, #, and _ infront of EntityDamage and statEntityDamage (think latter is just for localization) and it doesn't seem to be possible. Trying to do something like this...

              Code:
              <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="set" value="1.5"/>
              <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="multiply" value="_EntityDamage"/>
              hi

              the thing i came here hoping to solve. i solved.

              so i fixed a couple of my cvar not workings by ensuring i added the target="self" to the cvar declaration this makes the cvar local to the character and not global.. and its apparently important the game knows that the cvar sits on the individual and was not global. (i think this is whats happening at least)

              try
              Code:
              <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="set" target="self" value="1.5"/>
              <triggered_effect trigger="onSelfEquipStart" action="ModifyCVar" cvar="EntityDamageHeadshot" operation="multiply" target="self" value="_EntityDamage"/>
              Last edited by dstevens79; 4 weeks ago.

              Comment

              Working...
              X