• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] new native 1.31

Status
Not open for further replies.
Level 4
Joined
Aug 2, 2015
Messages
63
Code:
native BlzSetAbilityStringField                    takes ability whichAbility, abilitystringfield whichField, string value returns boolean
native BlzSetAbilityStringLevelArrayField          takes ability whichAbility, abilitystringlevelarrayfield whichField, integer level, integer index, string value returns boolean
native BlzSetAbilityStringLevelField               takes ability whichAbility, abilitystringlevelfield whichField, integer level, string value returns boolean
how to use these code and what the function??
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
Look at the GUI equivalent functions, then convert them to JASS to see what arguments they use. This is the easiest way to learn how they're used. They alter spell data for a particular unit so you can change damage, range, buff, etc. dynamically.
 
Level 4
Joined
Aug 2, 2015
Messages
63
Look at the GUI equivalent functions, then convert them to JASS to see what arguments they use. This is the easiest way to learn how they're used. They alter spell data for a particular unit so you can change damage, range, buff, etc. dynamically.
ok, thank for your suggestion and i will try it
 
Level 4
Joined
Aug 2, 2015
Messages
63
Code:
call BlzSetAbilityStringLevelFieldBJ(BlzGetUnitAbility(c,udg_AbilityIdQ[i]),ABILITY_SLF_TOOLTIP_LEARN,GetUnitAbilityLevel(c,udg_AbilityIdQ[i])-1,"test")
call BlzSetAbilityStringLevelFieldBJ(BlzGetUnitAbility(c,udg_AbilityIdQ[i]),ABILITY_SLF_TOOLTIP_LEARN_EXTENDED,GetUnitAbilityLevel(c,udg_AbilityIdQ[i])-1,"test")
call BlzSetAbilityStringLevelFieldBJ(BlzGetUnitAbility(c,udg_AbilityIdQ[i]),ABILITY_SLF_TOOLTIP_NORMAL,GetUnitAbilityLevel(c,udg_AbilityIdQ[i])-1,"test")
call BlzSetAbilityStringLevelFieldBJ(BlzGetUnitAbility(c,udg_AbilityIdQ[i]),ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED,GetUnitAbilityLevel(c,udg_AbilityIdQ[i])-1,"test")
call BlzSetAbilityStringLevelFieldBJ(BlzGetUnitAbility(c,udg_AbilityIdQ[i]),ABILITY_SLF_TOOLTIP_TURN_OFF,GetUnitAbilityLevel(c,udg_AbilityIdQ[i])-1,"test")
call BlzSetAbilityStringLevelFieldBJ(BlzGetUnitAbility(c,udg_AbilityIdQ[i]),ABILITY_SLF_TOOLTIP_TURN_OFF_EXTENDED,GetUnitAbilityLevel(c,udg_AbilityIdQ[i])-1,"test")
it doesn't work , i use it like that but no string are changed or get altered in game :(
udg_Abilityidq refers to the ability i want to change
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
You want to use these functions for spell tooltips, not that:
JASS:
native BlzSetAbilityTooltip                        takes integer abilCode, string tooltip, integer level returns nothing
native BlzSetAbilityActivatedTooltip               takes integer abilCode, string tooltip, integer level returns nothing
native BlzSetAbilityExtendedTooltip                takes integer abilCode, string extendedTooltip, integer level returns nothing
native BlzSetAbilityActivatedExtendedTooltip       takes integer abilCode, string extendedTooltip, integer level returns nothing
native BlzSetAbilityResearchTooltip                takes integer abilCode, string researchTooltip, integer level returns nothing
native BlzSetAbilityResearchExtendedTooltip        takes integer abilCode, string researchExtendedTooltip, integer level returns nothing
native BlzGetAbilityTooltip                        takes integer abilCode, integer level returns string
native BlzGetAbilityActivatedTooltip               takes integer abilCode, integer level returns string
native BlzGetAbilityExtendedTooltip                takes integer abilCode, integer level returns string
native BlzGetAbilityActivatedExtendedTooltip       takes integer abilCode, integer level returns string
native BlzGetAbilityResearchTooltip                takes integer abilCode, integer level returns string
native BlzGetAbilityResearchExtendedTooltip        takes integer abilCode, integer level returns string
They do, however, change it for all units that have the ability.
 
Level 4
Joined
Aug 2, 2015
Messages
63
then, what the function of and how to use these arguments
Code:
ABILITY_SLF_TOOLTIP_LEARN
ABILITY_SLF_TOOLTIP_LEARN_EXTENDED
ABILITY_SLF_TOOLTIP_NORMAL
ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED
ABILITY_SLF_TOOLTIP_TURN_OFF
ABILITY_SLF_TOOLTIP_TURN_OFF_EXTENDED
and why when i use debug msg for this
Code:
native BlzGetAbilityStringLevelField               takes ability whichAbility, abilitystringlevelfield whichField, integer level returns string
it returns the string of the ability tooltip?
 
Status
Not open for further replies.
Top