But I tested that calculation out in the 'Formula Editor', and as such it removes the <d ref= "" /> tags. Therefore, simply pasting that into the tooltip field will show "Effect,TimeOrbPersistent,PeriodicPeriodArray[0] * Effect,TimeOrbPersistent,PeriodCount[0]" as plain text.
Question 1: What is the xml / starcraft 2 convention for converting the 'math' back into 'text'? Ie. How can I display the outcome of a mathematical function in a tooltip?
Question 2: What is the 'array' value at the end of every example posted above? eg: "ObjectType,ObjectName,FieldValue[array value]" ? What specifically does that point to? Are abilities/effects/etc able to be given 'levels'? Or does this refer to 'upgrades'? Or are all effects/abilities duplicated per player (to allow for upgrades etc?)
Thanks for your time - I'd like to get this knowledge asap since it's sort of integral to the progress of my map :p.
If you view raw data on any field in the data editor you can see the array of values. Ie for some behaviors that give regen, health regen might be [0] and energy regen might be [1] for the regen field.
Well, I made a tutorial that has many examples FYI.
1: you make calculations within the "", just by using the usual arithmetic symbols. Example tooltip:
Deals <d ref="Effect,PoisonDamage,Amount * Behavior,Poison,Period"/> damage and slows by <d ref="100 - (100*Behavior,Poison,Modification.MoveSpeedMultiplier)"/> %
2.:Many fields in the data editor hold multiple values. Examples include levelable abilities, which hold multiple cost and effect values, vital values, where 0 is life, 1 is shields and 2 energy, or persistent effects, which can hold multiple values for period duration, effects, offsets...
For example, to adress the first used effect of a persistent, you cannot just reference the PeriodicEffectArray, without specifying, which effect you mean. So you need to use <d ref="Effect,MyPersisent,PeriodicEffectArray[0]"/>
So, without wanting to go any further without testing this... Say now 4 players each have the same unit, with the same abilities. But players 1 and 2 use upgrades so that their abilities have lower cooldowns. Players 3 and 4 use upgrades which increase energy cost and damage. Will the tooltips reflect individual values modified per player per their unique upgrade choices?
Anyone? I've created like 20 abilities and 3 units all with swanky tool-tips with the idea of customising abilities through extensive upgrades. If I need to re-work the way the tooltip's are displayed I'd like to know sooner rather than later xD
So, without wanting to go any further without testing this... Say now 4 players each have the same unit, with the same abilities. But players 1 and 2 use upgrades so that their abilities have lower cooldowns. Players 3 and 4 use upgrades which increase energy cost and damage. Will the tooltips reflect individual values modified per player per their unique upgrade choices?
Yup, what Kueken531 said. Although I have not seen it, I would assume based on Blizzard's modified C# syntax that their is a hidden array for each player in the current game. Then I would think that the XML takes the information from the data stored in the C# array, which seems like an odd way of going about it, but I haven't seen the player data stored in the XML files.
If anyone can prove me wrong here, please do, because that is truly, 100%, an educated guess.
Thats great news. Thanks again for the speedy as always responses. I can get back to making Graviton Spider Mines and Time Bubble abilities safe in the knowledge that their tooltips will look nice :D
I'll probably post a map work-in-progress thread once I have a few more things fleshed out. Thanks again.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Okay:
You can display a value from any field in the data editor in the tooltip using this format:
<d ref="Behavior,LethalFury,Duration[0]"/>
<d ref="Behavior,Lethalfury,Modification[0].DeathResponse[0].Cost[0].Cooldown[0].TimeUse[0]"/>
<d ref="Behavior,LethalFury,Modification[0].AttackSpeedMultiplier[0]" precision="3"/>
It works for effects also, as such:
<d ref="Effect,TimeOrbSearch,AreaArray[0].Radius[0]"/>
<d ref="Effect,RepeatedBlows,Chance[0]" precision="3"/>
From what I understand, it's simply a data editor reference, pointing at a field value? Am i rite?
The first problem I'm encountering is how to display a derived value - ie. two field values multiplied together.
For example this:
Effect,TimeOrbPersistent,PeriodicPeriodArray[0] * Effect,TimeOrbPersistent,PeriodCount[0]
will translate to
0.0012 * 6000
Resulting in 7.2
But I tested that calculation out in the 'Formula Editor', and as such it removes the <d ref= "" /> tags. Therefore, simply pasting that into the tooltip field will show "Effect,TimeOrbPersistent,PeriodicPeriodArray[0] * Effect,TimeOrbPersistent,PeriodCount[0]" as plain text.
Question 1: What is the xml / starcraft 2 convention for converting the 'math' back into 'text'? Ie. How can I display the outcome of a mathematical function in a tooltip?
Question 2: What is the 'array' value at the end of every example posted above? eg: "ObjectType,ObjectName,FieldValue[array value]" ? What specifically does that point to? Are abilities/effects/etc able to be given 'levels'? Or does this refer to 'upgrades'? Or are all effects/abilities duplicated per player (to allow for upgrades etc?)
Thanks for your time - I'd like to get this knowledge asap since it's sort of integral to the progress of my map :p.
@Nardival: Go
If you view raw data on any field in the data editor you can see the array of values. Ie for some behaviors that give regen, health regen might be [0] and energy regen might be [1] for the regen field.
Well, I made a tutorial that has many examples FYI.
http://forums.sc2mapster.com/resources/tutorials/17879-data-button-tooltip-referencing/#p1
1: you make calculations within the "", just by using the usual arithmetic symbols. Example tooltip:
Deals <d ref="Effect,PoisonDamage,Amount * Behavior,Poison,Period"/> damage and slows by <d ref="100 - (100*Behavior,Poison,Modification.MoveSpeedMultiplier)"/> %
2.:Many fields in the data editor hold multiple values. Examples include levelable abilities, which hold multiple cost and effect values, vital values, where 0 is life, 1 is shields and 2 energy, or persistent effects, which can hold multiple values for period duration, effects, offsets...
For example, to adress the first used effect of a persistent, you cannot just reference the PeriodicEffectArray, without specifying, which effect you mean. So you need to use <d ref="Effect,MyPersisent,PeriodicEffectArray[0]"/>
Thanks for the replies.
So, without wanting to go any further without testing this... Say now 4 players each have the same unit, with the same abilities. But players 1 and 2 use upgrades so that their abilities have lower cooldowns. Players 3 and 4 use upgrades which increase energy cost and damage. Will the tooltips reflect individual values modified per player per their unique upgrade choices?
@Nardival: Go
Bumpedy bump.
Anyone? I've created like 20 abilities and 3 units all with swanky tool-tips with the idea of customising abilities through extensive upgrades. If I need to re-work the way the tooltip's are displayed I'd like to know sooner rather than later xD
This is correct.
@Nardival:
Yup, what Kueken531 said. Although I have not seen it, I would assume based on Blizzard's modified C# syntax that their is a hidden array for each player in the current game. Then I would think that the XML takes the information from the data stored in the C# array, which seems like an odd way of going about it, but I haven't seen the player data stored in the XML files.
If anyone can prove me wrong here, please do, because that is truly, 100%, an educated guess.
Great to be back and part of the community again!
@Kueken531: Go
Thats great news. Thanks again for the speedy as always responses. I can get back to making Graviton Spider Mines and Time Bubble abilities safe in the knowledge that their tooltips will look nice :D
I'll probably post a map work-in-progress thread once I have a few more things fleshed out. Thanks again.