Painkeep v2 - Smash your opponents with all the Pain you can dish out. Deathmatch mod - make other players "die." Disclaimer - this is a free product with no warranty - see disclaimer.txt for details. Codename - Cataboligne - programmer and proud shovel owner.

Report article RSS Feed Painkeep hubs and PK mode in v1.2.x and v2.x code

Find out what PK mode is and how it affects normal and custom hubs.

Posted by numbersix on Oct 14th, 2008
Intermediate Server Side Coding.

Here is a recent question:
"What is PK mode and how does it affect regular and custom hubs?"

With the old painkeep v1.1x, anytime you loaded a map with the map command, say "map e1m1", when exit occurred from any method, if the hub flag was set the hub would be loaded. This behavior has been restored with the v1.2.1 release. Hub operation is more complex under the v1.2 release.

"What is PK mode?"
I implemented a map detection option called "PK mode" - simply put the admin can determine how maps are handled with respect to painkeep visual and sound effects and loaded items.

If you connect to a server and enter admin mode you will see this on the main menu:
60: PK mode toggle
--- PK mode = TRUE {... or FALSE}

When you enter 60 at the main menu one of the following messages will appear below the menu indicating the PK mode state:
"PK mode = NEVER" - no map will use painkeep features, no effects appear, and pk items if loaded / collected cant be used.

"PK mode = ALWAYS" - every map is treated as a painkeep map. All will use pk features, effects and items. Every map will return to the hub if the hub flag is set.

PK mod = Map - Painkeep maps will use painkeep features and items. Normal maps will use normal features, effects and sounds.

These operation states determine whether PK mode is true or false for a map. Never is always false and Always is always true. With Map, PK mode will evaluate to true for: the original painkeep maps, maps that load painkeep items, and custom hubs. PK mode will evaluate false for all other maps.

Item over-ride features found in v1.2.1 will work in any mode.

"What does that mean for hubs?"

Original painkeep hub:
Under the v1.2 release if PK mode is false for a map and the server admin issues a map command, such as "map e1m1" the hub will not reload, until manually or map reloaded. For example upon exiting e1m7 which reloads the start map - in painkeep, the hub. This issue is fixed in the v1.2.1 release and manual map loads work as in v1.1x.

Now for the custom hub. The custom hub requires 3 elements to work:
1. .ent file (darkplaces, enhanced engines), bsp edited with quark, re-compiled map - any with hub_custom entity(s) and hub_control entity added and configured correctly.
2. Alias hubmap set to "map {custom hub mapname}" - this is set by the server.
3. custom hub flag and PK hub flag set.

Since the custom hub can reference non painkeep maps that will cause PK mode to evaluate false if PK mode = Map, the custom hub ignores PK mode and will reload as long as its flags and alias are set properly.

No hubs will reload if the hub option is toggled off - from the main admin menu, select:
24: painkeep control
the select:
02: HUB mode toggle

This will toggle hub mode on and off.

A compile option for v1.2.1 reverts to v1.1x behavior for all hubs - only turning off the hub mode exits the hub loop! A server admin could compile the server code so that the v1.2 behavior applies, where having PK mode false will cause a hub loop exit upon manually loading a map.

-Cat

Post comment Comments
numbersix
numbersix Aug 26 2009, 12:25am says:

Does anyone (who even reads this...) think this still sounds confusing?

+1 vote     reply to comment
numbersix
numbersix Jun 3 2010, 5:03pm says:

The confusion with this (if there ever was any) will now end.

After much deliberation with the 2.0 code base I have decided to make the PK mode option in admin an override only, and code map mode to only effect the things I really wanted it to control - environment / static sounds, teleporter sounds, and minor details like that.

All the other pk goodies it controls will be always on if present. So if you carry pk weps to a quake 1 map (e1m1.bsp, etc.) they will work no matter what the map mode setting.

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Quake Icon
Platforms
Windows, Mac, Linux, DOS
Game
Quake
Developed By
numbersix
Contact
Send Message
Official Page
Moddb.com
Release Date
Released May 17, 2010
Mod Watch
Track this mod
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Mods
Painkeep v2.2 (Quake)
Painkeep v2.2 Quake - Multiplayer First Person Shooter
Related Games
Quake
Quake Single & Multiplayer First Person Shooter
Related Groups
qc
qc Hardware & Tech group with 27 members