What I'm trying to do is give a unit a life steal ability that returns a % of weapon dmg upon every attack, but the damage of the unit is partially non-hardcoded (as in, based off of buffs / other stuff and is in green text in the UI). I understand I need to use catalog triggers as a workaround, but don't know the first thing about them. Which trigger should I be using and how?
Thanks Bashar... I have a little bit better grasp but am still unsure what am I supposed to be putting in each field of the trigger...
How do I know which of the 51 catalogs i need to use?
Entry i can find easy enough from the effect name in the data editor.
Field Path looks really daunting and I am getting completely lost.
So the first 3 fields are ways of telling the trigger what exactly in the data editor you are trying to access, is that correct? If so, I don't see how I can use the trigger to ultimately make the ability I'm shooting for. Is the implementation of the data editor all through the very last field?
I believe what you are trying to do can be solved data-only.
Make your ability apply a behavior to the caster and modify the field "Vital gained from Damage Dealt - Damage Kind" to the percentage you want (you can differ various damage types like spell or melee and what vitals you want to gain).
Thanks Bashar... I have a little bit better grasp but am still unsure what am I supposed to be putting in each field of the trigger...
How do I know which of the 51 catalogs i need to use?
Entry i can find easy enough from the effect name in the data editor.
Field Path looks really daunting and I am getting completely lost.
So the first 3 fields are ways of telling the trigger what exactly in the data editor you are trying to access, is that correct? If so, I don't see how I can use the trigger to ultimately make the ability I'm shooting for. Is the implementation of the data editor all through the very last field?
Think of it like geography. Catalog is the country, Entry is the city, and Field Path is a house in the city. Field Path is the specific field in the data editor you want to retrieve/modify. For example, if you wanted to change the health of a Terran Marine, Category would be Units, Entry would be Marine, and Field Path would be Max HP. The actual entries are different of course... you need to use the IDs of each. Max HP is something like max_HP. I'm pretty sure if you enable the "View Raw Data" option in the data editor you can see the IDs of the objects you want.
The second tutorial I posted uses the example of using Catalog Field Value Set to change the Zealot's Charge ability to Blink:
Also keep in mind that while you can retrieve just about any catalog value, you can only modify some. The general rule is if you can change it using an upgrade, you can modify it using Catalog Field Set.
That actually would only work if I only want to consider damage that is coded right into the unit for the life steal (ie, the white numbers in the unit UI). Damage from behaviors and veterancy ("plus" green numbers) are not considered when making the calculation of how much to steal, hence my complicated problem :(
Awesome analogy. I definitely "get" the whole catalog thing now, but I'm not sure how to apply it to a unit for life steal. So I'd make the lifesteal behavior, then apply it through the catalog trigger, correct? If so, will my lifesteal behavior (passive ability) have to overwrite another ability, such as in the charge to blink example? So I have to make a dummy ability that is then overwritten, right?
And through this, the problem I just noted to Talon will be avoided?
Trying to wrap my head around this whole crazy thing. Thanks a ton for the help.
My first instinct is that you should be able to use Catalog Field Value Set to overwrite blank fields, so theoretically that should apply to an empty ability array slot. You would just need to know which array slot to modify. In the example I gave, Charge is in slot #5, which is why "AbilArray[5].Link" was written. All the function does is modify the related XML file, after all. Haven't tested it myself, though.
OK so my life steal ability takes into account two damage values: the overall damage of the unit itself + dmg gained from veterancy.
So I need two trigger actions that are "Catalog Field Value Set" to set the overall damage and the veterancy damage to catalog variables, right? Then I have to add these two catalogs somehow (using either the Catalog Link Replacement or the Catalog Link Replace trigger, not sure which one), then I have to replace that added value with another Catalog right?
Why don't you just use Catalog Field Value Get to find the damage + veterancy damage, then add those two values together and multiply by whatever the lifesteal % is to get the recovery amount, and finally add that amount to the attacking unit's current HP with each strike?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
What I'm trying to do is give a unit a life steal ability that returns a % of weapon dmg upon every attack, but the damage of the unit is partially non-hardcoded (as in, based off of buffs / other stuff and is in green text in the UI). I understand I need to use catalog triggers as a workaround, but don't know the first thing about them. Which trigger should I be using and how?
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
I wonder about that...what can these mystic calalog triggers do? I only use catalog set and it has no function on life steal ability
@zenx1: Go
The catalog triggers somehow communicate with the data editor based on what's going on in game.... just not sure how!
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
Field Value Get
Another tutorial
Thanks Bashar... I have a little bit better grasp but am still unsure what am I supposed to be putting in each field of the trigger...
How do I know which of the 51 catalogs i need to use?
Entry i can find easy enough from the effect name in the data editor.
Field Path looks really daunting and I am getting completely lost.
So the first 3 fields are ways of telling the trigger what exactly in the data editor you are trying to access, is that correct? If so, I don't see how I can use the trigger to ultimately make the ability I'm shooting for. Is the implementation of the data editor all through the very last field?
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
I believe what you are trying to do can be solved data-only.
Make your ability apply a behavior to the caster and modify the field "Vital gained from Damage Dealt - Damage Kind" to the percentage you want (you can differ various damage types like spell or melee and what vitals you want to gain).
Think of it like geography. Catalog is the country, Entry is the city, and Field Path is a house in the city. Field Path is the specific field in the data editor you want to retrieve/modify. For example, if you wanted to change the health of a Terran Marine, Category would be Units, Entry would be Marine, and Field Path would be Max HP. The actual entries are different of course... you need to use the IDs of each. Max HP is something like max_HP. I'm pretty sure if you enable the "View Raw Data" option in the data editor you can see the IDs of the objects you want.
The second tutorial I posted uses the example of using Catalog Field Value Set to change the Zealot's Charge ability to Blink:
CatalogFieldValueSet (c_gameCatalogUnit, "Zealot", "AbilArray[5].Link, 1, "Blink");
Also keep in mind that while you can retrieve just about any catalog value, you can only modify some. The general rule is if you can change it using an upgrade, you can modify it using Catalog Field Set.
@Talon0815: Go
That actually would only work if I only want to consider damage that is coded right into the unit for the life steal (ie, the white numbers in the unit UI). Damage from behaviors and veterancy ("plus" green numbers) are not considered when making the calculation of how much to steal, hence my complicated problem :(
@BasharTeg: Go
Awesome analogy. I definitely "get" the whole catalog thing now, but I'm not sure how to apply it to a unit for life steal. So I'd make the lifesteal behavior, then apply it through the catalog trigger, correct? If so, will my lifesteal behavior (passive ability) have to overwrite another ability, such as in the charge to blink example? So I have to make a dummy ability that is then overwritten, right?
And through this, the problem I just noted to Talon will be avoided?
Trying to wrap my head around this whole crazy thing. Thanks a ton for the help.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
@Bilxor: Go
My first instinct is that you should be able to use Catalog Field Value Set to overwrite blank fields, so theoretically that should apply to an empty ability array slot. You would just need to know which array slot to modify. In the example I gave, Charge is in slot #5, which is why "AbilArray[5].Link" was written. All the function does is modify the related XML file, after all. Haven't tested it myself, though.
@BasharTeg: Go
OK so my life steal ability takes into account two damage values: the overall damage of the unit itself + dmg gained from veterancy.
So I need two trigger actions that are "Catalog Field Value Set" to set the overall damage and the veterancy damage to catalog variables, right? Then I have to add these two catalogs somehow (using either the Catalog Link Replacement or the Catalog Link Replace trigger, not sure which one), then I have to replace that added value with another Catalog right?
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
Why don't you just use Catalog Field Value Get to find the damage + veterancy damage, then add those two values together and multiply by whatever the lifesteal % is to get the recovery amount, and finally add that amount to the attacking unit's current HP with each strike?