HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

"Extra" Tavern Space?

08-18-2008, 04:57 PM#1
Kyrbi0
I'd like to add some custom Tavern heroes (someday). But the existing four slots won't be enough, and I've already made up my mind not to take out any of the existing ones, or make a "Secondary Tavern" (I want this to be as melee/ladder-friendly as possible).

So is there some way of "adding" space to the Tavern, like a backroom? My first thought was of using Spellbook, but I'm not sure you can sell units from a Spellbook, just use abilities...
08-18-2008, 05:33 PM#2
rulerofiron99
Just to confirm: there are 12 slots.

If you have more than that, give it an ability that selects another tavern. (the other tavern will have no pathing practically be invisible) Just trigger it.
08-18-2008, 05:36 PM#3
Kyrbi0
But wouldn't I still have to insert this 'shadow Tavern' into each map? I was hoping for a method that would allow an unchanged melee map (ish).

Yes, there are 12 slots. 8 are taken up with the current hero list, and I have more than 4 ideas. Thus the issue :/
08-18-2008, 05:43 PM#4
Themerion
Collapse JASS:
I was hoping for a method that would allow an unchanged melee map (ish).

If you wish to overcomplicate it, then trigger it with an invisible tavern.

If you wish to make it complicated for the user, then make all heroes use black icons, and add all of them to the same tavern. Then add an icon/dummy ability to the tavern which tells the user what hotkey to press in order to get what hero.

Othwerwist just make another tavern and place it on the map!?
08-18-2008, 05:57 PM#5
rulerofiron99
Themerion is right, even the simplist triggered way of doing this will probably overcomplicate things for users.

The best way by far would be to make another tavern, but if you really need to make it all in one tavern, the trigger is easy as pie and can be placed into any map easily.
08-18-2008, 08:46 PM#6
Kyrbi0
Darn, so no "buy an item/cast a spell, catch that event, then summon a hero"-type solutions? Not sure that would work with the "only 1 per customer" rule and stuff, though...

So by 'trigger with an invisible tavern', you mean like it summons (temporarily) a sub-Tavern that gives you some more slots' worth of heroes, then disappears after selling?

--EDIT--

Woot! 333th post!
08-19-2008, 10:24 AM#7
rulerofiron99
Doesn't get created on the spot.

But now that you mention it, that could work even better.

Basically, allow your main tavern to sell other taverns. It owns.

Then just trigger it to select the sold tavern, and to destroy it when a hero is bought / tavern is deselected.

There is, however, a problem with this system: infinite heroes forever (no stock refresh cooldown)
08-19-2008, 03:27 PM#8
Kyrbi0
Grr...

So if that wasn't what you were suggesting, what was?
08-19-2008, 03:32 PM#9
TEC_Ghost
Not the most MUI way of doing this, but I just add a Turn Page spell to my tavern, and when it's clicked just replace the tavern with a new one and have the new Turn Page spell go back to the original. So the cons is it affects everyone, but if thats cool then i'd say it's the easiest way to go to save space.
08-19-2008, 04:09 PM#10
Kyrbi0
If by "affect everyone", you mean that if more than one person was "shopping" from the same Tavern, then yeah, that's ok. I mean, how often are you and your enemy/ally both going for the same Tavern at the same time?

(Rhetorical question; I don't play Battle.net much, so maybe it happens pretty often.)

And then what I'd do, to make it really Multi-Map-Instanceable, is have it work via triggers: at Map Initialization, you Pick Every Tavern on the map, then add the ability to them. That way I don't have to go into every map and add that ability to the Tavern.

(Speaking of which, does that leak a group or a location? I'm relatively sure I know how to remove a location, but not so much a group...)
08-19-2008, 04:32 PM#11
Alexander244
All players controlling the current page would be abused, and is not nessesary.

For clarification:
You have two taverns at the same spot, one with a smaller scale so it's invisible/unselectable. In both taverns you have an ability which will deselect that tavern and select the other.
08-19-2008, 04:50 PM#12
Kyrbi0
Eugh, that requires placing. I was hoping to just mass-import all trigger/object editor/imported data, line everything up, set all the proper paths, then start the map and be able to play. Preferably not adding a mini-Locust Tavern at the same spot as every existing Tavern, and giving them the 'switcheroo' abilities.

Unless that could be done with triggers as well... But it still seems simpler to have some mild abuse. What's the worst that could happen, a Peasant standing their switching the pages back and forth repeatedly? Kill the Peasant.
08-19-2008, 05:29 PM#13
Alexander244
It can easily be done with triggers, no need to manually place anything. It also doesn't have the issue of everything resetting when the building is replaced.
08-19-2008, 06:26 PM#14
Kyrbi0
So like this? (assuming the
Quote:
...ability which will deselect that tavern and select the other...
ability is triggered as well?)

Trigger:
Create SubTaverns
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Tavern)) and do (Actions)
Collapse Loop - Actions
Unit - Create 1 Sub-Tavern for Neutral Passive at (Position of (Picked unit)) facing Default building facing degrees

Trigger:
Switch Taverns1
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Switch to Sub-Tavern
Collapse Actions
Selection - Select (Units within 200.00 of (Position of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to Sub-Tavern))

Trigger:
Switch Taverns2
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Switch to Tavern
Collapse Actions
Selection - Select (Units within 200.00 of (Position of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to Tavern))

(Obviously, triggers 2 and 3 are the same, except they switch between the two.)

Even if all this is correct, I'm still unsure as to how to clean up "Pick Every Unit" functions.

~~~

Y'know, if buildings can be given and use a modified Robo-Goblin ability, that would make the last two triggers unnecessary...
08-19-2008, 07:46 PM#15
Themerion
Leaks horribly. Why not use custom data or something to associate the dummy-taverns with the real ones? You don't like variables?

Trigger:
Untitled Trigger 002
Collapse Events
Unit - A unit Sells a unit
Collapse Conditions
(Unit-type of (Sold unit)) Equal to Switch To Sub-Tavern
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Custom value of (Triggering unit)) Equal to 0
Collapse Then - Actions
-------- ----- --------
Set point = (Position of (Triggering unit))
Unit - Create 1 Sub-Tavern for Neutral Passive at point facing Default building facing degrees
Custom script: call RemoveLocation(udg_point)
-------- ----- --------
Set TavernCounter = (TavernCounter + 1)
Unit - Set the custom value of (Triggering unit) to TavernCounter
Set DummyTaverns[TavernCounter] = (Last created unit)
Else - Actions
Selection - Select DummyTaverns[(Custom value of (Triggering unit))] for (Owner of (Sold unit))
Unit - Remove (Sold unit) from the game

Quote:
Originally Posted by Kyrbi0
I'm still unsure as to how to clean up "Pick Every Unit" functions.

You seem to have missed the point. You need to clean up objects/handles. Not functions.

(Center of Playable Map Area) = Location
(Units within 200.00 of Location) = Group

Leaks a group:
Unit - Kill (Random unit from (Units in (Playable map area)))
Does not leak:
Set TempGroup = (Units in (Playable map area))
Unit - Kill (Random Unit from TempGroup)
Custom Script: call DestroyGroup(udg_TempGroup)