HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Native Functions added in the patches

04-24-2005, 11:21 PM#1
TitanLectro
I'm currently learning how to use JASS, and I have one question that I have not been able to find an answer for. I know that you can find most of the Native Functions in the common.j file, but I have not been able to find the new fuctions that were added by the patches (like set ability level and all the new floating text functions). Where can I find a list of these native functions? I could use the blizzard functions, but I would much rather use the natives.
Thanks in advance
04-24-2005, 11:35 PM#2
Guest
1. Find out the Blizzard function for it
2. Go into Blizzard.j, and find the code for the function
3. If its there, then it probabaly calls another function. That should be what you're looking for.

Example-Finding Create Units Facing Angle
1. The Blizzard code for spawn N units @ loc is "CreateNUnitsAtLoc"
2. Open up Blizzard.j, and search for "CreateNUnitsAtLoc".
You should come up with a function:
function CreateNUnitsAtLoc takes integer count, integer unitId, player whichPlayer, location loc, real face returns group
call GroupClear(bj_lastCreatedGroup)
loop
set count = count - 1
exitwhen count < 0
call CreateUnitAtLocSaveLast(whichPlayer, unitId, loc, face)
call GroupAddUnit(bj_lastCreatedGroup, bj_lastCreatedUnit)
endloop
return bj_lastCreatedGroup
endfunction
3. Using common sense, you can determine that the native function is probabaly "CreateUnitAtLocSaveLast"

Hope I'm not confusing you.
04-24-2005, 11:58 PM#3
TitanLectro
I actually have been doing what you explained above already, my problem is that I cannot find the new functions that were added by the patch in either common.j or blizzard.j. For example, the fuction that the WE uses to change a unit ability level is "SetUnitAbilityLevelSwapped" however I cannot find that in blizzard.j or common.j. I did take my copy of common.j and blizzard.j from a fully patched version of WC3, but the functions still dont seem to be in there. I dont know if WC3 stores the new code somewhere else or what is going on.
04-25-2005, 02:17 AM#4
Guest
It might be somewhere in the War3Patch.mpq file.
I cant get that to open correctly, so thats just a thought

Also, i think that Blizzard functions end with BJ (ex:SetPlayerFlagBJ)
04-25-2005, 10:50 PM#5
Vexorian
please, use the forum for scripts,

Also, they are in war3patch.mpq under scripts\common.j and scripts\blizzard.j
04-25-2005, 11:34 PM#6
TitanLectro
Whenever I try to open war3patch.mpq it just shows up as a bunch of odd files like "~unknowns/unknown_00000016" and the like. Is there another program I should be using to open this mpq? WinMPQ seems to work fine for the other MPQs.
04-26-2005, 12:11 AM#7
Vexorian
make a file like this:

scripts\common.j
scripts\blizzard.j

Save that file and use that file as listfile for war3patch.mpq
04-26-2005, 12:45 AM#8
TitanLectro
Many Thanks!
Your instructions worked great