1. The poll for our 11th Music Contest is up! Help us choose the most awesome cinematic tracks by casting a vote!
    Dismiss Notice
  2. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  3. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  4. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice

Warcraft III - Patch 1.29 PTR

Discussion in 'Latest Updates and News' started by StoPCampinGn00b, Feb 21, 2018.

  1. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    984
    Resources:
    10
    Tools:
    2
    Maps:
    2
    Spells:
    5
    Tutorials:
    1
    Resources:
    10
    Yes that works, but you'll need upto 24 Levels for each ability shown in the UI.
    If that GetLocalPlayer works you only need 1. Hmm but shared units might show wrong infos when using async tooltips, seems both have some flaws.
     
  2. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,298
    Resources:
    0
    Resources:
    0
    So has anyone tried out playing any 20 player maps yet?
     
  3. Marcell

    Marcell

    Joined:
    Jan 17, 2018
    Messages:
    113
    Resources:
    0
    Resources:
    0
    It would be absofuckingdamn great, if they made it so that if you leave a game room, you go to the game selection screen instead of the chatroom, Jesus why did they remove this feature in the first place?
     
  4. spellwalker

    spellwalker

    Joined:
    Nov 15, 2010
    Messages:
    2
    Resources:
    0
    Resources:
    0
    Do we finally get reconnection when desynced by ECONNRESET?
     
  5. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,538
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    The unused natives in the common.j actually work. There is even a hidden
    SetHeroPrimaryStat
    native which isn't defined anywhere, however that one does not work (it changes the primary stat value to 1).

    Code (vJASS):
    native GetUnitMovementType                      takes unit whichUnit returns integer
    native SetUnitMovementType                      takes unit whichUnit, integer movementType returns nothing
    native GetUnitArmorType                         takes unit whichUnit returns integer
    native SetHeroStatEx                            takes unit whichHero, integer whichStat, integer statValue, boolean permanent returns nothing
    native GetHeroPrimaryStat                       takes unit whichHero returns integer
    native GetHeroPrimaryStatById                   takes unit whichHero returns integer
    native GetHeroStat                              takes unit whichHero, integer whichStat, boolean includeBonuses returns integer
    native SetHeroPrimaryStat                       takes unit whichHero, integer whichStat returns nothing

    function Trig_Test_Actions takes nothing returns nothing
        local unit u
        local group g = CreateGroup()
        local string array stats
        local integer targetMovetype = 2
        local integer targetPrimaryStat = 1
     
        set stats[1] = "Strength"
        set stats[2] = "Intelligence"
        set stats[3] = "Agility"
     
        call GroupEnumUnitsSelected(g, GetTriggerPlayer(), null)
        set u = FirstOfGroup(g)
        call DestroyGroup(g)
        set g = null
     
        call ClearTextMessages()
        call BJDebugMsg("[Hidden Natives]\n")
        call BJDebugMsg("Test Unit: " + GetUnitName(u) + "\n\n")
     
        call BJDebugMsg("STR = " + I2S(GetHeroStat(u, 1, false)))
        call BJDebugMsg("AGI = " + I2S(GetHeroStat(u, 3, false)))
        call BJDebugMsg("INT = " + I2S(GetHeroStat(u, bj_HEROSTAT_INT, false)))
        call BJDebugMsg("PRIMARY = " + stats[GetHeroPrimaryStat(u)])
        call BJDebugMsg("PRIMARY ID = " + I2S(GetHeroPrimaryStatById(u)))
        call BJDebugMsg("ARMOR TYPE = " + I2S(GetUnitArmorType(u)))
        call BJDebugMsg("MOVEMENT TYPE = " + I2S(GetUnitMovementType(u)))
     
        call BJDebugMsg("\nAttempting to increase primary stat...")
        call TriggerSleepAction(1)
     
        call SetHeroStatEx(u, GetHeroPrimaryStat(u), 99, true)
        if (GetHeroStat(u, GetHeroPrimaryStat(u), false) == 99) then
            call BJDebugMsg("Success.")
        else
            call BJDebugMsg("Failed.")
        endif
     
        call BJDebugMsg("\nAttempting change primary stat...")
        call TriggerSleepAction(1)
     
        if (GetHeroPrimaryStat(u) == 1) then
            set targetPrimaryStat = 2
        else
            set targetPrimaryStat = 1
        endif

        call SetHeroPrimaryStat(u, targetPrimaryStat)
     
        if (GetHeroPrimaryStat(u) == targetPrimaryStat) then
            call BJDebugMsg("Success.")
        else
            call BJDebugMsg("Failed.")
        endif
     
        call BJDebugMsg("\nAttempting to movement type...")
        call TriggerSleepAction(1)
     
        if (GetUnitMovementType(u) == targetMovetype) then
            if (targetMovetype != 1) then
                set targetMovetype = 1
            else
                set targetMovetype = 8
            endif
        endif
     
        call SetUnitMovementType(u, targetMovetype)
        if (GetUnitMovementType(u) == targetMovetype) then
            call BJDebugMsg("Success.")
        else
            call BJDebugMsg("Failed.")
        endif
        call SetUnitFlyHeight(u, 300, 0)
     
        set u = null
    endfunction

    //===========================================================================
    function InitTrig_Test takes nothing returns nothing
        set gg_trg_Test = CreateTrigger(  )
        call TriggerRegisterPlayerEventEndCinematic( gg_trg_Test, Player(0) )
        call TriggerAddAction( gg_trg_Test, function Trig_Test_Actions )
    endfunction
     

    Attached Files:

  6. Trotim

    Trotim

    Joined:
    Feb 23, 2004
    Messages:
    59
    Resources:
    0
    Resources:
    0
    "Event Response - Set Damage of Unit Damaged Event to X" is really cool

    Makes damage / armor systems so much simpler to set up
     
  7. Sarungard

    Sarungard

    Joined:
    Jun 25, 2011
    Messages:
    36
    Resources:
    0
    Resources:
    0
    Yess! This what I want! Currently I am working on an altered melee map with more and unique races. This will definitely help!
    Also I'd appreciate a new version of JNGP that is compatible with the newest WE (I used some jngp triggers and can't import my map to the newest editor. any idea?)
     
  8. Kyrbi0

    Kyrbi0

    Joined:
    Jul 29, 2008
    Messages:
    7,617
    Resources:
    1
    Models:
    1
    Resources:
    1
    I don't think I understand that one; halp?
     
  9. RED BARON

    RED BARON

    Joined:
    Oct 9, 2006
    Messages:
    5,109
    Resources:
    42
    Models:
    37
    Icons:
    3
    Packs:
    1
    Skins:
    1
    Resources:
    42
    They are posted as screenshots in this thread: Warcraft III - Patch 1.29 PTR
     
  10. ZiBitheWand3r3r

    ZiBitheWand3r3r

    Joined:
    Nov 21, 2012
    Messages:
    876
    Resources:
    14
    Maps:
    6
    Spells:
    8
    Resources:
    14
    we can now manipulate damage value inside the damage event trigger. Nulling or healing is also possible like in this example. Thats really nice. On a side note most systems on Hive will require editing to match 1.29 I guess.
    • Untitled Trigger 001
      • Events
        • Unit - Kael 0001 <gen> Takes damage
      • Conditions
        • (Damage source) Equal to Rifleman 0002 <gen>
      • Actions
        • Event Response - Set Damage of Unit Damaged Event to -20.00
     
  11. Brismo

    Brismo

    Joined:
    Mar 26, 2015
    Messages:
    7
    Resources:
    0
    Resources:
    0
    *heavy breathing*
     
  12. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,776
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    So is anyone working on a new WEX or JNGP that supports the new natives? I can't deal with vanilla JASS code.
     
  13. Kostyarik

    Kostyarik

    Joined:
    Dec 28, 2014
    Messages:
    31
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Widescreen is not kinda what i expected it to be, i like ENAlexey's hack more to be honest =)
    At best they should've stretched the field where the icons of selected units appear rather than filling the side bars =(
     
  14. Wareditor

    Wareditor

    Joined:
    Jan 16, 2009
    Messages:
    638
    Resources:
    2
    Maps:
    2
    Resources:
    2
    @Zwiebelchen Yes I know for a fact a WEX version should be released soon.
    I also heard from Moyack that he will try and update JNGP when the versions get stable.
     
  15. Tharifas

    Tharifas

    Joined:
    Nov 20, 2016
    Messages:
    76
    Resources:
    1
    Maps:
    1
    Resources:
    1
    So... no more need for complicated damage detection? Now I think I only need a way to detect attack type (magic, piercing, chaos etc.) and I'll be happy
     
  16. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    957
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    You mean TESH? I will update the database with all new natives soon, however I am not sure if the official list is complete, because in the patch notes it says 90+ natives, and the list there contains less than that.
     
  17. ZiBitheWand3r3r

    ZiBitheWand3r3r

    Joined:
    Nov 21, 2012
    Messages:
    876
    Resources:
    14
    Maps:
    6
    Spells:
    8
    Resources:
    14
    That is what I found new in common.j (extracted from mpq 1.29):
    Code (vJASS):

    //============================================================================

    type mousebuttontype    extends     handle

    constant native ConvertMouseButtonType      takes integer i returns mousebuttontype

    constant native GetBJMaxPlayers             takes nothing returns integer
    constant native GetBJPlayerNeutralVictim    takes nothing returns integer
    constant native GetBJPlayerNeutralExtra     takes nothing returns integer
    constant native GetBJMaxPlayerSlots         takes nothing returns integer
    constant native GetPlayerNeutralPassive     takes nothing returns integer
    constant native GetPlayerNeutralAggressive  takes nothing returns integer


    //===================================================
    // Game Constants  
    //===================================================

        constant mousebuttontype    MOUSE_BUTTON_TYPE_LEFT          = ConvertMouseButtonType(1)
        constant mousebuttontype    MOUSE_BUTTON_TYPE_MIDDLE        = ConvertMouseButtonType(2)
        constant mousebuttontype    MOUSE_BUTTON_TYPE_RIGHT         = ConvertMouseButtonType(3)


        constant playerevent        EVENT_PLAYER_MOUSE_DOWN                 = ConvertPlayerEvent(269)
        constant playerevent        EVENT_PLAYER_MOUSE_UP                   = ConvertPlayerEvent(270)
        constant playerevent        EVENT_PLAYER_MOUSE_MOVE                 = ConvertPlayerEvent(271)


    // JAPI Test Functions
    native GetTriggerPlayerMouseX                   takes nothing returns real
    native GetTriggerPlayerMouseY                   takes nothing returns real
    native GetTriggerPlayerMousePosition            takes nothing returns location
    native GetTriggerPlayerMouseButton              takes nothing returns mousebuttontype
    native SetAbilityTooltip                        takes integer abilCode, string tooltip, integer level returns nothing
    native SetAbilityOnTooltip                      takes integer abilCode, string tooltip, integer level returns nothing
    native SetAbilityExtendedTooltip                takes integer abilCode, string ExtendedTooltip, integer level returns nothing
    native SetAbilityOnExtendedTooltip              takes integer abilCode, string ExtendedTooltip, integer level returns nothing
    native SetAbilityResearchTooltip                takes integer abilCode, string researchTooltip, integer level returns nothing
    native SetAbilityResearchExtendedTooltip        takes integer abilCode, string researchExtendedTooltip, integer level returns nothing
    native GetAbilityTooltip                        takes integer abilCode, integer level returns string
    native GetAbilityOnTooltip                      takes integer abilCode, integer level returns string
    native GetAbilityExtendedTooltip                takes integer abilCode, integer level returns string
    native GetAbilityOnExtendedTooltip              takes integer abilCode, integer level returns string
    native GetAbilityResearchTooltip                takes integer abilCode, integer level returns string
    native GetAbilityResearchExtendedTooltip        takes integer abilCode, integer level returns string
    native SetAbilityIcon                           takes integer abilCode, string iconPath, integer level returns nothing
    native GetAbilityIcon                           takes integer abilCode, integer level returns string
    native SetAbilityOnIcon                         takes integer abilCode, string iconPath returns nothing
    native GetAbilityOnIcon                         takes integer abilCode returns string
    native GetAbilityPosX                           takes integer abilCode returns integer
    native GetAbilityPosY                           takes integer abilCode returns integer
    native SetAbilityPosX                           takes integer abilCode, integer x returns nothing
    native SetAbilityPosY                           takes integer abilCode, integer y returns nothing
    native GetAbilityOnPosX                         takes integer abilCode returns integer
    native GetAbilityOnPosY                         takes integer abilCode returns integer
    native SetAbilityOnPosX                         takes integer abilCode, integer x returns nothing
    native SetAbilityOnPosY                         takes integer abilCode, integer y returns nothing
    native GetUnitMaxHP                             takes unit whichUnit returns integer
    native SetUnitMaxHP                             takes unit whichUnit, integer hp returns nothing
    native GetUnitMaxMana                           takes unit whichUnit returns integer
    native SetUnitMaxMana                           takes unit whichUnit, integer mana returns nothing
    native DeleteHeroAbility                        takes unit whichUnit, integer abilCode returns nothing
    native SetItemName                              takes item whichItem, string name returns nothing
    native SetItemDescription                       takes item whichItem, string name returns nothing
    native GetItemDescription                       takes item whichItem returns string
    native SetItemTooltip                           takes item whichItem, string name returns nothing
    native GetItemTooltip                           takes item whichItem returns string
    native SetItemExtendedTooltip                   takes item whichItem, string name returns nothing
    native GetItemExtendedTooltip                   takes item whichItem returns string
    native SetItemIconPath                          takes item whichItem, string name returns nothing
    native GetItemIconPath                          takes item whichItem returns string
    native SetUnitName                              takes unit whichUnit, string name returns nothing
    native SetUnitNameAll                           takes unit whichUnit, string name returns nothing
    native SetHeroProperName                        takes unit whichUnit, string name returns nothing
    native GetUnitBaseDamage                        takes unit whichUnit, integer weaponIndex returns integer
    native SetUnitBaseDamage                        takes unit whichUnit, integer baseDamage, integer weaponIndex returns nothing
    native GetUnitDiceNumber                        takes unit whichUnit, integer weaponIndex returns integer
    native SetUnitDiceNumber                        takes unit whichUnit, integer diceNumber, integer weaponIndex returns nothing
    native GetUnitDiceSides                         takes unit whichUnit, integer weaponIndex returns integer
    native SetUnitDiceSides                         takes unit whichUnit, integer diceSides, integer weaponIndex returns nothing
    native GetUnitAttackCooldown                    takes unit whichUnit, integer weaponIndex returns real
    native SetUnitAttackCooldown                    takes unit whichUnit, real cooldown, integer weaponIndex returns nothing
    native SetSpecialEffectColorByPlayer            takes effect whichEffect, player whichPlayer returns nothing
    native SetSpecialEffectColor                    takes effect whichEffect, integer r, integer g, integer b returns nothing
    native SetSpecialEffectAlpha                    takes effect whichEffect, integer alpha returns nothing
    native SetSpecialEffectScale                    takes effect whichEffect, real scale returns nothing
    native SetSpecialEffectPosition                 takes effect whichEffect, real x, real y, real z returns nothing
    native SetSpecialEffectHeight                   takes effect whichEffect, real height returns nothing
    native SetSpecialEffectTimeScale                takes effect whichEffect, real timeScale returns nothing
    native SetSpecialEffectTime                     takes effect whichEffect, real time returns nothing
    native SetSpecialEffectOrientation              takes effect whichEffect, real yaw, real pitch, real roll returns nothing
    native SetSpecialEffectYaw                      takes effect whichEffect, real yaw returns nothing
    native SetSpecialEffectPitch                    takes effect whichEffect, real pitch returns nothing
    native SetSpecialEffectRoll                     takes effect whichEffect, real roll returns nothing
    native PlaySpecialEffect                        takes effect whichEffect, integer anim returns nothing
    native PlaySpecialEffectWithTimeScale           takes effect whichEffect, integer anim, real timeScale returns nothing
    constant native DecPlayerTechResearched         takes player whichPlayer, integer techid, integer levels returns nothing
    native SetEventDamage                           takes real damage returns nothing

    native AutomationTestStart takes string testName returns nothing
    native AutomationTestEnd takes string testName returns nothing

    native SetSpecialEffectX                        takes effect whichEffect, real x returns nothing
    native SetSpecialEffectY                        takes effect whichEffect, real y returns nothing
    native SetSpecialEffectZ                        takes effect whichEffect, real z returns nothing
    native SetSpecialEffectPositionLoc              takes effect whichEffect, location loc returns nothing
    native GetLocalSpecialEffectX                   takes effect whichEffect returns real
    native GetLocalSpecialEffectY                   takes effect whichEffect returns real
    native GetLocalSpecialEffectZ                   takes effect whichEffect returns real
    native GetUnitArmor                             takes unit whichUnit returns real
    native SetUnitArmor                             takes unit whichUnit, real armorAmount returns nothing
    native UnitHideAbility                          takes unit whichUnit, integer abilId, boolean flag returns nothing
    native UnitDisableAbility                       takes unit whichUnit, integer abilId, boolean flag, boolean hideUI returns nothing
    native UnitCancelTimedLife                      takes unit whichUnit returns nothing
    native IsUnitSelectable                         takes unit whichUnit returns boolean
    native IsUnitInvulnerable                       takes unit whichUnit returns boolean
    native UnitInterruptAttack                      takes unit whichUnit returns nothing
    native GetUnitCollisionSize                     takes unit whichUnit returns real
    native GetAbilityManaCost                       takes integer abilId, integer level returns integer
    native GetAbilityCooldown                       takes integer abilId, integer level returns real
    native SetUnitAbilityCooldown                   takes unit whichUnit, integer abilId, integer level, real cooldown returns nothing
    native GetUnitAbilityCooldown                   takes unit whichUnit, integer abilId, integer level returns real
    native GetUnitAbilityCooldownRemaining          takes unit whichUnit, integer abilId returns real
    native EndUnitAbilityCooldown                   takes unit whichUnit, integer abilCode returns nothing
    native GetUnitAbilityManaCost                   takes unit whichUnit, integer abilId, integer level returns integer
    native GetLocalUnitZ                            takes unit whichUnit returns real  


     
     

    Attached Files:

  18. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,776
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    Has anyone already tinkered around with the new mouse natives? I mean, they should be synchronized, right? If so, what's the delay in multiplayer?
     
  19. Trotim

    Trotim

    Joined:
    Feb 23, 2004
    Messages:
    59
    Resources:
    0
    Resources:
    0


    Here's a quick sloppy demonstration. Didn't spend more than a couple minutes on this

    • unit damaged
      • Events
      • Conditions
      • Actions
        • Set randomInt = (Random integer number between -100 and 100)
        • Event Response - Set Damage of Unit Damaged Event to (Real(randomInt))


    • add units
      • Events
        • Time - Every 2.00 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is in damagableUnits) Equal to False
              • Then - Actions
                • Unit Group - Add (Picked unit) to damagableUnits
                • Trigger - Add to unit damaged <gen> the event (Unit - (Picked unit) Takes damage)
     
  20. The Panda

    The Panda

    Icon Reviewer

    Joined:
    Jun 2, 2008
    Messages:
    7,504
    Resources:
    323
    Icons:
    259
    Packs:
    16
    Maps:
    48
    Resources:
    323
    Looks cool, but the numbers could be little smaller because if you have a big battle itll just be abunch of red lettering in the way of everything..