1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Producer Update: Natives List

Discussion in 'Patch & Reforged Discussion' started by Kam, Dec 7, 2017.

  1. Raised

    Raised

    Joined:
    May 8, 2016
    Messages:
    58
    Resources:
    0
    Resources:
    0
    I've enhanced my list on page 12.

    These natives are broken:

    Code (vJASS):
    native SetTerrainFog takes real a, real b, real c, real d, real e returns nothing //This simply does not work. A lack of information in common.j

    native SetTerrainFogEx integer style, real zstart, real zend, real density, real red, real green, real blue returns nothing //Density parameter doesn't affect anything. Exponential fog is completely broken, so the style other than 0 breaks the fog.
     
    Last edited: Mar 29, 2018
  2. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,317
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Code (vJASS):
    native TrigUnitAbilCd takes unit WhichUnit, integer AbilId returns nothing
    //Triggers a unit's ability cooldown, useful for passive abilities mostly.
    native IsPathBlocked takes real x, real y, real x2, real y2 returns boolean
    //Checks if path is blocked between these two locations.
     
  3. DracoL1ch

    DracoL1ch

    Joined:
    Dec 12, 2010
    Messages:
    2,040
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    1. not every ability has cooldown support at all, cannot be maintained for passives properly. adding isn't quite obvious as nobody has the listings
    2. without stating pathing types its worthless too
     
  4. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,317
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    True, was too lazy for that x)
    Code (vJASS):
    native IsPathBlocked takes real x, real y, real x2, real y2, pathingtype WhichPath returns boolean
     
    I also thought about new ones:
    Code (vJASS):
    EVENT_DESTRUCTIBLE_ATTACKED //similar to units
    EVENT_DESTRUCTIBLE_TAKES_DAMAGE // similar to units
    EVENT_UNIT_HEALED // this should be some way "in contact or linked" to EVENT_UNIT_DAMAGED if the amount of damage is negative, meaning it heals
    EVENT_PLAYER_TRADE_GOLD // triggers when a player shares gold
    EVENT_PLAYER_TRADE_LUMBER // triggers when a player shares lumber
    EVENT_PLAYER_TRADE_ANY // triggers when a player shares either gold or lumber
    native GetTriggerPlayer takes nothing returns player
    //only added this here to say that this should be the event response for the player who shared resources
    native GetReceivedPlayer takes nothing returns player
    // gets the player who received the resources from another player
    native UnitHasBuff takes unit whichUnit, integer buffcode returns boolean
    //I know we already have UnitHasBuffBJ but it is proven to be unefficient because the buff is lost after a unit dying, so it must be redone
    native SetUnitBuildTime takes unit Whichunit, integer time returns nothing
    //Someone suggested GetUnitBuildTime and GetUnitBuildingProgress
    //So we also should be able to set the unit building time
    native GetUnitBuildTimeByIdEx takes integer UnitId time returns integer
    //Get original unit building time
    native SetHeroBuildTime takes unit Whichunit, integer time returns nothing
    //Same for heroes
    native GetHeroBuildTimeByIdEx takes integer HeroId time returns integer
    //Same for heroes
    native TriggerSleepAction takes integer timeout returns nothing
    //If possible, fix this native so all folks can be reliefed with an accurate wait
    native GetUnitCurrentAnimationById takes unit WhichUnit returns integer
    //self-explanatory
    native GetUnitCurrentAnimation takes unit WhichUnit returns string
    //self-explanatory
    native HasUnitAnimEnded takes unit WhichUnit returns boolean
    //checks if the unit's current animation ended, even if it loops
     
    Last edited: Apr 4, 2018
  5. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,721
    Resources:
    37
    Tools:
    2
    Maps:
    3
    Spells:
    11
    Tutorials:
    20
    JASS:
    1
    Resources:
    37
    1.29 was released and almost all new natives from the test version were renamed.
    Here a new list:
    Code (vJASS):


    // Automation Test
    native AutomationTestStart takes string testName returns nothing
    native AutomationTestEnd takes string testName returns nothing

    // JAPI Functions
    native BlzGetTriggerPlayerMouseX                   takes nothing returns real
    native BlzGetTriggerPlayerMouseY                   takes nothing returns real
    native BlzGetTriggerPlayerMousePosition            takes nothing returns location
    native BlzGetTriggerPlayerMouseButton              takes nothing returns mousebuttontype
    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
    native BlzSetAbilityIcon                           takes integer abilCode, string iconPath returns nothing
    native BlzGetAbilityIcon                           takes integer abilCode returns string
    native BlzSetAbilityActivatedIcon                  takes integer abilCode, string iconPath returns nothing
    native BlzGetAbilityActivatedIcon                  takes integer abilCode returns string
    native BlzGetAbilityPosX                           takes integer abilCode returns integer
    native BlzGetAbilityPosY                           takes integer abilCode returns integer
    native BlzSetAbilityPosX                           takes integer abilCode, integer x returns nothing
    native BlzSetAbilityPosY                           takes integer abilCode, integer y returns nothing
    native BlzGetAbilityActivatedPosX                  takes integer abilCode returns integer
    native BlzGetAbilityActivatedPosY                  takes integer abilCode returns integer
    native BlzSetAbilityActivatedPosX                  takes integer abilCode, integer x returns nothing
    native BlzSetAbilityActivatedPosY                  takes integer abilCode, integer y returns nothing
    native BlzGetUnitMaxHP                             takes unit whichUnit returns integer
    native BlzSetUnitMaxHP                             takes unit whichUnit, integer hp returns nothing
    native BlzGetUnitMaxMana                           takes unit whichUnit returns integer
    native BlzSetUnitMaxMana                           takes unit whichUnit, integer mana returns nothing
    native BlzDeleteHeroAbility                        takes unit whichUnit, integer abilCode returns nothing
    native BlzSetItemName                              takes item whichItem, string name returns nothing
    native BlzSetItemDescription                       takes item whichItem, string name returns nothing
    native BlzGetItemDescription                       takes item whichItem returns string
    native BlzSetItemTooltip                           takes item whichItem, string name returns nothing
    native BlzGetItemTooltip                           takes item whichItem returns string
    native BlzSetItemExtendedTooltip                   takes item whichItem, string name returns nothing
    native BlzGetItemExtendedTooltip                   takes item whichItem returns string
    native BlzSetItemIconPath                          takes item whichItem, string name returns nothing
    native BlzGetItemIconPath                          takes item whichItem returns string
    native BlzSetUnitName                              takes unit whichUnit, string name returns nothing
    native BlzSetHeroProperName                        takes unit whichUnit, string name returns nothing
    native BlzGetUnitBaseDamage                        takes unit whichUnit, integer weaponIndex returns integer
    native BlzSetUnitBaseDamage                        takes unit whichUnit, integer baseDamage, integer weaponIndex returns nothing
    native BlzGetUnitDiceNumber                        takes unit whichUnit, integer weaponIndex returns integer
    native BlzSetUnitDiceNumber                        takes unit whichUnit, integer diceNumber, integer weaponIndex returns nothing
    native BlzGetUnitDiceSides                         takes unit whichUnit, integer weaponIndex returns integer
    native BlzSetUnitDiceSides                         takes unit whichUnit, integer diceSides, integer weaponIndex returns nothing
    native BlzGetUnitAttackCooldown                    takes unit whichUnit, integer weaponIndex returns real
    native BlzSetUnitAttackCooldown                    takes unit whichUnit, real cooldown, integer weaponIndex returns nothing
    native BlzSetSpecialEffectColorByPlayer            takes effect whichEffect, player whichPlayer returns nothing
    native BlzSetSpecialEffectColor                    takes effect whichEffect, integer r, integer g, integer b returns nothing
    native BlzSetSpecialEffectAlpha                    takes effect whichEffect, integer alpha returns nothing
    native BlzSetSpecialEffectScale                    takes effect whichEffect, real scale returns nothing
    native BlzSetSpecialEffectPosition                 takes effect whichEffect, real x, real y, real z returns nothing
    native BlzSetSpecialEffectHeight                   takes effect whichEffect, real height returns nothing
    native BlzSetSpecialEffectTimeScale                takes effect whichEffect, real timeScale returns nothing
    native BlzSetSpecialEffectTime                     takes effect whichEffect, real time returns nothing
    native BlzSetSpecialEffectOrientation              takes effect whichEffect, real yaw, real pitch, real roll returns nothing
    native BlzSetSpecialEffectYaw                      takes effect whichEffect, real yaw returns nothing
    native BlzSetSpecialEffectPitch                    takes effect whichEffect, real pitch returns nothing
    native BlzSetSpecialEffectRoll                     takes effect whichEffect, real roll returns nothing
    native BlzSetSpecialEffectX                        takes effect whichEffect, real x returns nothing
    native BlzSetSpecialEffectY                        takes effect whichEffect, real y returns nothing
    native BlzSetSpecialEffectZ                        takes effect whichEffect, real z returns nothing
    native BlzSetSpecialEffectPositionLoc              takes effect whichEffect, location loc returns nothing
    native BlzGetLocalSpecialEffectX                   takes effect whichEffect returns real
    native BlzGetLocalSpecialEffectY                   takes effect whichEffect returns real
    native BlzGetLocalSpecialEffectZ                   takes effect whichEffect returns real
    native BlzGetUnitArmor                             takes unit whichUnit returns real
    native BlzSetUnitArmor                             takes unit whichUnit, real armorAmount returns nothing
    native BlzUnitHideAbility                          takes unit whichUnit, integer abilId, boolean flag returns nothing
    native BlzUnitDisableAbility                       takes unit whichUnit, integer abilId, boolean flag, boolean hideUI returns nothing
    native BlzUnitCancelTimedLife                      takes unit whichUnit returns nothing
    native BlzIsUnitSelectable                         takes unit whichUnit returns boolean
    native BlzIsUnitInvulnerable                       takes unit whichUnit returns boolean
    native BlzUnitInterruptAttack                      takes unit whichUnit returns nothing
    native BlzGetUnitCollisionSize                     takes unit whichUnit returns real
    native BlzGetAbilityManaCost                       takes integer abilId, integer level returns integer
    native BlzGetAbilityCooldown                       takes integer abilId, integer level returns real
    native BlzSetUnitAbilityCooldown                   takes unit whichUnit, integer abilId, integer level, real cooldown returns nothing
    native BlzGetUnitAbilityCooldown                   takes unit whichUnit, integer abilId, integer level returns real
    native BlzGetUnitAbilityCooldownRemaining          takes unit whichUnit, integer abilId returns real
    native BlzEndUnitAbilityCooldown                   takes unit whichUnit, integer abilCode returns nothing
    native BlzGetUnitAbilityManaCost                   takes unit whichUnit, integer abilId, integer level returns integer
    native BlzGetLocalUnitZ                            takes unit whichUnit returns real  
    native BlzDecPlayerTechResearched                  takes player whichPlayer, integer techid, integer levels returns nothing
    native BlzSetEventDamage                           takes real damage returns nothing
     


    Edit: What is this AutomationTestStart / AutomationTestEnd function and how one uses it?
     
    Last edited: Apr 11, 2018
  6. Bannar

    Bannar

    Joined:
    Mar 19, 2008
    Messages:
    3,099
    Resources:
    20
    Spells:
    5
    Tutorials:
    1
    JASS:
    14
    Resources:
    20
    Thanks to staff and to you @Kam for this thread.

    I'd like to add a small suggestion, on top of a already pilled stock that are suggestions provided by the community:
    Ability to detect when item hits the map. We can e.g.: detected when item is sold but when it is dropped by a monster as a reward, that's mistery.
     
  7. DracoL1ch

    DracoL1ch

    Joined:
    Dec 12, 2010
    Messages:
    2,040
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    debug tools, unexistance in release version (u can call it, it does nothing)
     
  8. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    15,062
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hey, so, I'm not sure how exactly Triggering Unit functions but shouldn't there be Event Response for every type of A Unit does something? For example: there's no definite Event Response for A Unit Comes Within Range of Unit.

    EDIT:
    Well, units with the Locust ability are not considered units, at least in the above mentioned trigger concern.
    Thus, it's important to be able to choose region points (variables) when using the A Unit Enters Region as that considers the Locust users actual units.

    EDIT2:
    Never mind. You can do a workaround converting a point to a region.
     
    Last edited: Apr 13, 2018
  9. Raised

    Raised

    Joined:
    May 8, 2016
    Messages:
    58
    Resources:
    0
    Resources:
    0
    Code (vJASS):
    function UnitAddItemToSlot takes unit whichUnit, item whichItem, integer slot returns boolean
     
  10. Bannar

    Bannar

    Joined:
    Mar 19, 2008
    Messages:
    3,099
    Resources:
    20
    Spells:
    5
    Tutorials:
    1
    JASS:
    14
    Resources:
    20
    On top of what I've added regarding item-enter-map event, providing mechanism for retrieving order queue would be great.
    What would be even more welcome, is interface for manipulation such queue, inserting orders etc.

    There are plenty of spells/libs that are limited / have FYI included with em due to lack of possibility of altering unit order queue.
     
  11. Bannar

    Bannar

    Joined:
    Mar 19, 2008
    Messages:
    3,099
    Resources:
    20
    Spells:
    5
    Tutorials:
    1
    JASS:
    14
    Resources:
    20
    You can workaround this by using dummy items and disabling item-pickup trigger within the handler until the operation is done. If RegisterNativeEvent/ RegisterPlayerUnitEvent is involved here (unified registration mechanism), then you should have no trouble workarounding that issue.
     
  12. DracoL1ch

    DracoL1ch

    Joined:
    Dec 12, 2010
    Messages:
    2,040
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    read the thread's title
    each "workaround" costs a lot, which is matter a lot in big maps
     
  13. Bannar

    Bannar

    Joined:
    Mar 19, 2008
    Messages:
    3,099
    Resources:
    20
    Spells:
    5
    Tutorials:
    1
    JASS:
    14
    Resources:
    20
    Nowhere did I say that the state of things should be left unchanged. Surely, there is plenty of room for improvements and that example is another one of them.
    What I have been concentrating on, are issues which cannot be workarounded, at least not directly.
     
  14. Avahor

    Avahor

    Joined:
    Sep 29, 2008
    Messages:
    289
    Resources:
    8
    Skins:
    4
    Maps:
    4
    Resources:
    8
    So, another thing that we have to deal in older wc3 versions is max number of abilities (4) that can be handled by an item (excepting book of spells workaround).
    what about removing this limit?. I don't know if it's posible to do. I remember some guy posted here about this lacking aspect. why no add/remove abilities to items in real time. It would open us the way to make advanced item management into the game, like crafting, reciping or making sets. After checking the main new natives list, I miss some functions related to them.

    the following functions would very useful
    Code (vJASS):

    function ItemAddAbility takes item whichItem, integer abilCode returns nothing

    function ItemRemoveAbility takes item whichItem, integer abilCode returns nothing

    function ItemCountAbilities takes item wichItem returns integer

    function ItemGetAbilityIndex takes item wichItem, integer abilCode returns integer

    function ItemGetAbilityLevel takes item wichItem, integer abilCode returns integer

    function ItemSetAbilityLevel takes item wichItem, integer abilCode, integer Level returns nothing

     



    if someone adviced this already, then this post seconds that suggestion ;D
     
  15. lan nguyen

    lan nguyen

    Joined:
    Feb 14, 2018
    Messages:
    34
    Resources:
    0
    Resources:
    0
    @Kam could u give something like getdestructableZ and setunitabilitycooldown? Maybe useful,I think
     
  16. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,317
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    what is exactly ItemGetAbilityIndex? Should be GetItemAbilityIndex, GetItemAbilityLevel and SetItemAbilityLevellike every other functions.
    Who even uses old versions of Warcraft? Max number of abilities on an item was always 4, there's a reason for it (to not get absurd values), so no, they're not going to remove the limit. Unless you need the ItemAdd and Remove ability for more complex stuff, you can just use the spellbook as you mentioned, it's not like it's a workaround that gives a lot effort.
     
  17. Avahor

    Avahor

    Joined:
    Sep 29, 2008
    Messages:
    289
    Resources:
    8
    Skins:
    4
    Maps:
    4
    Resources:
    8
    That's the point. Anyway, adding infinite abilities to an item is a weird option. Increasing maximun limit from 4 to any suitable amount of skills is more accurate requirement. About if this is posible with workarounds, yes, workarounds are our best alternative. But, refered to main request (add abilities to items on real time) I think related workarounds are ineficients in terms of abilities gestion. Basically equiping - dropping items from units those have dinamically added abilities you need to read some kind of table/ indexer to enable - disable abilities for item owner (what a rare option that disable ability for some unit to hide ability icon). All this manner to do things could be improved. Craft, recipe, upgrade, composite, fusion, evolve; all these item aspects could be easily achieved enabling the listed functions on previous post.
    About function name (ItemGetAbilityLevel) you're right. verb - noun order is irrelevant in this stage. finally, names responds to standars, we will get something like Blz...
     
  18. Raised

    Raised

    Joined:
    May 8, 2016
    Messages:
    58
    Resources:
    0
    Resources:
    0
    Powerup items tend to remain in game after being picked-up. They should be recycled.
     
  19. lan nguyen

    lan nguyen

    Joined:
    Feb 14, 2018
    Messages:
    34
    Resources:
    0
    Resources:
    0
    Blizzard,please add ability levels
     
  20. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,562
    Resources:
    9
    Models:
    1
    Icons:
    2
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    9