LUA scripts?

shiFt

Member
Reaction score
8
What are these scripts and how to use them? Iv seen them floating around recently and Id like to know what it is they're used for?
 

Nestharus

o-o
Reaction score
84
Check out this excellent tutorial written by PurgeandFire111

Lua Object Generation

Lua is mainly used for object generation ;P.

With Lua Framework for wc3, you can also generate JASS scripts and other Lua scripts ; ).
 

Nestharus

o-o
Reaction score
84
can you for instance get the value of a units attack damage?

This tells me that you didn't even bother to read the beginning of the tutorial I linked ; )

Note that the GrimExt tools can only be used for editing. They are not able to be used during the game, only for ease of map making and implementation.

Right towards the top at the intro... before you ask questions, read the tut ^)^.
 

shiFt

Member
Reaction score
8
So this is only used for development, and you cannot access values contained in the script ingame?

This is all for object generation correct? So you can edit all of you object data in a text format rather than in clicking in object editor? Kind of like what Jass is to GUI? if this is true then, what happens to the scripts if you cannot use them ingame?
 

Nestharus

o-o
Reaction score
84
Lua is mainly used for object generation ;P.

With Lua Framework for wc3, you can also generate JASS scripts and other Lua scripts ; ).

Lua is a full blown language, so you can use it for more than object generation. However, The Lua scripts and JASS scripts I tend to generate are for object generation ;P.

if this is true then, what happens to the scripts if you cannot use them ingame?

Lua processes when a map is saved.
 

WaterKnight

Member
Reaction score
7
can you for instance get the value of a units attack damage?

What you can do is, that you combine object generation with your jass script. Like this for example:

JASS:
//! textmacro Unit_SetAttackPoint takes raw, val
    //object generation
    //! externalblock extension=lua ObjectMerger $FILENAME$
        //! i setobjecttype("units")

        //! i modifyobject("$raw$")

        //! i makechange(current, "udp1", $val$)
    //! endexternalblock

    //storing the value in jass somewhere
    call SaveReal(<hashtable>, '$raw$', <key>, $val$)
//! endtextmacro

//! runtextmacro Unit_SetAttackPoint("u000", "1.234")


if this is true then, what happens to the scripts if you cannot use them ingame?

These are either not included in the .j file at all (the editor loads the .wct file only, which is not needed for playing) or the specific parts are commented out. A finalizer/optimizer can get rid of the excessive material.
 

Nestharus

o-o
Reaction score
84
What you can do is, that you combine object generation with your jass script. Like this for example:

Well, you can also use writejass feature in LUA_FILE_HEADER to generate the JASS, which is what I personally do =).
 

dudeim

New Member
Reaction score
22
Why would you generate jass using lua and not just write jass yourself the normal way?
 

Nestharus

o-o
Reaction score
84
Because writing JASS takes much longer when you have to write a 20,000 line ini script that is unique to each map.

20,000 lines of JASS or 50 lines of Lua? hmmm


One of my recent ones was a 587 line JASS ini script unique to each map. In Lua, it was 185 lines and it worked for all maps. Yes, unique means that every single line has to be modified, and it's not a simple edit/replace, you have to modify every little value =). Also, you have to add/remove lines from all over the script depending on what may be enabled/disabled and so on.


Yes, Lua just makes sense in that case. Here is a script from Bonus installation (removed comments to really show difference)-
JASS:

//! textmacro BONUS_CONFIG
    //! i powers[armor] = 13                      --bonus armor
    //! i powers[damage] = 16                     --bonus damage
    //! i powers[agility] = 14                    --bonus agility
    //! i powers[strength] = 14                   --bonus strength
    //! i powers[intelligence] = 14               --bonus intelligence
    //! i powers[life] = 20                       --bonus life
    //! i powers[liferegen] = 16                  --bonus life regen
    //! i powers[mana] = 20                       --bonus mana
    //! i powers[manaregen] = 9                   --bonus mana regen (%) (9 max?)
    //! i powers[sight] = 11                      --bonus sight range (11 max)
    //! i powers[attackspeed] = 9                 --bonus attack speed (%) (9 max)
    //! i enabled[armor] = true                   --bonus armor
    //! i enabled[damage] = true                  --bonus damage
    //! i enabled[agility] = true                 --bonus agility
    //! i enabled[strength] = true                --bonus strength
    //! i enabled[intelligence] = true            --bonus intelligence
    //! i enabled[life] = true                    --bonus life
    //! i enabled[liferegen] = true               --bonus life regen
    //! i enabled[mana] = true                    --bonus mana
    //! i enabled[manaregen] = true               --bonus mana regen (%)
    //! i enabled[sight] = true                   --bonus sight range
    //! i enabled[attackspeed] = true             --bonus attack speed (%)
//! endtextmacro
//! externalblock extension=lua ObjectMerger $FILENAME$
    //! runtextmacro LUA_FILE_HEADER()
    //! i dofile("GetVarObject")
    //! i local ABILITY_MAX = 10    --0 through 10
    //! i local armor = 0
    //! i local damage = 1
    //! i local agility = 2
    //! i local strength = 3
    //! i local intelligence = 4
    //! i local life = 5
    //! i local liferegen = 6
    //! i local mana = 7
    //! i local manaregen = 8
    //! i local sight = 9
    //! i local attackspeed = 10
    //! i local powers = {}         --max power
    //! i local enabled = {}        --enabled
    //! runtextmacro BONUS_CONFIG()
    //! i local abilities = {}      --array of generated ability ids
    //! i percent = {}              --is value percent
    //! i local abils = {}          --ability base ids
    //! i local fields = {}         --bonus field ids
    //! i local names = {}          --ability names
    //! i local function init(id,perc,abilityid,bonusfield,name)
        //! i if (enabled[id]) then
            //! i abilities[id] = {}
            //! i percent[id] = perc
            //! i abils[id] = abilityid
            //! i fields[id] = bonusfield
            //! i names[id] = name
        //! i end
    //! i end
    //! i init(armor,false,"AId1","Idef","ARMOR")
    //! i init(damage,false,"AItg","Iatt","DAMAGE")
    //! i init(agility,false,"AIa1","Iagi","AGILITY")
    //! i init(strength,false,"AIs1","Istr","STRENGTH")
    //! i init(intelligence,false,"AIi1","Iint","INTELLIGENCE")
    //! i init(life,false,"AIlz","Ilif","LIFE")
    //! i init(liferegen,false,"Arel","Ihpr","LIFE_REGEN")
    //! i init(mana,false,"AImv","Iman","MANA")
    //! i init(manaregen,true,"AIrm","Imrp","MANA_REGEN")
    //! i init(sight,false,"AIsi","Isib","SIGHT")
    //! i init(attackspeed,true,"AIsx","Isx1","ATTACK_SPEED")
    //! i local function getbonus(id,power)
        //! i if (enabled[id]) then
            //! i local div = 1
            //! i if (percent[id]) then
                //! i div = 0.01
            //! i end
            //! i local bonus = getvarobject(abils[id],"abilities","BONUS_" .. names[id] .. "_" .. tostring(power),false)
            //! i abilities[id][power] = bonus
            //! i createobject(abils[id], bonus)
            //! i makechange(current, "anam", "BONUS_" .. names[id] .. "_" .. tostring(power))
            //! i if (power == powers[id]+1) then
                //! i makechange(current, fields[id], 1, -div*2^(power-1))
            //! i else
                //! i makechange(current, fields[id], 1, div*2^power)
            //! i end
        //! i end
    //! i end
    //! i local function genconst(id,power)
        //! i if (enabled[id]) then
            //! i return "constant integer BONUS_" .. names[id] .. "=" .. tostring(power) .. "\n"
        //! i end
        //! i return ""
    //! i end
    //! i local function genpow(id,index)
        //! i if (enabled[id]) then
            //! i return "set bp[" .. tostring(index) .. "]=" .. tostring(2^powers[id]) .. "\n"
        //! i end
        //! i return ""
    //! i end
    //! i local function genpowmax(id,index)
        //! i if (enabled[id]) then
            //! i return "set pm[" .. tostring(index) .. "]=" .. tostring(powers[id]+1) .. "\n"
        //! i end
        //! i return ""
    //! i end
    //! i local function genabi(id,power,index)
        //! i if (enabled[id]) then
            //! i return "set bd[" .. tostring(index) .. "]='" .. abilities[id][power] .. "'\n"
        //! i end
        //! i return ""
    //! i end
    //! i local function preloadabi(id,power)
        //! i if (enabled[id]) then
            //! i return "call UnitAddAbility(u,'" .. abilities[id][power] .. "')\n"
        //! i end
    //! i end
    //! i local function genpowermax(id,index,power)
        //! i if (enabled[id]) then
            //! i if (power == powers[id]+1) then
                //! i return "set pw[" .. tostring(index) .. "]=" .. tostring(-(2^(power-1))) .. "\n"
            //! i end
            //! i return "set pw[" .. tostring(index) .. "]=" .. tostring(2^power) .. "\n"
        //! i end
        //! i return ""
    //! i end
    //! i local const = ""      --constant script
    //! i local powmax = ""     --power max script
    //! i local pows = ""       --power script
    //! i local abil2 = ""      --ability 2D array script
    //! i local powerarray = "" --power array script
    //! i local preload = ""    --preload ability script
    //! i cur = 0               --current ability
    //! i curp = 0              --current ability power
    //! i local curp2 = 0       --current 2D array index
    //! i while (cur <= ABILITY_MAX) do                 --loop through each ability
        //! i const = const .. genconst(cur,curp2)      --create constant that marks start of ability set
        //! i pows = pows .. genpow(cur,curp2)          --generate max power range
        //! i powmax = powmax .. genpowmax(cur,curp2)   --generate max power
        //! i curp = 0
        //! i while (curp <= powers[cur]+1) do          --loop through each power
            //! i getbonus(cur,curp)                                        --generate bonus ability
            //! i abil2 = abil2 .. genabi(cur,curp,curp2)                   --put bonus ability into 2D array
            //! i preload = preload .. preloadabi(cur,curp)                 --for preloading abilities
            //! i powerarray = powerarray .. genpowermax(cur,curp2,curp)    --for power value array
            //! i curp = curp + 1                                           --go to next power specific to ability
            //! i curp2 = curp2 + 1                                         --go to next array index
        //! i end
        //! i cur = cur + 1
    //! i end
    //! i local script =
        //! i [[//! textmacro BONUS_DATA
        //! i globals
        //! i private integer array bd
        //! i private integer array bp
        //! i private integer array pw
        //! i private integer array pm
        //! i ]]
    //! i script = script .. const              --ability constant sets
    //! i script = script ..
        //! i [[endglobals
        //! i private module I
        //! i private static method onInit takes nothing returns nothing
        //! i ]]
    //! i script = script ..
        //! i [[static if PRELOAD then
        //! i local unit u = CreateUnit(Player(14),'hpea',100000,100000,0)
        //! i ]]
    //! i script = script .. preload
    //! i script = script ..
    //! i [[call RemoveUnit(u)
    //! i set u = null
    //! i endif
    //! i ]]
    //! i script = script .. abil2              --ability data
    //! i script = script .. powmax             --max power (n)
    //! i script = script .. pows               --max power range (2^n)
    //! i script = script .. powerarray         --power on ability
    //! i script = script..
    //! i [[endmethod
    //! i endmodule
    //! i private struct O extends array
    //! i implement I
    //! i endstruct
    //! i ]]
    //! i script = script .. [[//! endtextmacro]]
    //! i writejass("BONUS",script)
    //! i updateobjects()
//! endexternalblock


And here is the JASS (unique to each map, generated by above Lua code in a footmen wars map)
JASS:

//! textmacro BONUS_DATA
globals
private integer array bd
private integer array bp
private integer array pw
private integer array pm
constant integer BONUS_ARMOR=0
constant integer BONUS_DAMAGE=15
constant integer BONUS_AGILITY=33
constant integer BONUS_STRENGTH=49
constant integer BONUS_INTELLIGENCE=65
constant integer BONUS_LIFE=81
constant integer BONUS_LIFE_REGEN=103
constant integer BONUS_MANA=121
constant integer BONUS_MANA_REGEN=143
constant integer BONUS_SIGHT=154
constant integer BONUS_ATTACK_SPEED=167
endglobals
private module I
private static method onInit takes nothing returns nothing
static if PRELOAD then
local unit u = CreateUnit(Player(14),'hpea',100000,100000,0)
call UnitAddAbility(u,'A!(@')
call UnitAddAbility(u,'A!([')
call UnitAddAbility(u,'A!(]')
call UnitAddAbility(u,'A!(^')
call UnitAddAbility(u,'A!(_')
call UnitAddAbility(u,'A!({')
call UnitAddAbility(u,'A!(|')
call UnitAddAbility(u,'A!(}')
call UnitAddAbility(u,'A!(~')
call UnitAddAbility(u,'A!)!')
call UnitAddAbility(u,'A!)"')
call UnitAddAbility(u,'A!)#')
call UnitAddAbility(u,'A!)$')
call UnitAddAbility(u,'A!)%')
call UnitAddAbility(u,'A!)&')
call UnitAddAbility(u,'A!)(')
call UnitAddAbility(u,'A!))')
call UnitAddAbility(u,'A!)*')
call UnitAddAbility(u,'A!)+')
call UnitAddAbility(u,'A!)-')
call UnitAddAbility(u,'A!).')
call UnitAddAbility(u,'A!):')
call UnitAddAbility(u,'A!);')
call UnitAddAbility(u,'A!)<')
call UnitAddAbility(u,'A!)=')
call UnitAddAbility(u,'A!)>')
call UnitAddAbility(u,'A!)?')
call UnitAddAbility(u,'A!)@')
call UnitAddAbility(u,'A!)[')
call UnitAddAbility(u,'A!)]')
call UnitAddAbility(u,'A!)^')
call UnitAddAbility(u,'A!)_')
call UnitAddAbility(u,'A!){')
call UnitAddAbility(u,'A!)|')
call UnitAddAbility(u,'A!)}')
call UnitAddAbility(u,'A!)~')
call UnitAddAbility(u,'A!*!')
call UnitAddAbility(u,'A!*"')
call UnitAddAbility(u,'A!*#')
call UnitAddAbility(u,'A!*$')
call UnitAddAbility(u,'A!*%')
call UnitAddAbility(u,'A!*&')
call UnitAddAbility(u,'A!*(')
call UnitAddAbility(u,'A!*)')
call UnitAddAbility(u,'A!**')
call UnitAddAbility(u,'A!*+')
call UnitAddAbility(u,'A!*-')
call UnitAddAbility(u,'A!*.')
call UnitAddAbility(u,'A!*:')
call UnitAddAbility(u,'A!*;')
call UnitAddAbility(u,'A!*<')
call UnitAddAbility(u,'A!*=')
call UnitAddAbility(u,'A!*>')
call UnitAddAbility(u,'A!*?')
call UnitAddAbility(u,'A!*@')
call UnitAddAbility(u,'A!*[')
call UnitAddAbility(u,'A!*]')
call UnitAddAbility(u,'A!*^')
call UnitAddAbility(u,'A!*_')
call UnitAddAbility(u,'A!*{')
call UnitAddAbility(u,'A!*|')
call UnitAddAbility(u,'A!*}')
call UnitAddAbility(u,'A!*~')
call UnitAddAbility(u,'A!+!')
call UnitAddAbility(u,'A!+"')
call UnitAddAbility(u,'A!+#')
call UnitAddAbility(u,'A!+$')
call UnitAddAbility(u,'A!+%')
call UnitAddAbility(u,'A!+&')
call UnitAddAbility(u,'A!+(')
call UnitAddAbility(u,'A!+)')
call UnitAddAbility(u,'A!+*')
call UnitAddAbility(u,'A!++')
call UnitAddAbility(u,'A!+-')
call UnitAddAbility(u,'A!+.')
call UnitAddAbility(u,'A!+:')
call UnitAddAbility(u,'A!+;')
call UnitAddAbility(u,'A!+<')
call UnitAddAbility(u,'A!+=')
call UnitAddAbility(u,'A!+>')
call UnitAddAbility(u,'A!+?')
call UnitAddAbility(u,'A!+@')
call UnitAddAbility(u,'A!+[')
call UnitAddAbility(u,'A!+]')
call UnitAddAbility(u,'A!+^')
call UnitAddAbility(u,'A!+_')
call UnitAddAbility(u,'A!+{')
call UnitAddAbility(u,'A!+|')
call UnitAddAbility(u,'A!+}')
call UnitAddAbility(u,'A!+~')
call UnitAddAbility(u,'A!-!')
call UnitAddAbility(u,'A!-"')
call UnitAddAbility(u,'A!-#')
call UnitAddAbility(u,'A!-$')
call UnitAddAbility(u,'A!-%')
call UnitAddAbility(u,'A!-&')
call UnitAddAbility(u,'A!-(')
call UnitAddAbility(u,'A!-)')
call UnitAddAbility(u,'A!-*')
call UnitAddAbility(u,'A!-+')
call UnitAddAbility(u,'A!--')
call UnitAddAbility(u,'A!-.')
call UnitAddAbility(u,'A!-:')
call UnitAddAbility(u,'A!-;')
call UnitAddAbility(u,'A!-<')
call UnitAddAbility(u,'A!-=')
call UnitAddAbility(u,'A!->')
call UnitAddAbility(u,'A!-?')
call UnitAddAbility(u,'A!-@')
call UnitAddAbility(u,'A!-[')
call UnitAddAbility(u,'A!-]')
call UnitAddAbility(u,'A!-^')
call UnitAddAbility(u,'A!-_')
call UnitAddAbility(u,'A!-{')
call UnitAddAbility(u,'A!-|')
call UnitAddAbility(u,'A!-}')
call UnitAddAbility(u,'A!-~')
call UnitAddAbility(u,'A!.!')
call UnitAddAbility(u,'A!."')
call UnitAddAbility(u,'A!.#')
call UnitAddAbility(u,'A!.$')
call UnitAddAbility(u,'A!.%')
call UnitAddAbility(u,'A!.&')
call UnitAddAbility(u,'A!.(')
call UnitAddAbility(u,'A!.)')
call UnitAddAbility(u,'A!.*')
call UnitAddAbility(u,'A!.+')
call UnitAddAbility(u,'A!.-')
call UnitAddAbility(u,'A!..')
call UnitAddAbility(u,'A!.:')
call UnitAddAbility(u,'A!.;')
call UnitAddAbility(u,'A!.<')
call UnitAddAbility(u,'A!.=')
call UnitAddAbility(u,'A!.>')
call UnitAddAbility(u,'A!.?')
call UnitAddAbility(u,'A!.@')
call UnitAddAbility(u,'A!.[')
call UnitAddAbility(u,'A!.]')
call UnitAddAbility(u,'A!.^')
call UnitAddAbility(u,'A!._')
call UnitAddAbility(u,'A!.{')
call UnitAddAbility(u,'A!.|')
call UnitAddAbility(u,'A!.}')
call UnitAddAbility(u,'A!.~')
call UnitAddAbility(u,'A!:!')
call UnitAddAbility(u,'A!:"')
call UnitAddAbility(u,'A!:#')
call UnitAddAbility(u,'A!:$')
call UnitAddAbility(u,'A!:%')
call UnitAddAbility(u,'A!:&')
call UnitAddAbility(u,&#039;A!<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown    :(" loading="lazy" data-shortname=":(" />&#039;)
call UnitAddAbility(u,&#039;A!<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile    :)" loading="lazy" data-shortname=":)" />&#039;)
call UnitAddAbility(u,&#039;A!:*&#039;)
call UnitAddAbility(u,&#039;A!:+&#039;)
call UnitAddAbility(u,&#039;A!:-&#039;)
call UnitAddAbility(u,&#039;A!:.&#039;)
call UnitAddAbility(u,&#039;A!::&#039;)
call UnitAddAbility(u,&#039;A!:;&#039;)
call UnitAddAbility(u,&#039;A!:&lt;&#039;)
call UnitAddAbility(u,&#039;A!:=&#039;)
call UnitAddAbility(u,&#039;A!:&gt;&#039;)
call UnitAddAbility(u,&#039;A!:?&#039;)
call UnitAddAbility(u,&#039;A!<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite4" alt=":mad:" title="Mad    :mad:" loading="lazy" data-shortname=":mad:" />&#039;)
call UnitAddAbility(u,&#039;A!:[&#039;)
call UnitAddAbility(u,&#039;A!:]&#039;)
call UnitAddAbility(u,&#039;A!:^&#039;)
call UnitAddAbility(u,&#039;A!:_&#039;)
call UnitAddAbility(u,&#039;A!:{&#039;)
call UnitAddAbility(u,&#039;A!:|&#039;)
call UnitAddAbility(u,&#039;A!:}&#039;)
call UnitAddAbility(u,&#039;A!:~&#039;)
call UnitAddAbility(u,&#039;A!;!&#039;)
call UnitAddAbility(u,&#039;A!;&quot;&#039;)
call UnitAddAbility(u,&#039;A!;#&#039;)
call UnitAddAbility(u,&#039;A!;$&#039;)
call UnitAddAbility(u,&#039;A!;%&#039;)
call UnitAddAbility(u,&#039;A!;&amp;&#039;)
call UnitAddAbility(u,&#039;A!;(&#039;)
call RemoveUnit(u)
set u = null
endif
set bd[0]=&#039;A!(@&#039;
set bd[1]=&#039;A!([&#039;
set bd[2]=&#039;A!(]&#039;
set bd[3]=&#039;A!(^&#039;
set bd[4]=&#039;A!(_&#039;
set bd[5]=&#039;A!({&#039;
set bd[6]=&#039;A!(|&#039;
set bd[7]=&#039;A!(}&#039;
set bd[8]=&#039;A!(~&#039;
set bd[9]=&#039;A!)!&#039;
set bd[10]=&#039;A!)&quot;&#039;
set bd[11]=&#039;A!)#&#039;
set bd[12]=&#039;A!)$&#039;
set bd[13]=&#039;A!)%&#039;
set bd[14]=&#039;A!)&amp;&#039;
set bd[15]=&#039;A!)(&#039;
set bd[16]=&#039;A!))&#039;
set bd[17]=&#039;A!)*&#039;
set bd[18]=&#039;A!)+&#039;
set bd[19]=&#039;A!)-&#039;
set bd[20]=&#039;A!).&#039;
set bd[21]=&#039;A!):&#039;
set bd[22]=&#039;A!);&#039;
set bd[23]=&#039;A!)&lt;&#039;
set bd[24]=&#039;A!)=&#039;
set bd[25]=&#039;A!)&gt;&#039;
set bd[26]=&#039;A!)?&#039;
set bd[27]=&#039;A!)@&#039;
set bd[28]=&#039;A!)[&#039;
set bd[29]=&#039;A!)]&#039;
set bd[30]=&#039;A!)^&#039;
set bd[31]=&#039;A!)_&#039;
set bd[32]=&#039;A!){&#039;
set bd[33]=&#039;A!)|&#039;
set bd[34]=&#039;A!)}&#039;
set bd[35]=&#039;A!)~&#039;
set bd[36]=&#039;A!*!&#039;
set bd[37]=&#039;A!*&quot;&#039;
set bd[38]=&#039;A!*#&#039;
set bd[39]=&#039;A!*$&#039;
set bd[40]=&#039;A!*%&#039;
set bd[41]=&#039;A!*&amp;&#039;
set bd[42]=&#039;A!*(&#039;
set bd[43]=&#039;A!*)&#039;
set bd[44]=&#039;A!**&#039;
set bd[45]=&#039;A!*+&#039;
set bd[46]=&#039;A!*-&#039;
set bd[47]=&#039;A!*.&#039;
set bd[48]=&#039;A!*:&#039;
set bd[49]=&#039;A!*;&#039;
set bd[50]=&#039;A!*&lt;&#039;
set bd[51]=&#039;A!*=&#039;
set bd[52]=&#039;A!*&gt;&#039;
set bd[53]=&#039;A!*?&#039;
set bd[54]=&#039;A!*@&#039;
set bd[55]=&#039;A!*[&#039;
set bd[56]=&#039;A!*]&#039;
set bd[57]=&#039;A!*^&#039;
set bd[58]=&#039;A!*_&#039;
set bd[59]=&#039;A!*{&#039;
set bd[60]=&#039;A!*|&#039;
set bd[61]=&#039;A!*}&#039;
set bd[62]=&#039;A!*~&#039;
set bd[63]=&#039;A!+!&#039;
set bd[64]=&#039;A!+&quot;&#039;
set bd[65]=&#039;A!+#&#039;
set bd[66]=&#039;A!+$&#039;
set bd[67]=&#039;A!+%&#039;
set bd[68]=&#039;A!+&amp;&#039;
set bd[69]=&#039;A!+(&#039;
set bd[70]=&#039;A!+)&#039;
set bd[71]=&#039;A!+*&#039;
set bd[72]=&#039;A!++&#039;
set bd[73]=&#039;A!+-&#039;
set bd[74]=&#039;A!+.&#039;
set bd[75]=&#039;A!+:&#039;
set bd[76]=&#039;A!+;&#039;
set bd[77]=&#039;A!+&lt;&#039;
set bd[78]=&#039;A!+=&#039;
set bd[79]=&#039;A!+&gt;&#039;
set bd[80]=&#039;A!+?&#039;
set bd[81]=&#039;A!+@&#039;
set bd[82]=&#039;A!+[&#039;
set bd[83]=&#039;A!+]&#039;
set bd[84]=&#039;A!+^&#039;
set bd[85]=&#039;A!+_&#039;
set bd[86]=&#039;A!+{&#039;
set bd[87]=&#039;A!+|&#039;
set bd[88]=&#039;A!+}&#039;
set bd[89]=&#039;A!+~&#039;
set bd[90]=&#039;A!-!&#039;
set bd[91]=&#039;A!-&quot;&#039;
set bd[92]=&#039;A!-#&#039;
set bd[93]=&#039;A!-$&#039;
set bd[94]=&#039;A!-%&#039;
set bd[95]=&#039;A!-&amp;&#039;
set bd[96]=&#039;A!-(&#039;
set bd[97]=&#039;A!-)&#039;
set bd[98]=&#039;A!-*&#039;
set bd[99]=&#039;A!-+&#039;
set bd[100]=&#039;A!--&#039;
set bd[101]=&#039;A!-.&#039;
set bd[102]=&#039;A!-:&#039;
set bd[103]=&#039;A!-;&#039;
set bd[104]=&#039;A!-&lt;&#039;
set bd[105]=&#039;A!-=&#039;
set bd[106]=&#039;A!-&gt;&#039;
set bd[107]=&#039;A!-?&#039;
set bd[108]=&#039;A!-@&#039;
set bd[109]=&#039;A!-[&#039;
set bd[110]=&#039;A!-]&#039;
set bd[111]=&#039;A!-^&#039;
set bd[112]=&#039;A!-_&#039;
set bd[113]=&#039;A!-{&#039;
set bd[114]=&#039;A!-|&#039;
set bd[115]=&#039;A!-}&#039;
set bd[116]=&#039;A!-~&#039;
set bd[117]=&#039;A!.!&#039;
set bd[118]=&#039;A!.&quot;&#039;
set bd[119]=&#039;A!.#&#039;
set bd[120]=&#039;A!.$&#039;
set bd[121]=&#039;A!.%&#039;
set bd[122]=&#039;A!.&amp;&#039;
set bd[123]=&#039;A!.(&#039;
set bd[124]=&#039;A!.)&#039;
set bd[125]=&#039;A!.*&#039;
set bd[126]=&#039;A!.+&#039;
set bd[127]=&#039;A!.-&#039;
set bd[128]=&#039;A!..&#039;
set bd[129]=&#039;A!.:&#039;
set bd[130]=&#039;A!.;&#039;
set bd[131]=&#039;A!.&lt;&#039;
set bd[132]=&#039;A!.=&#039;
set bd[133]=&#039;A!.&gt;&#039;
set bd[134]=&#039;A!.?&#039;
set bd[135]=&#039;A!.@&#039;
set bd[136]=&#039;A!.[&#039;
set bd[137]=&#039;A!.]&#039;
set bd[138]=&#039;A!.^&#039;
set bd[139]=&#039;A!._&#039;
set bd[140]=&#039;A!.{&#039;
set bd[141]=&#039;A!.|&#039;
set bd[142]=&#039;A!.}&#039;
set bd[143]=&#039;A!.~&#039;
set bd[144]=&#039;A!:!&#039;
set bd[145]=&#039;A!:&quot;&#039;
set bd[146]=&#039;A!:#&#039;
set bd[147]=&#039;A!:$&#039;
set bd[148]=&#039;A!:%&#039;
set bd[149]=&#039;A!:&amp;&#039;
set bd[150]=&#039;A!<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown    :(" loading="lazy" data-shortname=":(" />&#039;
set bd[151]=&#039;A!<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile    :)" loading="lazy" data-shortname=":)" />&#039;
set bd[152]=&#039;A!:*&#039;
set bd[153]=&#039;A!:+&#039;
set bd[154]=&#039;A!:-&#039;
set bd[155]=&#039;A!:.&#039;
set bd[156]=&#039;A!::&#039;
set bd[157]=&#039;A!:;&#039;
set bd[158]=&#039;A!:&lt;&#039;
set bd[159]=&#039;A!:=&#039;
set bd[160]=&#039;A!:&gt;&#039;
set bd[161]=&#039;A!:?&#039;
set bd[162]=&#039;A!<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite4" alt=":mad:" title="Mad    :mad:" loading="lazy" data-shortname=":mad:" />&#039;
set bd[163]=&#039;A!:[&#039;
set bd[164]=&#039;A!:]&#039;
set bd[165]=&#039;A!:^&#039;
set bd[166]=&#039;A!:_&#039;
set bd[167]=&#039;A!:{&#039;
set bd[168]=&#039;A!:|&#039;
set bd[169]=&#039;A!:}&#039;
set bd[170]=&#039;A!:~&#039;
set bd[171]=&#039;A!;!&#039;
set bd[172]=&#039;A!;&quot;&#039;
set bd[173]=&#039;A!;#&#039;
set bd[174]=&#039;A!;$&#039;
set bd[175]=&#039;A!;%&#039;
set bd[176]=&#039;A!;&amp;&#039;
set bd[177]=&#039;A!;(&#039;
set pm[0]=14
set pm[15]=17
set pm[33]=15
set pm[49]=15
set pm[65]=15
set pm[81]=21
set pm[103]=17
set pm[121]=21
set pm[143]=10
set pm[154]=12
set pm[167]=10
set bp[0]=8192
set bp[15]=65536
set bp[33]=16384
set bp[49]=16384
set bp[65]=16384
set bp[81]=1048576
set bp[103]=65536
set bp[121]=1048576
set bp[143]=512
set bp[154]=2048
set bp[167]=512
set pw[0]=1
set pw[1]=2
set pw[2]=4
set pw[3]=8
set pw[4]=16
set pw[5]=32
set pw[6]=64
set pw[7]=128
set pw[8]=256
set pw[9]=512
set pw[10]=1024
set pw[11]=2048
set pw[12]=4096
set pw[13]=8192
set pw[14]=-8192
set pw[15]=1
set pw[16]=2
set pw[17]=4
set pw[18]=8
set pw[19]=16
set pw[20]=32
set pw[21]=64
set pw[22]=128
set pw[23]=256
set pw[24]=512
set pw[25]=1024
set pw[26]=2048
set pw[27]=4096
set pw[28]=8192
set pw[29]=16384
set pw[30]=32768
set pw[31]=65536
set pw[32]=-65536
set pw[33]=1
set pw[34]=2
set pw[35]=4
set pw[36]=8
set pw[37]=16
set pw[38]=32
set pw[39]=64
set pw[40]=128
set pw[41]=256
set pw[42]=512
set pw[43]=1024
set pw[44]=2048
set pw[45]=4096
set pw[46]=8192
set pw[47]=16384
set pw[48]=-16384
set pw[49]=1
set pw[50]=2
set pw[51]=4
set pw[52]=8
set pw[53]=16
set pw[54]=32
set pw[55]=64
set pw[56]=128
set pw[57]=256
set pw[58]=512
set pw[59]=1024
set pw[60]=2048
set pw[61]=4096
set pw[62]=8192
set pw[63]=16384
set pw[64]=-16384
set pw[65]=1
set pw[66]=2
set pw[67]=4
set pw[68]=8
set pw[69]=16
set pw[70]=32
set pw[71]=64
set pw[72]=128
set pw[73]=256
set pw[74]=512
set pw[75]=1024
set pw[76]=2048
set pw[77]=4096
set pw[78]=8192
set pw[79]=16384
set pw[80]=-16384
set pw[81]=1
set pw[82]=2
set pw[83]=4
set pw[84]=8
set pw[85]=16
set pw[86]=32
set pw[87]=64
set pw[88]=128
set pw[89]=256
set pw[90]=512
set pw[91]=1024
set pw[92]=2048
set pw[93]=4096
set pw[94]=8192
set pw[95]=16384
set pw[96]=32768
set pw[97]=65536
set pw[98]=131072
set pw[99]=262144
set pw[100]=524288
set pw[101]=1048576
set pw[102]=-1048576
set pw[103]=1
set pw[104]=2
set pw[105]=4
set pw[106]=8
set pw[107]=16
set pw[108]=32
set pw[109]=64
set pw[110]=128
set pw[111]=256
set pw[112]=512
set pw[113]=1024
set pw[114]=2048
set pw[115]=4096
set pw[116]=8192
set pw[117]=16384
set pw[118]=32768
set pw[119]=65536
set pw[120]=-65536
set pw[121]=1
set pw[122]=2
set pw[123]=4
set pw[124]=8
set pw[125]=16
set pw[126]=32
set pw[127]=64
set pw[128]=128
set pw[129]=256
set pw[130]=512
set pw[131]=1024
set pw[132]=2048
set pw[133]=4096
set pw[134]=8192
set pw[135]=16384
set pw[136]=32768
set pw[137]=65536
set pw[138]=131072
set pw[139]=262144
set pw[140]=524288
set pw[141]=1048576
set pw[142]=-1048576
set pw[143]=1
set pw[144]=2
set pw[145]=4
set pw[146]=8
set pw[147]=16
set pw[148]=32
set pw[149]=64
set pw[150]=128
set pw[151]=256
set pw[152]=512
set pw[153]=-512
set pw[154]=1
set pw[155]=2
set pw[156]=4
set pw[157]=8
set pw[158]=16
set pw[159]=32
set pw[160]=64
set pw[161]=128
set pw[162]=256
set pw[163]=512
set pw[164]=1024
set pw[165]=2048
set pw[166]=-2048
set pw[167]=1
set pw[168]=2
set pw[169]=4
set pw[170]=8
set pw[171]=16
set pw[172]=32
set pw[173]=64
set pw[174]=128
set pw[175]=256
set pw[176]=512
set pw[177]=-512
endmethod
endmodule
private struct O extends array
implement I
endstruct
//! endtextmacro


In the above case, all you have to do is cnp the Lua script and it outputs the JASS script you need. If you just had the JASS script, you'd have to modify over 200 different values and delete portions you don't need for "each map you put it in." Cnping Lua into each map and saving is much easier than modifying a monstrous JASS script : D.

Furthermore, you may not know ids for dynamic values like generated objects. With generated JASS, it's easy since it can generate a global constant variable for you to use =P.
 
General chit-chat
Help Users
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top