Do you all remember back in the warcraft 3 editor where if you typed <A000,Dur1> into a tooltip the game would convert it to the duration of the ability A000.
Well I was wondering if the starcraft 2 has an equivilant function that can be used in it's tooltips, I have a popup for resource gain that I want to be changed depending on the value of an effect, I was wondering if there was a way that I can just reference the data on that effect.
I HOPE blizzard put something in, because otherwise this would be very counterproductive.
Ok I just want to make sure I'm being understood correctly, what I'm requesting doesn't involve the trigger editor. I'm trying to edit a piece of text in the DATA editor that pulls information from OTHER parts of the DATA editor. I am not trying to pull information from the data editor to use in triggers, I don't have a use for that at the moment. I will in the future but not at this exact moment.
Are these tutorials to show me what I'm requesting? Because I worry I may have been misunderstood, I just want to see if I'm getting the message across clear enough, because I'm trying to understand what's being said in these tutorials but they seem to be talking about a function used in the trigger editor and I'm getting concerned.
Ok here's basically what I'm asking, I made a custom text actor based off the automated refinery, every few seconds it says +10 minerals have been gained, I have an upgrade that adjust the effect that gives the minerals, however the text actor has a static +10 as it's text so even if I'm gaining different amounts of minerals it will always say +10.
I'm wondering if I can change
Field
CityTextKicker
UI - Text <s val="Kicker_Refinery">+10 </s><IMG path="Assets\Textures\icon-mineral-terran.dds" height="28" width="28"/>
to read from the effect that is increasing the minerals for the player
If you can show me an example, the raw data for the Mineral Income effect is
Field AutoHarvestVespene2 (City - CityIncomeEffectModifyUnit)
CEffectModifyPlayer_Resources (10|0|0|0)
try using the text editor. easier for this kind of stuff, and kinda what it was designed for.
If you look at the built in ones, sorting by text length, you'll see that some of the higher ones use references. You just need to figure out how to reference to it.
probably like the default Effect.AutoHarvestVespene.Resources added into the text field.
I couldn't find any using references, in fact every single one of blizzard's prebuilt abilities and tooltips all have hard coded data. I can't imagine how much of a sweatshop it must have been inputting all this data manually each time an update was made.
Could you show me an example of an area in the text editor referencing an area of the data editor? Right now I am unable to find anything to work on, I just want to know if hardcoding tooltips in the data editor is avoidable.
Awesome, thanks everyone. My faith in blizzard is now restored.
Now why didn't the other guys working on the data editor use this? It would just seem more sensible to use this system over hardcoding, I mean hardcoding is such a... unprofessional form of programming.
Because it's completely undocumented and so most people don't even know it's possible. Also the data paths use the XML field names, not the names used by the editor, so half the time you need to open up the XML files to see how the data relates in order to figure out the path for it. That's a little beyond most people.
Yeah but, all I did was copy the raw data but took off the things before the underscore "_" that's about the only thing I had to do to get this to work.
Course to get it to reference minerals and gas I had to put [Minerals] or [Gas] or something like that. Well at any rate that problem is nice and solved, glad to know this place is full of so many helpful people.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Do you all remember back in the warcraft 3 editor where if you typed <A000,Dur1> into a tooltip the game would convert it to the duration of the ability A000.
Well I was wondering if the starcraft 2 has an equivilant function that can be used in it's tooltips, I have a popup for resource gain that I want to be changed depending on the value of an effect, I was wondering if there was a way that I can just reference the data on that effect.
I HOPE blizzard put something in, because otherwise this would be very counterproductive.
Take a look at the Catalog functions. One should be something like "Get Field Value".
@Klishu: Go
I'm sorry, is that for using the trigger editor?
I want to know if I can type a piece of text in the data editor for a tooltip that updates depending on what an effect's value is.
Can you explain that in a little more detail?
@Zackreaver: Go
Its these function in case you cant find it. It can return a value or set value in the data editor based on object id
http://wiki.sc2mapster.com/galaxy/triggers/category-catalog/
Here's a small tut about it
http://forums.sc2mapster.com/development/tutorials/1250-triggers-catalog-field-value-get-set/
@progammer: Go
Ok I just want to make sure I'm being understood correctly, what I'm requesting doesn't involve the trigger editor. I'm trying to edit a piece of text in the DATA editor that pulls information from OTHER parts of the DATA editor. I am not trying to pull information from the data editor to use in triggers, I don't have a use for that at the moment. I will in the future but not at this exact moment.
Are these tutorials to show me what I'm requesting? Because I worry I may have been misunderstood, I just want to see if I'm getting the message across clear enough, because I'm trying to understand what's being said in these tutorials but they seem to be talking about a function used in the trigger editor and I'm getting concerned.
Ok here's basically what I'm asking, I made a custom text actor based off the automated refinery, every few seconds it says +10 minerals have been gained, I have an upgrade that adjust the effect that gives the minerals, however the text actor has a static +10 as it's text so even if I'm gaining different amounts of minerals it will always say +10.
I'm wondering if I can change
Field CityTextKicker
UI - Text <s val="Kicker_Refinery">+10 </s><IMG path="Assets\Textures\icon-mineral-terran.dds" height="28" width="28"/>
to read from the effect that is increasing the minerals for the player If you can show me an example, the raw data for the Mineral Income effect is
Field AutoHarvestVespene2 (City - CityIncomeEffectModifyUnit) CEffectModifyPlayer_Resources (10|0|0|0)
try using the text editor. easier for this kind of stuff, and kinda what it was designed for. If you look at the built in ones, sorting by text length, you'll see that some of the higher ones use references. You just need to figure out how to reference to it. probably like the default Effect.AutoHarvestVespene.Resources added into the text field.
@cavemaneca: Go
I couldn't find any using references, in fact every single one of blizzard's prebuilt abilities and tooltips all have hard coded data. I can't imagine how much of a sweatshop it must have been inputting all this data manually each time an update was made.
Could you show me an example of an area in the text editor referencing an area of the data editor? Right now I am unable to find anything to work on, I just want to know if hardcoding tooltips in the data editor is avoidable.
Heal (Medic)
Heals a friendly biological target.<n/><n/><c val="f078ff"> Heals <d ref="Effect,heal,RechargeVitalRate"/> life per <d ref="Effect,heal,RechargeVitalRate * Effect,heal,DrainVitalCostFactor"/> energy.</c>
@Nashadun: Go
Awesome, thanks everyone. My faith in blizzard is now restored.
Now why didn't the other guys working on the data editor use this? It would just seem more sensible to use this system over hardcoding, I mean hardcoding is such a... unprofessional form of programming.
Thanks everyone, this is just the info I needed.
Because it's completely undocumented and so most people don't even know it's possible. Also the data paths use the XML field names, not the names used by the editor, so half the time you need to open up the XML files to see how the data relates in order to figure out the path for it. That's a little beyond most people.
@RileyStarcraft: Go
Yeah but, all I did was copy the raw data but took off the things before the underscore "_" that's about the only thing I had to do to get this to work.
Course to get it to reference minerals and gas I had to put [Minerals] or [Gas] or something like that. Well at any rate that problem is nice and solved, glad to know this place is full of so many helpful people.