• 🏆 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!

Warcraft III - Patch 1.29 PTR

Status
Not open for further replies.
Level 10
Joined
Oct 5, 2008
Messages
355
@Tasyen: you don't even need to. You can change the tooltip of a specific level of a spell. Just give your Unit the level of the skill that corresponds with the player number and you are good to go, even without "getlocalplayer". And since you can acess the tooltip of an ability via trigger, i would rather don't use this.

You just need an API which registers a unit with the corresponding ability, change the level and provide some events which fire on leveling the skill (You can't use levels, the ability itself has to reset to the specific player level) and a storage space where you save the skills level for the specific unit.

Probably i gonna try to make it MUI, which changes the tooltip on the fly when selecting the unit, but then you run into problems when you select multiple units with different iterations of the skill.
 
Just give your Unit the level of the skill that corresponds with the player number and you are good to go, even without "getlocalplayer"
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.
 
Level 4
Joined
Jan 17, 2018
Messages
112
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?
 
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).

JASS:
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
 

Attachments

  • hidden2.png
    hidden2.png
    1.5 MB · Views: 305
Level 4
Joined
Feb 23, 2004
Messages
60
"Event Response - Set Damage of Unit Damaged Event to X" is really cool

Makes damage / armor systems so much simpler to set up
 
Level 3
Joined
Jun 25, 2011
Messages
39
Yes, this is great News! I hope they will continue to add new natives, there is still a lot of stuff missing.

Also I'd love to have the possibility of adding more than 4 races to the map which can be selected via the race menu.

If Blizzard continues this Path I'll revive my mapping projects, some which have not be seen and heard of yet.

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?)
 
Level 18
Joined
Nov 21, 2012
Messages
835
I don't think I understand that one
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
 
Level 4
Joined
Nov 20, 2016
Messages
75
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
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
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
So is anyone working on a new WEX or JNGP that supports the new natives? I can't deal with vanilla JASS code.

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.
 
Level 18
Joined
Nov 21, 2012
Messages
835
That is what I found new in common.j (extracted from mpq 1.29):
JASS:
//============================================================================

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
 

Attachments

  • commonNew129.j
    10.8 KB · Views: 62
Level 4
Joined
Feb 23, 2004
Messages
60
I don't think I understand that one; halp?

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)
 

The Panda

Icon Reviewer
Level 57
Joined
Jun 2, 2008
Messages
8,912

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)

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..
 
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?

The natives only work in event responses to mouse clicks. They are in sync in multiplayer but I'm not sure about the speeds.

EDIT: Didn't notice the mouse move event.
 
Last edited:
Level 4
Joined
Jun 6, 2015
Messages
77
This is beyond all expectations. I Wonder when sharpcraft will adapt. I can only Open my map if I delete all my doodads for some reason.
 

Deleted member 219079

D

Deleted member 219079

Haha yeah finally! Although a bit late but better ever than never.
For some reason I cannot set gamma, it is blurred in options. Before I could do it
Are you using true full screen?
 
Level 3
Joined
Jun 25, 2011
Messages
39
I reopened some of my old maps and some of the models are lost. Even reimport does not help? Did they change something in the editor/game with imported models?

Any idea?
 
I reopened some of my old maps and some of the models are lost. Even reimport does not help? Did they change something in the editor/game with imported models?
The Public Test version does for some reason miss some textures.
  • Some textures are missing from the MPQ which can break models (Confirmed with water textures "ReplaceableTextures\Water\D_Water01.blp" and "Textures\white.blp").
 
Level 34
Joined
Sep 18, 2007
Messages
1,727
Are you using true full screen?
How do you mean trulle full screen?
I already had Wc3 installed on D partition since ages ago, maybe 10 years or so. So when installed this, I order it to install regularly in C partition, so it installed whole new WC3/FT. A bit different yes, with ability to chose more colors and different resolutions.
Also, there is no screenshot folder when I press print screen so I have manually to take screenshot
newwc310.jpg

Also, as you can see at left and right side it is blank, resized, probably due to wide screen support. Also for some reason it copies double folders. I have two Frozen Throne folders and two new folders. However, in new folders there are just one files. It is not map, it is something else.
 

The Panda

Icon Reviewer
Level 57
Joined
Jun 2, 2008
Messages
8,912
How do you mean trulle full screen?
I already had Wc3 installed on D partition since ages ago, maybe 10 years or so. So when installed this, I order it to install regularly in C partition, so it installed whole new WC3/FT. A bit different yes, with ability to chose more colors and different resolutions.
Also, there is no screenshot folder when I press print screen so I have manually to take screenshot
newwc310.jpg

Also, as you can see at left and right side it is blank, resized, probably due to wide screen support. Also for some reason it copies double folders. I have two Frozen Throne folders and two new folders. However, in new folders there are just one files. It is not map, it is something else.

I also have those black spaces, im not sure if they will add more designs in that area just like in game screen overlay where on both bottom left and right they added more detailed designs on each side, so hopfully they do that on the main beginning screen..
 
Level 11
Joined
Nov 23, 2013
Messages
665
About these black blanks on both sides of main menus, it's intended that way, apparently:
Pete Stilwell from Blizzard said:
Widescreen Support
  • Added bookends to the in-game interface
  • Added black pillars in menus to prevent stretching

(Source)

Also, there is no screenshot folder when I press print screen
Screenshots are no longer stored in the game folder since 1.28, you'll find them in C:\User\<user name>\Documents\Warcraft III\ScreenShots
 
  • Like
Reactions: pyf

deepstrasz

Map Reviewer
Level 69
Joined
Jun 4, 2009
Messages
18,848
How do you mean trulle full screen?
I hope something like that doesn't happen with the last player's colour, handicap or race selection in a full house map with lots of forces.
Screenshots are no longer stored in the game folder since 1.28, you'll find them in C:\User\<user name>\Documents\Warcraft III\ScreenShots
Can't we just get to choose man, where to install, where to put things like screenshots? I really don't want to necessarily have a My Documents folder shortcut on my Desktop...
 

Deleted member 219079

D

Deleted member 219079

How do you mean trulle full screen?
There are 3 view modes: windowed fullscreen (default), windowed (-window), and native fullscreen (-nativefullscr). Windowed programs can't modify gamma.
 
Level 34
Joined
Sep 18, 2007
Messages
1,727
Screenshots are no longer stored in the game folder since 1.28, you'll find them in C:\User\<user name>\Documents\Warcraft III\ScreenShots
Oh, did not know about that. Thanks for info.

Can't we just get to choose man, where to install, where to put things like screenshots? I really don't want to necessarily have a My Documents folder shortcut on my Desktop...
Yeah, I do not get what was wrong with having screenshot folder directly in WC3 folder as before.

There are 3 view modes: windowed fullscreen (default), windowed (-window), and native fullscreen (-nativefullscr). Windowed programs can't modify gamma.
How should I check that in which mode my game is?
 

Deleted member 219079

D

Deleted member 219079

How should I check that in which mode my game is?
Either see launch parameters or check if the game doesn't minimize when you tab out of it (which would make it windowed full screen).
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
About the screenshots being moved, it's probably something to do with the stupid user limitations. Windows versions starting from Vista(iirc) do not always let you modify stuff in program files, which is the warcraft should in theory be installed. You can remove that limitation, but you have to know. Having a game not work out of the box would suck, so many games keep their saves and stuff in my documents.
 
  • Like
Reactions: pyf
Level 12
Joined
Mar 6, 2008
Messages
1,057
Have they added the option with these new player / player color additions (12 -> 24) for us to actually import custom colors into the editor and customize them? That'd be a neat feature, especially for campaign makers / custom RPG maps.
 
Status
Not open for further replies.
Top