View source for Map based hacks From Quake Wiki ← Map based hacks You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in the group: Administrators. You can view and copy the source of this page. ==Theory behind the hacks== All map entities have a set of core functions and default keys defined in their corresponding [[Quake-C]] file which determine their behavior. In most cases, these functions are fixed with the classname and cannot be changed. However, there are a few exceptions either due to a difference in terminology used in the map source and in the game code (for instance, the definition of sound effects), or because certain functions remain unused in some entities. Most hacks revolve around creating new versions of existing entities by incorporating their desired functions into an [[info_notnull]] entity, which can be regarded as a blank canvas since it does not have any predefined functions or behavior. Therefore, it is possible to recreate every single map entity in the game as into_notnull. When using this ''wildcard'' entity, it is often essential to set a corresponding field to define its spawn function, how it behaves when triggered or touched. *'''think''' - This function determines the what the entity does automatically after the server starts, or to be more precise, after the amount of time set in its mandatory sub-function ''nextthink''. Depending on which kind of role the info_notnull is meant is fulfill, the think field must contain the spawn function, e.g. ''InitTrigger'', ''PlaceItem'', ''walkmonster_start_go''. *'''use''' - This function determines how the entity reacts when being triggered by another entity, or in some cases when being activated or killed. It can serve as a spawn function for an initially dormant entity, e.g. ''InitTrigger'', ''classname'', or call a subroutine like e.g. ''SUB_UseTargets'', ''SUB_Remove'', ''SUB_regen''. *'''touch''' - This function determines what happens if the entity is touched by another entity, most notably in triggers, e.g. ''multi_touch'', ''hurt_touch'',''SUB_Null''. 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. Return to Map based hacks. Retrieved from "http://quakewiki.org/wiki/Map_based_hacks"