Patch 1.23b

wraithseeker

Tired.
Reaction score
122
Blizzard said:
Welcome Developers,

This guide has been written to help advanced Warcraft III map developers understand the changes that we’ve made to the JASS functionality. Please note that these changes apply to only a small set of custom map developers, and most Warcraft 3 custom maps remain unaffected. For those developers whose maps are affected by the changes we’ve made, please review the steps below to understand how to bring your map into compliance with our new implementation.

Note: JASS-enabled maps that are not brought into compliance with the may not work correctly or at all after we release the next Warcraft III patch.

Details on our new implementation:

This patch includes 97 new native JASS functions and one new JASS handle type designed to assist map makers. These enhancements are part of a new hashtable storage system which is very similar in structure to the GameCache.

While the original GameCache JASS functions only allowed units and JASS primitives to be stored (Integer, Real, Boolean, and String), hashtables can store most JASS handle types. However unlike the GameCache which uses strings for keys, the hashtable uses integers. Additionally, storing and retrieving data in hashtables are much faster and safer than storing data in the GameCache.

The new functions GetHandleId and StringHash are to assist in turning either a handle or a string into an integer. This indirectly allows handles and strings to be used as hashtable keys.

StringHash:
StringHash takes a string and returns an integer much like S2I, however StringHash can be used on any string.

GetHandleId:
GetHandleId takes a handle and returns an integer. GetHandleId works exactly like H2I functions that were written with the return bug. In order to reduce the number of JASS naming conflicts with existing maps, we named the function GetHandleId. We ask map makers to not create a GetHandleId alias function with the name H2I, as we will add a native H2I function to JASS in the future.

hashtable:
Hashtable variables can be declared using the type name ‘hashtable’. As mentioned before, hashtables work very similar to gamecache objects. To create a new hashtable call InitHashtable. For example local hashtable ht = InitHashtable() will create a new hashtable object and assign it to ht.

All handle types share the same key namespace. For instance, if you call SavePlayerHandle followed by SaveUnitHandle, with the same keys, then the unit handle will overwrite the player handle. Even though the handle functions share the same key space, The SaveXHandle and LoadXHandle functions are type safe. For instance, calling SavePlayerHandle followed by local unit u = LoadUnitHandle will result with u initialized to null.

All handle objects saved or removed from a hashtable are automatically reference-counted (with the exception of TextTag, Lightning, Image, Ubersplat, and FogState). This allows handle objects to be saved in the hashtable without risk of the object’s being prematurely memory freed. The reference counts are updated when an object is either added to, flushed, or overwritten in a hashtable.

The complete list of new jass functions are:

InitHashtable
GetHandleId
StringHash

SaveInteger
SaveReal
SaveBoolean
SaveStr
SavePlayerHandle
SaveWidgetHandle
SaveDestructableHandle
SaveItemHandle
SaveUnitHandle
SaveAbilityHandle
SaveTimerHandle
SaveTriggerHandle
SaveTriggerConditionHandle
SaveTriggerActionHandle
SaveTriggerEventHandle
SaveForceHandle
SaveGroupHandle
SaveLocationHandle
SaveRectHandle
SaveBooleanExprHandle
SaveSoundHandle
SaveEffectHandle
SaveUnitPoolHandle
SaveItemPoolHandle
SaveQuestHandle
SaveQuestItemHandle
SaveDefeatConditionHandle
SaveTimerDialogHandle
SaveLeaderboardHandle
SaveMultiboardHandle
SaveMultiboardItemHandle
SaveTrackableHandle
SaveDialogHandle
SaveButtonHandle
SaveTextTagHandle
SaveLightningHandle
SaveImageHandle
SaveUbersplatHandle
SaveRegionHandle
SaveFogStateHandle
SaveFogModifierHandle

LoadInteger
LoadReal
LoadBoolean
LoadStr
LoadPlayerHandle
LoadWidgetHandle
LoadDestructableHandle
LoadItemHandle
LoadUnitHandle
LoadAbilityHandle
LoadTimerHandle
LoadTriggerHandle
LoadTriggerConditionHandle
LoadTriggerActionHandle
LoadTriggerEventHandle
LoadForceHandle
LoadGroupHandle
LoadLocationHandle
LoadRectHandle
LoadBooleanExprHandle
LoadSoundHandle
LoadEffectHandle
LoadUnitPoolHandle
LoadItemPoolHandle
LoadQuestHandle
LoadQuestItemHandle
LoadDefeatConditionHandle
LoadTimerDialogHandle
LoadLeaderboardHandle
LoadMultiboardHandle
LoadMultiboardItemHandle
LoadTrackableHandle
LoadDialogHandle
LoadButtonHandle
LoadTextTagHandle
LoadLightningHandle
LoadImageHandle
LoadUbersplatHandle
LoadRegionHandle
LoadFogStateHandle
LoadFogModifierHandle

HaveSavedInteger
HaveSavedReal
HaveSavedBoolean
HaveSavedString
HaveSavedHandle

RemoveSavedInteger
RemoveSavedReal
RemoveSavedBoolean
RemoveSavedString
RemoveSavedHandle


FlushParentHashtable
FlushChildHashtable

Enjoy
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
Wait the next patch thingy is comming out?! Does it mean that the map/virus thingy is gonna be gone?
 

13lade619

is now a game developer :)
Reaction score
399
...
The entire 97 new JASS functions relate entirely to the hashtable feature (which we've already coded in regular JASS/vJASS)... So basically this is a useless patch. Joy. Way to go Blizzard, thanks for fixing all the other stupid problems Wc3 has!
The rest are really a bunch of crazy things we stopped needing long ago.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
I think they made it to replace our 'home-made' functions since they say that H2I is being replaced by their native call instead. Fun?
 

BlackRose

Forum User
Reaction score
239
Next time we discover a bug, don't keep your hopes up :)
Then, I will now wait for Starcraft II rather than code in Warcraft III!
 

Kuberr24

Well-Known Member
Reaction score
28
can somebody please explain 1) what was wrong with the map editor? 2) why blizzard released an emergecy patch 3) what will adding some jass natives do to stop the answer from question 1?
 

Sevion

The DIY Ninja
Reaction score
413
If this fucks with EGUI, God, I will be pissed at Blizzard.

Excuse the foul language.

EGUI has been updated.
 

Faust

You can change this now in User CP.
Reaction score
123
That is highly unlikely Sevion :p

I wonder if it and if yes how much will it be faster / safer / handier to use than gamecache stuff and ABC
 
Reaction score
456
Any system using H2I or any other return bug function will not work with 1.23b+.
 

Tom Jones

N/A
Reaction score
437
Yyyyyyyyyeeeeeeeesssss!!

Yes! H2I will faster than ever soon!!!!!!!

--------------------------------------------------------------------------
WARCRAFT III: THE FROZEN THRONE VERSION HISTORY
--------------------------------------------------------------------------

--------------------------------------------------------------------------
Patch 1.23b
--------------------------------------------------------------------------

PC WORLD EDITOR CHANGES

- Added new JASS hash table functions to replace the lost functionality from
fixing unsafe type casting.
- Hash Table - Save Item Handle
- Hash Table - Save Unit Handle
- ...
- Hash Table - Load Item Handle
- Hash Table - Load Unit Handle
- ...
- Hash Table - Get Handle ID

FIXES

- Fixed an exploit related to unsafe type casting that allowed users to
execute arbitrary code in maps.
- Fixed the JASS unsafe type casting exploit ("return bug").

- Fixed several World Editor crashes.

Most system won't work after the patch.
All jass/vjass spells won't work after the patch.
Every single map I have laying around won't work after the patch.

Blizzard couldn't have made a worse "fix".
 

13lade619

is now a game developer :)
Reaction score
399
Most system won't work after the patch.
All jass/vjass spells won't work after the patch.
Every single map I have laying around won't work after the patch.
wtf!?

so maps made pre 1.23b will not work?

i think blizz should've left all us mappers alone with that 'cause we actually WORKED around it..
 

Tom Jones

N/A
Reaction score
437
Anything that uses the return bug for typecasting shouldn't work after the patch.

Obviously, Blizzard gave us an alternative so all we have to do is replace all instances of return bug typecasting with their alternative. In the long run I bet that it turns out really well, however the next couple of months are going to get crazy. Expect bombardments of posts in system and spell threads, and in the jass forum.

i think blizz should've left all us mappers alone with that 'cause we actually WORKED around it..
If you have a look at my last post, and the patch information, right above the sentence I bolded out the real cause for the patch is pointed out. It's actually a necessary patch, I just wish they hadn't messed with the return bug.

On a side note, my guess is that the map developer Blizzard has collaborated with is Icefrog, have you seen the new version? Immense changelog.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top