1 - Map's entity "worldspawn" flags and settings:
In the (server-side) worldspawn entity of a map running on prozac there are several bitflags and settings that may be set, summarizing them, I'm just gonna paste here the source code as you can see it in the mod:// OfN - Possible map bit flags on world.#mapflags field ("has_holo") on worldspawn - 2020 some of them deprecated #define MAPFLAG_WATERVISED 1 // works - Makes the server to enable the watervis cvar when loading map #define MAPFLAG_NOTEAMSCORE 2 // works - Makes the mod to ignore team score increase in normal player frags for map #define MAPFLAG_GUARDOFF 4 // works - Disables spawn guard for the map #define MAPFLAG_OBSERVER 8 // works - Allows observers to move, otherwise they get a fixed (un-moveable) position #define MAPFLAG_STORM 16 // still works - Enables the lightning storm for the map #define MAPFLAG_EARTHQUAKE 32 // still works - Enables earthquakes for the map #define MAPFLAG_DAYTIME 64 // still works - Enables daytime emulation lighting for the map #define MAPFLAG_RUNES 128 // still works - Enables runes by default on the map #define MAPFLAG_NOCUSTOM 256 // still works - Disables custom player classes for the map #define MAPFLAG_NOSTOCK 512 // still works - Disabled "stock" player classes for the map #define MAPFLAG_NOEXTRAS 1024 // after search of the code, it may be buggy - DOESN'T WORK PROPERLY (22-04-2023)These bitflags above, to take effect, must be be set on a field called "has_holo" in your worldspawn entity. If, for example, you're building/editting a map which is watervised and want also the lightning storm to be enabled on it, you should add the 2 values together, the watervised flag (1) and the storm flag (16). So, the value would be 1+16 = 17. The first bitflag, the watervised one, tells the mod to enable watervis for your map. Take into consideration, that, if level is not watervised and you set this, the water and other liquid surfaces will look awful on clients not running with the client cvar "r_novis" enabled. DO NOT USE old flags to enable features in old versions of the mod. They won't do anything (they do something else instead now). If you want to enable fog, or rain, or snow on ProzacQW clients at the end of this page there is a list explained of integration settings that would do that. Note that these bitflags control aspects of the mod and doesn't require ProzacQW at all.
Rotate entities (from Hipnotic mission pack, first seen in TF in the MegaTF mod, and from 2001 in Prozac CustomTF)
These entities, including "func_rotate_entity", "func_rotate_door" and "func_rotate_train", were introduced by MegaTF to the Quake TeamFortress world. They came and were adopted from the hipnotic Quake1 mission pack (the first official expansion for the game). These entities work as they used to in that mission pack and in megatf, but there is one difference with megatf implementation: for func_rotate_entity the first bit (1) on the entity spawnflags field decides if the object rotation can be toggled, and the second bit (2) if it starts moving/rotating from the start. This is the intended behaviour of the hipnotic code, but in megatf these spawnflags are both (1) which is wrong, got badly implemented on it. This causes incompatibility on some maps, making the func_rotate_entity work on one mod and not the other.
Additional ambience sounds entities (first seen in TF in the MegaTF mod, and from 2001 in Prozac CustomTF)
The following entity names/kinds can be used to set a predefined ambience sound samples (they use looped WAV files) on your maps:
"ambient_jungle"
"ambient_diesel"
"ambient_chopper"
"ambient_eerie"
"ambient_ocean"
"ambient_peakwind"
"ambient_lavapit"
"ambient_unholy" (musical piece used in unholyk.bsp)
"ambient_flagflap"
"ambient_high_wind"
"ambient_meadow"
"ambient_brook"
"ambient_ice_moving"
"ambient_nightpond"
"ambient_alert"
"ambient_chant"
"ambient_onboard"
"ambient_rocket_engine"
...and a special one that allows to set a customized (not predefined) sound sample to play as ambient sound:
"ambient_sound"
In this last kind of ambient entity use the "noise" entity string field to define the WAV sample to play (must be a looped one, if you don't know how to loop WAV files ask in our discord). In all ambience sounds you may specify the intensity of the sound with the float entity field called "volume". Set it from 0 (the minimum) to 1 (the maximum sound loudness). Default volume is 1 (full intensity). Similarly, you can set the attenuation setting of the ambient_sound entity sound within the "option" float entity field. It must be an integer ranging from 0 (no attenuation, plays uniformly on the whole map) to 3 (maximum attenuation, the sound only is perceptible when the player is at very close range). This attenuation setting default is 0 (no attenuation in quake). Use 1 for normal sound attenuation.
MegaTF style map turrets: "monster_turret"
These turrets must be placed just below a ceiling part of the map, on spawn, they will move until they touch a ceiling surface on map start, and stay there. Map examples can be found at "frontlin.bsp", "megatf_asteroid.bsp", and "awaken2_ctf3.bsp" (shown below):
Miscellaneous entities shared with MegaTF
"func_glass"
This entity can be attached to a map brush or simply set its boundaries with "absmin" and "absmax" entity fields. Use "health" to determine the resistence (damage intake before breaking into pieces) of the glass, default is 1 HP.
"func_bobbingwater"
This entity makes a water brush to move up and down cyclically. See "frontlin.bsp" for an example.
"effect_random_sound"
This entity makes a sound sample to play at random time intervals. Use the "noise" string entity field to define the sound sample. The "volume" float determines the intensity (0 to 1) at which the sound will be played. The sample will be played at a random interval determined in seconds by the "option" (minimum) amd "option2" (maximum). See "frontlin.bsp" for an example.
"effect_rockfall"
This point entity plays a rock-fall sound audio sample when touched. See "frontlin.bsp" for examples.
"ambient_weaponfire"
This entity works in a similar way to "ambient_sound" but you cannot set the sample, it plays randomly several warfare themed sound samples instead. See "frontlin.bsp" for examples.
"effect_airburst"
Plays bombing-like sound effects, and spawns randomly explosions over a random extense area, around the entity. See "frontlin.bsp" for examples.
"monster_dog"
Spawns a dog for the team specified on this entity's "team_no" field. You can set the amount of times they respawn with the "lives" entity field, and how much HP they have with the "health" field. You may also override the default minimum and maximum delays for respawn time with the "ammo_shells" (minimum) and "ammo_nails" (maximum). The resulting respawn time will be a random value between those 2 values. See "frontlin.bsp" for examples.
"monster_zombie"
Spawns a crucified zombie monster. The entity must contain the bit 1 in the "spawnflags", or it will get removed. That bitflag determines the zombie is of crucified kind. They take damage, until gibbed, and their tollerance to damage can be set with the "health" entity field.
3 - Regular Quake/TeamFortress entity extensions present in the Prozac CustomTF mod:
Standard Quake entity extensions in Prozac
"func_door" extensionsIn addition to the standard quake door sounds in Prozac you can set custom sample sounds or different sets of predefined samples (in this case same as in MegaTF) for the door entity different movement stages sounds. To use the predefined extended sounds, just set the "armorclass" entity field to 1, 2 or 3. If you want to use custom samples for the door set it to 100, and use "noise1" and "noise2" to specify the WAV sound files. Also in Prozac you can set a target name to be triggered when the door block-kills someone, in the "event" string field.
"func_button" extensionsIn addition to the standard quake button sounds in Prozac you can set custom sample sounds. If you want to use a custom sample for the button set the "sounds" entity field to 5, and use "noise" to specify the custom WAV sound file. Also in Prozac if you set the 1 bit in "spawnflags" the button will be both triggered by push or damage.
"trigger_hurt" extensionsThere are 3 new bitflags to be able to set in the "spawnflags" entity field of the hurting triggers in Prozac. If you set the 2097152 bit the trigger will start in a "disabled" state, only will be enabled by using an entity of the kind "func_switch_trigger" (see Prozac entities section) with a target set to this hurting trigger. If you set the 4194304 bit, the hurt_trigger won't auto reset after being triggered, and if you use the 8388608 bitflag the damage won't gib the target ever (whatever was the damage done).
Standard TeamFortress entity extensions in Prozac
"info_tfgoal" extensionsYou can make an info_tfgoal sound to play with no attenuation (played at full loudness to everyone anywhere on the map) by setting its "option" entity field to 1.
"item_tfgoal" extensionsYou can make an item_tfgoal to persist on removal by using the bit flag 16384 in the "goal_activation" (or g_a) field. It impides the item entity to be removed, after removed from a goal can't be dropped until explicitly returned. Check the bluepain map for an example of the usage of this feature.
4 - Prozac CustomTF "exclusive" specific map entities:
Special trigger entities in Prozac
"trigger_alter_equip"Special "model" entities in Prozac
"model_solid"Miscellaneous entities included in the Prozac CustomTF mod
"model_fieldgen"5 - ProzacQW (Prozac's QuakeWorld client) "Integration" with server:
(Note: If you don't care about ProzacQW and just want to know about map entities you may skip this section)
The way the server decides fog, weather, sky and shader settings for ProzacQW is called client-server integration. The ProzacQW client can be set to ignore some, all or none of every specific aspect of those, in case the user doesn't want to use such features. The default is all integration enabled.
The entity with the integration information and settings for these features should be placed on maps as a "world_integration". This entity is removed after map starts automatically, just after the mod and server were allowed to read its fields correctly. The main entity field that is relevant for ProzacQW clients is "event", and contains a series of "tokens" or items. The order in which these tokens are defined/specified is not important. Tokens starting with "f" are related to fog settings, the ones starting with "w" are weather settings, the ones starting with "s" are sky-related settings and the ones starting with "h" are water-shader settings. These items must be written in the entity field sepparated by a space in a "xy:z xy:z xy:z" format (showing x as the kind of token, y as the parameter identifier, and z as the desired value. x and y must be 1 character long, z could be any length to fit the value).
Fog integration
The following tokens control every aspect of the fog for the map in the ProzacQW client: (any use of these tokens auto-enables fog)
fm:x this integer corresponds to the gl_fog_mode client cvar, possible values are 0, 1 or 2 fd:x this float (0 to 1) corresponds to the gl_fog_density and only applies when fog mode is 1 or 2 fs:x this float (128 to 8192) corresponds to the gl_fog_skydist fr:x this float (0 to 1) corresponds to the gl_fog_red client cvar fg:x this float (0 to 1) corresponds to the gl_fog_green client cvar fb:x this float (0 to 1) corresponds to the gl_fog_blue client cvar fn:x this float corresponds to the gl_fog_near and only applies when fog mode is 0 ff:x this float corresponds to the gl_fog_far and only applies when fog mode is 0
Weather integration
The following tokens control every aspect of the weather feature for the map in the ProzacQW client:
wm:x this integer enables weather, use 1 for rain, 2 for snow, and 0 to turn off weather wr:x this byte (0 to 255) corresponds to the red intensity of rain particle color, corresponds to weather_rain_red wg:x this byte (0 to 255) corresponds to the green intensity of rain particle color, corresponds to weather_rain_green wb:x this byte (0 to 255) corresponds to the blue intensity of rain particle color, corresponds to weather_rain_blue
Sky integration
The following tokens control every aspect of the sky for the map in the ProzacQW client:
sn:x This string will make the client to load that specific skybox name
Water-shader integration
The following tokens control every aspect of the water-shader for the map in the ProzacQW client:
hm:x 0 to 1 default is 0, enables shader. Corresponds to the r_watershader cvar hf:x 0 to 1 default is 0.25 Refraction/reflection balance. Corresponds to the shader_ref_balance cvar hw:x 0 to 1 default is 0.2 Original water texture alpha. Corresponds to the shader_tex_balance cvar hv:x default is 0.5 Wave size. Corresponds to the shader_wavesize cvar hs:x default is 0.02 Wave strength. Corresponds to the shader_wavestrength cvar hr:x default is 18 Wave rate. Corresponds to the shader_waverate cvar hc:x default is 55D Water solid color. Corresponds to the shader_color cvar hb:x default is 0, 1 is full solid color. Corresponds to the shader_col_balance cvar hn:x default is 0.32, Sets the fresnel intensity. Corresponds to the shader_fresnel cvar hp:x default is ABF, Ripples color. Corresponds to the shader_rip_color cvar ha:x default is 0.5, ripples alpha balance. Corresponds to the shader_rip_balance cvar hx:x default is 4095, Light source x coord. Corresponds to the shader_light_x cvar hy:x default is 4095, Light source y coord. Corresponds to the shader_light_y cvar hz:x default is 4095, Light source z coord. Corresponds to the shader_light_z cvar hh:x default is 20, Shine damp value. Corresponds to the shader_rip_shine cvar hi:x default is 0.6, Ripples reflectivity. Corresponds to the shader_rip_reflect hd:x default is 3, Displacement of the waves/ripples. Corresponds to the shader_displacement cvar ht:x default is 15, Ripples distortion. Corresponds to the shader_rip_distortion cvar he:x default is 0, 1 enables source of light. Corresponds to the shader_rip_source cvar
Miscellaneous integration (new in ProzacQW 0.81)
The following tokens control several aspects that doesn't fall into any previous category, for the map in the ProzacQW client:
ml:x 0 to 5 default is 0, enables outlines shader if > 0. Corresponds to the r_outlines cvar and the corresponding r_outlines_width is set on this token value mf:x 0 to undefined, default is 1, to be multiplied to the outlines neighbouring pixels check, acting as a factor for actual width mw:x 0 or 1, if 0, disables water effect caustics for the map md:x 0 or 1, if 0, disables close detail textures for the map mb:x 0 or 1, if 0, disables bloom effects for the map mi:x 0 or greater, sets the bloom intensity for the map, corresponds to the r_bloom_intensity cvar mc:x String in 3 hexadecimal characters, defines the RGB of the outlines, default is "000" (black)
6 - Final practical examples:
You can learn a lot by examining entities data from existing maps, like "frontlin.bsp" or "bluepain.bsp"
Usage of the "worldspawn" entity on current Prozac:
Let's see the "worldspawn" entity of the bluepain.bsp file:
{ "_bounce" "1" "_bouncestyled" "1" "_generator" "J.A.C.K. 1.1.1064 (vpQuake)" "classname" "worldspawn" "has_holo" "5" "light" "46" "mapversion" "220" "message" "Blue Pain\n\nBuilt on 24/12/2021 for PROZAC CustomTF\n" "sounds" "1" "wad" "C:\Old\JACK files\Q.wad;C:\Old\JACK files\textures\prozac.wad" "worldtype" "1" }
The relevant field here regarding this documentation is "has_holo" which is set to "5". That means this map is watervised (1 bit) and it disables spawn guard (4 bit). So 1 + 4 = 5
Let's see the "worldspawn" entity of the frontlin.bsp file:
{ "message" " You are on the FrontLine \n\nUpdated 26/03/2022 for Prozac CuTF\n" "wad" "c:\program files\worldcraft\tex2.wad;c:\program files\worldcraft\redwall.wad" "classname" "worldspawn" "worldtype" "0" "gstuff3" "4" }
The relevant field here regarding this documentation is "gstuff3" which is set to "4". That means this map gives everyone a free detpack whether you pick a stock class or a customized player class. "gstuff3" handles the "free" stuff for pages 7 to 9. And 4 means the 3rd item in that group of pages, which is the detpack.
Usage of the "world_integration" entity examples:
Let's see the "world_integration" entity for the 2mach1.bsp file:
{ "classname" "world_integration" "event" "fr:0.75 fg:0.65 fb:0.9 fn:512 ff:6200 wm:1 wr:32 wg:32 wb:38 sn:grave hm:1 hn:0 ha:0" }
There is fog in this map, the first 3 tokens determine a blue-ish gray for the fog, the 4th and 5th are the distances (near and far) for the fog settings. The following token enables rain, the next 3 determine the color of the rain particles. Then "sn:grave" specifies the skybox name. The next and last 3 enable water shader, set the fresnel effect at 0 (disables it), and the last token disables ripples.
Useful people you may meet in our discord or in-game:
Aberrant (discord nick)/Agent (in-game nick)Probably one of the persons who knows best about map entities in Quake or mapping in general with TF mods, he's also in charge of the MegaTF Mod QuakeC ran in tastyspleen (same box as Prozac's official USA server). When a map is failing to compile or you have a doubt about Quake/TF entities, he's the right man to ask!
Kevin/k3vinMain administrator for the tastyspleen MegaTF and USA Prozac servers. He also knows a lot about mapping, being a person who has converted and modded a lot of maps from other games for Quake1 TF.
PulseczarOwner and developer for the CustomTF 4TP (for the people) server, and code guru. Among other things he has successfully ported all the "Classic" Prozac mod QuakeC into C++ for his server.
DocHe's the person trusted (with server RCON/admin mod access) to moderate the Prozac server. He's also in charge of picking interesting maps for every saturday, and for recording and handling MVD (Multi-View Demo) demos on tastyspleen Prozac.
Ivko/Ivko [cp]Linux guru, although he's not shown interest in Quake programming, pro-grade coder.