System Unlimited Hero Selection

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
uhbp6.gif

Unlimited Hero Selection System
by Orc_Tamer​

Features:
In GUI (Jass version may be released)

Requires:
Next - Hero Unit
Hero - Unit Type Variable
Start - Integer Variable
TimerStart - Timer Variable (If you want to use it)

Here is a nice little system that will make any of your maps unique by making a tavern, altar, or any building be able to train/summon unlimited heroes. Array limit is 8191 so it's "almost" unlimited =P

Instructions:
Replace "Tavern 0002 <gen>" with any pre-placed building in the game and has "Sell Units" unit ability.
Add the hero to your "Set Heroes"
Use this as your template to add 4 new heroes
Code:
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Next Equal to [COLOR="Blue"][U]Your Next Variable Number[/U][/COLOR]
            Then - Actions
                For each (Integer A) from Your [COLOR="Blue"][U]Last Heroes Made[/U][/COLOR], do (Actions)
                    Loop - Actions
                        Neutral Building - Remove Hero[(Integer A)] from Tavern 0002 <gen>
                Neutral Building - Add Next to Tavern 0002 <gen> with 1 in stock and a max stock of 1
                For each (Integer A) from [COLOR="Blue"][U]Your New 4 Heroes[/U][/COLOR], do (Actions)
                    Loop - Actions
                        Neutral Building - Add Hero[(Integer A)] to Tavern 0002 <gen> with 1 in stock and a max stock of 1
            Else - Actions
Make sure your last loop removes the your last 4 heroes and set your "Next" variable back to 1 and add back your first 4 heroes.

Code:
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Next Equal to [COLOR="Blue"][U]Your Last Next Variable Number[/U][/COLOR]
            Then - Actions
                Set Next = 1
                For each (Integer A) from [COLOR="Blue"][U]Your Last Heroes[/U][/COLOR], do (Actions)
                    Loop - Actions
                        Neutral Building - Remove Hero[(Integer A)] from Tavern 0002 <gen>
                Neutral Building - Add Next to Tavern 0002 <gen> with 1 in stock and a max stock of 1
                For each (Integer A) from [COLOR="Blue"][U]Your First 4 Heroes[/U][/COLOR], do (Actions)
                    Loop - Actions
                        Neutral Building - Add Hero[(Integer A)] to Tavern 0002 <gen> with 1 in stock and a max stock of 1
            Else - Actions

Game Triggers:
Code:
Set Heroes
    Events
        Map initialization
    Conditions
    Actions
        -------- Set Up Our Heroes --------
        Set Hero[1] = Paladin
        Set Hero[2] = Archmage
        Set Hero[3] = Mountain King
        Set Hero[4] = Blood Mage
        Set Hero[5] = Blademaster
        Set Hero[6] = Far Seer
        Set Hero[7] = Tauren Chieftain
        Set Hero[8] = Shadow Hunter
        Set Hero[9] = Death Knight
        Set Hero[10] = Lich
        Set Hero[11] = Dreadlord
        Set Hero[12] = Crypt Lord
        Set Hero[13] = Keeper of the Grove
        Set Hero[14] = Priestess of the Moon
        Set Hero[15] = Demon Hunter
        Set Hero[16] = Warden

Code:
Start Hero
    Events
        Time - StartTimer expires
    Conditions
    Actions
        -------- Change event to "Time Elapsed" if you don't want to use the timer --------
        Set Next = 1
        Neutral Building - Add Next to Tavern 0002 <gen> with 1 in stock and a max stock of 1
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                Neutral Building - Add Hero[(Integer A)] to Tavern 0002 <gen> with 1 in stock and a max stock of 1

Code:
Next
    Events
        Unit - A unit Sells a unit
    Conditions
        (Unit-type of (Sold unit)) Equal to Next
    Actions
        Unit - Remove (Sold unit) from the game
        Set Next = (Next + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Next Equal to 2
            Then - Actions
                For each (Integer A) from 1 to 4, do (Actions)
                    Loop - Actions
                        Neutral Building - Remove Hero[(Integer A)] from Tavern 0002 <gen>
                Neutral Building - Add Next to Tavern 0002 <gen> with 1 in stock and a max stock of 1
                For each (Integer A) from 5 to 8, do (Actions)
                    Loop - Actions
                        Neutral Building - Add Hero[(Integer A)] to Tavern 0002 <gen> with 1 in stock and a max stock of 1
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Next Equal to 3
            Then - Actions
                For each (Integer A) from 5 to 8, do (Actions)
                    Loop - Actions
                        Neutral Building - Remove Hero[(Integer A)] from Tavern 0002 <gen>
                Neutral Building - Add Next to Tavern 0002 <gen> with 1 in stock and a max stock of 1
                For each (Integer A) from 9 to 12, do (Actions)
                    Loop - Actions
                        Neutral Building - Add Hero[(Integer A)] to Tavern 0002 <gen> with 1 in stock and a max stock of 1
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Next Equal to 4
            Then - Actions
                For each (Integer A) from 9 to 12, do (Actions)
                    Loop - Actions
                        Neutral Building - Remove Hero[(Integer A)] from Tavern 0002 <gen>
                Neutral Building - Add Next to Tavern 0002 <gen> with 1 in stock and a max stock of 1
                For each (Integer A) from 13 to 16, do (Actions)
                    Loop - Actions
                        Neutral Building - Add Hero[(Integer A)] to Tavern 0002 <gen> with 1 in stock and a max stock of 1
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Next Equal to 5
            Then - Actions
                Set Next = 1
                For each (Integer A) from 13 to 16, do (Actions)
                    Loop - Actions
                        Neutral Building - Remove Hero[(Integer A)] from Tavern 0002 <gen>
                Neutral Building - Add Next to Tavern 0002 <gen> with 1 in stock and a max stock of 1
                For each (Integer A) from 1 to 4, do (Actions)
                    Loop - Actions
                        Neutral Building - Add Hero[(Integer A)] to Tavern 0002 <gen> with 1 in stock and a max stock of 1
            Else - Actions

Why is this Unlimited?
Because normal taverns or any buildings uses 12 slots max and this can be used more than that.
Why use this?
1. Uses less buildings (Taverns, Altars, ect)
2. It's unique
3. Faster to add heroes to your Tavern
 

Attachments

  • UnlimitedHeroSelectionSystem.w3x
    24.5 KB · Views: 630

0zaru

Learning vJASS ;)
Reaction score
60
It would be nice a jass one ;). Anyway seems fine for me, i would suggest to add some comment or a README that says how to add more "Next" Buttons so you may add more heroes or a way to add more heroes in the "Unlimited Tavern" (Not just 4 I mean) (This is why i suggest that jass would be a better option)

+rep
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
I'll just add to the instructions, and I might make it using NewGen later. :)
 

ertaboy356b

Old School Gamer
Reaction score
86
I remembered making that kind of tavern once, although it's not really a tavern but a menu that pops-up at the start of the game..

I just thought of it while I was playing the Blizzard Race Game (forgot the title). I suggest you add more features into it like for example, the back button...
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
can we use all random commands for this?
how about all pick?

If we stored all the heroes on a unit-type variable array, waaaks! do you think it will be possible? :p

Ex.

Player types -ar

Create Hero Hero[Random#] for Player 1
 

emjlr3

Change can be a good thing
Reaction score
395
meh if u have more then 12 heroes in your map you deserve to be shot anyway, IMO, show me a map with 12 great heroes and Ill show you a shocked look :eek:
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
meh if u have more then 12 heroes in your map you deserve to be shot anyway, IMO, show me a map with 12 great heroes and Ill show you a shocked look :eek:

DotA
EotA
Tides of Blood :eek:
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Good system! Looks nice and works perfectly. The only thing I would suggest is perhaps trying to find an equation instead of using lots of if / then / elses.
 
Reaction score
456
Traxes
Spectre
Faceless Void
Lion
..
You want still more?

Write this system in JASS, then I shall look through it :).
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
The limit is 8191 heroes. Unless you are an idiot that shouldn't be a problem.
 

Hatebreeder

So many apples
Reaction score
380
The limit is 8191 heroes. Unless you are an idiot that shouldn't be a problem.

Whats this supposed to do with "if I'm an Idiot"?
Just asked whats the Maximum number of Pages (I was thinking about making this System into a "unlimited Spells", or "Spells Index" System). But thanks for your elaboration.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Looks awesome! :D
A back button would indeed be really nice.

Would it be too hard if you used the last two rows?
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
> Whats this supposed to do with "if I'm an Idiot"?

Nothing, I'm stating that the limit is unrealistic and one could not reach it unless he is doing something wrong.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      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