DMFlag to disable keys and weapons stay in Coop

Moderator: GZDoom Developers

Post Reply
User avatar
camaxide
Posts: 382
Joined: Thu Jun 11, 2015 8:38 am

DMFlag to disable keys and weapons stay in Coop

Post by camaxide »

There would be nice to have a DMFlag (or other setting) to disable staying of weapons and keys in Coop.
We want a weapon to only be picked up by one player, so one has to chose who get which weapon.
Additionally, the levels we play have triggers activated when a key is picked up, and when a key does not disappear it is not picked up, and thus we cant complete levels in coop (which works flawless in Single player).

We can get around this by adding fake dummy objetcs that is hidden inside keys, which activates the triggers in coop, and just agree only one picks up this and that weapon - but a simple flag would be much easier, and make much sense.
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: DMFlag to disable keys and weapons stay in Coop

Post by Chris »

Disabling key staying sounds like it could create situations where players get trapped. PlayerA and PlayerB do a level together, PlayerB grabs the red key and opens the red door, which leads to a blue door. PlayerA grabs the blue key and opens the blue door. PlayerA then dies and goes back to the start. PlayerA runs back into the red door but doesn't have the red key to open it. PlayerB has the red key but can't get through the blue door in the way. If there's another blue door to reach the exit, the level can't be completed.

The only way I could see that working is if all players get the key (and keep it after death) when anyone picks it up.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DMFlag to disable keys and weapons stay in Coop

Post by Graf Zahl »

camaxide wrote: and just agree

Behold the evil word that is so often used to wrap complex problems into supposedly simple solutions.

This simply does not work. Period.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: DMFlag to disable keys and weapons stay in Coop

Post by Rachael »

camaxide wrote:Is there a way to disable staying of weapons and keys in Coop?
We want a weapon to only be picked up by one player, so one has to chose who get which weapon.
Additionally, the levels we play have triggers activated when a key is picked up, and when a key does not disappear it is not picked up, and thus we cant complete levels in coop (which works flawless in Single player).
What is at play here clearly is poor level design - and two players obviously trying to play a level together that was never meant for Multiplayer.

I suggested he created a feature suggestion for this, at the very least to somewhat enable single-player rules in coop. A work-around could probably be created for the keys where if a key is picked up its script still executes at the very least.

As for the weapons, I really see no reason to absolutely force weapon stay to stay on in coop. It should be a standard, not a rule of absolution.
User avatar
phantombeta
Posts: 2084
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: DMFlag to disable keys and weapons stay in Coop

Post by phantombeta »

I'd like to mention that Graf seems to have misread camaxide's post - he wasn't saying to "just" add it, he said that what he is CURRENTLY doing is to
just agree only one picks up this and that weapon
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: DMFlag to disable keys and weapons stay in Coop

Post by gramps »

Chris wrote:The only way I could see that working is if all players get the key (and keep it after death) when anyone picks it up.
Ideally the door could stay permanently open/unlocked after opening it with a key. No idea what level of hackery would be needed to achieve something like that on modder's end.

Should be possible with decorate to replace weapon pickups with some dummy thing that gives you the weapon and goes away, at least.
Last edited by gramps on Sat Nov 03, 2018 1:19 pm, edited 1 time in total.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: DMFlag to disable keys and weapons stay in Coop

Post by Rachael »

gramps wrote:Ideally the door could eat the key and stay permanently open/unlocked after that. No idea what level of hackery would be needed to achieve something like that on modder's end.
That definitely will not work as an engine feature for old maps - because there are multiple locked doors with the same key colour.

It would work if the map explicitly defines this system though, as it would then allow for greater than 6 locks in a single map by simply reusing old ones.
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: DMFlag to disable keys and weapons stay in Coop

Post by gramps »

Yeah, the multiple doors thing occurred to me right after I wrote that... I'm not sure the door actually needs to eat the key, though.

Or -- just spitballing here -- the key could go away when you pick it up, but if you die while holding it, it respawns. Again, not sure what level of effort would be involved to make it happen.
User avatar
camaxide
Posts: 382
Joined: Thu Jun 11, 2015 8:38 am

Re: DMFlag to disable keys and weapons stay in Coop

Post by camaxide »

Graf Zahl wrote:
camaxide wrote: and just agree
Behold the evil word that is so often used to wrap complex problems into supposedly simple solutions.
This simply does not work. Period.
like phantombeta metioned, this is a misread, I explain that me and my friend are currently having to agree on who shall pick up which weapon when we meet them, as when we have a single weapon placed, it is not intended to be picked up by multiple players - thus one just has to leave it there without touching it. This works fine, but can be bothersome to work around at places, and a function to disable the coop weapon-stay would solve it more elegant.
Like someone mentioned I can also solve it on per map basis and add fake objects inside weapons which removes them when one picks them up, but again that would be bothersome compared to having the ability to play the maps coop the singleplayer way. It'd be nice to be able to play coop like singleplayer, without new rules and functions - just two players working together to beat the levels the way they were made to be played.
User avatar
camaxide
Posts: 382
Joined: Thu Jun 11, 2015 8:38 am

Re: DMFlag to disable keys and weapons stay in Coop

Post by camaxide »

Rachael wrote:
camaxide wrote:Is there a way to disable staying of weapons and keys in Coop?
We want a weapon to only be picked up by one player, so one has to chose who get which weapon.
Additionally, the levels we play have triggers activated when a key is picked up, and when a key does not disappear it is not picked up, and thus we cant complete levels in coop (which works flawless in Single player).
What is at play here clearly is poor level design - and two players obviously trying to play a level together that was never meant for Multiplayer.
I suggested he created a feature suggestion for this, at the very least to somewhat enable single-player rules in coop. A work-around could probably be created for the keys where if a key is picked up its script still executes at the very least.
As for the weapons, I really see no reason to absolutely force weapon stay to stay on in coop. It should be a standard, not a rule of absolution.
Why should a map be created different for single player and coop?
It is a bit weird to not be able to play Coop with the same set of rules in game as when you play single player.

It's not as complex as it might sound, it's nothing default we'd like changed - but a toggle for weapons stay in coop, and a toggle for keys stay in coop. Both of these are on by default and forced, it would be nice to be able to toggle those off if one please.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: DMFlag to disable keys and weapons stay in Coop

Post by Rachael »

camaxide wrote:Why should a map be created different for single player and coop?
It is a bit weird to not be able to play Coop with the same set of rules in game as when you play single player.

It's not as complex as it might sound, it's nothing default we'd like changed - but a toggle for weapons stay in coop, and a toggle for keys stay in coop. Both of these are on by default and forced, it would be nice to be able to toggle those off if one please.
There is nothing that says they have to be different for single player or coop. I just don't think it's a good idea to attach a critical script to a key - the whole point of the key is to unlock those exact critical things.

That being said - I do at the very least agree that weapons should not be forced to stay in Coop. Most of the somewhat more modern games I have played even don't force that.

As for the keys - that's a more complicated issue. At the very least the script should trigger when a player picks it up - full stop. And if that happens obviously it's a one-shot script and the key should disable its script when it does. As for making it disappear when picked up - I am a bit dubious by that. I think the only way that will work is to give the game's level itself ownership of the keys, and then change it so that itself, if it has a key, it will force all players to have it as well, at all times.

But it's not up to me. Much as I'd like to implement these things - Graf has already made his decision. It's him you'll have to talk to about this.
User avatar
Player701
 
 
Posts: 1636
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: DMFlag to disable keys and weapons stay in Coop

Post by Player701 »

Regarding weapons - it seems strange to me that "weapons stay" is a deathmatch-only setting. Never considered it before, but now I do agree that it should work in all multiplayer modes. If it's turned off, then weapons could be subject to normal item respawning rules, or maybe a new flag to control weapon respawning specifically could be introduced (in a similar fashion that "big powerups respawn" controls respawning of certain powerups not subject to the generic "items respawn" setting).

And as for keys that execute scripts when they're picked up, is there any reason for them to not do that in multiplayer? Technically, the player does pick up the key after all, since it appears in their inventory. What should be agreed on here is whether the pickup special is executed only when picking up the item for the first time, or for the first and all subsequent times as well. If a level is designed with co-op play in mind, it could use a flag to check whether a pickup script has already run or not. This allows for greater flexibility and lets the level designer choose which scripts are executed once, and which should run every time the same item is picked up (if it stays or respawns).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DMFlag to disable keys and weapons stay in Coop

Post by Graf Zahl »

Player701 wrote: And as for keys that execute scripts when they're picked up, is there any reason for them to not do that in multiplayer?
No. Actually, if the first pickup of the key does not result in a script call I'd consider it a bug. For multiple invocations I'm not so sure - in some maps it will only work if it does and in other if it doesn't. There is no universal solution.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: DMFlag to disable keys and weapons stay in Coop

Post by Matt »

How viable is it to have a dmflag that makes all spawns and behaviours identical to singleplayer, except for the additional player spawns and respawns after death? If someone picks up a key, at least one of the player has got to have a key throughout the duration of the map, so as long as people play smart and stick together (you know, actually cooperate) the risk of getting totally irreversibly stuck can be minimized.

It'll still leave places where things might be broken but in the second worst case scenario (the worst case scenario the map being broken in ways that indicate it had never been tested for coop at all in the first place ) everyone types "kill" in the console and regroups at the start.
User avatar
camaxide
Posts: 382
Joined: Thu Jun 11, 2015 8:38 am

Re: DMFlag to disable keys and weapons stay in Coop

Post by camaxide »

We have maps with multiples of the same key, where they will trigger different actions (like waking up a monster), but as soon as you have a key, no other key can be picked up - same goes if you already have the rocket launcher and a secondary rocket launcher is walked over, it wont be picked up (both making you lose the ammo you would have gone, as well as not triggering whatever might be triggered from picking it up).
When we play Coop, we use a resurrection wad which makes it possible to resurrect the teammate(s) as long as not all players die (at which point you have to restart).
We did a playthrough of both episodes of the game this weekend and it was a blast, but we had like mentioned to agree on which weapon who should have, and some functions of some maps had to get a quick "fix" where I would duplicate key(s) and turn them into health vials, so that whenever you picked up a key (or "didn't" pick it up) - it would also pick up the health vials in the same place executing all actions. it sure worked fine, but looks rather silly - and a simple flag was missed both on the weapon and the keys side.

Since Doom has it's oldschool Coop with it's set rules I don't wish for any of those defaults to change - but I would love if we were able to chose how the game should behave when picking up keys and weapons - after all, what we want is the game to behave like when you play singleplayer. - even ammo count etc. gets offset when dead marines through a map which has dropped their shotguns can't be picked up, since every weapon in coop can only be picked up once by each player. Sure, one could make shells spawn there instead in coop, but it seems like one of those things that it should be able to change if the player wish to simply play a Coop-game with regular Doom Singleplayer rules :)
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”