Limited "God" Mode -- Thoughts

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Limited "God" Mode -- Thoughts

Post by Baker »

In single player and coop, I'd like to hack in a "weaker god mode option" server-side that doesn't protect against

1. trigger_hurt
2. lava, slime
3. squishers

This way you can play in coop never suffering a death penalty aside from "must-die" situations like falling into lava, falling into the void or a trap meant to kill (which may have no true escape anyway).

I'm mostly talking out loud here, but what I am trying to avoid is having to make an enormous journey back to where you are if you die (which can take quite a while on some large maps).

Recording this here so I don't forget my thoughts.

[Mod side QuakeC isn't an option. I want this to work with long-dead closed source single player map releases.]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Re: Limited "God" Mode -- Thoughts

Post by Spirit »

In singleplayer just use savegames.

In coop I would love some sort of teleporter other players who plant for you to resume them (time penalty or something). Like town portals in Diablo.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Hectate
Posts: 8
Joined: Mon Mar 11, 2013 12:38 am

Re: Limited "God" Mode -- Thoughts

Post by Hectate »

I agree with Spirit about Single-player; this is the very purpose of saved games. Perhaps an auto-save would be more convenient though.

The teleporter Spirit mentions for Coop reminds me of playing Halo with my brother - if a player died they would respawn near to the other player so they could continue together. I presume this was also forced by the extremely large levels being streamed into the engine as they were traversed - you wouldn't want to have to reload the beginning of a map while another player was later on in it.
One note about the respawn though; the dead player wouldn't respawn unless there was no longer a danger to the living player. I expect this was a "proximity to nearest enemy" check (you could run away fast enough to get the other player spawned to help you). In many respects it's just an extension of the way the Halo handles shield regeneration; if you survive an encounter you'll get it all back anyway.
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: Limited "God" Mode -- Thoughts

Post by mankrip »

Baker wrote:[Mod side QuakeC isn't an option. I want this to work with long-dead closed source single player map releases.]
Then the only way would be to keep switching the godmode flag on and off at several different points of Quake's physics engine. And this would be a hacky mess, specially for trigger_hurt.

In my opinion, godmode serves more as a map inspection tool than as anything else, so it makes sense to not kill the player in areas where he can't return from. It's useful to, for example, discover the secret room behind the lava pool in Ziggurat Vertigo (e1m8). And it's also useful to explore areas where there's nothing, just so we can be sure that there's nothing in there.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: Limited "God" Mode -- Thoughts

Post by frag.machine »

Baker wrote:In single player and coop, I'd like to hack in a "weaker god mode option" server-side that doesn't protect against

1. trigger_hurt
2. lava, slime
3. squishers

This way you can play in coop never suffering a death penalty aside from "must-die" situations like falling into lava, falling into the void or a trap meant to kill (which may have no true escape anyway).

I'm mostly talking out loud here, but what I am trying to avoid is having to make an enormous journey back to where you are if you die (which can take quite a while on some large maps).

Recording this here so I don't forget my thoughts.

[Mod side QuakeC isn't an option. I want this to work with long-dead closed source single player map releases.]
Problem is, this is conceitually something that will always be better done in QuakeC, since T_Damage is a QuakeC function.
What are the maps ? Do they have custom QuakeC ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Limited "God" Mode -- Thoughts

Post by Baker »

frag.machine wrote:What are the maps ?
All of them :D

At least all the ones that somewhat resemble standard Quake. Checking if a player is in contact with a trigger_hurt, or touching slime or lava or in contact with an entity with "push damage" would be the condition. Probably checking in the vicinity of player pre-think (or possibly post-think) and switching god mode off before the QuakeC frame (or the latter case, the next frame).

Or something.
mankrip wrote:In my opinion, godmode serves more as a map inspection tool than as anything else, so it makes sense to not kill the player in areas where he can't return from. It's useful to, for example, discover the secret room behind the lava pool in Ziggurat Vertigo (e1m8). And it's also useful to explore areas where there's nothing, just so we can be sure that there's nothing in there.
Maybe I can bash it into a decent hack or maybe I can't. Seems likely that this can be made to be pretty close to being on the mark.
Last edited by Baker on Sat Apr 13, 2013 7:34 pm, edited 1 time in total.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Limited "God" Mode -- Thoughts

Post by Spike »

If you know how to activate the god cheat, you probably know the noclip cheat.
You've still not convinced me about why it might be good to encourage cheating.

Actually, what might be interesting in coop is shared health. :s
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Limited "God" Mode -- Thoughts

Post by Baker »

Spike wrote:If you know how to activate the god cheat, you probably know the noclip cheat.
Well, the idea is that in combination with sv_cheats 0, noclip isn't an option.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: Limited "God" Mode -- Thoughts

Post by mankrip »

Another option would be to edit the 'give' command to include the pentagram with an optional timeout, so the player could type "give i 20" (i for "invulnerability", or p for "pentagram") in the console to get the pentagram with a timeout of 20 seconds.

Since the pentagram times out, there's no need to make sure that the player receives damage under certain situations.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Limited "God" Mode -- Thoughts

Post by Spike »

bind w "+forward; give i 20"
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: Limited "God" Mode -- Thoughts

Post by qbism »

Hack a "rune-drop" function into the engine that can bind to a key. Each player has a rune, and will respawn at their previous rune-drop point. Anyone foolish enough to rune-drop while falling into lava deserves the resulting fate. :twisted:
gnounc
Posts: 428
Joined: Mon Apr 06, 2009 6:26 am

Re: Limited "God" Mode -- Thoughts

Post by gnounc »

I made a flag drop mod ...sometime last year?
Inspired by portal, halo, and diablo 2's town portal.
Proooobably dont have the code, but I doubt you'd need it, its an easy enough mod.

It was actually pretty fun to mes with.
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Limited "God" Mode -- Thoughts

Post by r00k »

impulse 255 give quad, make impulse 254 give pent.. the progs.dat will set the default duration..
edit the coop mod to spawn you at your fallen backpack, on your input. Let the player "cam" the area around their backpack,
"press fire or jump to respawn" ..
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: Limited "God" Mode -- Thoughts

Post by frag.machine »

Or, just mimic the Half Life "buddha" mode: the player do receive damage normally, but it never goes below 1. And it is not fully invulnerable (trigger_hurt placed in void areas like chasms still can kill the player).
Again, something better suited to a QuakeC mod, not to be wired directly into the engine IMHO.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Post Reply