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 > Systems
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 07-21-2008, 01:49 AM   #1
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default HeroChooseSystem HCS

HCS - HeroChooseSystem

I decided to post this since I wanted to remake the (GUI) herochoose I was using before. Then again, I thought "if you're going to make one anyway, why not release it?"

So, what does this system offer, what makes it "special"?

1. It features a variable number of teams
That's right. You can have 1-12 teams, for 12 players, or even 16 teams if you want to include all the neutral players, although noone will probably ever want to do that.
Hidden information:
The testmap contains only 4 teams(I didn't have more ppl to test it with, and I don't know how I order a unit to buy a unit from another unit >.> If anyone tells me that, I'll test the maximum of 16 teams.)


2. It "looks" good
Ever played AotZ or DoE? Well, then you basically know how this system looks like: It will give every choosable hero an ability that the user can activate in order to choose that hero.
Also you can define a custom camera-setting for each team, the camera will get locked to that setting aslong as the system is running.

4. It's easy to use
It's not hard to use at all, still it will provide you with a very flexible way of handling choosed heroes, and starting and ending the herochoose.

5. Includes randomness
It will take care of choosing a random hero if a player wants one, you'll only have to tell the system which unit(type) it is that will give a random hero.
Also the system will give random heroes to players who weren't fast enough to choose one - unless you disable this, of course.

6. It's customizable
You can choose if you want to enable or disable multiple picking of the same hero, if you want the heroes only to be hidden instead of removed(for remakes), you can specify the error-msg given to players that can't pick a certain hero, and you can specify the effect that will be used when a hero is picked.

7. It is remake-friendly
You can run it as often as you want. Aslong as wc3 doesn't crash, no buts.

8. Its user friendly
It saves the alliance settings you've done with the DummyPlayer and restores
them when the system is finished, no need to worry there. Also it makes it
impossible for players to choose heroes they shall not choose.

The attached example-map, which also includes the system, shows that this system is really easy to use. I'll also post the example-script into this thread, so people can look through it without having to dl/open the map.


First, the documentation:
Expand JASS:


Then the actual system:
Expand JASS:


and the example from the attached map:
Expand JASS:


Changelog:
Code:
v1.2f: got rid of the UnitUserData requirement, now working fully withhashtables(requires 1.24(1.23b+) now. turned the changelog upside down, so that is shows recent changes first(>.>)
v1.2e: fixed another bug with repicking, and updated the test-map to a working one
v1.2d: fixed another bug concerning randomness, and one concerning remakes and repicking
v1.2c: fixed the 1.2b testmap which wasn't working, and fixed the camera-lock.
v1.2b: fixed some bugs with the random function, which e.g. led to people sometimes not getting a hero at the end of the timer when there was no random picker
v1.2: big changes in usage, syntax for almost all functions changed. Best to look into the Documentation to see the changes.
Now includes it's own timer and timerwindow, and automatically creates the hero for the player, also takes care of applying the camera and selecting the hero.
v1.1: added a periodic-reset camera, removed the onlyHideHeroesAtEnd boolean, 
players will have to remove the chooseable heroes themselves.
Also added a function HCS_RepickHero which allows addition of a
-repick mode.
v1.1b: fixed a bug that prevented the alliance-restoring from working in most cases
fixed a bug that disabled the multiPick option
fixed a bug that was able to make heroes unchooseable when players used one of their abilities
v1.0: first release

Thanks for reading, I'm always happy about comments, don't hold back your breath on anything!
Attached Images
File Type: jpg HCSIcon.jpg (543.3 KB, 769 views)
Attached Files
File Type: w3x HCSv1.2f.w3x (40.8 KB, 379 views)

Last edited by Blubb-Tec : 07-04-2009 at 10:30 PM. Reason: removed old dl links to 1.0 and 1.1b, bugged and who needs them anyway?..
Blubb-Tec is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-21-2008, 02:54 AM   #2
chobibo
100% Genuine Retard!
 
chobibo's Avatar
 
Join Date: Jan 2007
Posts: 797

chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)

Send a message via Yahoo to chobibo
Default

Is this a Hero Selection System?
__________________
Where's mah sig?
chobibo is offline   Reply With Quote
Old 07-21-2008, 06:54 AM   #3
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Quote:
Is this a Hero Selection System?
Did you uh... read the title? Or the thread?


On-topic: This looks snazzy, although there's been 1001 of these before. Guess we'll see what the mods think.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Old 07-21-2008, 01:34 PM   #4
chobibo
100% Genuine Retard!
 
chobibo's Avatar
 
Join Date: Jan 2007
Posts: 797

chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)

Send a message via Yahoo to chobibo
Default

Sorry, I was just wondering if what I was thinking was right, my fault, I was in a rush when I posted that.

The System looks good, supports randomizing and re picking heroes, makes life easier for those who make AoS maps.
__________________
Where's mah sig?

Last edited by chobibo : 07-21-2008 at 01:35 PM.
chobibo is offline   Reply With Quote
Old 07-21-2008, 02:11 PM   #5
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default

oh well, re picking is not supported. just multiple picking of the same hero.
Also maybe today or tomorrow, I'll release v1.1 with a periodic-set camera, from what I heard the only possibility to "keep" the camera locked.
For the re-picking, I'd have to think of a way to put a single player back into his original force. well, since that seems to be a desirable feature, I'll include that as well.
__________________
P A R T Y

"In a way, we're all troubled adolescent girls... deep inside."
Blubb-Tec is offline   Reply With Quote
Old 07-21-2008, 05:53 PM   #6
chobibo
100% Genuine Retard!
 
chobibo's Avatar
 
Join Date: Jan 2007
Posts: 797

chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)chobibo has a spectacular aura about (101)

Send a message via Yahoo to chobibo
Default

I got confused about the remake lol, I thought it was a repick. Anyways, Good Luck. Oh and adding repick would be good really great.
__________________
Where's mah sig?
chobibo is offline   Reply With Quote
Old 07-22-2008, 06:54 PM   #7
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default

Version 1.1 released; Changelog in first post, it now includes:
-A REALLY locked camera, players can't trick it anymore.
-the function HCS_RepickHero, it allows for a player to repick his hero.
-A Screenshot/icon for the system(nothing great though :/)

Just a question, is the documentation of system/config/example understandable, or is it too crappy?

Edit: also, if anyone sees memory leaks in the (uncommented) script, please tell me.
__________________
P A R T Y

"In a way, we're all troubled adolescent girls... deep inside."

Last edited by Blubb-Tec : 07-22-2008 at 06:57 PM.
Blubb-Tec is offline   Reply With Quote
Old 08-02-2008, 11:56 PM   #8
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default

In the testmap, when you random a hero using the Tinker, the hero you get isn't selected so you will still have the Tinker as your selected hero.
Malf is offline   Reply With Quote
Old 08-03-2008, 12:54 PM   #9
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default

Quote:
Originally Posted by Malf
In the testmap, when you random a hero using the Tinker, the hero you get isn't selected so you will still have the Tinker as your selected hero.

mhhh I don't really understand your problem. I just tested it again with the 1.1 testmap from this thread, and chose the tinker as player 1, got a random hero, did a -repick, picked the tinker again, got another random hero.
Maybe you can tell me which player-slot you used?
__________________
P A R T Y

"In a way, we're all troubled adolescent girls... deep inside."
Blubb-Tec is offline   Reply With Quote
Old 08-03-2008, 04:18 PM   #10
Rising_Dusk
Obscurity, the Art


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

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

What's the deal with all of the force copying functions? Those seem... I don't know, unnecessary? I'm sure you could do all of the same things without the extra function calls sapping (However little) speed from the system.

Additionally, I had a few minor concerns. When a hero is selected by a team member, it should automatically hide the unselected heroes assuming everyone from the team has selected. Also, I was unable to test, but it hides/cleans up the timer as soon as all players from all teams select as well I hope. Additionally, it should select the hero (Like, for the player, unit selection) upon selection.

I like it though, it's cute.
__________________
Rising_Dusk is offline   Reply With Quote
Old 08-03-2008, 11:47 PM   #11
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default

ahh, finally some more feedback :D Well then, let me answer all those things..

Quote:
Originally Posted by Rising_Dusk
What's the deal with all of the force copying functions? Those seem... I don't know, unnecessary? I'm sure you could do all of the same things without the extra function calls sapping (However little) speed from the system.
Ah yes, I thought about that multiple times too, but then I like short calls in my init functions, like set iX = intParam or call CopyGroup(g, g2). And since I needed the copy-functions inside my init-functions, I chose to not inline the copy-functions


Quote:
Originally Posted by Rising_Dusk
Additionally, I had a few minor concerns. When a hero is selected by a team member, it should automatically hide the unselected heroes assuming everyone from the team has selected.
That is a good idea, but I'm not sure if that will be favorable for maps that make use of the repick-function? I would then have to unhide the heroes again etc. I could implement a boolean for hiding heroes when all players from a team have chosen a hero though. But I'm not sure if it would really be worth the effort...


Quote:
Originally Posted by Rising_Dusk
Also, I was unable to test, but it hides/cleans up the timer as soon as all players from all teams select as well I hope.
The herochoose-timer with its timer-dialog is only part of the testmap, the system itself only has a timer for periodically resetting the camera. That one is only paused when the herochoose ends, simply because I wasn't sure if destroying/recreating it for every remake would be better or worse.
And since the testmap includes a repick-mode, I think it is best not to hide/destroy the herochoose-timer before the time is up.


Quote:
Originally Posted by Rising_Dusk
Additionally, it should select the hero (Like, for the player, unit selection) upon selection.
Again, that is only a matter of the testmap, since the system itself only tells the map's script which unittype was picked, so the user has full control over the creation of the chosen hero.
I'll add that though when(if?) I release another version, since I basically only forgot it in the example-map ^_^


Quote:
Originally Posted by Rising_Dusk
I like it though, it's cute.
thanks
__________________
P A R T Y

"In a way, we're all troubled adolescent girls... deep inside."
Blubb-Tec is offline   Reply With Quote
Old 08-05-2008, 12:00 PM   #12
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default

v1.1b released, fixed some bugs.
__________________
P A R T Y

"In a way, we're all troubled adolescent girls... deep inside."
Blubb-Tec is offline   Reply With Quote
Old 08-09-2008, 05:51 PM   #13
Rising_Dusk
Obscurity, the Art


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

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 Blubb-Tec
Ah yes, I thought about that multiple times too, but then I like short calls in my init functions, like set iX = intParam or call CopyGroup(g, g2). And since I needed the copy-functions inside my init-functions, I chose to not inline the copy-functions
I'm still 100% certain that this system is doable without all of those unnecessary extra functions. I mean, the main reason I say that is because in all of the hero selections I've made I have never needed to copy a group or a force, it seems like unnecessary steps. Also, the BJ GroupPickRandomUnit() doesn't leak or anything, just has a few weird conditionals. If you just apply it's internals directly it wouldn't be a problem.

Also, I'm confused. Why do you have so much stuff in the test map if it isn't a part of the system? That's misleading to people like me that test it to see all of what your system does. Also, selecting the hero for the player and monitoring timers -- To me -- Is a key part of the hero selection system. So if it isn't in your system now, I highly recommend you incorporate it.
__________________
Rising_Dusk is offline   Reply With Quote
Old 08-10-2008, 11:26 AM   #14
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default

Quote:
Originally Posted by Rising_Dusk
I'm still 100% certain that this system is doable without all of those unnecessary extra functions. I mean, the main reason I say that is because in all of the hero selections I've made I have never needed to copy a group or a force, it seems like unnecessary steps. Also, the BJ GroupPickRandomUnit() doesn't leak or anything, just has a few weird conditionals. If you just apply it's internals directly it wouldn't be a problem.
Well I guess I can change to code to work without those copy-functions, so I'll just go and do that. I just don't quite get what you said about applying GroupPickRandomUnit()'s internals directly, because my GroupGetRandomUnit() function looks very similar to that one, it just uses another method.

Quote:
Originally Posted by Rising_Dusk
Also, I'm confused. Why do you have so much stuff in the test map if it isn't a part of the system? That's misleading to people like me that test it to see all of what your system does. Also, selecting the hero for the player and monitoring timers -- To me -- Is a key part of the hero selection system. So if it isn't in your system now, I highly recommend you incorporate it.
Originally I wanted to grant the user full control over the hero creation and start/end of the selection, since some users might be using something else than a timer to determine the end of their herochoose system.
But creating the hero, selecting it etc shouldn't be a problem for the system, would only require an x and y param for every team, and I'll just go and build that timer into the system, since probably 99% of all mappers use timers to end their herochoose anyway.

So I'll put all those changes into the next version, shouldn't be too much so I figure I'll be able to release it later today.

Edit: v1.2 released, changelog in first post.
Edit2: hotfixed v1.2, repicking was not disabled by default. The file only had 1 view, so I didn't release v1.2a or so..
__________________
P A R T Y

"In a way, we're all troubled adolescent girls... deep inside."

Last edited by Blubb-Tec : 08-10-2008 at 02:20 PM.
Blubb-Tec is offline   Reply With Quote
Old 09-03-2008, 05:09 PM   #15
Blubb-Tec
Full Metal Mapping!
 
Blubb-Tec's Avatar
 
Join Date: Nov 2006
Posts: 270

Submissions (1)

Blubb-Tec will become famous soon enough (37)Blubb-Tec will become famous soon enough (37)

Default

version 1.2b out, fixed a few bugs with the random-function
__________________
P A R T Y

"In a way, we're all troubled adolescent girls... deep inside."
Blubb-Tec 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 05:38 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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