Jump to content

Any way to use the EntityDamage variable for CVar calculations?


Recommended Posts

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...

 

<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"/>

Link to comment
Share on other sites

  • 5 months later...
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...

 

<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

Link to comment
Share on other sites

  • 7 months later...
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...

 

<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:

<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:

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.

Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

  • 1 month later...

heres teh right wrench for that... i think

 

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...

 

<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

<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"/>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...