System Bonus

Nestharus

o-o
Reaction score
84
Known Issues
Does not work properly with unit upgrades that change health/mana max. Your units will die when working with negative bonuses if their health/mana was modified by an upgrade. In fact, it's best to just do all upgrades through Bonus as there may be other bugs that I have not yet discovered.

Lua Installation Scripts

JASS:

//! externalblock extension=lua FileExporter $FILENAME$
    //! runtextmacro LUA_FILE_HEADER()
    
    //BonusAbility v1.0.0.1
    //BonusJASS v1.0.0.0
    
    //! i writelua("BonusAbility", [======[
    //////////////////////////////////////////////////////////////////
    //code
    
    //! i abilities = {}
    //! i 
    //! i Ability = {}    --[[
    //! i -------------------------------------------------------------------------------------------------------
    //! i *
    //! i *   Fields
    //! i *   ---------------------------------------------------------------------------------------------------
    //! i *   *   ->  maxpower        |   maximum power of ability (in base 2)
    //! i *   *   ->  isperc          |   is percent
    //! i *   *   ->  abilityid       |   id of ability object
    //! i *   *   ->  field           |   id of ability field that gives data bonus
    //! i *   *   ->  name            |   name to assign to ability object
    //! i *   *   ->  ranged          |   the ability has a definite range
    //! i *   ---------------------------------------------------------------------------------------------------
    //! i *
    //! i *   Functions
    //! i *   ---------------------------------------------------------------------------------------------------
    //! i *   *   ->  function Ability.new(perc, abilityid, bonusfield, name, ranged, enabled) returns ability
    //! i *   ---------------------------------------------------------------------------------------------------
    //! i *
    //! i ------------------------------------------------------------------------------------------------------- ]]
    //! i local function genobjects(self)
    //! i     local function getmultiplier(power)
    //! i         --[[get multiplier value]]
    //! i         local multiplier
    //! i         
    //! i         multiplier = 1
    //! i         
    //! i         if (self.isperc) then
    //! i             multiplier = .01
    //! i         end
    //! i         
    //! i         --[[get multiplier sign]]
    //! i         if (self.ranged) then
    //! i             if (power == self.maxpower) then
    //! i                 multiplier = -multiplier
    //! i             end
    //! i         elseif (power == 0) then
    //! i             multiplier = 0
    //! i         elseif (power ~= self.maxpower + 1) then
    //! i             multiplier = -multiplier
    //! i         end
    //! i         
    //! i         return multiplier
    //! i     end
    //! i 
    //! i     ----------------------------------------------------------------------------
    //! i     --  CODE
    //! i     ----------------------------------------------------------------------------
    //! i         --[[generate objects]]
    //! i         if (self.ranged) then
    //! i             for power = 0, self.maxpower, 1 do
    //! i                 --[[create object]]
    //! i                 self.objects[power]=getvarobject(self.abilityid, "abilities","BONUS_" .. self.name .. "_" .. tostring(power), false)
    //! i                 self.abilities[power] = createobject(self.abilityid, self.objects[power])
    //! i                 
    //! i                 --[[set object name]]
    //! i                 makechange(self.abilities[power], "anam", "BONUS_" .. self.name .. "_" .. tostring(power))
    //! i                 
    //! i                 --[[set object bonus]]
    //! i                 makechange(current, self.field, 1, getmultiplier(power)*2^power)
    //! i             end
    //! i         else
    //! i             --[[create object]]
    //! i             self.objects[0] = getvarobject(self.abilityid, "abilities", "BONUS_" .. self.name, false)
    //! i             self.abilities[0] = createobject(self.abilityid, self.objects[0])
    //! i             makechange(self.abilities[0], "anam", "BONUS_" .. self.name .. "_" .. tostring(power))
    //! i             
    //! i             --[[Level 1: 0]]
    //! i             --[[Level Mid: Negative Power - 1]]
    //! i             --[[Level Max: Positive Power - 1]]
    //! i             makechange(current, "alev", self.maxpower + 2)
    //! i             
    //! i             --[[set object bonus]]
    //! i             for power = 0, self.maxpower + 2, 1 do
    //! i                 makechange(current, self.field, power + 1, getmultiplier(power)*2^(power - 1))
    //! i             end
    //! i         end
    //! i     ----------------------------------------------------------------------------
    //! i end
    //! i 
    //! i function Ability.new(perc, abilityid, bonusfield, name, ranged, enabled, maxpower)    --[[
    //! i -------------------------------------------------------------------------------------------------------
    //! i *   -> perc                 |   is ability value percent?
    //! i *   -> abilityid            |   base ability id 
    //! i *   -> bonusfield           |   field with value of ability
    //! i *   -> name                 |   name of ability
    //! i *   -> ranged               |   does ability have defined range
    //! i *   -> enabled              |   is ability enabled
    //! i *   -> maxpower             |   maximum power
    //! i ------------------------------------------------------------------------------------------------------- ]]
    //! i     local self = nil
    //! i     
    //! i     if (enabled) then
    //! i         self = {}
    //! i         
    //! i         --[[init fields]]
    //! i         self.objects = {}           	--> stores generated ability ids
    //! i         self.abilities = {}             --> stores generated ability objects
    //! i         self.maxpower = maxpower    	--> stores max power of 2 ability value can be
    //! i         self.isperc = perc          	--> does ability use a percent value?
    //! i         self.abilityid = abilityid  	--> base ability id
    //! i         self.field = bonusfield     	--> object field that modifies bonus value
    //! i         self.name = name            	--> ability name
    //! i         self.ranged = ranged        	--> ability has definite range
    //! i         
    //! i         --[[generate objects]]
    //! i         genobjects(self)
    //! i   	end
    //! i     
    //! i     table.insert(abilities,self)
    //! i     abilities = Ability.getvalid(abilities)                             --> filter out invalid abilities
    //! i     abilities.containslimited = Ability.limitedenabled(abilities)       --> determine if any abilities are limited
    //! i     abilities.containsunlimited = Ability.unlimitedenabled(abilities)   --> determines if any abilites are unlimited
    //! i     
    //! i     return self
    //! i end
    //! i 
    //! i function Ability.getvalid(abilities)
    //! i     local abilitylist = {}
    //! i     for id, ability in ipairs(abilities) do
    //! i         if (ability~=nil) then
    //! i             table.insert(abilitylist, ability)
    //! i         end
    //! i     end
    //! i     return abilitylist
    //! i end
    //! i 
    //! i function Ability.limitedenabled(abilities)
    //! i     for id, ability in ipairs(abilities) do
    //! i         if (ability.limited) then
    //! i             return true
    //! i         end
    //! i     end
    //! i     return false
    //! i end
    //! i function Ability.unlimitedenabled(abilities)
    //! i     for id, ability in ipairs(abilities) do
    //! i         if (ability.limited) then
    //! i             return true
    //! i         end
    //! i     end
    //! i     return false
    //! i end
    
    //end code
    //////////////////////////////////////////////////////////////////
    //! i ]======])
    
    
    //! i writelua("BonusJASS", [======[
    //////////////////////////////////////////////////////////////////
    //code

    //! i BonusJASS = { }
    //! i 
    //! i local POWER_MAX = "pm"      --> max power
    //! i local POWER_SET = "ps"      --> power set (2^0 to 2^POWER_MAX)
    //! i local OBJECT_ID = "bo"      --> object ids
    //! i local IS_RANGED = "ir"      --> is ranged
    //! i local BINARY_POWER = "bp"   --> power of 2
    //! i local CURRENT_BONUS = "cb"  --> current bonus of unit
    //! i 
    //! i local function getabilityids(abilities)
    //! i     local constants = ""
    //! i     local prefix
    //! i     local cur = 0
    //! i     
    //! i     for id, ability in ipairs(abilities) do
    //! i         constants = constants .. "constant integer BONUS_" .. ability.name .. "=" .. tostring(cur) .. "\n"
    //! i         cur = cur + ability.maxpower + 1
    //! i         if (not ability.ranged) then
    //! i             cur = cur + 1
    //! i         end
    //! i     end
    //! i     
    //! i     return constants
    //! i end
    //! i 
    //! i local function getisranged(abilities)
    //! i     local isranged = ""
    //! i     local cur = 0
    //! i     
    //! i     for id, ability in ipairs(abilities) do
    //! i         if (ability.ranged) then
    //! i             isranged = isranged .. "set " .. IS_RANGED .. "[" .. tostring(cur) .. "]=true\n"
    //! i         else
    //! i             isranged = isranged .. "set " .. IS_RANGED .. "[" .. tostring(cur) .. "]=false\n"
    //! i             cur = cur + 1
    //! i         end
    //! i         cur = cur + ability.maxpower + 1
    //! i     end
    //! i     
    //! i     return isranged
    //! i end
    //! i 
    //! i local function getpowermax(abilities)
    //! i     local powermax = ""
    //! i     local cur = 0
    //! i     
    //! i     for id, ability in ipairs(abilities) do
    //! i         powermax = powermax .. "set " .. POWER_MAX .. "[" .. tostring(cur) .. "]=" .. tostring(ability.maxpower) .. "\n"
    //! i         cur = cur + ability.maxpower + 1
    //! i         if (not ability.ranged) then
    //! i             cur = cur + 1
    //! i         end
    //! i     end
    //! i     
    //! i     return powermax
    //! i end
    //! i 
    //! i local function getpowerset(abilities)
    //! i     local powerset = ""
    //! i     local index = 0
    //! i     for id, ability in ipairs(abilities) do
    //! i         if (ability.ranged) then
    //! i             for power = 0, ability.maxpower - 1, 1 do
    //! i                 powerset = powerset .. "set " .. POWER_SET .. "[" .. tostring(index) .. "]=" .. tostring((2^power)) .. "\n"
    //! i                 powerset = powerset .. "set " .. BINARY_POWER .. "[" .. tostring(index) .. "]=" .. tostring(power) .. "\n"
    //! i                 index = index + 1
    //! i             end
    //! i         else
    //! i             powerset = powerset .. "set " .. POWER_SET .. "[" .. tostring(index) .. "]=" .. tostring(0) .. "\n"
    //! i             index = index + 1
    //! i             for power = 0, ability.maxpower - 1, 1 do
    //! i                 powerset = powerset .. "set " .. POWER_SET .. "[" .. tostring(index) .. "]=" .. tostring((2^power)) .. "\n"
    //! i                 powerset = powerset .. "set " .. BINARY_POWER .. "[" .. tostring(index) .. "]=" .. tostring(power) .. "\n"
    //! i                 index = index + 1
    //! i             end
    //! i         end
    //! i         powerset = powerset .. "set " .. POWER_SET .. "[" .. tostring(index) .. "]=" .. tostring(-(2^ability.maxpower)) .. "\n"
    //! i         powerset = powerset .. "set " .. BINARY_POWER .. "[" .. tostring(index) .. "]=" .. tostring(-ability.maxpower) .. "\n"
    //! i         index = index + 1
    //! i     end
    //! i     return powerset
    //! i end
    //! i 
    //! i local function getobjectids(abilities)
    //! i     local powerset = ""
    //! i     local index = 0
    //! i     for id, ability in ipairs(abilities) do
    //! i         if (ability.ranged) then
    //! i             for power = 0, ability.maxpower, 1 do
    //! i                 powerset = powerset .. "set " .. OBJECT_ID .. "[" .. tostring(index) .. "]='" .. ability.objects[power] .. "'\/\/" .. tostring(power) .. "\n"
    //! i                 index = index + 1
    //! i             end
    //! i         else
    //! i             powerset = powerset .. "set " .. OBJECT_ID .. "[" .. tostring(index) .. "]='" .. ability.objects[0] .. "'\n"
    //! i             index = index + 2 + ability.maxpower
    //! i         end
    //! i     end
    //! i     return powerset
    //! i end
    //! i 
    //! i local function getpreload(abilities)
    //! i     local preload=""
    //! i     for id, ability in ipairs(abilities) do
    //! i         if (ability.ranged) then
    //! i             for power = 0, ability.maxpower, 1 do
    //! i                 preload = preload .. "call UnitAddAbility(u,'" .. ability.objects[power] .. "')\n"
    //! i             end
    //! i         else
    //! i             preload = preload .. "call UnitAddAbility(u,'" .. ability.objects[0] .. "')\n"
    //! i         end
    //! i     end
    //! i     return preload
    //! i end
    //! i 
    //! i function BonusJASS.get(abilities)
    //! i     local beginglobals = "globals\n"
    //! i         local powermax = "private integer array " .. POWER_MAX .. "\n"
    //! i         local powerset = "private integer array " .. POWER_SET .. "\n"
    //! i         local binarypower = "private integer array " .. BINARY_POWER .. "\n"
    //! i         local objectid = "private integer array " .. OBJECT_ID .. "\n"
    //! i         local isranged = "private boolean array " .. IS_RANGED .. "\n"
    //! i         local currentbonus = "private Table array " .. CURRENT_BONUS .. "\n"
    //! i         local abilityids = getabilityids(abilities)
    //! i     local endglobals = "endglobals\n"
    //! i     
    //! i     local begininit = "private module I\nprivate static method onInit takes nothing returns nothing\n"
    //! i         local preloadif = "static if PRELOAD then\n"
    //! i         local preloadend = "endif\n"
    //! i         local preload = "local unit u\nset UnitIndexer.enabled=false\nset u = CreateUnit(Player(14),'hpea',0,0,0)\n" .. getpreload(abilities) .. "call RemoveUnit(u)\nset u = null\nset UnitIndexer.enabled=true\n"
    //! i         local index = "call RegisterUnitIndexEvent(Condition(function thistype.index), UnitIndexer.INDEX)\n"
    //! i         local deindex = "call RegisterUnitIndexEvent(Condition(function thistype.deindex), UnitIndexer.DEINDEX)\n"
    //! i         local objectids = getobjectids(abilities)   --> actual object ids of abilities for UnitAddAbility
    //! i         local powermaxes = getpowermax(abilities)   --> max power (from config)
    //! i         local powersets = getpowerset(abilities)    --> power set: 1, 2, 4, 8, -16 etc
    //! i         local israngeds = getisranged(abilities)    --> is ability ranged or not
    //! i     local endinit = "endmethod\nendmodule\n"
    //! i     
    //! i     local beginstruct = "private struct O extends array\n"
    //! i         local beginindex = "private static method index takes nothing returns boolean\n"
    //! i             local indexcode =
    //! i             [[set cb[GetIndexedUnitId()] = Table.create()]] .. "\n"
    //! i         local endindex = "return false\nendmethod\n"
    //! i         local begindeindex = "private static method deindex takes nothing returns boolean\n"
    //! i             local deindexcode =
    //! i             [[call cb[GetIndexedUnitId()].destroy()]] .. "\n"
    //! i         local enddeindex = "return false\nendmethod\n"
    //! i     local endstruct = "implement I\nendstruct\n"
    //! i     
    //! i     local jass = ""
    //! i     
    //! i     jass = jass .. [[//! textmacro BONUS_SCRIPT]] .. "\n"
    //! i         jass = jass .. beginglobals
    //! i             jass = jass .. powermax
    //! i             jass = jass .. powerset
    //! i             jass = jass .. binarypower
    //! i             jass = jass .. objectid
    //! i             jass = jass .. isranged
    //! i             jass = jass .. currentbonus
    //! i             jass = jass .. abilityids
    //! i         jass = jass .. endglobals
    //! i         
    //! i         jass = jass .. begininit
    //! i             jass = jass .. preloadif
    //! i                 jass = jass .. preload
    //! i             jass = jass .. preloadend
    //! i             jass = jass .. index
    //! i             jass = jass .. deindex
    //! i             jass = jass .. objectids
    //! i             jass = jass .. powermaxes
    //! i             jass = jass .. powersets
    //! i             jass = jass .. israngeds
    //! i         jass = jass .. endinit
    //! i         
    //! i         jass = jass .. beginstruct
    //! i             jass = jass .. beginindex
    //! i                 jass = jass .. indexcode
    //! i             jass = jass .. endindex
    //! i             jass = jass .. begindeindex
    //! i                 jass = jass .. deindexcode
    //! i             jass = jass .. enddeindex
    //! i         jass = jass .. endstruct
    //! i     jass = jass .. [[//! endtextmacro]] .. "\n"
    //! i     
    //! i     return jass
    //! i end

    //end code
    //////////////////////////////////////////////////////////////////
    //! i ]======])
//! endexternalblock


Initialization Script

LUA_GET_VAR_OBJECT

This script can be used to create new bonuses, just be sure to add them to this script rather than generating them solo, or your map will only have that single generated bonus.
JASS:

/****************************************************************************************
*                                                                                       *
*                               Ranged Bonus Power                                      *
*                                                                                       *
*   Power determines how big a bonus range can go. For example, a power of 15 would be  *
*   -(2^16) to 2^(16)-1 or -65536 to 65535.                                            *
*                                                                                       *
*****************************************************************************************
*                                                                                       *
*                               Unlimited Bonus Power                                   *
*                                                                                       *
*   Power for unlimited bonuses increases speed of add/remove for larger values         *
*   and makes larger values easier to get to. For example, 50,000,000 is much           *
*   faster adding units of 1,048,576 than adding units of 16. In units of 16,           *
*   50,000,000 might as well be impossible to get to.                                   *
*                                                                                       *
*****************************************************************************************
*                                                                                       *
*                               ENABLED                                                 *
*                                                                                       *
*   Should the bonus be implemented into the system? By disabling a bonus, it will not  *
*   be in the system at all. Abilities and constants won't be made.                     *
*                                                                                       *
****************************************************************************************/
//! textmacro BONUS_CREATE_BONUSES
    /********************
    *                   *
    *   ability data    *
    *                   *
    ********************/
    //                perc          abil        field       name                    ranged 	        enabled	      max power
    //! i Ability.new(false,        "AId1",     "Idef",     "ARMOR",                true,  	        true,	        12)	        --> armor
    //! i Ability.new(false,        "AItg",     "Iatt",     "DAMAGE",               true,  	        true,	        15)	        --> damage
    //! i Ability.new(false,        "AIa1",     "Iagi",     "AGILITY",              true,  	        true,	        13)	        --> agility
    //! i Ability.new(false,        "AIs1",     "Istr",     "STRENGTH",             true,  	        true,	        13)	        --> strength
    //! i Ability.new(false,        "AIi1",     "Iint",     "INTELLIGENCE",         true,  	        true,	        13)	        --> intelligence
    //! i Ability.new(false,        "AIlf",     "Ilif",     "LIFE",                 false, 	        true,	        17)	        --> life
    //! i Ability.new(false,        "Arel",     "Ihpr",     "LIFE_REGEN",           true,  	        true,	        15)	        --> life regen
    //! i Ability.new(false,        "AImb",     "Iman",     "MANA",                 false, 	        true,	        17)	        --> mana
    //! i Ability.new(true,         "AIrm",     "Imrp",     "MANA_REGEN",           true,  	        true,	        8)	         --> mana regen, 8 max
    //! i Ability.new(false,        "AIsi",     "Isib",     "SIGHT",                true,  	        true,	        10)	        --> sight, 10 max
    //! i Ability.new(true,         "AIsx",     "Isx1",     "ATTACK_SPEED",         true,  	        true,	        8)	         --> attack speed, 8 max
//! endtextmacro

/********************
*                   *
*       code        *
*                   *
********************/
//! externalblock extension=lua ObjectMerger $FILENAME$
//! runtextmacro LUA_FILE_HEADER()
//! i dofile("GetVarObject")
//! i dofile("BonusAbility")
//! i dofile("BonusJASS")
//! runtextmacro BONUS_CREATE_BONUSES()
//! i local jass = BonusJASS.get(abilities)
//! i writejass("BONUS",jass)
//! i updateobjects()
//! endexternalblock


System Code

JASS:

library Bonus /* v2.0.0.2
*************************************************************************************
*
*   Adds bonuses to units. In the ini area, these bonuses can be enabled and disabled.
*   Ranges of bonus values can also be modified.
*
*   Bonuses
*       -   Armor                   any unit                        non percent bonus
*       -   Damage                  units with attack only          non percent bonus
*       -   Agility                 hero only                       non percent bonus
*       -   Strength                hero only                       non percent bonus
*       -   Intelligence            hero only                       non percent bonus
*       -   Life                    any unit                        non percent bonus
*       -   Life Regeneration       any unit                        non percent bonus
*       -   Mana                    any unit                        non percent bonus
*       -   Mana Regeneration       units with mana only            percent bonus
*       -   Sight Range             any unit                        non percent bonus
*       -   Attack Speed            units with attack only          percent bonus
*
*************************************************************************************
*
*   */uses/*
*       */ UnitIndexer /*       hiveworkshop.com/forums/jass-resources-412/system-unit-indexer-172090/
*       */ Table /*             hiveworkshop.com/forums/jass-resources-412/snippet-new-table-188084/
*
************************************************************************************
*   SETTINGS
*/
globals
    /*************************************************************************************
    *
    *                                   PRELOAD
    *
    *   Preloads all bonus abilities. This will add a hefty load time to the map but will
    *   prevent lag in game.
    *
    *************************************************************************************/
    private constant boolean PRELOAD = false
endglobals
/*
*************************************************************************************
*
*   Bonuses
*
*       constant integer BONUS_ARMOR
*       constant integer BONUS_DAMAGE
*       constant integer BONUS_AGILITY
*       constant integer BONUS_STRENGTH
*       constant integer BONUS_INTELLIGENCE
*       constant integer BONUS_LIFE
*       constant integer BONUS_LIFE_REGEN
*       constant integer BONUS_MANA
*       constant integer BONUS_MANA_REGEN
*       constant integer BONUS_ATTACK_SPEED
*       constant integer BONUS_SIGHT
*
*   Functions
*
*       function GetUnitBonus takes unit whichUnit, integer whichBonus returns integer
*       function SetUnitBonus takes unit whichUnit, integer whichBonus, integer value returns nothing
*       function AddUnitBonus takes unit whichUnit, integer whichBonus, integer value returns nothing
*
************************************************************************************/
    //! runtextmacro BONUS_SCRIPT()
    function SetUnitBonus takes unit u, integer b, integer v returns nothing
        local boolean n
        local integer a
        local integer p
        local integer on
        local integer i
        local integer nch
        local integer nb
        debug if (not IsUnitIndexed(u)) then
            debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "UNIT BONUS ERROR: INVALID UNIT")
            debug return
        debug endif
        debug if (0==pm<b>) then
            debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, &quot;UNIT BONUS ERROR: INVALID BONUS TYPE&quot;)
            debug return
        debug endif
        set i=GetUnitUserData(u)
        if (v != cb<i><b>) then
            set nch=0
            if (ir<b>) then
                set n=0&gt;v
                set cb<i><b>=v
                set p=b+pm<b>-1
                set on=p+1
                call UnitRemoveAbility(u,bo[on])
                if (n) then
                    set v=v-ps[on]
                endif
                loop
                    if (0&gt;v-ps[p]) then
                        call UnitRemoveAbility(u,bo[p])
                    else
                        call UnitAddAbility(u,bo[p])
                        call UnitMakeAbilityPermanent(u,true,bo[p])
                        set v=v-ps[p]
                    endif
                    exitwhen p==b
                    set p=p-1
                endloop
                if (n) then
                    call UnitAddAbility(u,bo[on])
                    call UnitMakeAbilityPermanent(u,true,bo[on])
                endif
            else
                set nb=v
                set v=v-cb<i><b>
                set cb<i><b>=nb
                set a=bo<b>
                set on=b+pm<b>+1
                loop
                    loop
                        exitwhen 0&lt;v
                        set v=v-ps[on]
                        set nch=nch+1
                    endloop
                    set p=b+pm<b>
                    loop
                        if (0&lt;=v-ps[p]) then
                            set v=v-ps[p]
                            call UnitAddAbility(u,a)
                            call SetUnitAbilityLevel(u,a,bp[p]+2)
                            call UnitRemoveAbility(u,a)
                        else
                            set p=p-1
                            exitwhen p==b
                        endif
                    endloop
                    exitwhen 0==v
                endloop
                loop
                    exitwhen 0==nch
                    set nch=nch-1
                    call UnitAddAbility(u,a)
                    call SetUnitAbilityLevel(u,a,(-bp[on])+2)
                    call UnitRemoveAbility(u,a)
                endloop
            endif
        endif
    endfunction
    function GetUnitBonus takes unit u, integer b returns integer
        return cb[GetUnitUserData(u)]<b>
    endfunction
    function AddUnitBonus takes unit u, integer b, integer v returns nothing
        call SetUnitBonus(u,b,GetUnitBonus(u,b)+v)
    endfunction
endlibrary
</b></b></b></b></b></i></b></i></b></b></i></b></b></i></b>

 
Updated =)

Quite a bit better if I do say so myself ; P


And here is a look at ini script (generated)

And jass tags have a bug >: O. Scroll down a little and you shall see o_O
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),&#039;hpea&#039;,100000,100000,0)
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!)!&#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 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!)&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!)@&#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 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!*&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!*@&#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 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!+&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!+@&#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 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!-&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!-@&#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 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!.&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!.@&#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!<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
 
Updated to 1.1.1.0

->made -ability bonus 2^(power+1) so that 1 less ability is needed for almost the same ranges of power +1
-----| -(2^(power+1) to 2^(power+1)-1

The ini script is now down to 554 lines with default settings and the amount of objects generated are now down to 167 with default settings =). In the previous version, it was 587 lines and 178 objects.
 
this would have been great like 5 years ago when i actually cared - where were you then huh?

I understand, from an ability level perspective, why you take an integer argument, but from a usage perspective, it should really be a real, as the majority of these values can have decimals - even if it just tricks the user into thinking the system has that level of control.... ^^

maybe just silly rambling though
 
Well, having a real argument would be misleading since the system doesn't support decimals =). I don't think that tricking the user is very nice =P.

I mean, I guess I could support decimals for the ones that take decimals, but that'd be nearly useless =). Are 6 new abilities for each object that supports it worth it for decimals? :p

That'd also add in overhead as I'd have to retrieve the decimals from the real (separate them out and cut out ones past hundredths) =).



Most of the people commenting on this state that Status from jesus4lyf and BonusMod from Earht-Fury already do this =P, but they don't support safe object generation and obviously this is much easier to customize. This even has faster loops, although those don't really matter since the speed in this case is negligible =).
 
Simple and useful. Distinct from Status.

Approved.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    alternatively if you not making at least 23 an hour you could work in an Aldi warehouse
  • Varine Varine:
    Yeah I've been thinking about using AI for shit. I'm on vacation next week so I'm going to spend some time reorganizing everything and getting all my shit back in order
  • Varine Varine:
    lol I technically make less than 23 right now because I'm on salary and am there all the time, but it's a lot more than a normal wage still. I also have a meeting soon to renegotiate my pay because I want about a 25% increase to account for what I'm actually doing or a re-evaluation of our duties so that that my responsibilities are more in line with my pay. Depending on how that goes I'm prepared to give notice and move on, I don't mind taking less money so I'd have time for the rest of my life, but I'd rather they just fucking pay me enough to justify the commitment on my end. Plus right now I hold pretty much all the cards since I'm the only one actually qualified for my position.
    +1
  • Varine Varine:
    The other chef was there before me and got his position by virtue of being the only adult when the old general manager got married and didn't want to deal with the kitchen all the time, and happened to be in the position when the GM quit. New GM is fine with front of house but doesn't know enough about the kitchen side to really do anything or notice that I'm the one primarily maintaining it. Last time I left they hired like 3 people to replace me and there was still a noticeable drop in quality, so I got offered like 6 dollars an hour more and a pretty significant summer bonus to come back
  • Varine Varine:
    So honestly even if I leave I think it would last a couple of months until it's obvious that I am not exactly replaceable and then I would be in an even better position.
  • Varine Varine:
    But as of right now I have two other job offers that are reasonably close to what my hourly equivalency would be, and I would probably have more time for my other projects. The gap would be pretty easy to fill up if I had time to do my side jobs. I use to do some catering and private events, personal lessons, consultations, ect, and I charge like 120 an hour for those. But they aren't consistent enough for a full time job, too small of a town. And I'm not allowed to move for another year until my probation is over
  • Varine Varine:
    I guess I could get it transferred, but that seems like a hassle.
  • Varine Varine:
    Plus I have a storage room full of broken consoles I need to fix. I need to build a little reflow oven so I can manufacture some mod chips still, but it'll get there.
    +1
  • Varine Varine:
    I would like to get out of cooking in general at some point in the next ten years, but for the time being I can make decent money and pump that into savings. I've been taking some engineering classes online, but those aren't exactly career oriented at the moment, but I think getting into electronic or computer engineering of some sort would be ideal. I'm just going to keep taking some classes here and there until there's one that I am really into.
    +2
  • The Helper The Helper:
    There is money in fixing and reselling consoles. Problem is people know that so they are doing it
  • The Helper The Helper:
    If you can find a source of broken consoles though you can make money fixing them - sometimes some big money
  • Varine Varine:
    I was buying them on Ebay, but it's pretty competitive, so more recently I've just been telling the thrift stores to call me and I will come take all their electronics they can't sell. I've volunteered there before and people use them like a dump sometimes, and so they just have a massive amount of broken shit they throw away
  • Varine Varine:
    The local GoodWill was pretty into it, surprisingly the animal shelter store was not. The lady I talked to there seemed to think I was trying to steal stuff or something, she wasn't very nice about it. Like I'm just trying to stop you having to throw a bunch of electronics away, if you can sell it great. I'd probably pay you for the broken shit too if you wanted
  • Varine Varine:
    Then I make posts on Facebook yard sale pages sometimes saying I want your old electronics, but Facebook being Facebook people on there are also wary about why I want it, then want a bunch of money like it's going to be very worth it
  • Varine Varine:
    Sooner than later I'm going to get my archives business going a little more. I need some office space that is kind of hard to get at the moment, but without it, I have to be like "Yeah so go ahead and just leave your family heirlooms and hundred year old photographs here at my shitty apartment and give me a thousand dollars, and next month I'll give you a thumb drive. I promise I'll take care of them!"
    +1
  • Varine Varine:
    I can do some things with them at their home, but when people have thousands of slides and very delicate newspaper clippings and things, not really practical. I
  • Varine Varine:
    I would be there for days, even with my camera set up slides can take a long time, and if they want perfect captures I really need to use my scanners that are professionally made for that. My camera rig works well for what it is, but for enlargements and things it's not as good.
  • Varine Varine:
    I've only had a couple clients with that so far, though. I don't have a website or anything yet though.
  • Varine Varine:
    Console repair can be worthwhile, but it's also not a thing I can do at scale in my house. I just don't have room for the equipment. I need an office that I can segregate out for archival and then electronic restoration.
  • Varine Varine:
    But in order for that to be real, I need more time, and for more time I need to work less, and to work less I need a different job, and for a different job I need more money to fall back on so that I can make enough to just pay like, rent and utilities and use my savings to find these projects
    +1
  • Varine Varine:
    Another couple years. I just need to take it slow and it'll get there.
  • jonas jonas:
    any chance to get that stolen money back?
  • jonas jonas:
    Maybe you can do console repair just as a side thing, especially if there's so much competition business might be slow. Or do you need a lot of special equipment for that?
  • jonas jonas:
    I recently bought a used sauna and the preowner told me some component is broken, I took a look and it was just a burnt fuse, really cheap to fix. I was real proud of my self since I usually have two left hands for this kinda stuff :p
  • tom_mai78101 tom_mai78101:
    I am still playing Shapez 2. What an awful thing to happen, Varine, and hopefully everything has been sorted out soon. Always use multi-factor authentication whenever you have the opportunity to do so.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top