wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 11-07-2009, 02:12 AM   #1
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default Board

Zoom (requires log in)
Multiboard Decorators
Version 0.2.01
Introduction
Board is written in vJass and requires the NewGen editor, or Jass Helper in some other configuration. Board requires the latest version of Jass Helper.

Board is a library that eases the work of dealing with multiboards. It provides simple decorators around the natives, which allow for simpler code. There is a speed penalty associated with these decorators, as compared to using the multiboard natives.

Note that these decorators do not limit the number of rows or columns you can have in a multiboard. You can have dozens of Board objects with hundreds of cells each, and this system will work just fine.

Documentation of the API is available in the library's documentation.
Credits
The Board Library
Requirements:
To add Board to your map, copy and paste the below library in to a custom-text trigger in your map.
Expand Board:

Change Log

Change Log

  • 0.2.01:
    • Fixed default width bug
  • 0.2:
    • Code refactoring
    • Fixed memory leaks
    • Added more debug-mode error messages
  • 0.1:
    • Initial version


Last edited by Earth-Fury : 04-19-2010 at 06:10 PM.
Earth-Fury is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 11-07-2009, 03:36 AM   #2
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

This is so amazing if it does all of the things it says it does.
__________________
Rising_Dusk is offline   Reply With Quote
Old 11-09-2009, 03:34 PM   #3
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Review:
  • Just a small thing that would be cool: rowInsert and colInsert that insert a row/col respectively into an already created Board. It could be really handy with dynamic multiboards for certain maps.
Is that really the only comment I had? It seemed to do everything the API said it would do and I couldn't think of much else I wanted to actually test / could need for a Board after the test. I attached a picture of my Board.

Good stuff. Just respond about the row/col insertion stuff and we'll go from there.
Attached Images
File Type: jpg Test.JPG (39.3 KB, 227 views)
__________________
Rising_Dusk is offline   Reply With Quote
Old 11-09-2009, 03:50 PM   #4
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Works perfectly, just one thing: Could you please add some basic functions, such as board.showAll(bool), board.showPlayer(p, bool), board.minimize(), board.maximize?

Thanks alot!
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 11-09-2009, 04:18 PM   #5
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Anachron
Could you please add some basic functions, such as board.showAll(bool), board.showPlayer(p, bool), board.minimize(), board.maximize?
Quote:
Originally Posted by Documentation
Collapse JASS:
// set board.visible = true
//     Makes the board visible for all players if set to true, and hidden for all
//     players if set to false.
//
// set board.visible[Player(0)] = false
//     Makes the board visible/hidden for the given player
// 
// local boolean b = board.visible[Player(0)]
//     Returns true if the board is visible for the given player; false otherwise.
// 
// 
// set board.minimized = true
//     Minimizes/restores the board for all players.
//
// set board.minimized[Player(0)] = false
//     Minimizes/restores the board for the given player only.
And:
Quote:
Originally Posted by Rising_Dusk
Just a small thing that would be cool: rowInsert and colInsert that insert a row/col respectively into an already created Board. It could be really handy with dynamic multiboards for certain maps.
The converse would also be valuable, with .removeCol and .removeRow
__________________

Last edited by Rising_Dusk : 11-09-2009 at 04:19 PM.
Rising_Dusk is offline   Reply With Quote
Old 11-09-2009, 04:23 PM   #6
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

RD, I am really blind. Sorry.
I read it but somehow wasn't there with my thoughts.

About the removeCol and addCol, that would be really great too.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 11-09-2009, 07:20 PM   #7
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

The problem with dynamic addition and removal of rows and columns in the middle and left/top of the board is that it would require storing all of the settings for all of the cells. (There are no getters for multiboard item properties.) This is of course impossible to do in a by-value struct, without using hashtables.

So, if people are really willing to add the cost of hashtable manipulation to every operation the library performs, for the benefit of more clean middle-of-the-board insertions and deletions, then so shall it be.

It's even conceivable that the hashtable handling could be turned off if it's not required. Of course, I don't know if I have the sanity to write so many static ifs...

So. Post your opinions on the matter, and I'll either get coding a hellish mixture of modulo math and hashtables, or not.
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Old 11-09-2009, 08:06 PM   #8
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Make a new module for this and use hashtable. Its not that bad actually.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 11-09-2009, 08:28 PM   #9
ploks
User
 
Join Date: Jun 2007
Posts: 99

ploks has little to show at this moment (6)

Default

Quote:
Originally Posted by Earth-Fury
So. Post your opinions on the matter, and I'll either get coding a hellish mixture of modulo math and hashtables, or not.

It would be very cool to have a dynamic multiboard and even more cool if you could chose whether its active or not.
ploks is offline   Reply With Quote
Old 11-09-2009, 09:35 PM   #10
fX_
User
 
fX_'s Avatar
 
Join Date: Jan 2007
Posts: 528

Submissions (2)

fX_ will become famous soon enough (38)fX_ will become famous soon enough (38)

Default

if you use dynamic multiboards items will have to be regarded 'in context'. you will need to know when the multiboard is changed - which rows/columns added/removed - and the 'positions' of each item.
(i dunno, multiboards might not always be handled by a 'single operator'/'in context' - could be done, say, per 'module' or 'section'.)
if you 'bunch them up' (like according to structs/'names'/objects), you dont need this 'in context'-ness and you can just mind whatever row/column/struct/name/object you're manipulating.

ex:
1 row corresponds to data for 1 unit. units monitored in multiboard dynamically; rows are dynamic.
set this unit's data (in field X) to 'value'. but which row, now? i can know only if i did all the row/column adding/removing, other manipulations, etc.
(maybe multiboards are handled this way as by a 'single operator'/in'in context', maybe not. i dunno.)
but if the multiboard is manipulated 'modularly', you cant do this. you need to refer to the 'row' as 'row of this unit'/object.

...but then this is all unimportant if, in the first place, multiboards ought not to be manipulated 'modularly' (i dunno).
fX_ is offline   Reply With Quote
Old 11-12-2009, 03:59 PM   #11
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

So what is the verdict on this? Are you too lazy or not clever enough (:P) to implement the row/col insertions? Everything else about this is fine, it's just that one feature could be really useful. I know I'd use it.
__________________

Last edited by Rising_Dusk : 11-12-2009 at 04:00 PM.
Rising_Dusk is offline   Reply With Quote
Old 11-12-2009, 04:13 PM   #12
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Quote:
Are you too lazy or not clever enough (:P)
I lol'ed.

Quote:
I know I'd use it.
Not only you.

Soo please do it.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 11-25-2009, 04:27 PM   #13
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

You should initialize board items to a non-zero width to fix that bug you figured out last night. It's a real pain in the f*cking ass, especially since it isn't mentioned anywhere.
__________________
Rising_Dusk is offline   Reply With Quote
Old 12-04-2009, 11:02 AM   #14
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Could you please fix the bug? I can do it myself, but I guess it will make this resource a lot better and maybe worth for approval.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]

Last edited by Anachron : 12-04-2009 at 11:02 AM.
Anachron is offline   Reply With Quote
Old 12-04-2009, 01:11 PM   #15
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,727

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

He's doing everything at once. It's okay to use the library, he's going to maintain backwards compatibility. I use it already and it works great.
__________________
Rising_Dusk is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:40 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services