I'm looking for a function that pulls the number of built interceptors of each carrier unit on the map. Is there a way to do this? I know that there's a "catalog_value_get" function but as far I understood it, it only checks general unit values and not actual values of each unit instance on the map. But if I'm wrong please do correct me.
The marine shield upgrade does have the points I mentioned above.
First of all, there is an ability of type research, its called "Tech Lab Research (Barracks)". If you look under Ability - info+ and then the second upgrade, you find the shield upgrade. It has a requirement "Learn Shield Wall", which prevents you from researching it more then once. Also, there is an upgrade, "Marine - Combat Shield". Under the Upgrade - Effects+ field of the upgrade you can see that it adds 10 health to marines.
Ok, I found it. I was looking for an actual ability called "Combat Shiled". I didn't know that it's part of the TechLab(Barracks) ability. Looks like that's how things work with all the upgrades that do not give units a clickable button. Similar to the Combat Shield, the Zergling upgrades for speed and attack speed are part of the spawning pool research ability. I see, I see...
Quote:
As for the CatalogFieldValueSet function.. Lets take an example - say I want to make the marine hit for an extra 5 damage vs light targets.
Then I need to edit the damage effect for the marine, so the first parameter will be c_gameCatalogEffect. The second parmeter is the identifier of the damage effect (the "Marine - Gauss Rifle (Damage)" effect). If you double click on that effect, you see the field ID, so the second parameter is "Marine".
The thrid parameter is the name of the field we want to edit. If you don't know the name of the field, you can change it to something other then the default - lets change it to 5. Then save the map and open it with an MPQ editor. You then look for the file Base.SC2Data/GameData/EffectData.xml This file contains a list of the custom settings you have made in the effect tab of the data editor. Look for <CEffectDamage id="Marine">, here we find a line called <AttributeBonus index="Light" value="5"/>, this means that our 3rd parameter becoms "AttributeBonus[Light]". The 4th parameter is the player you want to change this for, and the last parameter is our value, 5 as a string, so "5".
CatalogFieldValueSet(c_gameCatalogEffect, "Marine", "AttributeBonus[Light]", 1, "5");
or in gui: Catalog - Set value of Effects "Marine" "AttributeBonus[Light]" for player 1 to "5"
Great step-by-step guide. Can't get any clearer than that.
Once again, thanks for taking the time. Really appreciated! : )
Similar to setting armor and damage upgrades, talents and spells can be activated by this action, too. By setting the talent "Marine - Combat Shield" to upgrade level "1", all marines now have the correct model AND the correct amount of HP. The devil is in the details...
Never the less, I actually did spend some time with the data editor and I think I now have a pretty good idea of how upgrades work. But there are still some little things I'm not 100% sure of. For example: Again the Marine Shield. There is no ability connected to this upgrade. Why is that? Because it's not really an ability that can be used (like StimPack) but more of a stat buff? And likewise, the Marine Shield does not have a requirement either. Is that because requirements can only be set for abilities?
I have another question concerning the "CatalogFieldValueSet" function. Does this function have to implemented by actually writing code? While I found the function in the trigger editor I was not able to find appopriate presets or functions for the "Entry" and "Field Patch" parameters.
In the end, I would like to simulate the in-game effect (i.e. what happens when the shield upgrade is done being researched) just by the press of a button.
Once I'm back home, I'll dig deeper into the data editor and try to understand, what you've explained above. I'll let you know how it worked out. But be prepared for a pile of questions. ^_^
I'm trying to allow and disallow unit upgrades via triggers. At first it seemed easy. Just by adding the action "Tech tree - Disable tech tree requirements" all unit upgrades (Blink, StimPack, etc.) became available. But certain upgrades were not applied, the speed upgrade for the Reaper, for example. I checked several threads here in the forums and learned that there's more to unit upgrades than I previously thought. And it seems to be quite complicated...
So, could someone please explain to me how unit abilities are defined within the data editor? I got the impression there's a lot of cross-referencing and checking of certain requirements going on, and I just can't wrap my head around it...
So, let's say I want to buff my marines with the shield upgrade. When triggering the "Tech tree - Disable tech tree requirements" action all newly spawned marines will carry a shield, but their hit points will not have increased. However, if I research that upgrade via TechLab, it works as it's supposed to. I guess that upgrade requires some kind of condition that is not fullfilled just by the action mentioned above. What am I missing here?
0
@Molsterr: Go
Hi Molster,
it worked. Thanks a bunch! ^_^
0
Hi everybody,
I'm looking for a function that pulls the number of built interceptors of each carrier unit on the map. Is there a way to do this? I know that there's a "catalog_value_get" function but as far I understood it, it only checks general unit values and not actual values of each unit instance on the map. But if I'm wrong please do correct me.
Thx a lot, schnelge
0
Ok, I found it. I was looking for an actual ability called "Combat Shiled". I didn't know that it's part of the TechLab(Barracks) ability. Looks like that's how things work with all the upgrades that do not give units a clickable button. Similar to the Combat Shield, the Zergling upgrades for speed and attack speed are part of the spawning pool research ability. I see, I see...
Great step-by-step guide. Can't get any clearer than that.
Once again, thanks for taking the time. Really appreciated! : )
Cheers!
0
D'oh...I found what I was looking for...
Similar to setting armor and damage upgrades, talents and spells can be activated by this action, too. By setting the talent "Marine - Combat Shield" to upgrade level "1", all marines now have the correct model AND the correct amount of HP. The devil is in the details...
Never the less, I actually did spend some time with the data editor and I think I now have a pretty good idea of how upgrades work. But there are still some little things I'm not 100% sure of. For example: Again the Marine Shield. There is no ability connected to this upgrade. Why is that? Because it's not really an ability that can be used (like StimPack) but more of a stat buff? And likewise, the Marine Shield does not have a requirement either. Is that because requirements can only be set for abilities?
I have another question concerning the "CatalogFieldValueSet" function. Does this function have to implemented by actually writing code? While I found the function in the trigger editor I was not able to find appopriate presets or functions for the "Entry" and "Field Patch" parameters.
Cheers and thanks again for taking the time! ^_^
0
Hi SBeier,
thanks for your elaborate reply.
In the end, I would like to simulate the in-game effect (i.e. what happens when the shield upgrade is done being researched) just by the press of a button.
Once I'm back home, I'll dig deeper into the data editor and try to understand, what you've explained above. I'll let you know how it worked out. But be prepared for a pile of questions. ^_^
Cheers!
0
Hi everybody,
I'm trying to allow and disallow unit upgrades via triggers. At first it seemed easy. Just by adding the action "Tech tree - Disable tech tree requirements" all unit upgrades (Blink, StimPack, etc.) became available. But certain upgrades were not applied, the speed upgrade for the Reaper, for example. I checked several threads here in the forums and learned that there's more to unit upgrades than I previously thought. And it seems to be quite complicated...
So, could someone please explain to me how unit abilities are defined within the data editor? I got the impression there's a lot of cross-referencing and checking of certain requirements going on, and I just can't wrap my head around it...
So, let's say I want to buff my marines with the shield upgrade. When triggering the "Tech tree - Disable tech tree requirements" action all newly spawned marines will carry a shield, but their hit points will not have increased. However, if I research that upgrade via TechLab, it works as it's supposed to. I guess that upgrade requires some kind of condition that is not fullfilled just by the action mentioned above. What am I missing here?
Cheers and thx for your help! ^_^