• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Snippet] Multiboard

However, that doesn't really apply to this script. The script is quite literally a multiboard wrapper. If you know how multiboards work, you know how this script works. It has all the same features and operates in the same fashion (except that the multiboard items are cached to make retrieval of them faster/easier).

I'm personally of the thought that common data structures, like stacks, dequeues, queues, or multiboards (in this case) shouldn't have their operations described in the docs. It's up to the user to already know what they are given that they are rather standard data structures. If it was something completely new, then the operations should be explained in the docs. There are plenty of tutorials out there that will do a lot better job explaining something like a stack than some docs in the header of a stack script. It isn't a script's job to be a tutorial for standardized things, heh.


Now, if you want a prime example, look at String Parser. I really did write a massive tutorial about what String Parser is and how to use it. The header only contained the API. All of the information on how to use it was in the tutorial. This falls in line with exactly what I said.

This style makes it easier for people to learn the API of new resources that already know how that resource operates (Multiboard in this case). It also makes it easy for people to learn the resource who don't already know how it operates (the massive in-depth tutorial, which beats header docs any day of the week).



Now, as I said, I think the primary issue here between whether a user would want to use this or Board is Board's required use of ARGB. If they are already using ARGB or are planning on using ARGB, then Board is a good way to go. If not, they might as well use Multiboard. If Board was made optional, then the only dif between the two would be speed really >.>. I personally prefer a faster smaller script since I'm a perfectionist, but that's just me. As I said, if I'm the only one who'd use this script, then just gy it. If other people want to use it, then keep it up as there is no reason to gy it >.<. It's pretty simple.


I share anything that I write that appears to have a general use to it, regardless if scripts were already up or not. If I wrote it, then I either didn't know that the other scripts existed or I didn't like the other scripts for some reason or another. It just makes sense to share stuff you do, there is no reason not to >.>. If people don't like it or don't want to use it or prefer that other script, then it just gets gy'd and that's fine. If they do like it, then gj on sharing.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Now, as I said, I think the primary issue here between whether a user would want to use this or Board is Board's required use of ARGB

Oh. I thought it was the API. Err. The documentation. Err. You liked your style better. Oh wait its the required use of ARGB?

I personally prefer a faster smaller script since I'm a perfectionist, but that's just me

Oh cool, I always thought you were a comedian.

As I said before. It's not you who is at fault. It's the standard for accepted resources. Bribe mentioned to someone else that his resource did not provide any additional utility to what was already there (which was a bad thing) but now here is a resource made by yourself that does not provide any additional utility. It's okay though. Really what do I want to happen about this? Obviously I don't care whether or not your resource is taken down I really just want the moderators here to think about what they are accepting and analyze it properly. Netharus you are just a victim in all of this.
 
Berb, I stated the ARGB thing in a previous post as well, you probably just skipped past it.
I'd say to leave both up, primarily for the ARGB lib use in the other one. If people use ARGB, then they'll find the other one better for them. If not, then they might as well use this one. That's my big thought atm >.>.

Now, as I said, I think the primary issue here between whether a user would want to use this or Board is Board's required use of ARGB.


The other reasons were very minor. To me, the main thing is ARGB ^)^. Really, I think that the coloring thing for multiboards should again be a separate script so that users could choose what colorizer thing they wanted to use.


edit
Berb, these resources aren't meant to be insulting to people who have already done them. They just give more options or fix up possible design flaws or w/e. I personally started this trend with GetItemCost. The GetItemCost resource at wc3c contains serious memory leaks and my post about them has been ignored to this day. I finally got fed up with it and made my own version. I don't even bother posting up my thoughts on those resources that I don't like anymore, I just make my own.
 
I personally started this trend with GetItemCost. The GetItemCost resource at wc3c contains serious memory leaks and my post about them has been ignored to this day. I finally got fed up with it and made my own version. I don't even bother posting up my thoughts on those resources that I don't like anymore, I just make my own.

My posts at the TimerUtils thread were ignored too.
Too bad making another TimerUtils would end in it getting graveyarded.
I have an awesome idea for it.
Instead of providing data storage for a single piece of data, it would provide the user with an index that he can use in arrays for data storage :D
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I don't even bother posting up my thoughts on those resources that I don't like anymore, I just make my own.

I should totally write MBoard and just take all the functionality of the natives except add an optional requirement for ARGB. Then I can say that it works with/without ARGB, and its more efficient than Board because I don't have all that nonsense-debug-safety-processor-eating-crap (NDSPEP).

Then I'll make my own version of LinkedList, Queue, Stack, OrderedList, Dequeue, Priority Queue, etc... and they'll all have optional support for ARGB.
 
Nestharus said:
If everyone prefers to use ARGB with Board and I'm the only one who'd end up using this, then I guess might as well just gy it ;p. Just put it up as I figured I''d might as well share it.

No I don't think it should be graveyarded. I would use this, and I'm sure others would too since the main problems with multiboards are the annoying procedures involved and the interface. xP

moyackx said:
And earthfury's version... is bad?? does it have issues?? just wondering.

Nope, it is fine. This script is strictly a wrapper while Board is built more around wrappers + a few extra features. They also have different interfaces. It is mostly just personal preference. ;)
 
Level 10
Joined
May 27, 2009
Messages
495
isn't it possible to use -1 for cols or rows with the width method?

i tried doing that but nothing happens o.o
here:
set board[-1][3].width = 0.03
where 0.03 is 3% of the screen and -1 means it shall be applied to all rows of column 3

EDIT:
here are some other things too :/
call board[-1][-1].setStyle(true,false)
call board[-1][0].setStyle(true,true)
doesn't work

i think everything that has -1 doesn't work o.o
 
Last edited:
i see (they take 0)
JASS:
function MultiboardSetItemValueBJ takes multiboard mb, integer col, integer row, string val returns nothing
    local integer curRow = 0
    local integer curCol = 0
    local integer numRows = MultiboardGetRowCount(mb)
    local integer numCols = MultiboardGetColumnCount(mb)
    local multiboarditem mbitem = null

    // Loop over rows, using 1-based index
    loop
        set curRow = curRow + 1
        exitwhen curRow > numRows

        // Apply setting to the requested row, or all rows (if row is 0)
        if (row == 0 or row == curRow) then
            // Loop over columns, using 1-based index
            set curCol = 0
            loop
                set curCol = curCol + 1
                exitwhen curCol > numCols

                // Apply setting to the requested column, or all columns (if col is 0)
                if (col == 0 or col == curCol) then
                    set mbitem = MultiboardGetItem(mb, curRow - 1, curCol - 1)
                    call MultiboardSetItemValue(mbitem, val)
                    call MultiboardReleaseItem(mbitem)
                endif
            endloop
        endif
    endloop
endfunction
 
What is the point of the MULTIBOARD_LOOPER macro? The first two arguments could be inlined from what I can see (since they are all the same for each of your settings). It also doesn't loop through rows but only columns? What's that about?

what are you on about now??

Inlining first 2 args for a macro won't make a dif, so that stays ;)


And what's this about rows only?? You reading some other code I don't know about? It loops through either >.>.
 
Level 16
Joined
Aug 7, 2009
Messages
1,406
Well, the macro is bugged either way:

JASS:
[//! textmacro MULTIBOARD_LOOPER takes ROW, TABLE, CODE
        local multiboarditem mb
        loop
            exitwhen 0 == c //should be $ROW$ I guess
            set mb = $TABLE$.multiboarditem[this]
            call $CODE$
            set this = this + 1
            set c = c - 1 //again
        endloop
        
        set mb = null
    //! endtextmacro
 
Ok,

Nestharus said:
what is up with you guys and libraries that do 1001 and one things????? A library should have absolutely bare minimum functionality. Additional functionality should be written in additional libraries. That is the art of modularity >.>.

I know this is pretty late, but I just wanted to point out that I completely agree with this.
 
Okay Nes, I made my extension. The previous version had a couple of bugs that needed to be worked out, so I recoded the system. This version has been bug-tested extensively. The best part is that it no longer messes much with the system.

The main thing I did to integrate my system is I added wrapper Ex functions. This was used to save myself from having to implement several textmacros. The awesome thing is that it is all 100% inline friendly, so if you don't have MultiboardExtension, then it will essentially be the same system as before except with a couple of extra functions (however, those should be removed by the optimizer).

Here is the code, as well as the test map:
http://www.hiveworkshop.com/forums/pastebin.php?id=kphyup

I'm open to any suggestions. I am also open to changing the macro names, since I know you usually use ALL_CAPS_ for denoting them. The system itself might need some touch-ups efficiency-wise, but the main thing I'm concerned about is the integration into Multiboard.

Thanks.
 
Top