• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Anyone know about this odd glitch?

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
When a player leaves in a ww3 game (a large massed unit melee type game)

Anyway when a player leaves all its units are killed and removed but sometimes the units arnt removed and turn black so they must turn to player 13-16 not sure which..
and then they arnt killed and removed because it must happen an instant before the leaving player trigger goes off. so the black neutral units just remain in the game..

Ever hear of anything like this happening before and why? i have seen something like this in another large mass unit map before but dont know what would cause that..
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I once saw units getting a bugged armor type (Unknown) upon creation in a Tower Wars map. As unknown takes 0% from all attack types, it obviously was pretty serious. In the end I could not recreate this and have never seen it again so I suspect it was patched.

As for your problem, could easily be bad scripting.
 
Level 13
Joined
Mar 24, 2010
Messages
950
i dont think its the scripting really because its only a trigger that runs when the player leaves and kills the units he owns then removes them no leaks ofc..
idk i just started messing with a map i made years ago lately and i remember that being a problem and sometimes it would happen as a desync or something along those lines as well.

But this issue may also have been patched because it was years ago and i havent messed with it much since.
Was just wondering if anyone has experienced this before and had a reason for it.
 
Level 13
Joined
Mar 24, 2010
Messages
950
what is the oplimit of group selecting units to be killed/removed?

this most often happens only once in the game and sometime causes a server split also about 20-35 mins into game if someone leaves at that point each player could have anywhere from 1000-2000 units on the map x12 players lol Probably a bit over wc3 limits eh?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
When a player leaves in a ww3 game (a large massed unit melee type game)

Anyway when a player leaves all its units are killed and removed but sometimes the units arnt removed and turn black so they must turn to player 13-16 not sure which..

I am not sure what are you asking but when a player removes from a melee game that player's unit are never removed.For example in 1v1 games leaver player's units turn to neutral victim units(black units as you called)
 
Level 13
Joined
Mar 24, 2010
Messages
950
This is a melee type map but heavily altered what setting is it that makes that happen? the changing to neutral victim automatically when a player leaves the game.

is it this action?
Melee Game - Enforce victory/defeat conditions (for all players)
 
Level 13
Joined
Mar 24, 2010
Messages
950
yeah i know but if you remove all those melee actions then when a player leaves the buildings dont become a different players units so it must be something to do with one of those.

  • Actions
    • Melee Game - Use melee time of day (for all players)
    • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
    • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
    • Melee Game - Set starting resources (for all players)
    • Melee Game - Remove creeps and critters from used start locations (for all players)
    • Melee Game - Create starting units (for all players)
    • Melee Game - Run melee AI scripts (for computer players)
    • Melee Game - Enforce victory/defeat conditions (for all players)
must be one of those actions
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
No. It's a default hardcoded thing from Wc3 melee maps. If you delete all these, the player units will still remain as recuable when the player leaves the game.

The only maps that destroys everything when a player looses or quits are those with triggers to destroy the player stuff when it quits or looses. I Guess you assumed the custom triggered behavior as natural default Wc3 behavior.
 
Level 13
Joined
Mar 24, 2010
Messages
950
no.. i understand the difference lol there is a trigger that kills and deletes the units of a leaving player but sometimes it seems to mess up and change to a different player 'neutral extra' before that trigger executes and kills the triggering players units becuz its no longer the triggering players units by the time the trigger goes off. it might be a glitch becuz of the massive amounts of units owned by the player im not sure.
 
Level 13
Joined
Mar 24, 2010
Messages
950
k so i tested it, Melee Game - Enforce victory/defeat conditions (for all players)
is what makes the player that leaves change to neutral victim (player 14)
I no longer use this and made my own victory system so this player changing doesnt happen.
But there is an issue doing so, before i had it flagged:
Game - Set Allow observers to On
Game - Set Observers on defeat to On

letting obs on defeat no longer works.. when the normal melee victory conditions are on and a player dies they are given the option to stay and observe or quit game.

using Game - Defeat (Player(Temp_Integer)) with the message: Defeat!!!!
this only gives them quit game option and doesnt give staying as obs an option.
Any tips to help get around this issue?

Edit:
would it be possible to make that melee vic/defeat condition turned on locally for that 1 player losing their last building so it defeats them but also gives the observer option i the defeat menu?
 
Last edited:
Level 21
Joined
Mar 27, 2012
Messages
3,232
k so i tested it, Melee Game - Enforce victory/defeat conditions (for all players)
is what makes the player that leaves change to neutral victim (player 14)
I no longer use this and made my own victory system so this player changing doesnt happen.
But there is an issue doing so, before i had it flagged:
Game - Set Allow observers to On
Game - Set Observers on defeat to On

letting obs on defeat no longer works.. when the normal melee victory conditions are on and a player dies they are given the option to stay and observe or quit game.

using Game - Defeat (Player(Temp_Integer)) with the message: Defeat!!!!
this only gives them quit game option and doesnt give staying as obs an option.
Any tips to help get around this issue?

Edit:
would it be possible to make that melee vic/defeat condition turned on locally for that 1 player losing their last building so it defeats them but also gives the observer option i the defeat menu?

I spent 15 minutes going through the melee functions.

It actually seems that observers are just ordinary players, who are given full sight and don't have units.
JASS:
function MeleeCheckForLosersAndVictors takes nothing returns nothing
    local integer    playerIndex
    local player     indexPlayer
    local force      defeatedPlayers = CreateForce()
    local force      victoriousPlayers
    local boolean    gameOver = false

    // If the game is already over, do nothing
    if (bj_meleeGameOver) then
        return
    endif

    // If the game was disconnected then it is over, in this case we
    // don't want to report results for anyone as they will most likely
    // conflict with the actual game results
    if (GetIntegerGameState(GAME_STATE_DISCONNECTED) != 0) then
        set bj_meleeGameOver = true
        return
    endif

    // Check each player to see if he or she has been defeated yet.
    set playerIndex = 0
    loop
        set indexPlayer = Player(playerIndex)

        if (not bj_meleeDefeated[playerIndex] and not bj_meleeVictoried[playerIndex]) then
            //call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "Player"+I2S(playerIndex)+" has "+I2S(MeleeGetAllyStructureCount(indexPlayer))+" ally buildings.")
            if (MeleeGetAllyStructureCount(indexPlayer) <= 0) then

                // Keep track of each defeated player so that we can give
                // them a defeat later.
                call ForceAddPlayer(defeatedPlayers, Player(playerIndex))

                // Set their defeated flag now so MeleeCheckForVictors
                // can detect victors.
                set bj_meleeDefeated[playerIndex] = true
            endif
        endif
            
        set playerIndex = playerIndex + 1
        exitwhen playerIndex == bj_MAX_PLAYERS
    endloop

    // Now that the defeated flags are set, check if there are any victors
    set victoriousPlayers = MeleeCheckForVictors()

    // Defeat all defeated players
    call ForForce(defeatedPlayers, function MeleeDoDefeatEnum)

    // Give victory to all victorious players
    call ForForce(victoriousPlayers, function MeleeDoVictoryEnum)

    // If the game is over we should remove all observers
    if (bj_meleeGameOver) then
        call MeleeRemoveObservers()
    endif
endfunction
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
OMG Xonok... would be possible then to play 7v7 using triggers to make observer slots behave as default player slots?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
OMG Xonok... would be possible then to play 7v7 using triggers to make observer slots behave as default player slots?

Nope, because observers do not have separate slots afaik.
Observer = A player that doesn't get any units created for them and has full vision.
It might be possible to hack the game, like RtC did. They have started and maybe finished some features, like joining when game has already started.
 
Level 13
Joined
Mar 24, 2010
Messages
950
No there must be some difference because when they type its in observers chat and they cant talk to other players nor can other players talk to them.
Its like they become a different player or something and i think they cant get units back like their hero from a tavern that costs 0 food via an ally with shared control standing next to it.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I looked over this thread once again.

The option you're looking for is "Observers on defeat".
I think it is hardcoded, so you won't have to do anything more than turn it on when starting the game.
Also note that when I tested, then I was only able to set that option in multiplayer maps(LAN).
 
Level 13
Joined
Mar 24, 2010
Messages
950
Also you cant ally vic with someone in the game while that person stays in game to ''observe'', but if they are by wc3s stands an actual observer u can ally vic without also having to ally that observer again, they are for all purposes out of the game.
there is some different game mechanics going on somewhere in the shadows with that lol

I cant just turn it on because i have troubles with other things happening when its on that cause desyncs etc so i made my own winning system but when a player is dead i dont wanna just force defeat and boot them from the game, i wanna let them observe if they want after they are defeated. but it has to be true observer not keeping them in game without units and giving vision of the map.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Also you cant ally vic with someone in the game while that person stays in game to ''observe'', but if they are by wc3s stands an actual observer u can ally vic without also having to ally that observer again, they are for all purposes out of the game.
there is some different game mechanics going on somewhere in the shadows with that lol

I cant just turn it on because i have troubles with other things happening when its on that cause desyncs etc so i made my own winning system but when a player is dead i dont wanna just force defeat and boot them from the game, i wanna let them observe if they want after they are defeated. but it has to be true observer not keeping them in game without units and giving vision of the map.

The thing is, when a player leaves and has allies, then their units do not get transferred to neutral victim. That's also why observers can't have past units, even if under ally control.
The observer system truly seems like it's just a hardcoded way of giving full vision(the unit transfer is even done by triggers).
 
Status
Not open for further replies.
Top