MIDIoz Software Prozac QuakeWorld

Special functions (some shared with MegaTF and hipnotic mission pack expansion) present on the Prozac mod regarding maps and client


Are you a map maker/modder and want to know the secrets of the Prozac CustomTF mod? keep reading then...


Features and entities implementation for maps running on the current prozac mod:

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 ("has_holo") field - 2020 some of them deprecated
#define MAPFLAG_WATERVISED  1 // still works, enables watervis on server for the map
#define MAPFLAG_SHOULDRAIN  2 // deprecated in ProzacQW (DO NOT USE)
#define MAPFLAG_SHOULDSNOW  4 // deprecated in ProzacQW (DO NOT USE)
#define MAPFLAG_FOG         8 // deprecated in ProzacQW (DO NOT USE)
#define MAPFLAG_STORM       16 // still works, enables the lightning storm
#define MAPFLAG_EARTHQUAKE  32 // still works, enables the earthquakes
#define MAPFLAG_DAYTIME     64 // still works, enables 10 daylight cycles for the map
#define MAPFLAG_RUNES       128 // still works, enables the runes for the map
#define MAPFLAG_NOCUSTOM    256 // still works, disables custom classes for the map (make sure that's what you want!)
#define MAPFLAG_NOSTOCK     512 // still works, disables stock classes for the map
#define MAPFLAG_NOEXTRAS    1024 // not sure, after search of the code, it may be buggy
#define MAPFLAG_STOCKFREE   2048 // dunno what this even was or was intended to become (DO NOT USE)
#define MAPFLAG_OBSERVER    4096 // works, enables observer movement for the map, when just joined the server
#define MAPFLAG_NOTEAMSCORE 8192 // working in 2021, makes the mod to ignore team score increase in normal player frags
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 flags 2, 4 or 8. They won't do anything. 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. Just ignore the fog and weather ones, which never have been in use.

The key/value pair named "money" in worldspawn too, can be used to set a different-than-default amount of startup money to customize your class in the prozac mod.

You'll notice, that in some maps, a particular team is friendly and, their members, considered teammates of another specific team, or several. That might be set with the "noise1", "noise2", "noise3" and "noise4" key/value pairs on the worldspawn entity too. These are bitflag "teammasks", if, for example team 1 (blue) and team 3 (yellow) should be considered teammates just set both noise1 and noise3 to "5". Why? because every team is handled as a bitflag, and treated as a mask to determine affinity to other teams, so, team 1 (bit 1) + team 3 (bit 4) = 5 value. See more examples later.

Set in the worldspawn entity too, it is possible to disable or give to everyone one weapon or item while running a map in prozac, it will sound complex to do at a first glance, but when understood gives you a lot of control about peculiarities and gameplay of a specific map. First you must know there are 15 class-customizing pages, and this system is based on that to disable/give for free specific items/weapons on a map, it will work for custom classes and stock classes indiferently, for example if you disable the sniper rifle, people won't be able to buy it for their custom class neither the stock sniper will get it. Again it relies on the usage of bitflags. There are 10 fields (5 for disables and 5 for givings) on worldspawn that controls what items are special. These are: dstuff1, dstuff2, dstuff3, dstuff4, and dstuff5 as bit fields for disabling. And gstuff1, gstuff2, gstuff3, gstuff4 and gstuff5 to give them away. Each one of these fields contain a bitfield for 3 pages of the customize menu, which bits correspond to every item to be disabled/given. So dstuff1 corresponds to the first 3 pages, dstuff2 to the next 3 (4 to 6 pages) etc... and the same for gstuffX ones, but for giving instead of disabling/stripping. Every page contains 7 items, and a QuakeC float holds space for 24 integer bits, so it was "rounded" to 21 for each field, making no use of the last 3 bits for every dstuffX/gstuffX.

In the following 2 screenshots you can see the assault cannon and rocket launcher disabled (first) and then the sniper rifle made free:

Assault cannon and rocket launcher disabled Sniper rifle made free
  • test