[GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Cheatpacks and learning how to use them, as well as other guides for manipulating maps.

Moderator: Cheaters

Arakunido
Cheater
Posts: 185
Joined: February 7th, 2013, 5:04 am
Title: Skid

[GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Post by Arakunido »

INTRODUCTION


Hello!

If you ever tried to play Chinese maps from Netease platform, then you already know that it's impossible to play them outside of their platform, even in the Singleplayer. It's exactly because of the DzAPI natives in war3map.j file.
In this Guide, I'll try to explain how exactly DzAPI "works" and how to disable/remove it.
To be honest with you, it's very easy and very hard at the same time, I'll explain why I think so a little bit later.

REQUIREMENTS

  • Depending on the map, you'll need to be able to at least READ the JASS code and UNDERSTAND how some functions work.
  • Ladik's MPQ Editor (click here) to extract war3map.j
  • JassCraft (click here) to edit war3map.j & check for syntax errors in the JASS code, if you make any.
NATIVES & FUNCTIONS


At the bottom of this section you'll be able to find 2 lists.
First one is the list of DzAPI natives, they only exist on Netease platform and they're also the reason why maps don't work on other platforms.
And a second one, that is the list of DzAPI natives that were already converted to functions, for your convenience, of course.
Spoiler for List of Natives:
native DzGetMouseTerrainX takes nothing returns real
native DzGetMouseTerrainY takes nothing returns real
native DzGetMouseTerrainZ takes nothing returns real
native DzIsMouseOverUI takes nothing returns boolean
native DzGetMouseX takes nothing returns integer
native DzGetMouseY takes nothing returns integer
native DzGetMouseXRelative takes nothing returns integer
native DzGetMouseYRelative takes nothing returns integer
native DzSetMousePos takes integer x,integer y returns nothing
native DzTriggerRegisterMouseEvent takes trigger trig,integer btn,integer status,boolean sync,string func returns nothing
native DzTriggerRegisterMouseEventByCode takes trigger trig,integer btn,integer status,boolean sync,code funcHandle returns nothing
native DzTriggerRegisterKeyEvent takes trigger trig,integer key,integer status,boolean sync,string func returns nothing
native DzTriggerRegisterKeyEventByCode takes trigger trig,integer key,integer status,boolean sync,code funcHandle returns nothing
native DzTriggerRegisterMouseWheelEvent takes trigger trig,boolean sync,string func returns nothing
native DzTriggerRegisterMouseWheelEventByCode takes trigger trig,boolean sync,code funcHandle returns nothing
native DzTriggerRegisterMouseMoveEvent takes trigger trig,boolean sync,string func returns nothing
native DzTriggerRegisterMouseMoveEventByCode takes trigger trig,boolean sync,code funcHandle returns nothing
native DzGetTriggerKey takes nothing returns integer
native DzGetWheelDelta takes nothing returns integer
native DzIsKeyDown takes integer iKey returns boolean
native DzGetTriggerKeyPlayer takes nothing returns player
native DzGetWindowWidth takes nothing returns integer
native DzGetWindowHeight takes nothing returns integer
native DzGetWindowX takes nothing returns integer
native DzGetWindowY takes nothing returns integer
native DzTriggerRegisterWindowResizeEvent takes trigger trig,boolean sync,string func returns nothing
native DzTriggerRegisterWindowResizeEventByCode takes trigger trig,boolean sync,code funcHandle returns nothing
native DzIsWindowActive takes nothing returns boolean
native DzDestructablePosition takes destructable d,real x,real y returns nothing
native DzSetUnitPosition takes unit whichUnit,real x,real y returns nothing
native DzExecuteFunc takes string funcName returns nothing
native DzGetUnitUnderMouse takes nothing returns unit
native DzSetUnitTexture takes unit whichUnit,string path,integer texId returns nothing
native DzSetMemory takes integer address,real value returns nothing
native DzSetUnitID takes unit whichUnit,integer id returns nothing
native DzSetUnitModel takes unit whichUnit,string path returns nothing
native DzSetWar3MapMap takes string map returns nothing
native DzGetLocale takes nothing returns string
native DzGetUnitNeededXP takes unit whichUnit,integer level returns integer
native DzTriggerRegisterSyncData takes trigger trig,string prefix,boolean server returns nothing
native DzSyncData takes string prefix,string data returns nothing
native DzGetTriggerSyncData takes nothing returns string
native DzGetTriggerSyncPlayer takes nothing returns player
native DzFrameHideInterface takes nothing returns nothing
native DzFrameEditBlackBorders takes real upperHeight,real bottomHeight returns nothing
native DzFrameGetPortrait takes nothing returns integer
native DzFrameGetMinimap takes nothing returns integer
native DzFrameGetCommandBarButton takes integer row,integer column returns integer
native DzFrameGetHeroBarButton takes integer buttonId returns integer
native DzFrameGetHeroHPBar takes integer buttonId returns integer
native DzFrameGetHeroManaBar takes integer buttonId returns integer
native DzFrameGetItemBarButton takes integer buttonId returns integer
native DzFrameGetMinimapButton takes integer buttonId returns integer
native DzFrameGetUpperButtonBarButton takes integer buttonId returns integer
native DzFrameGetTooltip takes nothing returns integer
native DzFrameGetChatMessage takes nothing returns integer
native DzFrameGetUnitMessage takes nothing returns integer
native DzFrameGetTopMessage takes nothing returns integer
native DzGetColor takes integer r,integer g,integer b,integer a returns integer
native DzFrameSetUpdateCallback takes string func returns nothing
native DzFrameSetUpdateCallbackByCode takes code funcHandle returns nothing
native DzFrameShow takes integer frame,boolean enable returns nothing
native DzCreateFrame takes string frame,integer parent,integer id returns integer
native DzCreateSimpleFrame takes string frame,integer parent,integer id returns integer
native DzDestroyFrame takes integer frame returns nothing
native DzLoadToc takes string fileName returns nothing
native DzFrameSetPoint takes integer frame,integer point,integer relativeFrame,integer relativePoint,real x,real y returns nothing
native DzFrameSetAbsolutePoint takes integer frame,integer point,real x,real y returns nothing
native DzFrameClearAllPoints takes integer frame returns nothing
native DzFrameSetEnable takes integer name,boolean enable returns nothing
native DzFrameSetScript takes integer frame,integer eventId,string func,boolean sync returns nothing
native DzFrameSetScriptByCode takes integer frame,integer eventId,code funcHandle,boolean sync returns nothing
native DzGetTriggerUIEventPlayer takes nothing returns player
native DzGetTriggerUIEventFrame takes nothing returns integer
native DzFrameFindByName takes string name,integer id returns integer
native DzSimpleFrameFindByName takes string name,integer id returns integer
native DzSimpleFontStringFindByName takes string name,integer id returns integer
native DzSimpleTextureFindByName takes string name,integer id returns integer
native DzGetGameUI takes nothing returns integer
native DzClickFrame takes integer frame returns nothing
native DzSetCustomFovFix takes real value returns nothing
native DzEnableWideScreen takes boolean enable returns nothing
native DzFrameSetText takes integer frame,string text returns nothing
native DzFrameGetText takes integer frame returns string
native DzFrameSetTextSizeLimit takes integer frame,integer size returns nothing
native DzFrameGetTextSizeLimit takes integer frame returns integer
native DzFrameSetTextColor takes integer frame,integer color returns nothing
native DzGetMouseFocus takes nothing returns integer
native DzFrameSetAllPoints takes integer frame,integer relativeFrame returns boolean
native DzFrameSetFocus takes integer frame,boolean enable returns boolean
native DzFrameSetModel takes integer frame,string modelFile,integer modelType,integer flag returns nothing
native DzFrameGetEnable takes integer frame returns boolean
native DzFrameSetAlpha takes integer frame,integer alpha returns nothing
native DzFrameGetAlpha takes integer frame returns integer
native DzFrameSetAnimate takes integer frame,integer animId,boolean autocast returns nothing
native DzFrameSetAnimateOffset takes integer frame,real offset returns nothing
native DzFrameSetTexture takes integer frame,string texture,integer flag returns nothing
native DzFrameSetScale takes integer frame,real scale returns nothing
native DzFrameSetTooltip takes integer frame,integer tooltip returns nothing
native DzFrameCageMouse takes integer frame,boolean enable returns nothing
native DzFrameGetValue takes integer frame returns real
native DzFrameSetMinMaxValue takes integer frame,real minValue,real maxValue returns nothing
native DzFrameSetStepValue takes integer frame,real step returns nothing
native DzFrameSetValue takes integer frame,real value returns nothing
native DzFrameSetSize takes integer frame,real w,real h returns nothing
native DzCreateFrameByTagName takes string frameType,string name,integer parent,string template,integer id returns integer
native DzFrameSetVertexColor takes integer frame,integer color returns nothing
native DzOriginalUIAutoResetPoint takes boolean enable returns nothing
native DzFrameSetPriority takes integer frame,integer priority returns nothing
native DzFrameSetParent takes integer frame,integer parent returns nothing
native DzFrameGetHeight takes integer frame returns real
native DzFrameSetFont takes integer frame,string fileName,real height,integer flag returns nothing
native DzFrameGetParent takes integer frame returns integer
native DzFrameSetTextAlignment takes integer frame,integer align returns nothing
native DzFrameGetName takes integer frame returns string
native DzAPI_Map_SaveServerValue takes player whichPlayer,string key,string value returns boolean
native DzAPI_Map_GetServerValue takes player whichPlayer,string key returns string
native DzAPI_Map_Ladder_SetStat takes player whichPlayer,string key,string value returns nothing
native DzAPI_Map_IsRPGLadder takes nothing returns boolean
native DzAPI_Map_GetGameStartTime takes nothing returns integer
native DzAPI_Map_Stat_SetStat takes player whichPlayer,string key,string value returns nothing
native DzAPI_Map_GetMatchType takes nothing returns integer
native DzAPI_Map_Ladder_SetPlayerStat takes player whichPlayer,string key,string value returns nothing
native DzAPI_Map_GetServerValueErrorCode takes player whichPlayer returns integer
native DzAPI_Map_GetLadderLevel takes player whichPlayer returns integer
native DzAPI_Map_IsRedVIP takes player whichPlayer returns boolean
native DzAPI_Map_IsBlueVIP takes player whichPlayer returns boolean
native DzAPI_Map_GetLadderRank takes player whichPlayer returns integer
native DzAPI_Map_GetMapLevelRank takes player whichPlayer returns integer
native DzAPI_Map_GetGuildName takes player whichPlayer returns string
native DzAPI_Map_GetGuildRole takes player whichPlayer returns integer
native DzAPI_Map_IsRPGLobby takes nothing returns boolean
native DzAPI_Map_GetMapLevel takes player whichPlayer returns integer
native DzAPI_Map_MissionComplete takes player whichPlayer,string key,string value returns nothing
native DzAPI_Map_GetActivityData takes nothing returns string
native DzAPI_Map_GetMapConfig takes string key returns string
native DzAPI_Map_HasMallItem takes player whichPlayer,string key returns boolean
native DzAPI_Map_SavePublicArchive takes player whichPlayer,string key,string value returns boolean
native DzAPI_Map_GetPublicArchive takes player whichPlayer,string key returns string
native DzAPI_Map_UseConsumablesItem takes player whichPlayer,string key returns nothing
native DzAPI_Map_OrpgTrigger takes player whichPlayer,string key returns nothing
native DzAPI_Map_GetServerArchiveDrop takes player whichPlayer,string key returns string
native DzAPI_Map_GetServerArchiveEquip takes player whichPlayer,string key returns integer
native RequestExtraIntegerData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns integer
native RequestExtraBooleanData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns boolean
native RequestExtraStringData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns string
native RequestExtraRealData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns real
native DzAPI_Map_GetPlatformVIP takes player whichPlayer returns integer
Spoiler for List of Natives converted to Functions:
function DzTriggerRegisterMouseEventByCode takes trigger trig,integer btn,integer status,boolean sync,code funcHandle returns nothing
return
endfunction
function DzTriggerRegisterKeyEventByCode takes trigger trig,integer key,integer status,boolean sync,code funcHandle returns nothing
return
endfunction
function DzTriggerRegisterMouseWheelEventByCode takes trigger trig,boolean sync,code funcHandle returns nothing
return
endfunction
function DzTriggerRegisterMouseMoveEventByCode takes trigger trig,boolean sync,code funcHandle returns nothing
return
endfunction
function DzGetTriggerKey takes nothing returns integer
return 100
endfunction
function DzGetWheelDelta takes nothing returns integer
return 100
endfunction
function DzIsKeyDown takes integer iKey returns boolean
return true
endfunction
function DzGetTriggerKeyPlayer takes nothing returns player
return null
endfunction
function DzGetWindowWidth takes nothing returns integer
return 100
endfunction
function DzGetWindowHeight takes nothing returns integer
return 100
endfunction
function DzGetWindowX takes nothing returns integer
return 100
endfunction
function DzGetWindowY takes nothing returns integer
return 100
endfunction
function DzTriggerRegisterWindowResizeEventByCode takes trigger trig,boolean sync,code funcHandle returns nothing
return
endfunction
function DzIsWindowActive takes nothing returns boolean
return true
endfunction
function DzExecuteFunc takes string funcName returns nothing
return
endfunction
function DzGetUnitUnderMouse takes nothing returns unit
return null
endfunction
function DzSetUnitTexture takes unit whichUnit,string path,integer texId returns nothing
return
endfunction
function DzSetMemory takes integer address,real value returns nothing
return
endfunction
function DzSetUnitID takes unit whichUnit,integer id returns nothing
return
endfunction
function DzSetUnitModel takes unit whichUnit,string path returns nothing
return
endfunction
function DzSetWar3MapMap takes string map returns nothing
return
endfunction
function DzGetLocale takes nothing returns string
return null
endfunction
function DzGetUnitNeededXP takes unit whichUnit,integer level returns integer
return 100
endfunction
function DzGetTriggerSyncPlayer takes nothing returns player
return null
endfunction
function DzFrameHideInterface takes nothing returns nothing
return
endfunction
function DzFrameEditBlackBorders takes real upperHeight,real bottomHeight returns nothing
return
endfunction
function DzFrameGetPortrait takes nothing returns integer
return 100
endfunction
function DzFrameGetMinimap takes nothing returns integer
return 100
endfunction
function DzFrameGetCommandBarButton takes integer row,integer column returns integer
return 100
endfunction
function DzFrameGetHeroBarButton takes integer buttonId returns integer
return 100
endfunction
function DzFrameGetHeroHPBar takes integer buttonId returns integer
return 100
endfunction
function DzFrameGetHeroManaBar takes integer buttonId returns integer
return 100
endfunction
function DzFrameGetItemBarButton takes integer buttonId returns integer
return 100
endfunction
function DzFrameGetMinimapButton takes integer buttonId returns integer
return 100
endfunction
function DzFrameGetUpperButtonBarButton takes integer buttonId returns integer
return 100
endfunction
function DzFrameGetTooltip takes nothing returns integer
return 100
endfunction
function DzFrameGetChatMessage takes nothing returns integer
return 100
endfunction
function DzFrameGetUnitMessage takes nothing returns integer
return 100
endfunction
function DzFrameGetTopMessage takes nothing returns integer
return 100
endfunction
function DzGetColor takes integer r,integer g,integer b,integer a returns integer
return 100
endfunction
function DzFrameSetUpdateCallback takes string func returns nothing
return
endfunction
function DzFrameSetUpdateCallbackByCode takes code funcHandle returns nothing
return
endfunction
function DzCreateFrame takes string frame,integer parent,integer id returns integer
return 100
endfunction
function DzCreateSimpleFrame takes string frame,integer parent,integer id returns integer
return 100
endfunction
function DzDestroyFrame takes integer frame returns nothing
return
endfunction
function DzLoadToc takes string fileName returns nothing
return
endfunction
function DzFrameSetAbsolutePoint takes integer frame,integer point,real x,real y returns nothing
return
endfunction
function DzFrameClearAllPoints takes integer frame returns nothing
return
endfunction
function DzFrameSetEnable takes integer name,boolean enable returns nothing
return
endfunction
function DzFrameSetScript takes integer frame,integer eventId,string func,boolean sync returns nothing
return
endfunction
function DzFrameFindByName takes string name,integer id returns integer
return 100
endfunction
function DzSimpleFrameFindByName takes string name,integer id returns integer
return 100
endfunction
function DzSimpleFontStringFindByName takes string name,integer id returns integer
return 100
endfunction
function DzSimpleTextureFindByName takes string name,integer id returns integer
return 100
endfunction
function DzClickFrame takes integer frame returns nothing
return
endfunction
function DzSetCustomFovFix takes real value returns nothing
return
endfunction
function DzEnableWideScreen takes boolean enable returns nothing
return
endfunction
function DzFrameGetText takes integer frame returns string
return null
endfunction
function DzFrameSetTextSizeLimit takes integer frame,integer size returns nothing
return
endfunction
function DzFrameGetTextSizeLimit takes integer frame returns integer
return 100
endfunction
function DzFrameSetTextColor takes integer frame,integer color returns nothing
return
endfunction
function DzGetMouseFocus takes nothing returns integer
return 100
endfunction
function DzFrameSetAllPoints takes integer frame,integer relativeFrame returns boolean
return true
endfunction
function DzFrameSetFocus takes integer frame,boolean enable returns boolean
return true
endfunction
function DzFrameSetModel takes integer frame,string modelFile,integer modelType,integer flag returns nothing
return
endfunction
function DzFrameGetEnable takes integer frame returns boolean
return true
endfunction
function DzFrameGetAlpha takes integer frame returns integer
return 100
endfunction
function DzFrameSetAnimate takes integer frame,integer animId,boolean autocast returns nothing
return
endfunction
function DzFrameSetAnimateOffset takes integer frame,real offset returns nothing
return
endfunction
function DzFrameSetScale takes integer frame,real scale returns nothing
return
endfunction
function DzFrameSetTooltip takes integer frame,integer tooltip returns nothing
return
endfunction
function DzDestructablePosition takes destructable d,real x,real y returns nothing
return
endfunction
function DzSetMousePos takes integer x,integer y returns nothing
return
endfunction
function DzSetUnitPosition takes unit whichUnit,real x,real y returns nothing
return
endfunction
function DzFrameCageMouse takes integer frame,boolean enable returns nothing
return
endfunction
function DzFrameGetValue takes integer frame returns real
return 99.
endfunction
function DzFrameSetMinMaxValue takes integer frame,real minValue,real maxValue returns nothing
return
endfunction
function DzFrameSetStepValue takes integer frame,real step returns nothing
return
endfunction
function DzGetTriggerUIEventFrame takes nothing returns integer
return 100
endfunction
function DzGetTriggerUIEventPlayer takes nothing returns player
return null
endfunction
function DzFrameSetScriptByCode takes integer frame,integer eventId,code funcHandle,boolean sync returns nothing
return
endfunction
function DzFrameSetPoint takes integer frame,integer point,integer relativeFrame,integer relativePoint,real x,real y returns nothing
return
endfunction
function DzFrameShow takes integer frame,boolean enable returns nothing
return
endfunction
function DzSyncData takes string prefix,string data returns nothing
return
endfunction
function DzGetTriggerSyncData takes nothing returns string
return null
endfunction
function DzTriggerRegisterSyncData takes trigger trig,string prefix,boolean server returns nothing
return
endfunction
function DzTriggerRegisterWindowResizeEvent takes trigger trig,boolean sync,string func returns nothing
return
endfunction
function DzTriggerRegisterMouseMoveEvent takes trigger trig,boolean sync,string func returns nothing
return
endfunction
function DzTriggerRegisterMouseWheelEvent takes trigger trig,boolean sync,string func returns nothing
return
endfunction
function DzTriggerRegisterKeyEvent takes trigger trig, integer key, integer status, boolean sync, string func returns nothing
return
endfunction
function DzTriggerRegisterMouseEvent takes trigger trig,integer btn,integer status,boolean sync,string func returns nothing
return
endfunction
function DzGetGameUI takes nothing returns integer
return 100
endfunction
function DzFrameSetText takes integer frame,string text returns nothing
return
endfunction
function DzFrameSetAlpha takes integer frame,integer alpha returns nothing
return
endfunction
function DzFrameSetTexture takes integer frame,string texture,integer flag returns nothing
return
endfunction
function DzFrameSetValue takes integer frame, real value returns nothing
return
endfunction
function DzFrameSetSize takes integer frame,real w,real h returns nothing
return
endfunction
function DzCreateFrameByTagName takes string frameType,string name,integer parent,string template,integer id returns integer
return 100
endfunction
function DzFrameSetVertexColor takes integer frame,integer color returns nothing
return
endfunction
function DzOriginalUIAutoResetPoint takes boolean enable returns nothing
return
endfunction
function DzFrameSetPriority takes integer frame,integer priority returns nothing
return
endfunction
function DzFrameSetParent takes integer frame,integer parent returns nothing
return
endfunction
function DzFrameGetHeight takes integer frame returns real
return 99.
endfunction
function DzFrameSetFont takes integer frame,string fileName,real height,integer flag returns nothing
return
endfunction
function DzFrameGetParent takes integer frame returns integer
return 100
endfunction
function DzFrameSetTextAlignment takes integer frame,integer align returns nothing
return
endfunction
function DzFrameGetName takes integer frame returns string
return null
endfunction
function DzGetMouseTerrainX takes nothing returns real
return 99.
endfunction
function DzGetMouseTerrainY takes nothing returns real
return 99.
endfunction
function DzGetMouseTerrainZ takes nothing returns real
return 99.
endfunction
function DzIsMouseOverUI takes nothing returns boolean
return true
endfunction
function DzGetMouseX takes nothing returns integer
return 100
endfunction
function DzGetMouseY takes nothing returns integer
return 100
endfunction
function DzGetMouseXRelative takes nothing returns integer
return 100
endfunction
function DzGetMouseYRelative takes nothing returns integer
return 100
endfunction
function DzAPI_Map_Ladder_SetPlayerStat takes player whichPlayer,string key,string value returns nothing
return
endfunction
function DzAPI_Map_GetServerValueErrorCode takes player whichPlayer returns integer
return 100
endfunction
function DzAPI_Map_MissionComplete takes player whichPlayer,string key,string value returns nothing
return
endfunction
function DzAPI_Map_GetLadderLevel takes player whichPlayer returns integer
return 100
endfunction
function DzAPI_Map_GetMatchType takes nothing returns integer
return 100
endfunction
function DzAPI_Map_GetActivityData takes nothing returns string
return null
endfunction
function DzAPI_Map_GetPublicArchive takes player whichPlayer,string key returns string
return null
endfunction
function DzAPI_Map_UseConsumablesItem takes player whichPlayer,string key returns nothing
return
endfunction
function DzAPI_Map_SavePublicArchive takes player whichPlayer,string key,string value returns boolean
return true
endfunction
function DzAPI_Map_GetMapConfig takes string key returns string
return null
endfunction
function DzAPI_Map_GetGameStartTime takes nothing returns integer
return 100
endfunction
function DzAPI_Map_IsBlueVIP takes player whichPlayer returns boolean
return true
endfunction
function DzAPI_Map_GetLadderRank takes player whichPlayer returns integer
return 100
endfunction
function DzAPI_Map_IsRedVIP takes player whichPlayer returns boolean
return true
endfunction
function DzAPI_Map_GetMapLevelRank takes player whichPlayer returns integer
return 100
endfunction
function DzAPI_Map_OrpgTrigger takes player whichPlayer,string key returns nothing
return
endfunction
function DzAPI_Map_IsRPGLadder takes nothing returns boolean
return false
endfunction
function DzAPI_Map_GetServerArchiveEquip takes player whichPlayer,string key returns integer
return 100
endfunction
function DzAPI_Map_GetServerArchiveDrop takes player whichPlayer,string key returns string
return null
endfunction
function RequestExtraStringData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns string
return null
endfunction
function RequestExtraRealData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns real
return 99.
endfunction
function DzAPI_Map_GetPlatformVIP takes player whichPlayer returns integer
return 100
endfunction
function DzAPI_Map_Ladder_SetStat takes player whichPlayer,string key,string value returns nothing
return
endfunction
function DzAPI_Map_GetGuildRole takes player whichPlayer returns integer
return 20
endfunction
function DzAPI_Map_GetGuildName takes player whichPlayer returns string
return null
endfunction
function RequestExtraBooleanData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns boolean
return false
endfunction
function RequestExtraIntegerData takes integer dataType,player whichPlayer,string param1,string param2,boolean param3,integer param4,integer param5,integer param6 returns integer
return 0
endfunction
function DzAPI_Map_IsRPGLobby takes nothing returns boolean
return true
endfunction
function DzAPI_Map_GetMapLevel takes player whichPlayer returns integer
return 5
endfunction
function DzAPI_Map_HasMallItem takes player whichPlayer,string key returns boolean
return false
endfunction
function DzAPI_Map_SaveServerValue takes player whichPlayer,string key,string value returns nothing
endfunction
function DzAPI_Map_GetServerValue takes player whichPlayer,string key returns string
return null
endfunction
function DzAPI_Map_Stat_SetStat takes player whichPlayer,string key,string value returns nothing
endfunction
HOW-TO


Basically, you just change natives to functions, like I did in NATIVES & FUNCTIONS section.
You can also copy & paste already converted natives from my list above.

General idea:

If native returns boolean, then function will return false/true
If native returns integer, then function will return #, where # is any number.
If native returns string, then function will return null, check NOTICE
If native returns player, then function will return null
If native returns real, then function will return #, where # is any REAL number, for e.g. 99.
If native returns nothing, then function will return nothing


NOTICE – you'll need to check each function by yourself, if it does something in the code, then you might need to change some of them to return something else, instead of my values. See example below.

Here's an example:

BEFORE
Image
AFTER
Image

That's it. You can now play your map on other platforms.

BUT
Sometimes maps use a lot of functions of DzAPI, for example:
Image

DzAPI_Map_GetMapLevel – I can't say for sure what exactly is Map Level means on Netease platform, but as you can see in the code above, it checks if it's <= 8 & if it's, then it will execute code below.
DzAPI_Map_StoreInteger – Stores selected data (in our case POINTS) on their servers in SQL.

As you can already see, there's a system with points in our example, which means that you can spend those points somewhere, but since we removed/disabled all DzAPI stuff, how can the map save them for the future use?
And the answer is – it can't.

There's few solutions to this problem:

1) You unlock everything locked behind the points system, for e.g. ITEM requires 50 POINTS, then you just remove 50 POINTS condition or replace 50 with 0, etc.
2) You make your own save/load system and tie all those points to it.
And so on, you got the idea.

Overall, you'll need to check almost EVERY DzAPI function and see if it does anything else in the code & if it does, then you'll need to fix it.
Otherwise, you'll not be able to play the map properly (like earning points to unlock stuff) or you might even encounter desync in the multiplayer match, because it saves points to the system that doesn't exist.

CONCLUSION


As you might have noticed, it's VERY EASY to remove/disable DzAPI, but it may be VERY HARD to fix various systems in the map that relied on DzAPI.
There's a chance that I'll update this guide later, like more examples, etc. But I included every single native I was able to find, so you shouldn't have any problems at all.
Bertix
Junior Member
Posts: 48
Joined: March 22nd, 2014, 8:48 am
Location: Garena

Re: [GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Post by Bertix »

Hello , ill check this guide today when i have time , please check that thread too , map in it have some natives which somehow activate map files with LUA script and they somehow can work
http://forum.wc3edit.net/deprotection-c ... 37231.html
Arakunido
Cheater
Posts: 185
Joined: February 7th, 2013, 5:04 am
Title: Skid

Re: [GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Post by Arakunido »

It's not really a DzAPI, but this instead: https://github.com/actboy168/jass2lua/b ... english.md
TL;DR - https://www.hiveworkshop.com/threads/a- ... -3.248513/
You can try to launch your Warcraft with lua-engine from the second link & check it if it works.


But even just by looking at your war3map.j I can already see that map also relied on DzAPI a lot, so if you don't know JASS, then you won't be able to fix it completely (not really talking about skills, skills probably don't work because of what I mentioned earlier)
User avatar
devoltz
Co-Admin
Posts: 3129
Joined: March 23rd, 2016, 8:06 pm
Has thanked: 10 times
Been thanked: 53 times

Re: [GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Post by devoltz »

Great information thread memekunido, very nice.
Bertix
Junior Member
Posts: 48
Joined: March 22nd, 2014, 8:48 am
Location: Garena

Re: [GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Post by Bertix »

Arakunido wrote:It's not really a DzAPI, but this instead: https://github.com/actboy168/jass2lua/b ... english.md
TL;DR - https://www.hiveworkshop.com/threads/a- ... -3.248513/
You can try to launch your Warcraft with lua-engine from the second link & check it if it works.


But even just by looking at your war3map.j I can already see that map also relied on DzAPI a lot, so if you don't know JASS, then you won't be able to fix it completely (not really talking about skills, skills probably don't work because of what I mentioned earlier)
Thank you. I created new function with LUA calls but there another problem , it thinks that lua is wrong but its not and i dont know LUA :)
Guide helped too

Image of error
Spoiler:
111.jpg
You do not have the required permissions to view the files attached to this post.
Arakunido
Cheater
Posts: 185
Joined: February 7th, 2013, 5:04 am
Title: Skid

Re: [GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Post by Arakunido »

No idea about LUA, since I don't know it too.

But have you tried to just use lua-engine with your old war3map.j that you included in your other thread?
The following software is an extension for Warcraft 3 which can let it execute lua script. You can just click 'launchwar3.bat' to lauch Warcraft 3 with this extension.
Maybe the reason why spells work is because Chinese platform already includes support for LUA scripts and you're trying to play the map via ordinary warcraft 3 that doesn't support them?
I was talking about that, try to play your map with lua-engine enabled (you can DL it from the Hiveworkshop link).
Bertix
Junior Member
Posts: 48
Joined: March 22nd, 2014, 8:48 am
Location: Garena

Re: [GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Post by Bertix »

Arakunido wrote:No idea about LUA, since I don't know it too.

But have you tried to just use lua-engine with your old war3map.j that you included in your other thread?
The following software is an extension for Warcraft 3 which can let it execute lua script. You can just click 'launchwar3.bat' to lauch Warcraft 3 with this extension.
Maybe the reason why spells work is because Chinese platform already includes support for LUA scripts and you're trying to play the map via ordinary warcraft 3 that doesn't support them?
I was talking about that, try to play your map with lua-engine enabled (you can DL it from the Hiveworkshop link).
Map drops to lan when i tried to do it with old jass without edits . I think author of lua-engine from hiveworkshop must update his program because last time he edit it in 2014
Ruma
Newcomer
Posts: 4
Joined: January 7th, 2019, 10:35 am

Re: [GUIDE] How to deal with DzAPI/Dz163 in Chinese maps

Post by Ruma »

What do i do if it returns abilty?