System Timed Buffs System

luorax

Invasion in Duskwood
Reaction score
67
Timed Buffs System v2.1.0 - LAST EDIT: 10-17-2010

I've heard that modifying the buff's duration is impossible. I think it isn't true. With some nice systems everything is possible. That's why i decided to create this system. It's quite simple, but it should be usefull, and combined with a buffstruct system gives you the way to control the buff times (and once i finish my next project you should manage your units' custom stats [what you give them.. like spell vampirism etc]). But we don't need any more words.

Requires:
-AIDS
-TimerUtils (purple)

And the system:

JASS:
//---------------------TIMED---BUFFS---SYSTEM-----------------------
//---------------------------BY---LUORAX----------------------------
//------------------------VERSION----2.1.0--------------------------
//----------------------- _____ ___ ___-----------------------------
//-----------------------|_   _| _ ) __|----------------------------
//-------------------------| | | _ \__ \----------------------------
//-------------------------|_| |___/___/----------------------------
//------------------------------------------------------------------
//------------------------------------------------------------------
//
// - REQUIREMENTS -
//
//  -Timer Utils by Vexorian
//  -AIDS by Jesus4Lyf
//
// - AND WHAT IS TBS REALLY? -
//
//   TBS means Timed Buffs System. TBS was designed to show the
//   remaining time of the buff for the players.
//
// - WHY TBS? AND WHEN NOT? -
//
//   Using TBS is quite simple. You have to modify 1 row in the
//   "Game Interface" menu, and to create 1 dummy abil and a buff.
//   You call a function, and you're done! But be careful! You
//   have to change all old buffs' icon to "NONE". So they won't
//   be shown in the buff bar.
//
// - API -
//  
//  -function ApplyTimedBuff takes unit whichUnit, real time, integer whichBuff, integer dummyAbil returns boolean
//   Applies a dummy buff on the target.
//   = whichUnit   ==   The unit targeted by the buff.
//   = time        ==   The duration of the buff.
//   = whichBuff   ==   The rawcode of the applied buff.
//   = dummyAbil   ==   The dummy ability used by to place the buff on the target.
//  
//  -function ApplyTimedBuffEx takes unit whichUnit, real time, integer whichBuff, integer dummyAbil, integer dummyUnitID, string orderString returns boolean
//   A more configurable version of the basic function
//   = whichUnit   ==   The unit targeted by the buff.
//   = time        ==   The duration of the buff.
//   = whichBuff   ==   The rawcode of the applied buff.
//   = dummyAbil   ==   The dummy ability used by to place the buff on the target.
//   = dummyUnitID ==   The id of the dummy unit used to place the buff.
//   = orderString ==   The order string used to order the dummy unit to place the buff on the target.
//  
//  -function SetBuffTime takes unit whichUnit, integer whichBuff, real newtime returns boolean
//   Sets the time of a buff for the targeted unit.
//   = whichUnit   ==   The unit targeted by the buff.
//   = newtime     ==   The new duration of the buff.
//   = whichBuff   ==   The rawcode of the buff what you want to change.
//  
//  -function RemoveTimedBuff takes unit whichUnit, integer whichBuff returns nothing
//   Removes a timed buff from the target unit.
//   = whichUnit   ==   The unit what you want to refresh.
//   = whichBuff   ==   The rawcode of the buff what you want to remove.
//
//  -function GetTimedBuffTime takes unit whichUnit, integer whichBuff returns integer
//   Returns the remaining time of the buff. Returns 0 if the unit doesn't have the specified buff.
//   = whichUnit   ==   The owner unit of the buff.
//   = whichBuff   ==   The rawcode of the buff what you want to check.
//
//  -function GetTimedBuffBasicTime takes unit whichUnit, integer whichBuff returns real
//   Returns the total time of the buff. Returns 0 if the unit doesn't have the specified buff.
//   = whichUnit   ==   The owner unit of the buff.
//   = whichBuff   ==   The rawcode of the buff what you want to check.
//
//
//
// - IMPLEMENTING -
//  
//   Copy this trigger into your map, and the other libraries if they aren't installed yet.
//   Then go to the "Advenced --> Game Interface" and modify the line called 
//   "Text - General - 'Level: |CFFFFFFFF%d|R'" to "|cff00ffffRemaining Time:|r |CFFFFFFFF%d|R",
//   or use whatever you want, it's optional for us. Create a dummy ability with 20/30 
//   levels (or more for longer durations), null it's stats and set its duration to 
//   1.5/2.5/3.5 and so on. Then create a buff for it with the icon waht you want 
//   to show, and set the last created dummy ability's placed buff to the dummy buff. Then
//   call the "ApplyTimedBuff" or "ApplyTimedBuffEx" function for the target unit and you're done!
//
//   P.S. : You can use the "Inner Fire" for positive and the "Cripple" for negative buffs.
//
//
//------------------------------------------------------------------
//------------------------------------------------------------------
//----------------------- _____ ___ ___-----------------------------
//-----------------------|_   _| _ ) __|----------------------------
//-------------------------| | | _ \__ \----------------------------
//-------------------------|_| |___/___/----------------------------
//------------------------VERSION----2.1.0--------------------------
//---------------------------BY---LUORAX----------------------------
//---------------------TIMED---BUFFS---SYSTEM-----------------------
//
//
// ------ HERE BEGINS THE SYSTEM ------
//
library TimedBuffSystem requires TimerUtils, AIDS

globals
    //OPTIONS
    private constant integer DUMMY_ID = 'e000'           //The ID of the basic dummy unit used to place the buff
    private constant string ORDER = "lightningshield"    //And the basic order id
endglobals

//SYSTEM CODE! DON'T TOUCH THEM IF YOU DONT KNOW (v)JASS!
private struct TimedBuff
    unit u
    unit dummy
    integer buffcode = 0
    integer buffabil = 0
    string order = ORDER
    integer time = 0
    real ttime = 0.00
    timer t
    integer sid
endstruct

private function R2IR takes real r returns integer
    if R2I(r + 0.555555) == R2I(r) then  
        return R2I(r) 
    endif
    return R2I(r) + 1
endfunction

globals
    private TimedBuff array TB
    private integer id = 0
endglobals

private function GetStruct takes unit u, integer buffcode returns TimedBuff
    local integer li = 0
    local TimedBuff tb
    loop
        exitwhen li > id
        set tb = TB[li]
        if tb.u == u and tb.buffcode == buffcode then
            return tb
        else
            set li = li + 1
        endif
    endloop
    return 0
endfunction

private function Buff_Loop takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local TimedBuff tb = GetTimerData(t)
    local TimedBuff tba
    
    if GetUnitAbilityLevel(tb.u, tb.buffcode) != 1 then
        set id = id - 1
        set tba = TB[id]
        set tba.sid = tb.sid
        set TB[tb.sid] = TB[id]
        call ReleaseTimer(t)
        call UnitApplyTimedLife(tb.dummy, 'BTLF', 0.1)
        call tb.destroy()
    else
        if tb.time - 1 == 0 then
            set id = id - 1
            set tba = TB[id]
            set tba.sid = tb.sid
            set TB[tb.sid] = TB[id]
            call UnitRemoveAbility(tb.u, tb.buffcode)
            call ReleaseTimer(t)
            call UnitApplyTimedLife(tb.dummy, 'BTLF', 0.1)
            call tb.destroy()
        elseif tb.time - 1 >= 1 then
            call SetUnitAbilityLevel(tb.dummy, tb.buffabil, tb.time - 1)
            call SetUnitPosition(tb.dummy, GetUnitX(tb.u), GetUnitY(tb.u))
            call IssueTargetOrder(tb.dummy, tb.order, tb.u)
            set tb.time = tb.time - 1
        endif
    endif
    
    set t = null
endfunction

function GetTimedBuffTime takes unit u, integer buffcode returns integer 
    local TimedBuff tb
    
    if GetUnitAbilityLevel(u, buffcode) != 1 then
        return 0
    else
        set tb = GetStruct(u, buffcode)
        return tb.time
    endif
endfunction

function GetTimedBuffBasicTime takes unit u, integer buffcode returns real 
    local TimedBuff tb
    
    if GetUnitAbilityLevel(u, buffcode) != 1 then
        return 0.0
    else
        set tb = GetStruct(u, buffcode)
        return tb.ttime
    endif
endfunction

function SetBuffTime takes unit u, integer buffcode, real newtime returns boolean
    local TimedBuff tb
    
    if GetUnitAbilityLevel(u, buffcode) == 1 and newtime > 0.0 then
        set tb = GetStruct(u, buffcode)
        call PauseTimer(tb.t)
        set tb.time = R2IR(newtime)
        set tb.ttime = newtime
        call SetUnitAbilityLevel(tb.dummy, tb.buffabil, R2IR(newtime))
        call IssueTargetOrder(tb.dummy, tb.order, u)
        call TimerStart(tb.t, 1.0, true, function Buff_Loop)
        return true
    endif
    
    return false
endfunction

function RemoveTimedBuff takes unit u, integer buffcode returns boolean
    local TimedBuff tb
    local TimedBuff tba
    
    if GetUnitAbilityLevel(u, buffcode) == 1 then
        set tb = GetStruct(u, buffcode)
        set id = id - 1
        set tba = TB[id]
        set tba.sid = tb.sid
        set TB[tb.sid] = TB[id]
        call UnitRemoveAbility(u, buffcode)
        call ReleaseTimer(tb.t)
        call UnitApplyTimedLife(tb.dummy, 'BTLF', 0.1)
        call tb.destroy()
        return true
    endif
    
    return false
endfunction

function ApplyTimedBuff takes unit u, real time, integer buffcode, integer buffabil returns boolean
    local timer t
    local TimedBuff tb
    
    if GetWidgetLife(u) > 0.405 then
        if GetUnitAbilityLevel(u, buffcode) == 1 then
            set tb = GetStruct(u, buffcode)
            call PauseTimer(tb.t)
            set tb.time = R2IR(time)
            set tb.ttime = time
            call SetUnitAbilityLevel(tb.dummy, buffabil, R2IR(time))
            call IssueTargetOrder(tb.dummy, ORDER, u)
            call TimerStart(tb.t, 1.0, true, function Buff_Loop)
        else
            set t = NewTimer()
            set tb = tb.create()
            set tb.u = u
            set tb.t = t
            set tb.dummy = CreateUnit(GetOwningPlayer(u), DUMMY_ID, GetUnitX(u), GetUnitY(u), 0.0)
            set tb.buffcode = buffcode
            set tb.buffabil = buffabil
            set tb.time = R2IR(time)
            set tb.ttime = time
            set tb.sid = id
            call SetTimerData(t, tb)
            call UnitAddAbility(tb.dummy, buffabil)
            call SetUnitAbilityLevel(tb.dummy, buffabil, R2IR(time))
            call IssueTargetOrder(tb.dummy, ORDER, u)
            set TB[id] = tb
            set id = id + 1
            call TimerStart(t, 1.0, true, function Buff_Loop)
        endif
        
        set t = null
        return true 
    endif
    set t = null
    return false 
endfunction

function ApplyTimedBuffEx takes unit u, real time, integer buffcode, integer buffabil, integer dummyid, string order returns boolean
    local timer t
    local TimedBuff tb
    
    if GetWidgetLife(u) > 0.405 then
        if GetUnitAbilityLevel(u, buffcode) == 1 then
            set tb = GetStruct(u, buffcode)
            call PauseTimer(tb.t)
            set tb.time = R2IR(time)
            set tb.ttime = time
            call SetUnitAbilityLevel(tb.dummy, buffabil, R2IR(time))
            call IssueTargetOrder(tb.dummy, order, u)
            call TimerStart(tb.t, 1.0, true, function Buff_Loop)
        else
            set t = NewTimer()
            set tb = tb.create()
            set tb.u = u
            set tb.t = t
            set tb.dummy = CreateUnit(GetOwningPlayer(u), dummyid, GetUnitX(u), GetUnitY(u), 0.0)
            set tb.buffcode = buffcode
            set tb.buffabil = buffabil
            set tb.time = R2IR(time)
            set tb.ttime = time
            set tb.order = order
            set tb.sid = id
            call SetTimerData(t, tb)
            call UnitAddAbility(tb.dummy, buffabil)
            call SetUnitAbilityLevel(tb.dummy, buffabil, R2IR(time))
            call IssueTargetOrder(tb.dummy, order, u)
            set TB[id] = tb
            set id = id + 1
            call TimerStart(t, 1.0, true, function Buff_Loop)
        endif
        set t = null
        return true 
    endif
    
    set t = null
    return false 
endfunction

endlibrary



JASS:
//---------------------TIMED---BUFFS---SYSTEM-----------------------
//---------------------------BY---LUORAX----------------------------
//------------------------VERSION----2.1.0--------------------------
//----------------------- _____ ___ ___-----------------------------
//-----------------------|_   _| _ ) __|----------------------------
//-------------------------| | | _ \__ \----------------------------
//-------------------------|_| |___/___/----------------------------
//------------------------------------------------------------------
//------------------------------------------------------------------
//
// - CHANGELOG -
//
// v1.0.0 - 10-09-2010
//   The First Release
//
// v1.1.0 - 10-09-2010
//   Fixed a bug around the buff removing
//
// v2.0.0 - 10-10-2010
//   The complete system is reworked. Now uses the AIDS, the
//   Timer Utils (purple) and structs.
//   Added the changelog
//
// v2.0.1 - 10-10-2010
//   Minor bugfixes, and added some return value
//
// v2.1.0 - 10-17-2010
//   The system has been redesigned, now supports reals, 
//   doesn't use any hashtable, and added/redesigned some function
//
//------------------------------------------------------------------
//------------------------------------------------------------------
//----------------------- _____ ___ ___-----------------------------
//-----------------------|_   _| _ ) __|----------------------------
//-------------------------| | | _ \__ \----------------------------
//-------------------------|_| |___/___/----------------------------
//------------------------VERSION----2.1.0--------------------------
//---------------------------BY---LUORAX----------------------------
//---------------------TIMED---BUFFS---SYSTEM-----------------------


Bug reports, and feedbacks are welcomed!
 

Attachments

  • TimedBuffs.jpg
    TimedBuffs.jpg
    188.6 KB · Views: 393
  • Timed Buffs v2.1.0.w3x
    40.3 KB · Views: 304

Laiev

Hey Listen!!
Reaction score
188

luorax

Invasion in Duskwood
Reaction score
67
I've tested the most function, but i forgot about that!

Thanks, fixed of course.

About the handle vars:
Yea, i could do using structs, or indexing systems, arrays, etc. But i think this is the most undrerstandable / the easiest way to do it. I've not found any better systems. Easy, but useful.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
1) Vexorian said :
Do not use these functions for new stuff, it is just not the right thing to do...
2) You didn't recycle timers.
3) You create dummies dynamically, which is not necessary.
4) BuffStruct is lot's better than this.
5) You didn't stress it before posting here.
Enough said.
 

luorax

Invasion in Duskwood
Reaction score
67
1) vexorian said :
do not use these functions for new stuff, it is just not the right thing to do...

I don't know why should be a bad thing using that stuf... But okay, reworked the system a bit.

2) You didn't recycle timers.
3) You create dummies dynamically, which is not necessary.
The new version uses the TimerUtils to recycle the timers, and doesn't create dummys dynamically.

4) BuffStruct is lot's better than this.
5) You didn't stress it before posting here.
How could a car be better than a house? Or a bear than a tree? They're different things. Like my system and the BuffStruct. The buffstruct is usefull to place buff which gains bonuses, etc. This system was created to show the remaining time of the buffs. Ind i don't know about any systems like this.

I created this system because i read this. I wanted to show that the next thing isn't true:
Buff Timers
As is said, combinated with a cool buffstruct system we can manage our buffs' time.

EDIT: ohh, i read the first post once again. Maybe that's why you thought that it's like the other buff system. No this isn't. This's a "visual" system. It isn't manage the buffs used to gain bonuses etc, it only shows the buffs' duration.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Well, something like this is better, in efficiency, readability and interface.
JASS:
/*
    Demo Buff System
    
    Usage :
    =========================
    Adding a buff...
    =========================
    Buff[unit].apply(a,l,b,o,d)
    a -> Buff applying ability.
    l -> Buff's level
    b -> Buff's ID
    o -> OrderId of buff applying ability.
    d -> Duration of buff
    
    =========================
    Get remaining time...
    =========================
    Buff[unit].getRemaining(b) -> boolean
    b -> Buff's ID
    
    =========================
    Manual buff removing...
    =========================
    Buff[unit].remove(b)
    b -> Buff's ID
    
    =========================
    Buff checker...
    =========================
    Buff[unit].hasBuff(b) -> boolean
    b -> Buff's ID

    Requires :
    ~ AIDS
    ~ TimerUtils
*/
library DemoBuffSystem requires AIDS, TimerUtils
    
    globals
        private constant integer DUMMY_ID = 'e000'
    endglobals
    
    globals
        private hashtable hasht = InitHashtable()
        private unit Dummy
        //Yeah, one dummy is enough to handle.
        private integer lastAbil = 0
    endglobals
    
    private struct BuffStruct
        unit u
        integer buffId
        timer t
        //Informations that we need.
        thistype prev
        thistype next
        //Linked list, to speed up buff removing.
    endstruct
    
    struct Buff extends array
        private BuffStruct head
        //Yeah, buff list, pretty useful.
        
        private method AIDS_onCreate takes nothing returns nothing
        //Fires when a unit is created.
            set .head = BuffStruct.create()
            set .head.prev = .head
            set .head.next = .head
            //Making a list head.
        endmethod
        
        private method AIDS_onDestroy takes nothing returns nothing
        //Fires when a unit is removed.
            local BuffStruct b = .head.next
            loop
            exitwhen b == .head
                call ReleaseTimer(b.t)
                set b.t = null
                call b.destroy()
                set b = b.next
                //Iterate through whole list to remove applied buffs.
            endloop
            call FlushChildHashtable(hasht,this)
            //Remove all stored struct.
        endmethod
        
        private static method AIDS_onInit takes nothing returns nothing
            set Dummy = CreateUnit(Player(15),DUMMY_ID,0.,0.,0.)
        endmethod
        //! runtextmacro AIDS()
        
        private static method removeBuff takes nothing returns nothing
            local BuffStruct b = GetTimerData(GetExpiredTimer())
            set b.prev.next = b.next
            set b.next.prev = b.prev
            //Unlink the struct from list.
            call UnitRemoveAbility(b.u,b.buffId)
            call RemoveSavedInteger(hasht,thistype[b.u],b.buffId)
            call ReleaseTimer(b.t)
            //Some cleaning functions.
            set b.t = null
            call b.destroy()
        endmethod
        
        method apply takes integer abil_id, integer level, integer buff_id, string orderId, real duration returns nothing
            local BuffStruct b = LoadInteger(hasht,this,buff_id)
            if b == 0 then
                //If the buff is not on unit...
                set b = BuffStruct.create()
                set b.u = this.unit
                set b.buffId = buff_id
                set b.t = NewTimer()
                call SetTimerData(b.t,b)
                //Save all data to struct.
                call TimerStart(b.t,duration,false,function thistype.removeBuff)
                call SaveInteger(hasht,this,buff_id,b)
                //Start the timer.
                
                set head.prev.next = b
                set b.prev = head.prev
                set b.next = head
                //Link it to unit's buff list.
                
                call UnitRemoveAbility(Dummy,lastAbil)
                call UnitAddAbility(Dummy,abil_id)
                call SetUnitAbilityLevel(Dummy,abil_id,level)
                call IssueTargetOrder(Dummy,orderId,this.unit)
                set lastAbil = abil_id
            else
                call PauseTimer(b.t)
                call TimerStart(b.t,duration,false,function thistype.removeBuff)
                //If the buff is on unit, so we modify the duration instead.
            endif
        endmethod
        
        method getRemaining takes integer buff_id returns real
            return TimerGetRemaining(BuffStruct(LoadInteger(hasht,this,buff_id)).t)
        endmethod
        
        method remove takes integer buff_id returns nothing
            local BuffStruct b = LoadInteger(hasht,this,buff_id)
            if b != 0 then
                set b.prev.next = b.next
                set b.next.prev = b.prev
                call RemoveSavedInteger(hasht,thistype[b.u],b.buffId)
                call ReleaseTimer(b.t)
                set b.t = null
                call b.destroy()
            endif
                //Forced remove, some cleaning functions.
        endmethod
        
        method hasBuff takes integer buff_id returns boolean
            return LoadInteger(hasht,this,buff_id) != 0
        endmethod
        
    endstruct
    
endlibrary
 

luorax

Invasion in Duskwood
Reaction score
67
Nice system, but this system does an other thing :D

With your system we can get the remaining time of a buff, IN REAL. With my system we can SHOW the remaining time for the USER, using the fact that when you casts a spell on a target, and move the mouse button over the icon of the buff, there's a line what shows you the level of the ability used to place the buff. We can modify the text, so we can use it to show the remaining time for the players. For example:

You use the Mountain Kings Stormbolt ability (level 2). THen you move the cursor over the icon of the buff, and you'll see something like this:
Stunned

Level 2

This unit will not move.

But with my system you'll see the next:

Stunned

Remaining Time: 3

This unit will not move.

Do you understand me? This isn't a simple buff-placer system, this is a "visual system". And that's why so simple.

And an other thing? Did you try it? Or simple read the first 2 line, and say "enough said"? Test it, and then write your opinion once again :D
 

jrhetf4xb

Member
Reaction score
12
Create a dummy ability with 20/30 levels (or more for longer durations)

This has a huge impact on loading time, considering that the average user would create 10+ abilities with this (if he decides to use it) ... It's a very big downside in my opinion.
 

luorax

Invasion in Duskwood
Reaction score
67
For shorter buffs (for a stun, or a silence) 3-4 level is far enough, but yea, many dummy ability with many levels can slow down the loading time...
In my opinion 2-3 seconds more to wait isn't too much... In my opinion..
 

Laiev

Hey Listen!!
Reaction score
188
As previously stated in another topic, using the system Status (for example), well worth the wait in loading, since it frees you from any other requisite skills extras
 

Deaod

Member
Reaction score
6
The duration of the buff. It's an integer, because the WC3's R2I conversion is a shit.
So intead of fixing your problems on your end, youre going to force the user to fix YOUR problem on HIS end. Way to go.
Go and implement support for real-value durations.

The create method in your struct is unneeded.

Try an array of Tables and store the fricken struct instance, not the timer. If you need to modify the timer, store the timer in the struct instance. Or make the struct you currently have publicly accessible and run things like changing the time remaining as methods.

Your system is going to increase loading times of maps if used heavily (which it is designed for), because spells with more than 4 levels cant be stored in an SLK and you need more than 4 levels for any buff with a duration higher than 4 seconds.

Youll have to create a new buff and dummy ability to apply it per level if you want the description of the buff to show the current level of the ability.
 

luorax

Invasion in Duskwood
Reaction score
67
Okay, i got bored, so updated the system a bit. The new version doesn't use hashtables, supports reals as time (and can round the values, so 14.4445 will become 15).
Feedbacks and bug reports are welcomed. :thup:
 

tooltiperror

Super Moderator
Reaction score
231
So you make this system work by modifying the game constants so that we can not specify buff levels, but you never mentioned that. Also, if you take a buff that may be on a unit for up to five minutes, or even longer (let's say 20 minutes in an ORPG) you're up to 1,200 levels of a buff. Now, let's say we want three different levels of this buff because it can be upgraded by a caster, so we're up to 3,600 levels of a buff. Now let's imagine you have a caster with 4 different spells that apply buffs like that, and we're up to 14,400 buff levels, which is going to take a giant toll on loading time. You should really have pros/cons list.

Buffs are rather important parts of games, and timing needs to be spot on, so you should really be using T32, as according to J4L it is super precise (and better than TimerUtils IMO)

I also think someone said it would be more efficient to use Table.

And can you please get a prettier documentation?

Edit: is there a reason you don't indent inside your libraries? Ugly.

EditEdit: You could write this more efficiently (I shall provide a dummy map in 6.5 hours.)
 

Deaod

Member
Reaction score
6
T32 doesnt support timeouts other than what specified in its constants section.
T32 also has a maximum error of PERIOD/2 in the best implementations (which are slightly more complex) and a maximum error of PERIOD in less complex implementations. Timers used directly dont have any error.

Btw, your current implementation is actually slower than how it was before. Linear searches are ALWAYS slower than O(1) access. Especially now that we have hashtables.
 

tooltiperror

Super Moderator
Reaction score
231
T32 doesnt support timeouts other than what specified in its constants section.
T32 also has a maximum error of PERIOD/2 in the best implementations (which are slightly more complex) and a maximum error of PERIOD in less complex implementations. Timers used directly dont have any error.

Btw, your current implementation is actually slower than how it was before. Linear searches are ALWAYS slower than O(1) access. Especially now that we have hashtables.

Yes, that timeout is also a factor of 1. So he should still use KT2 then, TAZO > TU

Also, I think the fastest approach would be using AIDS.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Not really, TAZO < TU.
J4L already benchmarked it.
High Frequency - T32
Low Frequency - TU

For those who wanted to get different interface other than these 2, KT2.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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