This site is designed to function in a browser that supports web standards.


AN ADVANCED MAP LOGIC MOD
FOR QUAKE 1
ABOUT CPQ
What is CPQ?

CPQ is designed as a suite of utilities that work together to empower map authors with much more in-depth trigger logic than currently available in Quake, thereby immensely expanding the possibilities when it comes to encounters and dynamic map experiences. This is accomplished by allowing for a great many values to be saved, manipulated and leveraged during gameplay, with the goal of emulating how a computing CPU works (hence the name of the mod!) CPQ is designed to be blendable with other Quake mods (though this will require separate releases for each), and does not intend to introduce new weapons, items, monsters or mechanics that may conflict with those.

CPQ is built around a new entity type, the register; similar to how computing CPUs operate, a register holds a numerical value in memory. Then, other entities access that value, and can perform operations on it (addition, multiplication, modulo, etc) and then store the resulting value in the same or other registers. The real power comes from the ability to perform what are called boolean expressions, or checking if something is true or false. Then, from that check, there is strong utility in both where the original value is derived, and how the result is used.

Example

Let's walk through a basic example. (An older version of the same example can be found in the v0.1a Quick Start Tutorial)
In our example, we want the door to open when the player is under 50 health. We have four entities:
  • func_door - a standard Quake brush entity for a door
  • info_register - our primary CPQ entity, a point entity that holds a numerical value
  • trigger_setregister - a CPQ trigger that is targets a register and sets that register to a "sourced" value (from a list of possible sources, including player health), or a "static" value (meaning the value to be set is defined on the trigger itself)
  • trigger_boolexpr - a CPQ trigger that targets a register, checks whether a specific expression is true (such as "is value less than 5" or "is value equal to 0")
Now that we've established our entities, let's look at the steps.
  1. Player walks into the trigger trigger_setregister, which is connected to our info_register. As configured, when triggered trigger_setregister sets the register to whatever the current health value of the player is.
  2. Let's assume the player has 30 health. Thus, trigger_setregister sets info_register to 30.
  3. Now, trigger_setregister subsequently triggers trigger_boolexpr, which is configured to look at the value in the info_register, and if it's less than 50, trigger the func_door. If the value is not less than 50, it's configured to display a standard centerprint message, something akin to "You're not wounded enough!"
  4. The trigger_boolexpr triggers, checks info_register, evaluates that the value inside (30) is less than 50, and then triggers the func_door, which opens and allows the player through.

Further Detail

In addition to setting values into registers, CPQ can also use the values in registers to do things like set health or dynamically change the position of doors and platforms.

Here's a sample of the sort of data CPQ is setup to handle:
Setting Register Values from:Using Register Values to:
  • Entity Position & Distance
  • Player Look at Angle
  • Entity Health, Damage Taken
  • Player Armor, Items, Ammo & Current Weapon
  • And many more!
  • Deal & Heal Damage
  • Give Items, Armor, Armor Mitigation, Ammo
  • Dynamically change door/platform state data such as lip, angle, speed and position
  • Dynamically enable/disable triggers and teleporters
  • Also many more!

CPQ is currently built on vanilla QuakeC, but versions that are woven in with popular platforms such as Arcane Dimensions and/or Copper are also planned.

CPQ was authored by Qalten [Qalten#1019 on Discord, find me in the Quake Mapping Discord!]