Skip to content

Map Specific Scripts

Blixibon edited this page Jul 18, 2020 · 3 revisions

Mapbase adds a system designed to load certain types of scripts on a map-by-map basis. This is best suited for maps which can't have their own deriving mod with their own script changes. It also allows mappers to easily use scripts previously reserved for more complex modding.

This system was inspired by existing code which loads level-specific soundscripts and soundscapes.


Map-specific scripts are normally loaded by an automatic manifest which searches for specific file names. The types of scripts which could be used with the map-specific file system are listed below.

Type Default File Main Script Description
Actbusy maps/%mapname%_actbusy.txt scripts/actbusy.txt Actbusies are basically unscripted scripted sequences, allowing NPCs to play animations without actually entering an uninterruptible scripted state. See the VDC article for more information.
Response System maps/%mapname%_talker.txt scripts/talker/response_rules.txt The Response System is a complex system which some NPCs use to decide what to say in response to an event, like seeing an enemy. See the VDC article for more information.
Localization maps/%mapname%_%language%.txt resource/%modname%_%language%.txt Localization files contain language-specific text. They can be used in env_hudhint or game_text. Existing localization tokens should not be overridden because changes cannot be reverted on map unload.
Sentences maps/%mapname%_sentences.txt scripts/sentences.txt Sentences are used to create speech out of individual sound files. Unfortunately, sentences are locked behind the engine and custom files cannot appear to be loaded, so map-specific sentences are not actually supported.
Clone this wiki locally