Zavar 6 Posted May 14, 2022 Hello all, I hope everyone is well. Is there a macro that returns the key name for the damage source? Not sure I'm explaining it properly, {{c:dmg}} returns the color value, is there a macro that instead returns the key name, similar to how {{sys-color-key}} returns the key name and {{c:system}} returns the color value? Thanks for any help, Zavar Quote Share this post Link to post Short link Share on other sites
Kurzdor 372 #517556 Posted May 15, 2022 Hey there. If I understand you well the {{c:dmg-kind}} should help you. Also res_mods\mods\shared_resources\xvm\doc\macros.txt: Quote │ D │ {{dmg-kind}} │ │ │ │ │ X │ │ damage kind (attack, fire, ramming, ...) │ D │ {{dmg-kind-key}} │ │ │ │ │ X │ │ damage kind table key value (shot, fire, ramming, ...) │ D │ {{c:dmg}} │ │ │ │ │ X │ │ color depending on damage source │ D │ {{c:dmg-kind}} │ │ │ │ │ X │ │ color depending on damage kind Quote Share this post Link to post Short link Share on other sites
Zavar 6 #517557 Posted May 15, 2022 It's similar, but not what I was looking for. My understanding is that {{c:dmg-kind}} returns the actual color assigned in colors.xc for the dynamic color by damage kind, i.e. from the dmg_kind: shot, fire, ramming, etc. The {{dmg-kind-key}} returns that actual key name that is being applied for the damage kind instead of the color. I'm looking for the equivalent for the {{c:dmg}} which is based on the damage source i.e. alley, enemy, etc. and returns the color (i.e. ally_enemy_hit -> red). I want an equivalent function say {{dmg-source-key}} to return the key, not the color, so if an alley is shooting and hits an enemy it should return alley_enemy_hit. Quote Share this post Link to post Short link Share on other sites
ktulho 5,710 #517643 Posted May 19, 2022 Added macro {{dmg-color-key}}. 2 Quote Share this post Link to post Short link Share on other sites
Zavar 6 #517649 Posted May 19, 2022 Thank you very much for adding this in ktulho!!! Quote Share this post Link to post Short link Share on other sites