HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Patch 1.24b Discussion

06-09-2009, 09:58 PM#1
Skater
http://forums.battle.net/thread.html...93122&sid=3000
Quote:
Originally Posted by Karune
Battle.net Map Making PTR

Following our temporary fix to address the recently identified Warcraft III exploit, we have begun preparations to implement a permanent resolution of the issue on Battle.net. As a consequence of this fix (which prevents the possibility of malicious software being spread through Warcraft III maps), we do anticipate that some functionality in current maps will need to be adjusted before it will work properly. Before deploying the fix, we’ll be working closely with the makers of some of the most popular maps to ensure that their maps continue to stay playable on Battle.net with little to no interruption. In the meantime, we’ll be hosting a Public Test Realm (PTR) for map makers to test their maps beginning on June 9th, 2009. We will also be hosting online guides to help map makers make the transition into the new patch during this process. Throughout this process we’ll keep everyone posted on any updates leading up to the release of the patch.

FAQ
Will I be able to play my favorite custom maps online on Battle.net?
We’ll be working closely with the map creators of many popular custom maps on Battle.net to ensure that they’re consistently playable online throughout this process.

Will my computer catch a virus while playing on Battle.net right now?
Our temporary fix has addressed the immediate issues that have been identified on Battle.net, but we still recommend that players avoid downloading maps from unofficial sources or websites they do not trust -- be aware that corrupted maps may share the same name as other popular maps.

How do I know if my map will work with the new patch?
The PTR will be going live on June 9th, 2009 and you will be able to test your maps there.

How do I fix my map if it does not work properly on the PTR?
A guide will be up on Battle.net shortly giving more technical details on how to fix many of the issues that may cause certain features on the map to malfunction. A link to that guide will also be updated in this forum thread as well when available.

Good night.
06-09-2009, 10:52 PM#2
2-P
Guide is up:

http://forums.battle.net/thread.html...93178&sid=3000
06-09-2009, 10:52 PM#3
Litany
Quote:
Welcome Developers,

This guide has been written to help advanced Warcraft II 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
06-09-2009, 10:56 PM#4
darkwulfv
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!

Quote:
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.
Yay? Nay?
06-09-2009, 11:17 PM#5
Vexorian
Thank God blizz did listen to my begs and finally decided to add GetHandleId

The rest are really a bunch of crazy things we stopped needing long ago. Though maybe they could get some use.

Edit: HashTable are actually really good when you compare them with the crazy gamecache functions they were going to add, wonder who gave them the idea, my primary focus was GetHandleId.

Edit: Basically native handle vars. Wonder about benchmarks, I guess they couldn't get as fast as arrays, but maybe they could... then I could make structs compile into them without limits... which means multiple interface inheritance and other things that I always wanted...
06-09-2009, 11:18 PM#6
darkwulfv
So with the official advent of GetHandleId (and the eventual addition of H2I as a native), will systems need to be changed to meet this new Blizz standard?
06-09-2009, 11:24 PM#7
Vexorian
I guess they will release blizzard.j with an H2I function that will just call GetHandleId.

It doesn't matter, H2I is private in most systems, so they are free to change it (as the real name won't be H2I, but Table__H2I)

And systems have to be updated cause they wouldn't compile in the new patch...
06-09-2009, 11:34 PM#8
darkwulfv
Well, they did say it was only going to effect a small number of maps. I think only those that may have functions of the same name as the new ones would have conflicts... Unless they actually did fix the return bug (making any function similar to H2I return a syntax error).
06-09-2009, 11:42 PM#9
Vexorian
they will remove the return bug if they didn't already.

Crap, I forgot to tell Zoxc about the new lack of handle type safety, though I guess he's got time to update the compiler...
06-09-2009, 11:53 PM#10
Bobo_The_Kodo
Quote:
Additionally, storing and retrieving data in hashtables are much faster and safer than storing data in the GameCache.
06-09-2009, 11:55 PM#11
SeasonsOfLove
Should anyone care, "Popular maps" means DotA. Go figure.

I'm only shocked it took this many years for an exploit to be found like this.
06-10-2009, 12:03 AM#12
Vexorian
Just in case somebody needed more good news: new war3err does NOT work in 1.23b.
06-10-2009, 01:34 AM#13
Bobo_The_Kodo
So what about systems that use S2I?
06-10-2009, 02:07 AM#14
TriggerHappy
When I patched, every script i make I get about 5,000 unregistered native errors.
06-10-2009, 03:35 AM#15
Here-b-Trollz
We could ask Blizzard?