MantisBT - Zandronum
View Issue Details
0002597Zandronum[All Projects] Suggestionpublic2016-01-26 14:322024-01-02 04:51
Korshun 
 
normalminoralways
resolvedfixed 
2.1 
3.1 
0002597: Allow coop starts in gamemodes with teams
Currently there is no way to make a gamemode with teams use coop starts. This limitation makes it much harder to make bug-free teamgame mods based around coop on existing coop maps.
Using PLAYERSONTEAMS flag for the cooperative gamemode, as in the following code, DOES NOT work. It makes coop use dm spawns:

cooperative {
addflag PLAYERSONTEAMS
}
There are several ugly ways to work around this limitation:

* make the game coop and replace all damage types to only damage the players who are on the opposing "team" (this is what is used by Master of Puppets). Complexity explodes with the amount of damage types and teams. Explosive team damage cannot be removed if suicides must be preserved. BFG tracer damage is simply impossible to eliminate due to a hardcoded damagetype and no way to reduce the damage to 0 (0 is interpreted as default, and default is 40), but it can be minimized by setting the damage to 1 and doing the rest of damage with an explosion of the needed damagetype that is spawned from a bfg extra effect.

* make scripts to temporarily switch the game to coop and record the coordinates of coop starts, then switch back to the needed gamemode. Then use scripts to teleport the players who spawn at dm spawns back to coop spawns. AFAIK, no mod has attempted this yet.

* a variaton of the second workaround: pre-record the coordinates at server startup by adding bots. Or precompile a list of coop spawn positions for many megawads that will typically be played with a given mod. Avoids the slow startups or annoying map switching but works only with a predefined list of maps. Requires the administrator to specify the wad twice. Has not ever been attempted either.

This all is very ugly and can be avoided by simply allowing the use of coop starts in team games.
No tags attached.
? coopteamgame.wad (68) 2016-01-26 14:32
https://zandronum.com/tracker/file_download.php?file_id=1714&type=bug
Issue History
2016-01-26 14:32KorshunNew Issue
2016-01-26 14:32KorshunFile Added: coopteamgame.wad
2016-05-21 21:09KorshunNote Added: 0014970
2017-07-09 21:56KorshunNote Added: 0017996
2017-07-11 03:54Ru5tK1ngNote Added: 0018002
2017-07-11 04:25Ru5tK1ngNote Added: 0018003
2017-07-11 14:40KorshunNote Added: 0018004
2017-07-11 14:43KorshunNote Edited: 0018004bug_revision_view_page.php?bugnote_id=18004#r10753
2017-07-11 14:46KorshunNote Edited: 0018004bug_revision_view_page.php?bugnote_id=18004#r10754
2017-07-11 15:29Ru5tK1ngNote Added: 0018005
2017-07-15 03:36Ru5tK1ngNote Added: 0018033
2017-07-15 03:38Ru5tK1ngStatusnew => feedback
2017-07-15 10:51KorshunNote Added: 0018037
2017-07-15 10:51KorshunStatusfeedback => new
2017-07-15 10:54KorshunNote Edited: 0018037bug_revision_view_page.php?bugnote_id=18037#r10778
2017-07-15 10:55KorshunNote Edited: 0018037bug_revision_view_page.php?bugnote_id=18037#r10779
2024-01-02 04:51Ru5tK1ngNote Added: 0022959
2024-01-02 04:51Ru5tK1ngStatusnew => resolved
2024-01-02 04:51Ru5tK1ngResolutionopen => fixed
2024-01-02 04:51Ru5tK1ngFixed in Version => 3.1

Notes
(0014970)
Korshun   
2016-05-21 21:09   
Forgot to note, this issue prevents Complex MOP from having team chat.
(0017996)
Korshun   
2017-07-09 21:56   
I found a workaround that enabled teams in Complex MOP. The workaround is to add the following to TeamInfo:

ClearTeams

Team "Marines"
{
    TextColor "Green"
    PlayerStartThingNumber 1
}

Team "Puppetmasters"
{
    TextColor "Red"
    PlayerStartThingNumber 2
}


PlayerStartThingNumber makes the whole team spawn at a single coop start.

BUT this workaround COMPLETELY BREAKS VOODOO DOLLS. This breaks A LOT of Boom maps that use voodoo dolls on conveyors to trigger essential stuff like opening the door forward.
(0018002)
Ru5tK1ng   
2017-07-11 03:54   
The easiest soultion would probably be to implement handling for coop modes that add the PLAYERSONTEAM flag rather than try to change TEAMGAME handling. There are a bit of checks in which TEAMGAME relies on the presence of team spawns otherwise it's a no go. By-passing these checks will lead to undesired side effects. It's just one of those design oversights that causes pain for map flexibility every now and then.

The example wad shows that the functionality is nearly complete and all that's missing are a few checks to force the use of coop spawns as the first option rather than dm spawns.
(0018003)
Ru5tK1ng   
2017-07-11 04:25   
Can you test this build and see if it works any better:

'https://www.sendspace.com/file/l4jp2c [^]'
(0018004)
Korshun   
2017-07-11 14:40   
(edited on: 2017-07-11 14:46)
Players do correctly belong to teams and spawn on coop spawns. In multiplayer, voodoo dolls seem to be replaced by invisible indestructible actors (that don't show up on the automap even with am_cheat 3), which makes Boom maps work correctly. This is great.

In singleplayer, voodoo dolls look as expected. Are the multiplayer voodoo dolls SERVERSIDEONLY?

But players on opposing teams can't hurt each other, unless teamdamage is on, which makes this feature unusable for mods where players on opposing teams need to shoot each other.

Also, it displays "SERVERCONSOLE_SetupColumns: Couldn't get column!" in Windows server GUI on every map change.

(0018005)
Ru5tK1ng   
2017-07-11 15:29   
The column issue is just something on my end.

I am no expert on voodoo dolls so I can't answer that question.

Ill look into fixing the team damage however.
(0018033)
Ru5tK1ng   
2017-07-15 03:36   
Teams should work better now:

'https://www.sendspace.com/file/mhwmfm [^]'
(0018037)
Korshun   
2017-07-15 10:51   
(edited on: 2017-07-15 10:55)
Team damage works and there is no "SERVERCONSOLE_SetupColumns: Couldn't get column!". Voodoo doll maps continue to work.

I think this is fixed, unless there are some unexpected non-obvious bugs.

Many thanks, as it allows MOP and other coop team game mods to be played with actual teams without giving up on voodoo doll maps.

(0022959)
Ru5tK1ng   
2024-01-02 04:51   
It seems this flag was fixed in 3.1. Example wad runs fine and the teams use COOP starts instead of dm.