Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Editing Map based hacks
From Quake Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 5: | Line 5: | ||
− | '''Map-based hacks''' are non-standard techniques in [[Mapping | mapping]] that allow the customization of [[Entity | entities]] in a map without resorting to [[Modding | modding]]. They are made possible due to the fairly open nature of [[Quake-C]]. The so-called hacks involve the modification, replacment or addition of keys in existing entities to enhance their functionality as well as the creation of completely new ones. While they generally work reliably in [[Vanilla Quake]] ("ID1"), they can cause compatibility problems if the map is run with a [[Mod | mod]], ranging from incorrect appearance to engine crashes, which means they have to be used with caution. | + | '''Map-based hacks''' are non-standard techniques in [[Mapping | mapping]] that allow the customization of [[Entity | entities]] in a map without resorting to [[Modding | modding]]. They are made possible due to the fairly open nature of [[Quake-C]]. The so-called hacks involve the modification, replacment or addition of keys in existing entities to enhance their functionality as well as the creation of completely new ones. While they generally work reliably in [[Vanilla Quake]] ("[[ID1]]"), they can cause compatibility problems if the map is run with a [[Mod | mod]], ranging from incorrect appearance to engine crashes, which means they have to be used with caution. |
==Theory behind the hacks== | ==Theory behind the hacks== | ||
Line 19: | Line 19: | ||
In addition to the spawn function, there are several other possibilities or requirements to further determine the behavior of the new entity and its appearance in the game, such as its [[Model | model]] and [[Sounds | sound effects]]. For many hacks to work, it is important that all of such resources are precached, which require the corresponding standard [[Entity_guide | entities]] to be present in the map alongside the new ones. | In addition to the spawn function, there are several other possibilities or requirements to further determine the behavior of the new entity and its appearance in the game, such as its [[Model | model]] and [[Sounds | sound effects]]. For many hacks to work, it is important that all of such resources are precached, which require the corresponding standard [[Entity_guide | entities]] to be present in the map alongside the new ones. | ||
+ | |||
+ | ==Specific hacks== | ||
==Triggers== | ==Triggers== | ||
===Point-based triggers with custom bounding box=== | ===Point-based triggers with custom bounding box=== | ||
− | While most of the standard [[Entity_guide | triggers]] are by default defined as [[Entity#Overview | brush entities]], it is possible to for them to be used as [[Entity#Overview | point entities]] as well. The difference is that they only work at a single point instead of a larger volume that would otherwise be | + | While most of the standard [[Entity_guide | triggers]] are by default defined as [[Entity#Overview | brush entities]], it is possible to for them to be used as [[Entity#Overview | point entities]] as well. The difference is that they only work at a single [[Origin | point]] instead of a larger volume that would otherwise be defined by the [[Brush | brush]]. They also do not count against the [[Engine_Limits | model limit]]. Among other fields of use, this makes them a good alternative for monster [[Teleport | teleporters]] (the ''silent'' spawnflag must be set), for example. |
− | There are two downsides, however. If set to be shootable, point triggers can only be activated by splash damage. Furthermore, in a normal map environment, touchable point triggers are | + | There are two downsides, however. If set to be shootable, point triggers can only be activated by splash damage. Furthermore, in a normal map environment, touchable point triggers are easily missable by the player. The latter can be worked around as it is possible to assign any precached model to serve as the bounding box of the point trigger. This is achieved by adding a '''model''' field to the trigger which points the corresponding entity, such as an item, a monster, or a brush entity. |
− | For instance, ''"model" "maps/b_bh100.bsp"'' will make the bounding box the size of a [[Megahealth]] (32*32*32 units), ''"model" "progs/shambler.mdl"'' will make it the size of a [[Shambler]] (64*64*96 units). Using any kind of .bsp and .mdl model is the easiest way, but it bears the risk of | + | For instance, ''"model" "maps/b_bh100.bsp"'' will make the bounding box the size of a [[Megahealth]] (32*32*32 units), ''"model" "progs/shambler.mdl"'' will make it the size of a [[Shambler]] (64*64*96 units). Using any kind of .bsp and .mdl model is the easiest way, but it bears the risk of incompatibility to mods that lack the referenced objects or treat them differently, and will likely result in a crash. A safe, but also more complicated way is to reference existing brush models from within the map, e.g. ''"model" "*10"''. This makes placing the such a trigger very tricky, however, because its location has to be determined by the location of the original brush entity in its relation to the map origin (0 0 0). |
Example: | Example: | ||
Line 32: | Line 34: | ||
"target" "t1" | "target" "t1" | ||
"model" "progs/player.mdl"</pre> | "model" "progs/player.mdl"</pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Triggerable explosion=== | ===Triggerable explosion=== | ||
One of the most well known tricks allows the creation of a triggerable explosion using the '''info_notnull''' entity. It is created as follows: | One of the most well known tricks allows the creation of a triggerable explosion using the '''info_notnull''' entity. It is created as follows: |