DotA Template - All Random

BarzahdX

Active Member
Reaction score
18
DotA Template - All Random, helpers get +rep!

I know this has been asked before, I searched for any answers, but there were none.. I saw one reliable post, but to "fix" the error, I would have to remake all of the "mode" triggers--doesn't that defeat the purpose of having the template?

My question: The current DotA Template has a broken -allrandom mode, it randoms a hero for the host, but not other players--with it's current implementation--how can I fix this simple bug?

I'm looking for an answer, not a suggestion. You all have always answered my questions, please answer this one. :) Thank you. /bow
 

BarzahdX

Active Member
Reaction score
18
Nothing, it's just passively incorrect.. If you want to be technical, I changed the names of the triggers, but I didn't move, delete, or add any. I'll show the trigger.

Code:
Command All Random
    Events
        Player - Player 2 (Blue) types a chat message containing -ar as An exact match
        Player - Player 2 (Blue) types a chat message containing -allrandom as An exact match
    Conditions
        GameMode Equal to MODE_Normal
    Actions
        Set GameMode = MODE_AllRandom_AllPick
        Quest - Display to Players the Secret message: All random mode ena...
        Player Group - Pick every player in Players and do (Actions)
            Loop - Actions
                Set Random_Hero = (Random integer number between 1 and RandomTotal_All)
                Unit - Create 1 Heroes_All[RandomData_All[Random_Hero]] for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                Quest - Display to (All enemies of (Picked player)) the Hint message: (A player has randomed  + (Name of (Last created unit)))
                Set Player_Already_Picked[(Player number of (Picked player))] = (Player_Already_Picked[(Player number of (Picked player))] + 1)
                Player Group - Pick every player in Players and do (Actions)
                    Loop - Actions
                        Player - Make (Unit-type of (Last created unit)) Unavailable for training/construction by (Picked player)
                Set RandomData_All[Random_Hero] = RandomData_All[RandomTotal_All]
                Set RandomTotal_All = (RandomTotal_All - 1)

As stated above, I'm not the only one who has encountered this problem.
 

BarzahdX

Active Member
Reaction score
18
Code:
Setup Players
    Events
    Conditions
    Actions
        -------- All players --------
        Set Players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
        Set LastHeroStanding = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
        Set PlayersCount = (Number of players in Players)
        Player Group - Pick every player in Players and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Current gold to Player_Starting_Gold
                Player - Set (Picked player) Food cap to 6
                Player - Limit training of Heroes to 1 for (Picked player)
        -------- The Empire --------
        Set PlayersTheEmpire = (All allies of Player 1 (Red))
        Player Group - Remove Player 1 (Red) from PlayersTheEmpire
        Set PlayersTheEmpireCount = (Number of players in PlayersTheEmpire)
        Set PlayersTheEmpireReverse = (All allies of Player 1 (Red))
        Player Group - Remove Player 1 (Red) from PlayersTheEmpireReverse
        Set PlayersTheEmpirePlaying = (All allies of Player 1 (Red))
        Player Group - Remove Player 1 (Red) from PlayersTheEmpirePlaying
        -------- Outcasts --------
        Set PlayersOutcasts = (All allies of Player 7 (Green))
        Player Group - Remove Player 7 (Green) from PlayersOutcasts
        Set PlayersOutcastsCount = (Number of players in PlayersOutcasts)
        Set PlayersOutcastsReverse = (All allies of Player 7 (Green))
        Player Group - Remove Player 7 (Green) from PlayersOutcastsReverse
        Set PlayersOutcastsPlaying = (All allies of Player 7 (Green))
        Player Group - Remove Player 7 (Green) from PlayersOutcastsPlaying
        -------- General --------
        Player - Turn Gives bounty On for Player 1 (Red)
        Player - Turn Gives bounty On for Player 7 (Green)
        Player - Turn Gives bounty On for Neutral Hostile

This trigger is run on map initialization.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Well, yes... I already know all the triggers in the template...
The question is: what's different in your map compared to the original?
 

BarzahdX

Active Member
Reaction score
18
The answer is--with relation to the triggers of modes and such--nothing. I even just tested the template on it's own, unedited; same issue.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
"Broken" is extremely unlikely on a map with thousands of downloads...
It's also three years old.

There's two recent threads.
And one I remember from ages ago where he forgot to copy the init triggers, and once he did he wasn't running them.
That's about it.
 

BarzahdX

Active Member
Reaction score
18
Have you tested it yourself? I know that's a stupid question I'm gonna get smacked for, but if you took the template, fresh from the DL, hosted it, had another person join on the opposite team--allrandom would only random your hero.

You're killin' me here Ace! I didn't mess with the map anybit, I just want an answer--I apologize if I'm making this harder than it needs to be...
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
My AR is based of the DotA template as well and works just fine... Randoms for every player and from what I have noticed also does not duplicate heroes...
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Code:
Set Player_Already_Picked[(Player number of (Picked player))] = (Player_Already_Picked[(Player number of (Picked player))] + 1)

As stated above, I'm not the only one who has encountered this problem.[/QUOTE]

Why is there a +1 there?
 

BarzahdX

Active Member
Reaction score
18
I don't know, I'm not very familiar with those types of triggers.. You know, the ones that don't make any sense unless you're the mastermind behind them. :(

Should I remove it and see what happens?
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Remove the +1, I'm fairly certain it shouldn't be there, seeing as I made a trigger like this before. :thup:
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Why is there a +1 there?

Because otherwise that line would not be doing anything?
Because it's 0 to start with, and this changes it?
It's there for a reason...
 

BarzahdX

Active Member
Reaction score
18
I have no idea what it realistically does, but if it starts at 0, then adds 1, then minuses 1, doesn't it also end at 0? :p

I changed the +1 to +0(so I wouldn't have to remake the line), it changed the nothing.. I still got a hero, and still, the others did not.

Is there a way to force people to type -random? That would work. Hehehe!
 

BarzahdX

Active Member
Reaction score
18
Bump.. If it means anything, I didn't copy the triggers, I used the actual DotA Template map and edited things within it.. So nothing I did could have changed it.. Like I said, fresh from the DL, the raw map's -ar doesn't random other players than your own.. Test it yourself if you don't believe me.

Unless of course the map has had an update within the last 3 or 4 months.
 

Fluffball

Well-Known Member
Reaction score
35
Maybe it only does random for the triggering unit. Try doing an integer loop, or I can show you my all random trigger.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top