- Joined
- Jul 10, 2007
- Messages
- 6,306
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
* method unsetBase takes nothing returns nothing
* - Removes override of PTS
* method unsetGrowth takes nothing returns nothing
* - Removes override of LVL_GROWTH
if (oin[this]) then
return in2[this]
endif
I use this in my map (god behold!) and i want a change. I have to work through that code base. I'd rather write it myself than work with that code.
And if this should be deleted from the final version, a 0.00001% increase in game-execution speed is not going to make a difference if it is only going to be for debugging.
I can read these variable names perfectly. I mostly use acronyms for the short names =P.]
TriggerRegisterVariableEvent() by manually editing the optimized war3map.j. Doing so takes less than 2 minutes.private real array gr, it'd end up being complied to real array HeroStat__gr unless the map is optimized afterwards. And that's quite a long name, isn't it? loop
set y=n[y]
exitwhen e[y]
set q=y
loop
exitwhen z>v[q]
if (e[n[q]]) then
if (0==n[0]) then
set i=i+1
set a=i
else
set a=n[0]
set n[0]=n[a]
endif
set p[a]=q
set n[a]=td
set n[q]=a
set p[td]=a
set v[a]=0
endif
set v[n[q]]=v[n[q]]+v[q]/z
set v[q]=v[q]-v[q]/z*z
endloop
endloop
if (0==n[0]) then
set i=i+1
set a=i
else
set a=n[0]
set n[0]=n[a]
endif
//! i characters aren't needed. private module Init
private static method lvl takes nothing returns boolean
local unit u = GetIndexedUnit()
local HeroStat i = GetUnitId(u)
local integer l = GetHeroLevel(u)
local real p
local real p2
if (IsUnitType(u, UNIT_TYPE_HERO)) then
set p = i.base*i.strength/STR_COST
set p2 = i.tgrow*i.strength/STR_COST
if (l > 1) then
set str[i] = GetHeroStr(u, false)-R2I(p+p2*(l-2))
else
set str[i] = GetHeroStr(u, false)
endif
call SetHeroStr(u, R2I(p+p2*(l-1)+str[i]), true)
set p = i.base*i.agility/AGI_COST
set p2 = i.tgrow*i.agility/AGI_COST
if (l > 1) then
set agr[i] = GetHeroAgi(u, false)-R2I(p+p2*(l-1))
else
set agr[i] = GetHeroAgi(u, false)
endif
call SetHeroAgi(u, R2I(p+p2*(l-1)+agr[i]), true)
set p = i.base*i.intelligence/INT_COST
set p2 = i.tgrow*i.intelligence/INT_COST
if (l > 1) then
set inr[i] = GetHeroInt(u, false)-R2I(p+p2*(l-1))
else
set inr[i] = GetHeroInt(u, false)
endif
call SetHeroInt(u, R2I(p+p2*(l-1)+inr[i]), true)
endif
set u = null
return false
endmethod
i.base*i.strength/STR_COSTi.tgrow*i.strength/STR_COSTcall SetHeroStr(u, R2I(p+p2*(l-1)+str[i]), true)most of the variable names were totally random

Why does the quality of the tools have anything to do with using uselessly short variable names? I don't understand that.
I can do my pointer yoga in C in notepad, and I won't need to make every variable names single or double letter, lol
I don't understand,![]()
because they aren't uselessly short. Longer names in JASS make the code run slower =P.

Is it actually that noticeable?
