help me understand how ability quoted by #s only in GoH

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

afis
Junior Member
Posts: 26
Joined: June 22nd, 2009, 3:47 pm

help me understand how ability quoted by #s only in GoH

Post by afis »

I am trying to edit an rpg map called guild of hyppogryphs, GoH 1.31
Spoiler:
http://www.hiveworkshop.com/forums/maps-564/guilds-hyppos-rpg-v1-31-a-94391/

and I am having difficulty finding the references for object editor data in the map.j file
Many abilities do attribute* damage
an excerpt of a sample trigger from version 1.08 if shown here
Spoiler:
function jIiIIj takes nothing returns nothing
local unit u1=GetTriggerUnit()
local integer i1=GetUnitAbilityLevel(u1,1093677145)
local integer i2=GetHeroInt(u1,true)
local integer jjiljj=GetConvertedPlayerId(GetOwningPlayer(u1))
local real r1=0.20*GetUnitState(u1,UNIT_STATE_MAX_LIFE)
local real r2=(I2R(i1)*I2R(i2)*0.40)+(jlij[jjiljj]*.75)
call GroupEnumUnitsInRange(g1,x,y,450,Condition(function iIjiI))
set u2=FirstOfGroup(g1)
exitwhen u2==null
call GroupRemoveUnit(g1,u2)
if IsUnitEnemy(u2,GetOwningPlayer(u1))then
call UnitDamageTarget(u1,u2,r2,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)

Now, in most maps, the ability is referenced by its rawcode, in this case A06K:ACbf (I searched A06K separately), however this map never does so, the ability is only referenced by the name 1093677145 in the map.j file, A06K never shows up
This tells me wc3 has its own way of telling what 1093677145 means and putting it back together but I have no clue how to convert the rawcode or ability name into this number so I can identify and make changes to the abilities. The same problem exists with items that are referenced with numbers like 1227895880, once again without mentioning the raw code in the map.j ever and I know the items have to be referenced because they do spell damage bonus to the triggered spells.

Sorry the post is long but please help me figure out how to turn 1093677145 into a rawcode like A06K and vice-versa, the link to download the relevent map is posted in a spoiler.
Thank you
User avatar
UndeadxAssassin
Grammar King
Posts: 2115
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: help me understand how ability quoted by #s only in GoH

Post by UndeadxAssassin »

If you take a look at JJ's CP, you can see the conversion. I also believe it's posted somewhere in the forum already, since I'm sure this was asked before (also, Haxorizer has a function to change between the two).


function Str2RAW takes string s2s returns integer
return S2RAW[s2i(SubString(s2s,0,1))]*0x1000000+S2RAW[s2i(SubString(s2s,1,2))]*0x10000+S2RAW[s2i(SubString(s2s,2,3))]*0x100+S2RAW[s2i(SubString(s2s,3,4))]
endfunction

function RAW2Str takes integer I2I,player p2p returns nothing
local string s2s
set s2s=S2RAWa[I2I/0x1000000]+S2RAWa[(I2I-0x1000000*(I2I/0x1000000))/0x10000]+S2RAWa[((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))/0x100]+S2RAWa[((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))-0x100*(((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))/0x100)]

Str2Raw converts the 4 character RAWCode to the actual RAWCode used by wc3.
Raw2Str does the opposite.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


(23:44:12) Bartimaeus: I was in pubic school until middle school...


Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!
afis
Junior Member
Posts: 26
Joined: June 22nd, 2009, 3:47 pm

Re: help me understand how ability quoted by #s only in GoH

Post by afis »

Thank you very much, now learned to put this info to use